Create invoice

Creates a draft sales invoice in the credential-bound company; approving it (invoice.approve) is a separate action that numbers it and posts it to the ledger. Each line names the income account it posts to by account_id (the chart-of-accounts id from the chart of accounts list: use it when the account has no code) or by account_code; when both are sent they must name the same account. An account_id that is not an active income account of the company is refused with 422 invoice_line_account_unavailable, naming the line in error.fields. A draft may be saved with a line that has no account, but approval refuses it with invoice_line_account_missing until the line has one. Omit number for a new invoice; for an invoice already issued in another system pass its original number in number, never in reference (see the Invoice numbering guide). Send an optional Idempotency-Key to replay the stored response safely for 24 hours. Requires the invoices:write OAuth scope; the legacy approve: true flag also needs invoices:action. A foreign-currency document whose ECB exchange rate cannot be read in time is refused with 503 exchange_rate_unavailable (error.fields.currency and error.fields.date name the lookup, error.retryable is true) and a Retry-After: 30 header; nothing is written, so retry the same request, with the same Idempotency-Key, after that many seconds.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Fields accepted to create invoice. The schema identifies required and optional values.

uuid
required

A customer owned by an integration is refused.

date
required
uuid
required
string
enum
required
Allowed:
date | null
date | null
string | null
string | null
string | null
uuid | null
uuid | null

Ships from; the main warehouse when empty.

date | null
date | null
string | null
enum
Allowed:
boolean | null
boolean | null
integer | null
≥ 0
number | null
0 to 100
boolean | null

Frozen REST compatibility: approve=true remains available to
existing clients, but the controller applies the action scope,
update permission and update-plan checks before any write. The
canonical MCP tool explicitly disallows this legacy shim.

string | null

Only for an invoice issued in another system: its original
number, never in reference; omit it for a new invoice. A number
in use is refused (invoice_number_taken); it cannot be changed
later. No . or .. path segment, no control or invisible character.

exchange_rate
object
line_items
array of objects
required
length ≥ 1
line_items*
Headers
string
length ≤ 191

Optional unique key whose request hash and terminal response are stored durably for 24 hours.

Responses

Language
Credentials
OAuth2
Missing 1 required scope
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
*/*