Common Patterns
Response Envelope
Every successful response is wrapped in a data envelope.
Single resource:
Code
List of resources:
Code
Request IDs
Every response includes a server-assigned x-request-id header containing a UUIDv4. Clients cannot choose this value.
Error envelopes include the same value in error.request_id. Log either value and include it when contacting support so the request can be traced across systems.
Code
Request Bodies
Request bodies are limited to 1 MiB. A larger body returns 413 PAYLOAD_TOO_LARGE; malformed or otherwise unparseable JSON returns 400 VALIDATION_ERROR. These responses describe a problem with the request, so do not retry them without changing the payload.
Pagination
All list endpoints use cursor-based pagination.
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 25 | Items per page (1–200) |
cursor | string | — | Opaque cursor from previous response |
How to paginate:
- Make your first request (optionally with
limit) - Check the
next_cursorfield in the response - If
next_cursoris not null, pass it as?cursor=VALUEon the next request - Repeat until
next_cursoris null (no more pages)
Code
Timestamps
All timestamps are returned as ISO 8601 strings (e.g., "2025-01-15T14:30:00.000Z").
Several list endpoints support an updated_since filter that accepts ISO 8601 timestamps and returns records modified on or after that time. See Syncing Data for the full list of supported endpoints.
Identifiers
All resources use UUIDs as public identifiers (the id field). Internal system identifiers are never exposed.
Related-resource fields like salesorder_id, shipment_id, item_id, and warehouse_id also reference public UUIDs. Item and warehouse references are null when the related resource is unavailable to the caller. Stock filters accept these public UUIDs in item_id and warehouse_id. You can use these directly in API calls — for example, pass a salesorder_id from an invoice to GET /v1/sales-orders/{id} without any translation.
Canonical line_item_id values are public UUIDs. Pending sales-order lines return line_item_id: null until the order is reconciled to canonical records.
Null Fields
Fields that have no value are returned as null, not omitted. This makes it safe to destructure responses without checking for key existence.

