List sales orders
query Parameters
limitcursorupdated_sinceISO 8601 timestamp — return records modified on or after this time
created_afterISO 8601 timestamp — orders created on or after this time
statusreference_numberexpandComma-separated expansions, e.g. line_items
Headers
AuthorizationThe Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.
List sales orders › Responses
Sales orders
next_cursorCreate a sales order
Validates and queues a sales order for asynchronous processing. Request bodies are limited to 1 MiB. The request may contain at most 50 line items; each SKU is limited to 100 characters, and quote_number is limited to 50 characters.
Poll the URL returned in data._links.self after creation. 202 Accepted means the submission is queued, not that the order was successfully created. A queued submission is available through GET with its queue-derived status. GET returns 200 OK whenever the record is found, including pending or failed processing. 404 means not found or inaccessible; it does not mean “still processing.”
Always inspect data.queue_error, even when data.status is a normal order status such as confirmed. Canonical order statuses remain unchanged. queue_error is omitted when the queue is not failed; its absence alone does not establish successful creation.
Display queue_error.message and any optional queue_error.skus. Unknown or unresolved item IDs are never returned. Known validation messages cover inactive items, phone number length, attention length, and attachment filename length. Other errors use safe generic wording.
| Public code | Meaning |
|---|---|
ORDER_CREATE_FAILED | Order creation failed |
ORDER_ATTACHMENT_FAILED | Attachment processing failed; the order may already exist |
ORDER_PROCESSING_FAILED | Unrecognized processing failure; contact support |
Compatibility change: queue_result_code now contains one of these public failure codes, duplicate, or null, rather than raw worker codes.
Example failed-processing fields, returned alongside existing order details with HTTP 200:
Code
Do not automatically resubmit attachment failures or ambiguous processing failures. Direct users to support; an order may already exist.
For POST /v1/sales-orders, send an Idempotency-Key (1–255 characters), scoped to your tenant.
- Replay an ambiguous request: If the POST response is lost or a timeout leaves acceptance uncertain, replay the identical body with the same key. This does not retry failed processing. Once accepted, poll
data._links.self. - Submit a corrected order: A corrected creation submission requires a new key. Changing the payload while reusing the original key returns
409. A new key permits a new submission; consumer duplicate handling must make that submission safe. - Attachment or ambiguous processing failures: Do not automatically resubmit
ORDER_ATTACHMENT_FAILEDorORDER_PROCESSING_FAILED, including with a new key. Direct users to support because an order may already exist.
Do not assume other write endpoints are idempotent or automatically retry account/key creation.
Headers
AuthorizationThe Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.
Idempotency-KeyTenant-scoped replay key. Replay an ambiguous POST with the same key and identical body. A corrected submission requires a new key and safe consumer duplicate handling. Reusing the original key does not retry failed processing; changing its payload returns 409.
Create a sales order › Request Body
po_numberPurchase order reference number.
quote_number^DV-[QD]\d+$Optional quote or deal reference number, maximum 50 characters. Must match the pattern DV-Q12345 or DV-D12345. Trimmed before validation; stored as null if omitted.
notescontact_emailOptional buyer contact email persisted on the queued order. Validated for email format and length only; the mailbox is not verified.
Create a sales order › Responses
Accepted and queued for processing; order creation has not yet succeeded. Poll data._links.self.
List invoices for a sales order
Returns invoices linked to a sales order, resolved by the order's public ID.
path Parameters
idHeaders
AuthorizationThe Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.
List invoices for a sales order › Responses
Invoices linked to the sales order
List shipments for a sales order
Returns shipments linked to a sales order, resolved by the order's public ID.
path Parameters
idHeaders
AuthorizationThe Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.
List shipments for a sales order › Responses
Shipments linked to the sales order
Get sales order by ID
Poll the URL returned in data._links.self after creation. 202 Accepted means the submission is queued, not that the order was successfully created. A queued submission is available through GET with its queue-derived status. GET returns 200 OK whenever the record is found, including pending or failed processing. 404 means not found or inaccessible; it does not mean “still processing.”
Always inspect data.queue_error, even when data.status is a normal order status such as confirmed. Canonical order statuses remain unchanged. queue_error is omitted when the queue is not failed; its absence alone does not establish successful creation.
Display queue_error.message and any optional queue_error.skus. Unknown or unresolved item IDs are never returned. Known validation messages cover inactive items, phone number length, attention length, and attachment filename length. Other errors use safe generic wording.
| Public code | Meaning |
|---|---|
ORDER_CREATE_FAILED | Order creation failed |
ORDER_ATTACHMENT_FAILED | Attachment processing failed; the order may already exist |
ORDER_PROCESSING_FAILED | Unrecognized processing failure; contact support |
Compatibility change: queue_result_code now contains one of these public failure codes, duplicate, or null, rather than raw worker codes.
Example failed-processing fields, returned alongside existing order details with HTTP 200:
Code
Do not automatically resubmit attachment failures or ambiguous processing failures. Direct users to support; an order may already exist.
path Parameters
idquery Parameters
expandComma-separated expansions, e.g. line_items
Headers
AuthorizationThe Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.
Get sales order by ID › Responses
Record found, including queued submissions and failed processing. Inspect queue_error regardless of order status.

