Skip to article

REST

Invoices

Issue, retrieve and void invoices.

Invoices are immutable once issued; a correction is a credit note, never an edit. This page is a placeholder for the invoice endpoints.

Retrieve an invoice#

GET/v1/invoices/{id}

Returns one invoice with its line items and payments.

FieldTypeNotes
idstringInvoice id
statusstringdraft, open, paid, void
amountDuestringDecimal string, never a float
lineItemsobject[]Ordered line items

Issue an invoice#

POST/v1/invoices/{id}/issue

Finalises a draft invoice and assigns its number.

curl -X POST -H "Authorization: Bearer $VERLIX_API_KEY" \
  https://api.verlix.example/v1/invoices/inv_01H.../issue

Numbers are assigned on issue

A draft has no invoice number. The number is assigned atomically when the invoice is issued, so two drafts never collide.

Void an invoice#

POST/v1/invoices/{id}/void

Voids an open invoice. A paid invoice must be credited instead.

FieldTypeNotes
reasonstringRequired; stored on the audit trail

Money is a string#

Amounts are decimal strings such as "1250.00". Parse them with a decimal library, never with parseFloat, or a rounding error will eventually move a cent.