CDP REST APIAPI Reference
Get Order
Fetch a single order by its Shopify/external id, returning a normalized contract with line items.
GET /cdp/commerce/orders/{id} — fetch a single order by its Shopify/external id,
bound to your shop scope. The order is served from the local synced store and
returned as a normalized contract (line items and processed_at are derived from
the stored payload) — the raw Shopify payload is never exposed verbatim.
Requires the beta:cdp-commerce permission on your brand.
Request
GET /cdp/commerce/orders/{id}
Authorization: Bearer vyg_…Path parameters
| Param | Type | Description |
|---|---|---|
id | string | The order's Shopify/external order id. |
Response 200
{
"id": "b2c1…",
"external_id": "4501234567890",
"number": "1001",
"state": "complete",
"billing_status": "complete",
"total": "120.00",
"currency_code": "USD",
"customer": {
"contact_id": "c9f0…",
"shopify_customer_id": "5483611717768"
},
"created_at": "2026-03-02T14:21:00.000Z",
"processed_at": "2026-03-02T14:22:10.000Z",
"updated_at": "2026-03-02T14:22:10.000Z",
"recovered_at": null,
"line_items": [
{
"title": "Product 2",
"quantity": 2,
"price": "5.00",
"sku": "jojo",
"product_id": "4616065155208",
"variant_id": "32547470704776",
"variant_title": ""
}
]
}| Field | Type | Description |
|---|---|---|
id | string | Internal order id. |
external_id | string | Shopify/external order id (the {id} you fetched by). |
number | string | Human-facing order number. |
state / billing_status | string | Order state and billing status. |
total / currency_code | string | Order total and its currency. |
customer | object | Local contact_id and, when derivable, the shopify_customer_id. |
created_at / processed_at / updated_at | string | null | Order timestamps. |
recovered_at | string | null | When the order was recovered, if applicable. |
line_items | array | Normalized line items ([] when the stored payload has none). |
Example
curl -s "https://cdp.vyg.app/cdp/commerce/orders/4501234567890" \
-H "Authorization: Bearer vyg_your_key_here"Errors
| Status | When |
|---|---|
400 | Missing order id. |
401 | Missing or invalid credential. |
403 | Brand not enrolled in the commerce beta (beta_not_enabled), or no connected Shopify integration (integration_not_connected). |
404 | Order not found or owned by another brand — indistinguishable by design, so a brand cannot probe for another brand's ids. |
405 | Non-GET method. |
{
"error": "not_found",
"error_description": "Order not found"
}See Tenant Isolation & Scope for why out-of-scope ids return 404.