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

billIdintegerRequired
Bill identifier

Request

This endpoint expects an object.
lineItemslist of objectsOptional

Line items (LINE_ITEMS bills only)

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.

Allowed values:
descriptionstring or nullOptional
Bill description

Response

Bill updated successfully
idinteger
Bill identifier
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
billNumberinteger
Unique bill number
descriptionstring or null
Bill description
typeenum or null
Document type
Allowed values:
basedOnIdinteger or null
ID of the record this bill is based on
basedOnUidinteger or null
UID of the record this bill is based on
dueDatestringformat: "date-time"
Due date
issueDatestring or nullformat: "date-time"
Issue date
isArchivedboolean
Whether the bill is archived
percentagedouble or null
Percentage if calculationMethod is PERCENTAGE
baseAmountdouble or null
Base amount if calculationMethod is PERCENTAGE
accountobject or null
recordobject or null
lineItemslist of objects

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error