invoice a sales order
Raises the account's invoice for the quantities that were actually fulfilled, at the price the order was agreed at, and sends it as an 810 where the account takes one. It is also posted to Xero or QuickBooks as a receivable where a ledger is connected. Tax and freight are figures you send; Tightly never calculates either.
Three states are served apart: the document's own, what the books did (ledger.state, null where no ledger is connected) and what the network did with the 810 (edi.state, null where the account takes none). Neither the ledger nor the network can fail the invoice.
Call it after the goods have shipped. Do not call it to invoice what was ordered rather than what shipped, and do not call it twice: one live invoice stands per order, and the second call names the one that stands.
Scope: orders:write, which includes orders:read.
Request
- Base URL: https://api.app.tightly.io
- URL: https://api.app.tightly.io/api/v1/sales/orders/{order_id}/invoice
- Auth: HTTP bearer
Path parameters
The order's id.
Headers
The date train to answer on. One train exists today, 2026-11, the one this reference describes and the one every key is minted on, so the call answers on it with or without this header. Send it anyway, so a client built now names its train from the start.
A string of your own, up to 255 characters, that makes this write safe to retry. Send the same key twice and the second request is answered with the first one's status and body instead of writing again, so a client that retried after a timeout ends holding the record's id rather than creating a second one. Reusing a key with a different body, or while the first request is still running, is refused 409. A write that failed releases its key. Keys answer for 24 hours and belong to the API key that used them. A key longer than 255 characters is ignored and the write goes ahead without the guarantee.
Request body
Response
The invoice, as GET /api/v1/sales/invoices/{invoice_id} serves it.
Changes
No recorded changes to this operation across all 1 revision of this API.