@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Invoices
@base https://api-m.sandbox.paypal.com
@version 2.6
@auth OAuth2
@endpoints 22
@hint download_for_search
@toc invoicing(22)

@endpoint POST /v2/invoicing/invoices
@desc Create draft invoice
@required {detail: map # The details of the invoice. Includes invoice number, date, payment terms, and audit metadata.}
@optional {id: str # The ID of the invoice., parent_id: str # The parent ID to an invoice that defines the group invoice to which the invoice is related., status: str(DRAFT/SENT/SCHEDULED/PAID/MARKED_AS_PAID/CANCELLED/REFUNDED/PARTIALLY_PAID/PARTIALLY_REFUNDED/MARKED_AS_REFUNDED/UNPAID/PAYMENT_PENDING/AUTO_CANCELLED/PAID_EXTERNAL/REFUNDED_EXTERNAL/SHARED) # The status of the invoice., invoicer: map # The invoicer business information that appears on the invoice., primary_recipients: [map{billing_info: map, shipping_info: map}] # The billing and shipping information. Includes name, email, address, phone and language., additional_recipients: [str(ppaas_common_email_address_v2)] # An array of one or more CC: emails to which notifications are sent. If you omit this parameter, a notification is sent to all CC: email addresses that are part of the invoice.Note: Valid values are email addresses in the `additional_recipients` value associated with the invoice., items: [map{id: str, name!: str, description: str, quantity!: str, unit_amount!: map, tax: map, item_date: str(ppaas_date_notime_v2), discount: map, unit_of_measure: str}] # An array of invoice line item information., configuration: map # The invoice configuration details. Includes partial payment, tip, and tax calculated after discount., amount: map{currency_code: str, value: str, breakdown: map} # The invoice amount summary of item total, discount, tax total, and shipping., due_amount: map{currency_code!: str, value!: str} # The currency and amount for a financial transaction, such as a balance or payment due., gratuity: map{currency_code!: str, value!: str} # The currency and amount for a financial transaction, such as a balance or payment due., payments: map{paid_amount: map, transactions: [map]} # An array of payments registered against the invoice., refunds: map{refund_amount: map, transactions: [map]} # The invoicing refund details. Includes the refund type, date, amount, and method., links: [map{href!: str, rel!: str, method: str}] # An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).}
@returns(201) {id: str, parent_id: str, status: str, detail: map, invoicer: map, primary_recipients: [map], additional_recipients: [str(ppaas_common_email_address_v2)], items: [map], configuration: map, amount: map{currency_code: str, value: str, breakdown: map{item_total: map{currency_code: str, value: str}, discount: map{invoice_discount: map, item_discount: map}, tax_total: map{currency_code: str, value: str}, shipping: map{amount: map, tax: map}, custom: map{label: str, amount: map}}}, due_amount: map{currency_code: str, value: str}, gratuity: map{currency_code: str, value: str}, payments: map{paid_amount: map{currency_code: str, value: str}, transactions: [map]}, refunds: map{refund_amount: map{currency_code: str, value: str}, transactions: [map]}, links: [map]} # A successful request returns the HTTP `201 Created` status code. A JSON response body that shows invoice details is returned if you set prefer=return=representation.
@errors {400: Invalid request., 403: Authorization Error., 422: Unprocessable Entity., 500: An internal server error has occurred.}

@endpoint GET /v2/invoicing/invoices
@desc List invoices
@optional {page: int=1 # The page number to be retrieved, for the list of templates. So, a combination of `page=1` and `page_size=20` returns the first 20 templates. A combination of `page=2` and `page_size=20` returns the next 20 templates., page_size: int=20 # The maximum number of templates to return in the response., total_required: bool=false # Indicates whether the to show total_pages and total_items in the response., fields: str=all # The fields to return in the response. Value is `all` or `none`. To return only the template name, ID, and default attributes, specify `none`.}
@returns(200) {total_pages: int, total_items: int, items: [map], links: [map]} # A successful request returns the HTTP `200 OK` status code and a JSON response body that lists invoices with details.
@errors {400: Invalid request., 403: Authorization Error., 500: An internal server error has occurred.}

@endpoint POST /v2/invoicing/invoices/{invoice_id}/send
@desc Send invoice
@required {invoice_id: str # The ID of the draft invoice to delete.}
@optional {subject: str # The subject of the email that is sent as a notification to the recipient.Note: User-provided values for this field will not be honored and the subject will always be defaulted to a system-defined value., note: str # A note to the payer.Note: User-provided values for this field will not be honored and the note will always be defaulted to a system-defined value., send_to_invoicer: bool=false # Indicates whether to send a copy of the email to the merchant., send_to_recipient: bool=true # Indicates whether to send a copy of the email to the recipient., additional_recipients: [str(ppaas_common_email_address_v2)] # An array of one or more CC: emails to which notifications are sent. If you omit this parameter, a notification is sent to all CC: email addresses that are part of the invoice.Note: Valid values are email addresses in the `additional_recipients` value associated with the invoice.}
@returns(200) {href: str, rel: str, method: str} # A successful request returns the HTTP `200 OK` when the invoice issue date is current date.
@returns(202) {href: str, rel: str, method: str} # The server has accepted the request and will execute it at a later time.
@errors {400: Invalid request., 403: Authorization Error., 404: Resource Not Found., 422: Unprocessable Entity., 500: An internal server error has occurred.}

@endpoint POST /v2/invoicing/invoices/{invoice_id}/remind
@desc Send invoice reminder
@required {invoice_id: str # The ID of the draft invoice to delete.}
@optional {subject: str # The subject of the email that is sent as a notification to the recipient.Note: User-provided values for this field will not be honored and the subject will always be defaulted to a system-defined value., note: str # A note to the payer.Note: User-provided values for this field will not be honored and the note will always be defaulted to a system-defined value., send_to_invoicer: bool=false # Indicates whether to send a copy of the email to the merchant., send_to_recipient: bool=true # Indicates whether to send a copy of the email to the recipient., additional_recipients: [str(ppaas_common_email_address_v2)] # An array of one or more CC: emails to which notifications are sent. If you omit this parameter, a notification is sent to all CC: email addresses that are part of the invoice.Note: Valid values are email addresses in the `additional_recipients` value associated with the invoice.}
@returns(204) A successful request returns the HTTP `204 No Content` status code with no JSON response body.
@errors {400: Invalid request., 403: Authorization Error., 404: Resource Not Found., 422: Unprocessable Entity., 500: An internal server error has occurred.}

@endpoint POST /v2/invoicing/invoices/{invoice_id}/cancel
@desc Cancel sent invoice
@required {invoice_id: str # The ID of the draft invoice to delete.}
@optional {subject: str # The subject of the email that is sent as a notification to the recipient.Note: User-provided values for this field will not be honored and the subject will always be defaulted to a system-defined value., note: str # A note to the payer.Note: User-provided values for this field will not be honored and the note will always be defaulted to a system-defined value., send_to_invoicer: bool=false # Indicates whether to send a copy of the email to the merchant., send_to_recipient: bool=true # Indicates whether to send a copy of the email to the recipient., additional_recipients: [str(ppaas_common_email_address_v2)] # An array of one or more CC: emails to which notifications are sent. If you omit this parameter, a notification is sent to all CC: email addresses that are part of the invoice.Note: Valid values are email addresses in the `additional_recipients` value associated with the invoice.}
@returns(204) A successful request returns the HTTP `204 No Content` status code with no JSON response body.
@errors {400: Invalid request., 403: Authorization Error., 404: Resource Not Found., 422: Unprocessable Entity., 500: An internal server error has occurred.}

@endpoint POST /v2/invoicing/invoices/{invoice_id}/payments
@desc Record payment for invoice
@required {invoice_id: str # The ID of the draft invoice to delete., method: str(BANK_TRANSFER/CASH/CHECK/CREDIT_CARD/DEBIT_CARD/PAYPAL/WIRE_TRANSFER/OTHER) # The payment mode or method through which the invoicer can accept the payments.}
@optional {type: str(PAYPAL/EXTERNAL) # The payment type. Can be PayPal or an external payment. Includes cash or a check., payment_id: str # The ID for a PayPal payment transaction. Required for the `PAYPAL` payment type., payment_date: str(ppaas_date_notime_v2) # The stand-alone date, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). To represent special legal values, such as a date of birth, you should use dates with no associated time or time-zone data. Whenever possible, use the standard `date_time` type. This regular expression does not validate all dates. For example, February 31 is valid and nothing is known about leap years., note: str # A note associated with an external cash or check payment., amount: map{currency_code!: str, value!: str} # The currency and amount for a financial transaction, such as a balance or payment due., shipping_info: map # The contact information of the user. Includes name and address.}
@returns(200) {payment_id: str} # A successful request returns the HTTP `200 Created` status code and a reference to the recorded payment.
@errors {400: Invalid request., 403: Authorization Error., 404: Resource Not Found., 422: Unprocessable Entity., 500: An internal server error has occurred.}

@endpoint DELETE /v2/invoicing/invoices/{invoice_id}/payments/{transaction_id}
@desc Delete external payment
@required {invoice_id: str # The ID of the draft invoice to delete., transaction_id: str # The ID of the external refund transaction to delete.}
@returns(204) A successful request returns the HTTP `204 No Content` status code with no JSON response body.
@errors {400: Invalid request., 403: Authorization Error., 404: Resource Not Found., 422: Unprocessable Entity., 500: An internal server error has occurred.}

@endpoint POST /v2/invoicing/invoices/{invoice_id}/refunds
@desc Record refund for invoice
@required {invoice_id: str # The ID of the draft invoice to delete., method: str(BANK_TRANSFER/CASH/CHECK/CREDIT_CARD/DEBIT_CARD/PAYPAL/WIRE_TRANSFER/OTHER) # The payment mode or method through which the invoicer can accept the payments.}
@optional {type: str(PAYPAL/EXTERNAL) # The payment type. Can be PayPal or an external payment. Includes cash or a check., refund_id: str # The ID for a PayPal payment transaction. Required for the `PAYPAL` payment type., refund_date: str(ppaas_date_notime_v2) # The stand-alone date, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). To represent special legal values, such as a date of birth, you should use dates with no associated time or time-zone data. Whenever possible, use the standard `date_time` type. This regular expression does not validate all dates. For example, February 31 is valid and nothing is known about leap years., amount: map{currency_code!: str, value!: str} # The currency and amount for a financial transaction, such as a balance or payment due.}
@returns(200) {refund_id: str} # A successful request returns the HTTP `200 Created` status code and a reference to the recorded refund.
@errors {400: Invalid request., 403: Authorization Error., 404: Resource Not Found., 422: Unprocessable Entity., 500: An internal server error has occurred.}

@endpoint DELETE /v2/invoicing/invoices/{invoice_id}/refunds/{transaction_id}
@desc Delete external refund
@required {invoice_id: str # The ID of the draft invoice to delete., transaction_id: str # The ID of the external refund transaction to delete.}
@returns(204) A successful request returns the HTTP `204 No Content` status code with no JSON response body.
@errors {400: Invalid request., 403: Authorization Error., 404: Resource Not Found., 500: An internal server error has occurred.}

@endpoint POST /v2/invoicing/invoices/{invoice_id}/generate-qr-code
@desc Generate QR code
@required {invoice_id: str # The ID of the draft invoice to delete.}
@optional {width: int=500 # The width, in pixels, of the QR code image. Value is from `150` to `500`., height: int=500 # The height, in pixels, of the QR code image. Value is from `150` to `500`., action: str=pay # The type of URL for which to generate a QR code. Valid values are `pay` and `details`.}
@returns(200) A successful request returns the HTTP `200 OK` status code and a JSON response body that shows the QR code as a PNG image.
@errors {400: Invalid request., 403: Authorization Error., 404: Resource Not Found., 500: An internal server error has occurred.}

@endpoint POST /v2/invoicing/generate-next-invoice-number
@desc Generate invoice number
@optional {fetch_id: bool=false # Optional to decide the number or ID.}
@returns(200) {invoice_number: str, invoice_id: str} # A successful request returns the HTTP `200 OK` status code and a JSON response body that shows the next invoice number.
@errors {400: Invalid request., 403: Authorization Error., 500: An internal server error has occurred.}

@endpoint GET /v2/invoicing/invoices/{invoice_id}
@desc Show invoice details
@required {invoice_id: str # The ID of the draft invoice to delete.}
@returns(200) {id: str, parent_id: str, status: str, detail: map, invoicer: map, primary_recipients: [map], additional_recipients: [str(ppaas_common_email_address_v2)], items: [map], configuration: map, amount: map{currency_code: str, value: str, breakdown: map{item_total: map{currency_code: str, value: str}, discount: map{invoice_discount: map, item_discount: map}, tax_total: map{currency_code: str, value: str}, shipping: map{amount: map, tax: map}, custom: map{label: str, amount: map}}}, due_amount: map{currency_code: str, value: str}, gratuity: map{currency_code: str, value: str}, payments: map{paid_amount: map{currency_code: str, value: str}, transactions: [map]}, refunds: map{refund_amount: map{currency_code: str, value: str}, transactions: [map]}, links: [map]} # A successful request returns the HTTP `200 OK` status code and a JSON response body that shows invoice details.
@errors {400: Invalid request., 403: Authorization Error., 404: Resource Not Found., 500: An internal server error has occurred.}

@endpoint PUT /v2/invoicing/invoices/{invoice_id}
@desc Fully update invoice
@required {invoice_id: str # The ID of the draft invoice to delete., detail: map # The details of the invoice. Includes invoice number, date, payment terms, and audit metadata.}
@optional {send_to_recipient: bool=true # Indicates whether to send the invoice update notification to the recipient., send_to_invoicer: bool=true # Indicates whether to send the invoice update notification to the merchant., id: str # The ID of the invoice., parent_id: str # The parent ID to an invoice that defines the group invoice to which the invoice is related., status: str(DRAFT/SENT/SCHEDULED/PAID/MARKED_AS_PAID/CANCELLED/REFUNDED/PARTIALLY_PAID/PARTIALLY_REFUNDED/MARKED_AS_REFUNDED/UNPAID/PAYMENT_PENDING/AUTO_CANCELLED/PAID_EXTERNAL/REFUNDED_EXTERNAL/SHARED) # The status of the invoice., invoicer: map # The invoicer business information that appears on the invoice., primary_recipients: [map{billing_info: map, shipping_info: map}] # The billing and shipping information. Includes name, email, address, phone and language., additional_recipients: [str(ppaas_common_email_address_v2)] # An array of one or more CC: emails to which notifications are sent. If you omit this parameter, a notification is sent to all CC: email addresses that are part of the invoice.Note: Valid values are email addresses in the `additional_recipients` value associated with the invoice., items: [map{id: str, name!: str, description: str, quantity!: str, unit_amount!: map, tax: map, item_date: str(ppaas_date_notime_v2), discount: map, unit_of_measure: str}] # An array of invoice line item information., configuration: map # The invoice configuration details. Includes partial payment, tip, and tax calculated after discount., amount: map{currency_code: str, value: str, breakdown: map} # The invoice amount summary of item total, discount, tax total, and shipping., due_amount: map{currency_code!: str, value!: str} # The currency and amount for a financial transaction, such as a balance or payment due., gratuity: map{currency_code!: str, value!: str} # The currency and amount for a financial transaction, such as a balance or payment due., payments: map{paid_amount: map, transactions: [map]} # An array of payments registered against the invoice., refunds: map{refund_amount: map, transactions: [map]} # The invoicing refund details. Includes the refund type, date, amount, and method., links: [map{href!: str, rel!: str, method: str}] # An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).}
@returns(200) {id: str, parent_id: str, status: str, detail: map, invoicer: map, primary_recipients: [map], additional_recipients: [str(ppaas_common_email_address_v2)], items: [map], configuration: map, amount: map{currency_code: str, value: str, breakdown: map{item_total: map{currency_code: str, value: str}, discount: map{invoice_discount: map, item_discount: map}, tax_total: map{currency_code: str, value: str}, shipping: map{amount: map, tax: map}, custom: map{label: str, amount: map}}}, due_amount: map{currency_code: str, value: str}, gratuity: map{currency_code: str, value: str}, payments: map{paid_amount: map{currency_code: str, value: str}, transactions: [map]}, refunds: map{refund_amount: map{currency_code: str, value: str}, transactions: [map]}, links: [map]} # A successful request returns the HTTP `200 OK` status code. A JSON response body that shows invoice details is returned if you set prefer=return=representation.
@errors {400: Invalid request., 403: Authorization Error., 404: Resource Not Found., 422: Unprocessable Entity., 500: An internal server error has occurred.}

@endpoint DELETE /v2/invoicing/invoices/{invoice_id}
@desc Delete invoice
@required {invoice_id: str # The ID of the draft invoice to delete.}
@returns(204) A successful request returns the HTTP `204 No Content` status code with no JSON response body.
@errors {400: Invalid request., 403: Authorization Error., 404: Resource Not Found., 500: An internal server error has occurred.}

@endpoint POST /v2/invoicing/search-invoices
@desc Search for invoices
@optional {page: int=1 # The page number to be retrieved, for the list of templates. So, a combination of `page=1` and `page_size=20` returns the first 20 templates. A combination of `page=2` and `page_size=20` returns the next 20 templates., page_size: int=20 # The maximum number of templates to return in the response., total_required: bool=false # Indicates whether the to show total_pages and total_items in the response., recipient_email: str # Filters the search by the email address., recipient_first_name: str # Filters the search by the recipient first name., recipient_last_name: str # Filters the search by the recipient last name., recipient_business_name: str # Filters the search by the recipient business name., invoice_number: str # Filters the search by the invoice number., status: [str] # An array of status values., reference: str # The reference data. Includes a Purchase Order (PO) number., currency_code: str # The [three-character ISO-4217 currency code](/api/rest/reference/currency-codes/) that identifies the currency., memo: str # A private bookkeeping memo for the user., total_amount_range: map{lower_amount!: map, upper_amount!: map} # The amount range., invoice_date_range: map{start!: str(ppaas_date_notime_v2), end!: str(ppaas_date_notime_v2)} # The date range. Filters invoices by creation date, invoice date, due date, and payment date., due_date_range: map{start!: str(ppaas_date_notime_v2), end!: str(ppaas_date_notime_v2)} # The date range. Filters invoices by creation date, invoice date, due date, and payment date., payment_date_range: map{start!: str(ppaas_date_time_v3), end!: str(ppaas_date_time_v3)} # The date and time range. Filters invoices by creation date, invoice date, due date, and payment date., creation_date_range: map{start!: str(ppaas_date_time_v3), end!: str(ppaas_date_time_v3)} # The date and time range. Filters invoices by creation date, invoice date, due date, and payment date., archived: bool # Indicates whether to list merchant-archived invoices in the response. Value is:true. Response lists only merchant-archived invoices.false. Response lists only unarchived invoices.null. Response lists all invoices., fields: [str] # A CSV file of fields to return for the user, if available. Because the invoice object can be very large, field filtering is required. Valid collection fields are items, payments, refunds, additional_recipients_info, and attachments.}
@returns(200) {total_pages: int, total_items: int, items: [map], links: [map]} # A successful request returns the HTTP `200 OK` status code and a JSON response body that lists the invoices that match the search criteria.
@errors {400: Invalid request., 403: Authorization Error., 500: An internal server error has occurred.}

@endpoint GET /v2/invoicing/templates
@desc List templates
@optional {fields: str=all # The fields to return in the response. Value is `all` or `none`. To return only the template name, ID, and default attributes, specify `none`., page: int=1 # The page number to be retrieved, for the list of templates. So, a combination of `page=1` and `page_size=20` returns the first 20 templates. A combination of `page=2` and `page_size=20` returns the next 20 templates., page_size: int=20 # The maximum number of templates to return in the response.}
@returns(200) {addresses: [map], emails: str(ppaas_common_email_address_v2), phones: [map], templates: [map], links: [map]} # A successful request returns the HTTP `200 OK` status code and a JSON response body that lists invoices.
@errors {400: Invalid request., 403: Authorization Error., 500: An internal server error has occurred.}

@endpoint POST /v2/invoicing/templates
@desc Create template
@optional {id: str # The ID of the template., name: str # The template name.Note: The template name must be unique., default_template: bool # Indicates whether this template is the default template. A invoicer can have one default template., template_info: map{detail: map, invoicer: map, primary_recipients: [map], additional_recipients: [str(ppaas_common_email_address_v2)], items: [map], configuration: map, amount: map, due_amount: map} # The template details. Includes invoicer business information, invoice recipients, items, and configuration., settings: map{template_item_settings: [map], template_subtotal_settings: [map]} # The template settings. Sets a template as the default template or edit template., unit_of_measure: str(QUANTITY/HOURS/AMOUNT) # The unit of measure for the invoiced item., standard_template: bool # Indicates whether this template is a invoicer-created custom template. The system generates non-custom templates., links: [map{href!: str, rel!: str, method: str}] # An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).}
@returns(201) {id: str, name: str, default_template: bool, template_info: map{detail: map, invoicer: map, primary_recipients: [map], additional_recipients: [str(ppaas_common_email_address_v2)], items: [map], configuration: map{tax_calculated_after_discount: bool, tax_inclusive: bool, allow_tip: bool, partial_payment: map{allow_partial_payment: bool, minimum_amount_due: map}, has_conditional_rule: bool}, amount: map{currency_code: str, value: str, breakdown: map{item_total: map, discount: map, tax_total: map, shipping: map, custom: map}}, due_amount: map{currency_code: str, value: str}}, settings: map{template_item_settings: [map], template_subtotal_settings: [map]}, unit_of_measure: str, standard_template: bool, links: [map]} # A successful request returns the HTTP `201 Created` status code. A JSON response body that shows template details is returned if you set prefer=return=representation.
@errors {400: Invalid request., 403: Authorization Error., 422: Unprocessable Entity., 500: An internal server error has occurred.}

@endpoint GET /v2/invoicing/templates/{template_id}
@desc Show template details
@required {template_id: str # The ID of the template to delete.}
@returns(200) {id: str, name: str, default_template: bool, template_info: map{detail: map, invoicer: map, primary_recipients: [map], additional_recipients: [str(ppaas_common_email_address_v2)], items: [map], configuration: map{tax_calculated_after_discount: bool, tax_inclusive: bool, allow_tip: bool, partial_payment: map{allow_partial_payment: bool, minimum_amount_due: map}, has_conditional_rule: bool}, amount: map{currency_code: str, value: str, breakdown: map{item_total: map, discount: map, tax_total: map, shipping: map, custom: map}}, due_amount: map{currency_code: str, value: str}}, settings: map{template_item_settings: [map], template_subtotal_settings: [map]}, unit_of_measure: str, standard_template: bool, links: [map]} # A successful request returns the HTTP `200 OK` status code and a JSON response body that shows template details.
@errors {403: Authorization Error., 404: Resource Not Found., 500: An internal server error has occurred.}

@endpoint PUT /v2/invoicing/templates/{template_id}
@desc Fully update template
@required {template_id: str # The ID of the template to delete.}
@optional {id: str # The ID of the template., name: str # The template name.Note: The template name must be unique., default_template: bool # Indicates whether this template is the default template. A invoicer can have one default template., template_info: map{detail: map, invoicer: map, primary_recipients: [map], additional_recipients: [str(ppaas_common_email_address_v2)], items: [map], configuration: map, amount: map, due_amount: map} # The template details. Includes invoicer business information, invoice recipients, items, and configuration., settings: map{template_item_settings: [map], template_subtotal_settings: [map]} # The template settings. Sets a template as the default template or edit template., unit_of_measure: str(QUANTITY/HOURS/AMOUNT) # The unit of measure for the invoiced item., standard_template: bool # Indicates whether this template is a invoicer-created custom template. The system generates non-custom templates., links: [map{href!: str, rel!: str, method: str}] # An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).}
@returns(200) {id: str, name: str, default_template: bool, template_info: map{detail: map, invoicer: map, primary_recipients: [map], additional_recipients: [str(ppaas_common_email_address_v2)], items: [map], configuration: map{tax_calculated_after_discount: bool, tax_inclusive: bool, allow_tip: bool, partial_payment: map{allow_partial_payment: bool, minimum_amount_due: map}, has_conditional_rule: bool}, amount: map{currency_code: str, value: str, breakdown: map{item_total: map, discount: map, tax_total: map, shipping: map, custom: map}}, due_amount: map{currency_code: str, value: str}}, settings: map{template_item_settings: [map], template_subtotal_settings: [map]}, unit_of_measure: str, standard_template: bool, links: [map]} # A successful request returns the HTTP `200 OK` status code. A JSON response body that shows template details is returned if you set prefer=return=representation.
@errors {400: Invalid request., 403: Authorization Error., 404: Resource Not Found., 500: An internal server error has occurred.}

@endpoint DELETE /v2/invoicing/templates/{template_id}
@desc Delete template
@required {template_id: str # The ID of the template to delete.}
@returns(204) A successful request returns the HTTP `204 No Content` status code with no JSON response body.
@errors {403: Authorization Error., 404: Resource Not Found., 500: An internal server error has occurred.}

@endpoint GET /v2/invoicing/accounting-sync/merchant/connections
@desc List Connections.
@returns(200) {connections: [map]} # A successful request returns the HTTP `200 OK` status code and a JSON response body.
@errors {400: Invalid request., 403: Authorization Error., 404: Resource Not Found., 500: An internal server error has occurred.}

@endpoint GET /v2/invoicing/accounting-sync/invoices/{id}/connections
@desc List Connection Status for an Invoice.
@required {id: str # The invoice id of the account.}
@returns(200) {id: str, connection_status: [map]} # A successful request returns the HTTP `200 OK` status code and a JSON response body.
@errors {400: Invalid request., 403: Authorization Error., 404: Resource Not Found., 500: An internal server error has occurred.}

@end
