Get one of the shopper's orders
const url = 'https://apibase.ecomweb.app/api/v1/tenant/stores/example/customers/orders/1';const options = { method: 'GET', headers: { 'x-storefront-api-key': '<x-storefront-api-key>', Authorization: 'Bearer <token>' }};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://apibase.ecomweb.app/api/v1/tenant/stores/example/customers/orders/1 \ --header 'Authorization: Bearer <token>' \ --header 'x-storefront-api-key: <x-storefront-api-key>'Returns one order of the signed-in shopper with its lines, shipment tracking, whether the shopper can still cancel it, and the order metafields that customers may read. An order that belongs to someone else returns 404, the same as one that does not exist.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The order ID, as returned when the order was placed or listed.
The store’s ref, as returned by GET /stores.
Responses
Section titled “Responses”object
Lifecycle status of the order.
The status the order was in before it was put on hold, or null. Resuming restores it.
Warehouse status: whether the items have been picked and packed, or returned.
Delivery status.
Payment status.
The order’s shipment, or null when none has been booked or tracking could not be read.
object
Normalized shipment status, or null.
Tracking steps from the carrier.
object
When the step happened, as an ISO 8601 timestamp.
What happened, in the carrier’s wording.
Where it happened, or null.
Carrier name, or null.
URL of the carrier’s logo, or null.
Name of the carrier service, or null.
Tracking number, or null.
Link to the carrier’s tracking page, or null.
The order’s metafields that customers may read, keyed by namespace.key. Empty when none apply.
object
object
The metafield’s type, such as single_line_text_field or list.number_integer.
Name of the carrier, or null.
Whether the shopper may still cancel the order: it is pending, confirmed or processing, has not shipped and has no active shipment. False when tracking could not be read.
Order ID.
ID of the signed-in user who placed the order, or null for a guest or a staff-keyed order.
ID of the cart the order was created from, or null.
ID of the customer the order is linked to, or null for a guest checkout.
Sequence number of the order, unique within the store.
Customer-facing order code, such as #1001. Prefer it for display.
Customer name.
Customer email, or null for a walk-in customer without one.
Customer phone number, or null.
Customer avatar URL, or null.
ID of the sales channel the order is attributed to, or null.
Deprecated combined status. Use order_status, fulfillment_status, shipping_status and payment_status instead.
Code of the payment method, as configured on the store, such as cod.
Sum of the line totals, in the order’s currency.
Shipping fee charged.
Tax amount.
Total discount applied to the order.
Amount due: subtotal plus shipping and tax, minus discounts.
ISO 4217 currency code the amounts are in, such as VND.
Subtotal before promotions, or null when it was not recorded.
Shipping fee before promotions, or null when it was not recorded.
Part of the discount that came off shipping, or null.
Street address to deliver to.
Province code of the delivery address.
Province name. Present only when a single order is fetched.
Deprecated district code. New orders use shipping_ward.
Ward code of the delivery address, or null.
Ward name. Present only when a single order is fetched.
Postal code, or null.
Tracking number of the shipment, or null.
Deprecated: always null on new orders.
Name of the shipping method. Present only when include_order_shipping is true.
ID of the shipping rate used. Present only when include_order_shipping is true.
Free-text notes on the order, or null.
When the order was placed, as an ISO 8601 timestamp.
When the order was last changed, as an ISO 8601 timestamp.
The order’s lines. Empty unless items are requested (the list omits them by default).
object
Order item ID.
ID of the order the line belongs to.
ID of the product, or null when the product has since been removed.
Product name as it was when the order was placed.
Product image URL as it was when the order was placed, or null.
ID of the purchased variant, or null when the variant has since been removed.
Variant label as it was when the order was placed, or null.
Units ordered.
Unit price before any promotion, or null when it was not recorded.
Unit price charged, after promotions.
Line total: the unit price times the quantity.
Total discount applied to the whole line, or null when none.
Example
{ "order_status": "pending", "previous_order_status": "pending", "fulfillment_status": "unfulfilled", "shipping_status": "not_shipped", "payment_status": "pending", "shipment": { "status": "booked" }}The key is missing, invalid, revoked or expired.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The key may not do this: a missing scope, a readonly key, a publishable key on a Store API route, or a disallowed origin.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The resource does not exist in this store.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}