Update Invoice

Update an existing invoice. Supports partial updates. Updatable fields: - `calculationMethod`: Must be "LINE_ITEMS" or "PERCENTAGE" - `lineItems`: Array of line items if calculationMethod is "LINE_ITEMS" - `percentage`: Percentage if calculationMethod is "PERCENTAGE" - `dueDate`: ISO 8601 datetime string - `description`: Invoice description

Authentication

x-api-keystring
API Key authentication via header

Path parameters

invoice_idintegerRequired
Invoice identifier

Request

This endpoint expects an object.
statusenumOptional
Invoice status
lineItemslist of objectsOptional

Flat array of line items (LINE_ITEMS only). May be combined with sections (a catalogItemId may appear only once across both).

sectionslist of objectsOptional

Grouped line items with named sections (LINE_ITEMS only). May be combined with lineItems (ungrouped items).

dueDatestringOptionalformat: "date-time"

Due date (ISO 8601 datetime string)

descriptionstring or nullOptional
Invoice description

Response

Invoice updated successfully
idinteger
Invoice identifier
invoiceNumberinteger
Unique invoice number
statusenum
Invoice status
amountdouble
Total invoice amount
amountPaiddouble
Amount paid
calculationMethodstring

Calculation method (e.g., LINE_ITEMS)

createdAtstringformat: "date-time"
Creation timestamp
updatedAtstringformat: "date-time"
Last update timestamp
descriptionstring or nullOptional
Invoice description
basedOnIdinteger or nullOptional
ID of the record this invoice is based on
basedOnUidinteger or nullOptional
UID of the record this invoice is based on
dueDatestringOptionalformat: "date-time"
Due date
isArchivedbooleanOptional
Whether the invoice is archived
sharedWithPortalbooleanOptional
Whether the invoice is shared with portal
percentagedouble or nullOptional
Percentage if applicable
baseAmountdouble or nullOptional
Base amount if applicable
accountobject or nullOptional
recordobject or nullOptional
lineItemslist of objectsOptional

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error