Update Invoice
Update an existing invoice. Supports partial updates.
Updatable fields:
- `lineItems`: Array of line items if calculationMethod is "LINE_ITEMS"
- `sections`: Grouped line items if calculationMethod is "LINE_ITEMS"
- `percentage`: Percentage if calculationMethod is "PERCENTAGE"
- `issueDate`: ISO 8601 datetime string
- `dueDate`: ISO 8601 datetime string
- `description`: Invoice description
- `status`: Invoice status — one of `DRAFT`, `SENT`, `DECLINED`, `PAID`, `PARTIALLY_PAID`, `OVERDUE`. Only valid transitions from the invoice's current status are accepted (e.g. `DECLINED` is reachable from `DRAFT`, `SENT`, `OVERDUE`, or `PARTIALLY_PAID`); an invalid transition is rejected with a 400.
- `isActive`: Set to `false` to archive the invoice, or `true` to unarchive it. Applied independently of any other fields present in the same request.
`calculationMethod` cannot be changed after creation and is rejected if included.
Authentication
x-api-keystring
API Key authentication via header
Path parameters
invoice_id
Invoice identifier
Request
This endpoint expects an object.
status
Invoice status
lineItems
Flat array of line items (LINE_ITEMS only). May be combined with sections (a catalogItemId may appear only once across both).
sections
Grouped line items with named sections (LINE_ITEMS only). May be combined with lineItems (ungrouped items).
percentage
Percentage (PERCENTAGE invoices only). Cannot be combined with lineItems or sections.
issueDate
Issue date (ISO 8601 datetime string)
dueDate
Due date (ISO 8601 datetime string)
description
Invoice description
isActive
Set to false to archive the invoice, or true to unarchive it. Applied independently of any other fields present in the same request.
Response
Invoice updated successfully
id
Invoice identifier
invoiceNumber
Unique invoice number
status
Invoice status
amount
Total invoice amount
amountPaid
Amount paid
calculationMethod
Calculation method (e.g., LINE_ITEMS)
createdAt
Creation timestamp
updatedAt
Last update timestamp
description
Invoice description
basedOnId
ID of the record this invoice is based on
basedOnUid
UID of the record this invoice is based on
dueDate
Due date
issueDate
Issue date when the invoice has been issued
isArchived
Whether the invoice is archived
percentage
Percentage if applicable
baseAmount
Base amount if applicable
account
record
lineItems
Errors
400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
