orders

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.

post/api/v1/sales/orders/{order_id}/invoice

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

order_idstring required

The order's id.

Headers

Tightly-Versionstring
Example:2026-11

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.

Idempotency-Keystring
Example:b8f1c0d2-6a4e-4f39-9c21-0d5f2e7a1b44

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

freight_centsinteger

Freight as invoiced, in whole cents.

tax_centsinteger

Tax as invoiced, in whole cents. Tightly calculates none.

terms'net_30' | 'net_60' | 'net_90' | 'due_on_receipt' nullable

The payment terms this invoice carries. Omit it where the account's terms are not on file; the ledger then applies its own standing terms for the contact.

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.