bills

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
patch/bills/{bill_id}

Request

  • Base URL: https://api.coperniq.io/v1
  • URL: https://api.coperniq.io/v1/bills/{bill_id}
  • Auth: API key in header x-api-key

Path parameters

bill_idinteger required

Bill identifier

Request body

percentagenumber double

Percentage value (PERCENTAGE bills only)

dueDatestring date-time

Due date (ISO 8601 datetime string)

issueDatestring date-time

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

status'SENT' | 'PARTIALLY_PAID' | 'PAID'

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

descriptionstring nullable

Bill description

Response

Bill updated successfully

idinteger required

Bill identifier

billNumberinteger required

Unique bill number

descriptionstring nullable

Bill description

status'DRAFT' | 'SENT' | 'DECLINED' | 'PAID' | 'PARTIALLY_PAID' | 'OVERDUE' required

Bill status

basedOnIdinteger nullable

ID of the record this bill is based on

basedOnUidinteger nullable

UID of the record this bill is based on

dueDatestring date-time

Due date

issueDatestring date-time nullable

Issue date

amountnumber double required

Total bill amount

amountPaidnumber double required

Amount paid

isArchivedboolean

Whether the bill is archived

calculationMethodstring required

Calculation method (LINE_ITEMS or PERCENTAGE)

percentagenumber double nullable

Percentage if calculationMethod is PERCENTAGE

baseAmountnumber double nullable

Base amount if calculationMethod is PERCENTAGE

createdAtstring date-time required

Creation timestamp

updatedAtstring date-time required

Last update timestamp

Changes

No recorded changes to this operation across all 1 revision of this API.