Look up an order as a guest
const url = 'https://apibase.ecomweb.app/api/v1/storefront/stores/example/orders/lookup?order_code=DH-1042-26&order_number=12345&customer_email=customer%40example.com&customer_phone=%2B84987654321';const options = {method: 'GET', headers: {'x-storefront-api-key': '<x-storefront-api-key>'}};
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/storefront/stores/example/orders/lookup?order_code=DH-1042-26&order_number=12345&customer_email=customer%40example.com&customer_phone=%2B84987654321' \ --header 'x-storefront-api-key: <x-storefront-api-key>'Finds one order so a guest can track it. Send the order code shown at checkout (order_code, or the older numeric order_number) together with the customer_email or customer_phone used on the order; one of the two is required, and it must match the order (email ignoring case, phone ignoring spaces and dashes). Without either the request fails with 400 ORDER_LOOKUP_CONTACT_REQUIRED. The route is rate limited to 20 requests a minute per store and client IP; over that it fails with 429. The response carries the order’s lines, shipment tracking and whether it can still be cancelled. When nothing matches, including a right code with the wrong email or phone, the status is still 200 and the body is { "message": "Order not found" }, so check for message rather than the status.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The store’s ref, as returned by GET /stores.
Query Parameters
Section titled “Query Parameters”Example
DH-1042-26The order code shown to the customer, e.g. DH-1042-26. A bare sequence is also accepted. Preferred over order_number.
Example
12345Numeric order sequence. Retained for clients predating order codes; prefer order_code.
Example
customer@example.comEmail used on the order. Send this or customer_phone; one is required.
Example
+84987654321Phone used on the order. Send this or customer_email; one is required.
Responses
Section titled “Responses”The matching order, or { "message": "Order not found" } when none matches.
object
The order’s lines.
object
Order item ID.
Product name as it was when the order was placed.
Variant label, or null.
Product image URL, or null.
Units ordered.
Unit price charged, after promotions.
Unit price before promotions, or null.
Discount applied to the line, or null.
Line total.
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.
Order ID.
Sequence number of the order, unique within the store.
Customer-facing order code.
Customer name.
Customer email, or null.
Customer phone number, or null.
Deprecated combined status. Use order_status, shipping_status and payment_status.
Lifecycle status of the order.
Delivery status.
Payment status.
Code of the payment method, or null.
Sum of the line totals.
Subtotal before promotions, or null.
Shipping fee charged.
Shipping fee before promotions, or null.
Part of the discount that came off shipping, or null.
Tax amount.
Total discount.
Amount due.
Street address to deliver to.
Province code of the delivery address.
Deprecated district code, or null.
Ward code, or null.
Postal code, or null.
Tracking number, or null.
Name of the carrier, or null.
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.
Whether the order can still be cancelled by the shopper.
object
Always Order not found.
Example
{ "shipment": { "status": "booked" }}The request is malformed or failed validation.
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 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 on a Storefront route that needs a secret key, 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"}Too many requests; wait a little before retrying.
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"}