Orders API Overview
The Orders API lets you retrieve and manage orders. You can fetch a single order in full detail, list orders that a customer either placed or was sold to, check which actions are currently allowed on an order, and cancel an open order.
All request/response examples use placeholder values; field names and types match what the API returns.
Base URL
Section titled “Base URL”https://<store-url>/public/orders/v1<store-url> is the base URL issued to your store, per environment (sandbox / production).
See Getting Started → Base URL for the full list of hosts.
All paths below are relative to it.
Authentication
Section titled “Authentication”Every request must be authenticated. You need two credentials on each call:
| Header | Value | Purpose |
|---|---|---|
Authorization |
Bearer <access_token> |
OAuth 2.0 JWT access token |
Ocp-Apim-Subscription-Key |
<your-subscription-key> |
Identifies your subscription at the API gateway |
- The access token must carry the
order:readscope. A token without it is rejected with403 Forbidden. - The cancel endpoint additionally requires the
order:writescope. - Tokens are short-lived (typically 30–60 minutes). Request a new token when the old one expires.
- For details on obtaining a token, supported authorities, and the claims involved, see Getting Started → Authentication.
Beyond the scope check, per-order access control applies: you only see orders your account is
entitled to (orders you own, placed, or have an explicit relationship with). Requesting an order you
are not entitled to returns 403 Forbidden; in list responses such orders are silently omitted
(see Pagination).
Conventions
Section titled “Conventions”- Format: JSON only (
Accept: application/json). Field names are camelCase. - Enums are serialized as strings (e.g.
"Completed","PHYSICAL_ITEM"), never as numbers. - Timestamps are ISO 8601 with an explicit UTC offset, e.g.
2026-05-01T09:32:00+02:00. - Money (
gross/net/vat) is expressed in the order’scurrency.gross = net + vat. - Nullable fields are present in the payload with a
nullvalue when not applicable. - Each response carries an
X-Trace-Idheader. Quote it when contacting support — it lets us correlate your request with our logs.
Endpoints
Section titled “Endpoints”| Method | Path | Description |
|---|---|---|
GET |
/orders/v1/{orderId} |
Retrieve one order in full detail |
GET |
/orders/v1/{orderId}/allowed-actions |
Check which actions are currently allowed on an order |
PATCH |
/orders/v1/{orderId}/cancel |
Cancel an open order |
GET |
/orders/v1/list/placed-by/{placedByCustomerId} |
List orders placed by a customer (summaries) |
GET |
/orders/v1/list/sold-to/{soldToCustomerId} |
List orders sold to a customer (summaries) |
The two list endpoints return order summaries (
OrderSearchResult), not full orders. They differ only in which party the pathcustomerIdrefers to:
- placed-by — the customer who created/submitted the order (the buyer acting),
- sold-to — the customer the order was billed/sold to.
To get the full order, take an
orderIdfrom a list and callGET /orders/v1/{orderId}.
1. Get order by ID
Section titled “1. Get order by ID”GET /orders/v1/{orderId}Retrieves a single order, including its lines, deliveries, billing, and status timeline.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
orderId |
string | yes | The unique identifier of the order. |
Responses
| Status | Meaning |
|---|---|
200 OK |
Order found and you are entitled to see it. Body is a full order. |
400 Bad Request |
orderId was empty/invalid. |
401 Unauthorized |
Missing or invalid token. |
403 Forbidden |
Token lacks order:read, or you are not entitled to this order. |
404 Not Found |
No order exists with that id. |
500 Internal Server Error |
Unexpected server error. |
Example response (200 OK)
{ "order": { "orderId": "1000001", "checkoutId": "c0ffee00-0000-0000-0000-000000000001", "currency": "NOK", "events": { "Placed": "2026-05-01T09:32:00+02:00", "Completed": "2026-05-03T14:10:00+02:00" }, "parties": { "soldTo": "11111111-1111-1111-1111-111111111111", "shipTo": "11111111-1111-1111-1111-111111111111", "billTo": "11111111-1111-1111-1111-111111111111", "contactTo": null, "placedBy": "22222222-2222-2222-2222-222222222222" }, "references": { "billingReference": null, "deliveryReference": null }, "orderLines": [ { "lineNumber": "10", "name": "Acme 27\" Monitor", "description": "27-inch 4K display", "materialNumber": "MON-27-4K", "quantity": { "total": 2, "fulfilled": 2, "cancelled": 0 }, "unitPrice": { "gross": 4999.0, "net": 3999.2, "vat": 999.8 }, "references": { "deliveryReference": "DLV-001" }, "categories": ["PHYSICAL_ITEM"], "orderLines": [] } ], "expectedDeliveries": [ { "estimatedDeliveryDate": "2026-05-03T00:00:00+02:00", "expectedLines": [ { "orderLineNumber": "10", "quantity": 2, "references": null, "status": "Available", "availableAt": "2026-05-01T00:00:00+02:00" } ], "collectionPoint": null, "deliveryAddress": { "name": "Contoso AS", "addressLine1": "Storgata 1", "addressLine2": null, "postCode": "0151", "city": "Oslo", "country": "NO", "contactPersonName": "Ola Nordmann", "phone": "+4722000000", "mobilePhone": "+4790000000", "email": "orders@contoso.example", "globalLocationNumber": null } } ], "deliveries": [ { "deliveryId": "DLV-001", "trackingNumber": "TRK123456789", "events": { "Created": "2026-05-02T08:00:00+02:00", "Sent": "2026-05-02T17:00:00+02:00", "Delivered": "2026-05-03T14:10:00+02:00" }, "deliveryLines": [ { "lineNumber": "1", "quantity": 2, "orderLineNumber": "10", "serialNumbers": ["SN-A1", "SN-A2"] } ], "collectionPoint": null, "deliveryAddress": { "name": "Contoso AS", "addressLine1": "Storgata 1", "addressLine2": null, "postCode": "0151", "city": "Oslo", "country": "NO", "contactPersonName": "Ola Nordmann", "phone": "+4722000000", "mobilePhone": "+4790000000", "email": "orders@contoso.example", "globalLocationNumber": null } } ], "billings": [ { "billingId": "INV-55501", "events": { "Billed": "2026-05-03T15:00:00+02:00" }, "type": "Invoice", "billingLine": [ { "lineNumber": "1", "quantity": 2, "orderLineNumber": "10", "serialNumbers": ["SN-A1", "SN-A2"] } ] } ] }}2. Get allowed actions
Section titled “2. Get allowed actions”GET /orders/v1/{orderId}/allowed-actionsReturns which state-changing operations are currently permitted on the order. Use it to decide up front whether to offer an action to the user (e.g. show or hide a Cancel order button) instead of attempting the action and handling the failure.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
orderId |
string | yes | The unique identifier of the order. |
Required scope: order:read
Responses
| Status | Meaning |
|---|---|
200 OK |
Order found and you are entitled to see it. Body is an AllowedActions. |
400 Bad Request |
orderId was empty/invalid. |
401 Unauthorized |
Missing or invalid token. |
403 Forbidden |
Token lacks order:read, or you are not entitled to this order. |
404 Not Found |
No order exists with that id. |
500 Internal Server Error |
Unexpected server error. |
Example response (200 OK)
{ "canBeCancelled": true}The response is a point-in-time snapshot, not a reservation. The order may progress between this call and a subsequent action (e.g. a delivery is created), so the action can still be rejected with
422 Unprocessable Entity. Always handle that response on the action itself.
Eligibility is evaluated at a finer grain than the summarized
statusfield — an order showingstatus: "Open"may still havecanBeCancelled: false. Use this endpoint rather than inferring eligibility fromstatus.
3. Cancel order
Section titled “3. Cancel order”PATCH /orders/v1/{orderId}/cancelRequests cancellation of an order. The operation is state-guarded and idempotent:
| Outcome | Behaviour |
|---|---|
| Order can be cancelled | Cancellation is submitted. Returns 204 No Content. |
| Order already cancelled | No action taken. Returns 204 No Content. |
| Order not eligible | Cannot be cancelled in its current state. Returns 422 Unprocessable Entity. |
Eligibility is decided server-side and is not derivable from the
statusfield alone — an order showingstatus: "Open"may still be rejected. To check eligibility up front, call Get allowed actions and inspectcanBeCancelled. Either way, act on the cancel response:204means it is (or will be) cancelled,422means it is not eligible.
Cancellation is processed asynchronously. A
204response means the request was accepted, not that the order has already reached theCancelledstate. PollGET /orders/v1/{orderId}untilevents.Cancelledappears if you need to confirm completion.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
orderId |
string | yes | The unique identifier of the order to cancel. |
Required scope: order:write (in addition to order:read)
Responses
| Status | Meaning |
|---|---|
204 No Content |
Cancellation accepted, or order was already cancelled. No body. |
400 Bad Request |
orderId was empty/invalid. |
401 Unauthorized |
Missing or invalid token. |
403 Forbidden |
Token lacks required scope, or you are not entitled to this order. |
404 Not Found |
No order exists with that id. |
422 Unprocessable Entity |
Order is not currently eligible for cancellation (see the state table above). |
4. List orders placed by a customer
Section titled “4. List orders placed by a customer”GET /orders/v1/list/placed-by/{placedByCustomerId}Lists summaries of orders placed by the given customer, newest first by default.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
placedByCustomerId |
string (GUID) | yes | Customer who placed the orders. |
Supports filtering, sorting and paging via query string.
5. List orders sold to a customer
Section titled “5. List orders sold to a customer”GET /orders/v1/list/sold-to/{soldToCustomerId}Lists summaries of orders sold to the given customer, newest first by default.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
soldToCustomerId |
string (GUID) | yes | Customer the orders were sold to. |
Supports filtering, sorting and paging via query string.
Responses (both list endpoints)
| Status | Meaning |
|---|---|
200 OK |
Body is a paged list of summaries. May be empty. |
400 Bad Request |
A query parameter failed validation (see Errors). |
401 Unauthorized |
Missing or invalid token. |
403 Forbidden |
Token lacks order:read. |
500 Internal Server Error |
Unexpected server error. |
Example response (200 OK)
{ "orders": [ { "orderId": "1000001", "checkoutId": "c0ffee00-0000-0000-0000-000000000001", "placedAt": "2026-05-01T09:32:00+02:00", "status": "Completed", "soldTo": "11111111-1111-1111-1111-111111111111", "placedBy": "22222222-2222-2222-2222-222222222222", "productNames": ["Acme 27\" Monitor", "USB-C Cable"], "references": { "billingReference": null, "deliveryReference": null } } ], "continuationToken": "eyJwYWdlIjogMn0="}Query parameters for list endpoints
Section titled “Query parameters for list endpoints”All parameters are optional. With none supplied you get the first page, newest first.
| Parameter | Type | Default | Description |
|---|---|---|---|
status |
string enum | (all) | Return only orders in this status. Omit for all statuses. |
from |
timestamp | (open) | Only orders placed at or after this instant. Must not be earlier than 2023-10-14 (no order data exists before then). |
to |
timestamp | (open) | Only orders placed at or before this instant. Must not be earlier than from. |
sortBy |
PlacedAt | OrderId |
PlacedAt |
Field to sort by. |
sortDir |
Asc | Desc |
Desc |
Sort direction. |
pageSize |
integer | server default | Page size, 1–50. |
continuationToken |
string | (none) | Opaque token from a previous response, used to fetch the next page. |
Validation errors (400) are returned when: from is earlier than 2023-10-14, from is later
than to, or pageSize is outside 1–50.
Example
GET /orders/v1/list/sold-to/11111111-1111-1111-1111-111111111111?status=Completed&from=2026-01-01T00:00:00Z&pageSize=25&sortDir=DescPagination
Section titled “Pagination”List endpoints are cursor-based, not page-numbered. Read these rules carefully — they affect correctness:
- A response includes a
continuationTokenwhen more results may be available, ornullwhen you have reached the end. - To fetch the next page, repeat the same request and pass the token back as the
continuationTokenquery parameter. - There is no total count. Do not rely on result counts to decide when to stop.
- Per-order access control is applied after paging. Because of this, a page may contain
fewer items than
pageSize, or even be empty, while still returning a non-nullcontinuationToken. An empty page does not mean you are done. - Keep following
continuationTokenuntil it isnull. That — and only that — signals the end of the result set.
GET .../list/sold-to/{soldToCustomerId} → { "orders": [...], "continuationToken": "abc" }GET .../list/sold-to/{soldToCustomerId}?continuationToken=abc → { "orders": [], "continuationToken": "def" } // not finished!GET .../list/sold-to/{soldToCustomerId}?continuationToken=def → { "orders": [...], "continuationToken": null } // finishedResponse models
Section titled “Response models”Full order
Section titled “Full order”Returned by get-by-id under the top-level order property.
Note: the full order has no single
statusfield. Its lifecycle is conveyed by theeventstimeline. The summarizedstatusvalue is available on list results.
Order
| Field | Type | Description |
|---|---|---|
orderId |
string | null | Unique order identifier. |
checkoutId |
string | null | Identifier of the checkout the order originated from. |
currency |
string | null | ISO currency code for all monetary amounts on the order. |
events |
map<string, timestamp> | Order lifecycle timeline. See the events map. |
parties |
Parties | The customers involved. |
references |
References | null | Customer/business references. |
orderLines |
OrderLine[] | The ordered items. |
expectedDeliveries |
ExpectedDelivery[] | Planned deliveries with estimated dates and addresses. |
deliveries |
Delivery[] | Actual deliveries/shipments. |
billings |
Billing[] | Invoices and credit notes. |
Parties
| Field | Type | Description |
|---|---|---|
soldTo |
string | Customer the order was sold to. |
shipTo |
string | Customer/destination the order ships to. |
billTo |
string | Customer billed for the order. |
contactTo |
string | null | Contact party, if any. |
placedBy |
string | null | Customer who placed the order. |
References (used on the order and on list summaries)
| Field | Type | Description |
|---|---|---|
billingReference |
string | null | Billing reference. |
deliveryReference |
string | null | Delivery reference. |
OrderLine
| Field | Type | Description |
|---|---|---|
lineNumber |
string | Identifier of the line within the order. |
name |
string | Product name. |
description |
string | null | Product description. |
materialNumber |
string | Material/SKU number. |
quantity |
Quantity | Ordered/fulfilled/cancelled counts. |
unitPrice |
Price | Price per unit, in the order currency. |
references |
LineReferences | null | Line-level references. |
categories |
string[] | One or more line categories. |
orderLines |
OrderLine[] | Nested/child lines (e.g. components of a bundle). Empty when none. |
Quantity
| Field | Type | Description |
|---|---|---|
total |
integer | Quantity ordered on the line. |
fulfilled |
integer | Quantity invoiced/fulfilled so far. |
cancelled |
integer | Quantity cancelled (equals total when the whole line is cancelled). |
Price
| Field | Type | Description |
|---|---|---|
gross |
decimal | Amount including VAT. |
net |
decimal | Amount excluding VAT. |
vat |
decimal | VAT amount. (gross = net + vat) |
LineReferences — { "deliveryReference": string | null }
ExpectedDelivery
| Field | Type | Description |
|---|---|---|
estimatedDeliveryDate |
timestamp | null | Estimated delivery date for the whole planned delivery. Rolled up from the per-item status / availableAt of its expectedLines — see Availability status values. |
expectedLines |
ExpectedDeliveryLine[] | Which order lines and quantities are planned for this delivery, each with its own availability. |
collectionPoint |
CollectionPoint | null | Pickup point, for collection deliveries. |
deliveryAddress |
DeliveryAddress | null | Home/business delivery address. |
ExpectedDeliveryLine
| Field | Type | Description |
|---|---|---|
orderLineNumber |
string | The order line this planned delivery relates to. |
quantity |
integer | Quantity planned on this line for this delivery. |
references |
LineReferences | null | Line-level references. |
status |
string enum | Per-item availability status — also tells you how firm availableAt is. |
availableAt |
timestamp | null | When this specific item is (or is expected to be) ready to ship. Confidence depends on status. |
Delivery
| Field | Type | Description |
|---|---|---|
deliveryId |
string | Identifier of the delivery/shipment. |
trackingNumber |
string | null | Carrier tracking number. |
events |
map<string, timestamp> | Delivery timeline. See the events map. |
deliveryLines |
DeliveryLine[] | Items included in this delivery. |
collectionPoint |
CollectionPoint | null | Pickup point, for collection deliveries. |
deliveryAddress |
DeliveryAddress | null | Destination address. |
DeliveryLine — { "lineNumber": string, "quantity": integer, "orderLineNumber": string, "serialNumbers": string[] }
Billing
| Field | Type | Description |
|---|---|---|
billingId |
string | Invoice / credit-note identifier. |
events |
map<string, timestamp> | Billing timeline (key Billed). |
type |
Invoice | CreditNote |
Document type. |
billingLine |
BillingLine[] | Billed lines. |
BillingLine — { "lineNumber": string, "quantity": integer, "orderLineNumber": string | null, "serialNumbers": string[] }
DeliveryAddress
| Field | Type | Description |
|---|---|---|
name |
string | Recipient name. |
addressLine1 |
string | Street address. |
addressLine2 |
string | null | Additional address line. |
postCode |
string | Postal code. |
city |
string | City. |
country |
string | Country. |
contactPersonName |
string | null | Contact person. |
phone |
string | Phone number. |
mobilePhone |
string | Mobile number. |
email |
string | Email address. |
globalLocationNumber |
string | null | GLN, if applicable. |
Note —
phone/mobilePhoneasymmetry with Checkout. On this response contract bothphoneandmobilePhoneare always present (non-null). On the Checkout API request the same two fields are optional / nullable. This asymmetry is deliberate: you may create a checkout without a phone number, but an order that comes back always carries one.
CollectionPoint — { "id": string, "name": string, "addressLine": string, "postCode": string, "city": string, "country": string }
Allowed actions
Section titled “Allowed actions”Returned by get-allowed-actions. One boolean per state-changing operation; true means the
operation is permitted on the order right now.
AllowedActions
| Field | Type | Description |
|---|---|---|
canBeCancelled |
boolean | Whether Cancel order would currently be accepted. false for orders already cancelled, in progress, or completed. |
New fields may be added to this object as further actions become available. Ignore fields you do not recognise.
Order summary
Section titled “Order summary”Returned by the list endpoints, one per item in orders.
OrderSearchResult
| Field | Type | Description |
|---|---|---|
orderId |
string | Unique order identifier. Use it with get-by-id for full detail. |
checkoutId |
string | null | Originating checkout identifier. |
placedAt |
timestamp | When the order was placed. |
status |
string enum | High-level status. |
soldTo |
string | Customer the order was sold to. |
placedBy |
string | null | Customer who placed the order. |
productNames |
string[] | Names of products on the order (for quick display). |
references |
References | null | Order references (see References). |
List response wrapper
| Field | Type | Description |
|---|---|---|
orders |
OrderSearchResult[] | The page of summaries (possibly empty). |
continuationToken |
string | null | Cursor for the next page; null at the end. See Pagination. |
Enumerations
Section titled “Enumerations”Status values
Section titled “Status values”Used by the status query parameter and the status field on summaries.
| Value | Meaning |
|---|---|
Open |
Order received and awaiting processing (includes submitted / credit-check states). |
InProgress |
Order is being processed/fulfilled. |
Completed |
Order fully fulfilled. |
Cancelled |
Order cancelled. |
When filtering by
status=Open, all “open-equivalent” internal states are included, so the filter matches what you see in thestatusfield.Note that not every
Openorder is immediately cancellable — use Get allowed actions to check, and see Cancel order for the finer-grained eligibility rules.
Order line categories
Section titled “Order line categories”The categories array on an order line contains one or more of:
| Value | Meaning |
|---|---|
PHYSICAL_ITEM |
A physical product. |
SERVICE |
A service (e.g. extended warranty, insurance, fee, license, enrollment). |
DELIVERY |
A delivery/shipping line. |
VIRTUAL_ITEM |
A virtual/grouping item (e.g. a bundle or sales set). |
Availability status values
Section titled “Availability status values”The status field on an ExpectedDeliveryLine describes that item’s current availability. Read the
two fields together: availableAt is when the item is expected to be ready to ship, and status is
how certain that date is. The further the item still has to travel through the supply chain
before it reaches the warehouse it ships from, the lower the confidence.
Listed from most to least certain:
| Value | Where the item is | Confidence in availableAt |
|---|---|---|
Available |
Physically in the warehouse it ships from. | Near-certain. Nothing upstream can move it; only picking and carrier lead time remain. |
ConfirmedRestock |
Not in the shipping warehouse yet, but the supplier has confirmed a delivery date. | Good. The date can still slip if the inbound shipment is delayed in transit. |
UnconfirmedRestock |
Not in the shipping warehouse; a restock is expected but the supplier has not confirmed the date. | Low. The date is a best estimate and may change once the supplier confirms. |
Unavailable |
Not in the shipping warehouse and no restock is planned or known. | None. availableAt is null. |
Unknown |
Availability has not been assessed yet (e.g. the order was just placed). | None. availableAt is null; expect it to move to one of the statuses above shortly. |
availableAtcarries a date whenever one is known: the (unconfirmed or confirmed) restock date forUnconfirmedRestock/ConfirmedRestock, and the date the item became available forAvailable. It isnullonly forUnknownandUnavailable.A line normally moves up this ladder over time (
Unknown→UnconfirmedRestock→ConfirmedRestock→Available), andavailableAtgets firmer with each step. When showing the date to a customer, usestatusto decide how strongly to word it — “ships 19 June” forAvailable, “expected 19 June” forConfirmedRestock, “estimated 19 June, to be confirmed” forUnconfirmedRestock.
How item availability relates to estimatedDeliveryDate
status and availableAt are the item-level view; estimatedDeliveryDate on the enclosing
ExpectedDelivery is the delivery-level roll-up of them. A planned delivery ships once every
item in it is available, so its estimate is driven by the line that becomes available last:
- All lines
Available→ the delivery can ship now;estimatedDeliveryDateis the nearest delivery date. - One or more lines
ConfirmedRestock/UnconfirmedRestock→ the delivery waits for those items;estimatedDeliveryDatemoves out to (at least) the latestavailableAt. Treat an estimate built onUnconfirmedRestockas tentative. - Any line
Unknown/Unavailable→ no reliable estimate;estimatedDeliveryDateisnull.
Use estimatedDeliveryDate when you only need “when will this shipment arrive”. Use expectedLines[]
when you need to tell the customer which item is holding the shipment back and why.
Compatibility note.
statusandavailableAtare new, additive fields onExpectedDeliveryLine— existing integrations that don’t read them are unaffected.
The events map
Section titled “The events map”Several objects (order, each delivery, each billing) expose an events object instead of
fixed timestamp fields. It is a map of event name → timestamp:
- A key is present only if that event has occurred. Absent keys mean the event hasn’t happened.
- Entries are ordered ascending by time, so you can read the map as a chronological timeline.
Possible keys
| Object | Possible event keys |
|---|---|
| Order | Placed, Cancelled, Completed |
| Delivery | Created, Picked, Cancelled, Sent, Delivered, ReadyToCollect |
| Billing | Billed |
Example order states
Section titled “Example order states”Sample responses for each state are in the companion example docs:
- Order detail examples — single-order responses across lifecycle, delivery, billing and line-type scenarios.
- Order list examples — paginated summary responses, with filtering, sorting and pagination samples.
- Cancel order examples — per-state behaviour, idempotency, and error responses for the cancel endpoint.
Errors
Section titled “Errors”All errors use the RFC 9457 / RFC 7807 Problem Details JSON format.
Problem Details
| Field | Type | Description |
|---|---|---|
type |
string (URI) | Identifies the error category. |
title |
string | Short, human-readable summary of the category. |
detail |
string | Human-readable explanation specific to this occurrence. |
status |
integer | HTTP status code. |
instance |
string | The request path that produced the error. |
code |
string | Stable machine-readable error code (see table below). |
traceId |
string | Correlation id; also returned in the X-Trace-Id header. Quote it to support. |
Validation errors (400) include an additional errors array, one entry per invalid field:
{ "type": "...", "title": "Validation Failed", "detail": "Some fields have validation errors", "status": 400, "instance": "/orders/v1/list/sold-to/11111111-1111-1111-1111-111111111111", "code": "ERR_VALIDATION_0001", "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01", "errors": [ { "fieldName": "PageSize", "message": "PageSize must be between 1 and 50." } ]}Status / code reference
| HTTP status | code |
When it happens |
|---|---|---|
400 Bad Request |
ERR_VALIDATION_0001 |
A path or query parameter failed validation. See errors[]. |
401 Unauthorized |
— | Missing, malformed, or expired token / wrong auth scheme. |
403 Forbidden |
ERR_ACCESS |
Token lacks order:read, or you are not entitled to the requested order. |
404 Not Found |
ERR_NOTFOUND |
No order exists with the given id. |
422 Unprocessable Entity |
ERR_PROCESSING |
The request was understood but could not be processed. |
500 Internal Server Error |
InternalServerError |
Unexpected server error. Retry later; quote the trace id if it persists. |
Quick start
Section titled “Quick start”# 1. Fetch a page of orders sold to a customercurl -s "https://<store-url>/public/orders/v1/list/sold-to/11111111-1111-1111-1111-111111111111?pageSize=25" \ -H "Authorization: Bearer <access_token>" \ -H "Ocp-Apim-Subscription-Key: <subscription_key>" \ -H "Accept: application/json"
# 2. Take an orderId from the list and fetch the full ordercurl -s "https://<store-url>/public/orders/v1/1000001" \ -H "Authorization: Bearer <access_token>" \ -H "Ocp-Apim-Subscription-Key: <subscription_key>" \ -H "Accept: application/json"
# 3. Check whether the order can be cancelled before offering the actioncurl -s "https://<store-url>/public/orders/v1/1000001/allowed-actions" \ -H "Authorization: Bearer <access_token>" \ -H "Ocp-Apim-Subscription-Key: <subscription_key>" \ -H "Accept: application/json"To page through all results, repeat the list call with continuationToken from each response until
it comes back null.