Update Bill

Update an existing bill. 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 - `issueDate`: ISO 8601 datetime string - `description`: Bill description - `status`: Bill status

Authentication

x-api-keystring
API Key authentication via header

Path parameters

bill_idintegerRequired
Bill identifier

Request

This endpoint expects an object.
lineItemslist of objectsOptional

Flat array of line items (LINE_ITEMS bills 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 bills only). May be combined with lineItems (ungrouped items).

percentagedoubleOptional0-100

Percentage value (PERCENTAGE bills only)

dueDatestringOptionalformat: "date-time"

Due date (ISO 8601 datetime string)

issueDatestringOptionalformat: "date-time"

Issue date (LINE_ITEMS bills only). When provided, status must also be provided and must not be DRAFT.

statusenumOptional

Bill status (LINE_ITEMS bills only). Only valid when issueDate is also provided.

descriptionstring or nullOptional
Bill description

Response

Bill updated successfully
idinteger
Bill identifier
billNumberinteger
Unique bill number
statusenum
Bill status
amountdouble
Total bill amount
amountPaiddouble
Amount paid
calculationMethodstring

Calculation method (LINE_ITEMS or PERCENTAGE)

createdAtstringformat: "date-time"
Creation timestamp
updatedAtstringformat: "date-time"
Last update timestamp
descriptionstring or nullOptional
Bill description
basedOnIdinteger or nullOptional
ID of the record this bill is based on
basedOnUidinteger or nullOptional
UID of the record this bill is based on
dueDatestringOptionalformat: "date-time"
Due date
issueDatestring or nullOptionalformat: "date-time"
Issue date
isArchivedbooleanOptional
Whether the bill is archived
percentagedouble or nullOptional
Percentage if calculationMethod is PERCENTAGE
baseAmountdouble or nullOptional
Base amount if calculationMethod is PERCENTAGE
accountobject or nullOptional
recordobject or nullOptional
lineItemslist of objectsOptional

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error