Credit an invoice and create an editable copy of it

Requires the INVOICE.ONE_OFF.CREATE or INVOICE.CREDIT.CREATE permission.

Authentication

X-API-KEYstring
API Key authentication via header
OR
AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

versionstringRequiredDefaults to 1
version
resourceIdstringRequiredDefaults to
The ID of the resource for which the action is posted.

Headers

x-platform-idstringOptional
Platform ID.

Request

This endpoint expects an object.
update_new_invoice_to_finalboolean or nullOptional
Whether to move the newly created copy invoice to FINAL. Defaults to false, leaving the copy editable.
update_credit_invoice_to_finalboolean or nullOptional
Whether to move the credit invoice to FINAL. Defaults to false, leaving the credit invoice editable.
credit_details_sourceenum or nullOptional
Source of customer and billing entity information on the credit invoice.

Response

OK
original_invoice_idstring
Resource ID of the original invoice that was credited and copied.
credit_invoice_idstring
Resource ID of the created credit invoice.
new_invoice_idstring
Resource ID of the created copy invoice.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
500
Internal Server Error