Create Invoice
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
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
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.
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.
Per-invoice override of the workspace’s default commission terms.
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 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.
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.

