# order.state_changed

The order moved to another workflow state. `data.previous_state` names the state it left and `data.state` the one it entered, both captured when the change happened; the rest of the order is read when the delivery is sent. This is the superset of the order lifecycle, so an endpoint subscribed to it and to `order.submitted` receives two deliveries for a submit.

Endpoint: POST order.state_changed
Version: 1.19
Security: ApiKey, ApiSecret, UserGuid, UserToken, SupplierGuid

## Security:

  - `ApiKey` (unknown)
    apiKey in header x-apiKey

  - `ApiSecret` (unknown)
    apiKey in header x-apiSecret

  - `UserGuid` (unknown)
    apiKey in header userGuid

  - `UserToken` (unknown)
    apiKey in header userToken

  - `SupplierGuid` (unknown)
    apiKey in header supplierGuid

## Request fields (application/json):

  - `id` (string, required)
    Delivery id. Use it as an idempotency key: a retry or a manual redelivery carries the same id.

  - `type` (string, required)
    Event type, e.g. `order.submitted`.

  - `api_version` (string, required)
    Example: 2026-10-27

  - `occurred_at` (string, required)
    When the event happened. Deliveries are not ordered; compare `occurred_at` (and the resource's `updated_at`) when ordering matters.

  - `supplier_guid` (string, required)
    GUID of the supplier account the event belongs to.

  - `test` (boolean)
    Present and true for deliveries made with the "send test" action.

  - `data` (object, required)
    `data` for the order and quote events. A curated view of the order: internal notes, costs, commissions, integration ids and user records are never included. Fetch `GET /v1/orders/{guid}` for the full record.

  - `data.guid` (string)

  - `data.number` (string)
    Order number as displayed, e.g. `ABC-10000`.

  - `data.api_guid` (string)

  - `data.is_quote` (boolean)

  - `data.is_sample` (boolean)

  - `data.is_on_hold` (boolean)

  - `data.is_cancelled` (boolean)

  - `data.is_shipped` (boolean)

  - `data.partially_shipped` (boolean)

  - `data.is_local_pickup` (boolean)

  - `data.is_local_delivery` (boolean)

  - `data.state` (object)

  - `data.state.id` (integer)

  - `data.state.name` (string)

  - `data.source` (string)

  - `data.po_no` (string)

  - `data.invoice_no` (string)

  - `data.description` (string)

  - `data.note` (string)

  - `data.shipping_instructions` (string)

  - `data.currency` (string)

  - `data.sub_total` (number)

  - `data.discount_total` (number)

  - `data.tax` (number)

  - `data.shipping` (number)

  - `data.labor` (number)

  - `data.other` (number)

  - `data.grand_total` (number)

  - `data.delivery_date` (string)

  - `data.ship_date` (string)

  - `data.do_not_ship_before_date` (string)

  - `data.submit_date` (string)

  - `data.confirmed_date` (string)

  - `data.cancel_date` (string)

  - `data.customer` (object)
    A related record named by guid.

  - `data.customer.guid` (string)

  - `data.customer.name` (string)

  - `data.customer.email` (string)

  - `data.customer.customer_internal_id` (string)

  - `data.client` (object)
    A related record named by guid, or `null` when the resource has none.

  - `data.client.guid` (string)

  - `data.client.name` (string)

  - `data.user` (object)
    The user who placed the order.

  - `data.user.guid` (string)

  - `data.user.name` (string)

  - `data.user.email` (string)

  - `data.ship_to` (object)

  - `data.ship_to.guid` (string)

  - `data.ship_to.name` (string)

  - `data.ship_to.company_name` (string)

  - `data.ship_to.address_line_one` (string)

  - `data.ship_to.address_line_two` (string)

  - `data.ship_to.address_line_three` (string)

  - `data.ship_to.city` (string)

  - `data.ship_to.state` (string)

  - `data.ship_to.postal_code` (string)

  - `data.ship_to.country` (string)

  - `data.ship_to.phone` (string)

  - `data.ship_to.email` (string)

  - `data.ship_to.address_internal_id` (string)

  - `data.items` (array)

  - `data.items.guid` (string)

  - `data.items.item_no` (integer)

  - `data.items.sku` (string)

  - `data.items.name` (string)

  - `data.items.description` (string)

  - `data.items.qty` (number)

  - `data.items.qty_shipped` (number)

  - `data.items.qty_backordered` (number)

  - `data.items.unit_price` (number)

  - `data.items.discount_total` (number)

  - `data.items.tax` (number)

  - `data.items.total` (number)

  - `data.items.is_backordered` (boolean)

  - `data.items.note` (string)

  - `data.items.catalog_item` (object)
    A related record named by guid.

  - `data.items.catalog_item.guid` (string)

  - `data.items.catalog_item.name` (string)

  - `data.items.catalog_item.sku` (string)

  - `data.items.parent_item_guid` (string)

  - `data.items.selected_options` (array)

  - `data.items_truncated` (boolean)
    True when the order has more than 500 lines and only the first 500 are included.

  - `data.previous_state` (object)
    `order.state_changed` only: the state the order left.

  - `data.previous_state.id` (integer)

  - `data.previous_state.name` (string)

  - `data.quote` (object)
    `quote.converted_to_order` only: the quote that became this order.

  - `data.quote.guid` (string)

  - `data.quote.number` (string)

  - `data.sent_to` (array)
    `quote.sent` only: extra addresses the quote was emailed to.

  - `data.workflow` (object)
    `workflow.fired` only: the step that fired.

  - `data.workflow.guid` (string)

  - `data.workflow.step` (object)

  - `data.workflow.step.order_state_id` (integer)

  - `data.workflow.step.name` (string)

  - `data.workflow.step.step_no` (integer)

  - `data.created_at` (string)

  - `data.updated_at` (string)

## Response 200:

  - `200` (unknown)
    Return any 2xx to acknowledge. Anything else, or no answer within 10 seconds, is retried.

