Objects and enums
The order payload, its field names, and every value the status field can hold.
Field naming
Writes accept camelCase or snake_case (clientName and client_name are both read). Reads always return snake_case, matching the underlying column names. Normalize on your side rather than assuming the casing you sent comes back.
Order
| Field | Type | Notes |
|---|---|---|
| id | uuid | Server generated. Your handle for every later read. |
| workspace_id | uuid | Server generated from the session. Ignored if you send it. |
| client_name | string | Required on create. Max 120 chars. |
| phone | string | Required on create. Stored as +212XXXXXXXXX. |
| store_name | string | Required on create. Max 120 chars. |
| products_name | string | Required on create. Max 500 chars. |
| address | string | null | Optional. Max 250 chars. Send "" to clear. |
| status | enum | Defaults to pending. See values below. |
| operation_id | uuid | null | The conversation attached at create time. |
| created_at | timestamptz | ISO 8601, UTC. |
status
Any other value is rejected with 400. Treat unknown values as non-terminal if you pin this list in your code.
pendingprocessingcallingconfirmedunconfirmedfailedno-answerpostponedorder-changedunrecognizedStatus lifecycle
Group these into your own states rather than branching on all ten.
| Group | Values | Meaning for your integration |
|---|---|---|
| In flight | pending, processing, calling | Keep polling. Do not act. |
| Shippable | confirmed, order-changed | order-changed means the customer altered quantity, product, or address. Read the operation before fulfilling. |
| Not shippable | unconfirmed, no-answer, failed, unrecognized | Terminal without a confirmation. |
| Deferred | postponed | The customer asked to be contacted later. Will be retried. |
Operations
An operation is the conversation attached to an order: the call or chat, its transcript, its duration, and its outcome. Creating an order attaches one pending outbound operation assigned to the order handler agent, and links it back through orders.operation_id. Operations are not yet exposed as an endpoint; transcripts are readable in the dashboard only.
Mutability
status can be changed at any point in the order's life. The content fields (client_name, phone, store_name, products_name, address) are only writable while the order is still pending, because after an agent starts calling, editing them would break the record of what was actually confirmed.