Skip to navigation

Create Invoice

View as Markdown

Creates an invoice. items is required. allow_post is optional; when true, the invoice is posted immediately after creation (the workspace must have allow_create_and_post enabled, otherwise the request is rejected with 400). Send payment_term_id to put the invoice on a payment term, or due_date for a fixed date; the term wins when both are sent. With neither, the customer’s default term is used, then the workspace default term, then the workspace’s default due days.

Requires the can_create_sales_invoice permission on the key owner’s role.

Keys: secret key only.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

identitystring
The identity for the active workspace.

Request

This endpoint expects an object.
customer_idstringRequiredformat: "uuid"
invoice_datedatetimeRequired

Must include exactly 3 fractional-second digits, e.g. 2025-12-29T18:00:00.000Z. Timestamps with no fractional seconds, or with a different digit count (e.g. microseconds), are rejected.

itemslist of objectsRequired
exchange_ratedoubleOptional
debit_account_idstringOptionalformat: "uuid"
sales_personnel_idstringOptionalformat: "uuid"

Sales personnel to credit for this invoice. Accepts either a ProfileSalesPersonnel id or a Contact id; if a Contact id is given and no sales-personnel record is linked to it yet, one is created automatically.

commissionobjectOptional

Per-invoice override of the workspace’s default commission terms.

order_idstringOptional
subjectstringOptional
due_datedatetimeOptional

Must include exactly 3 fractional-second digits, e.g. 2025-12-29T18:00:00.000Z. Timestamps with no fractional seconds, or with a different digit count (e.g. microseconds), are rejected.

payment_term_idstringOptionalformat: "uuid"

Payment term to apply. Takes precedence over due_date. The document’s due dates and any early-payment discount are worked out from the term and returned in payment_schedule.

reverse_chargebooleanOptional
adjustmentslist of objectsOptional
allow_postbooleanOptional
incentivesobjectOptional

Promotions and loyalty points to apply. Send only what to apply; the server calculates every amount. Discounts are subtracted from the invoice total and allocated across the eligible lines.

Response

Created
dataobject
statusboolean
messagestring

Errors

401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error