Get a sales order
Returns 404 if the ID belongs to a document of a different type (e.g. an invoice ID) — each document type is isolated to its own endpoint.
Required scope: read:sales_orders.
Authentication
JWT issued via POST /api/v1/auth/sign_in. Used by mobile and SPA clients. Revoked tokens are rejected.
Lucanto API key. Two prefixes:
lct_pat_<random><checksum>— personal access token (owner: User)lct_live_<random><checksum>— workspace token, live data
Issue keys at /settings/api_keys (personal) or
/:workspace_id/settings/api_keys (workspace). Plaintext token is
shown once and never again.
Path parameters
Sales order ID. Either the numeric id or the public_id (doc_…).
Response
Stable public identifier of this record. Never changes once assigned.
Its prefix names the entity: doc_ document (invoice, proforma, credit
note, quote, sales order), exp_ expense, cnt_ contact, prj_
project, ba_ bank account or cash register, txn_ transaction,
lon_ loan, bst_ bank statement. Accepted in place of the numeric
id in this resource’s path parameters and in request fields that
reference it (customer_id, bank_account_id, …).
Sales order lifecycle state: draft while it is being entered
or extracted; confirmed once accepted (this is where the
number is minted); fulfilled once every ordered line has been
invoiced — a system transition driven by the fulfilment query,
which also moves it back to confirmed if the invoiced total
drops; rejected when the order was refused; reopened after
a locked order was unlocked for editing; canceled when it was
explicitly retired.
ISO-4217 currency code.
Always null: a sales order is not payable, so no settlement is derived for it (the field is reserved for the shared document shape).
Always null here — non-payable document type.
Always null here — non-payable document type.
Sales order number (formatted via number_series). Null until the order is confirmed.
Tax scheme (UNCL 5153), e.g. “VAT”.
Delivery/carrier mode
Always null here — non-payable document type.
Always null here — non-payable document type.
Origin of the document. null when it was created in Lucanto, in which case totals are Lucanto’s EN 16931 calculation. A non-null value means the document was imported from that system and initially carries the source system’s own figures, preserved verbatim; those may differ by cents from Lucanto’s calculation because systems round VAT at different levels (line vs. category). insight means AI extraction from an uploaded file, not an import from another vendor — on this type that is the normal case, since a customer’s order usually arrives as a PDF. This records provenance only, not which calculation is currently in effect — editing line items or document discounts recomputes totals in Lucanto while leaving import_source set. The enum is kept as the union across resources rather than narrowed, so a legacy row cannot fail validation.
The party identity as it appears on a document. On an ISSUED document this is the identity the document was issued with — a snapshot pinned at issue, which does NOT change when the legal entity is later renamed, re-registered, or moved. A draft follows the entity’s current identity. id is the legal entity’s id and is stable across identity changes, so a stored reference keeps resolving. This matches the PDF and the ISDOC export of the same document. vat_period is not part of this projection — a counterparty’s filing period is not knowable.
The party identity as it appears on a document. On an ISSUED document this is the identity the document was issued with — a snapshot pinned at issue, which does NOT change when the legal entity is later renamed, re-registered, or moved. A draft follows the entity’s current identity. id is the legal entity’s id and is stable across identity changes, so a stored reference keeps resolving. This matches the PDF and the ISDOC export of the same document. vat_period is not part of this projection — a counterparty’s filing period is not knowable.
