Invoices
Create an invoice
POST/invoices
Creates an invoice. It is saved as a draft unless you set finalize: true to assign an invoice number, or send: true to finalize it and email the customer in the same request.
Headers
Idempotency-Keystring · max 255required
Client-generated key that identifies one write for 24 hours. Reuse it only when retrying the same method, path, query, and body.
Body
customerIdstring · uuidrequired
currencyCodestring
lineItemsarray of objectsrequired
issueDatestring · date
dueDatestring · date
validUntilstring · date
Quotes only.
poNumberstring
notesstring
termsstring
finalizebooleandefault false
If true, finalize on create (assign invoiceNumber).
sendbooleandefault false
If true, email the customer on create (implies finalize).
sendToarray of strings
Recipients when send is true; defaults to the customer.
sendMessagestring
Optional message body when send is true.
Responses
201
Created. Created.
status reflects whether it was finalized/sent.400
Bad request. Malformed request.
401
Unauthorized. Missing, invalid, revoked, or expired API key.
403
Forbidden. The API key lacks a required scope or the creator lacks a required permission.
409
Conflict. A matching request with this Idempotency-Key is still in progress. Retry after one second.
422
Unprocessable content. This Idempotency-Key was already used for a different request.
429
Too many requests. Rate limit exceeded.