List orders
const url = 'https://apibase.ecomweb.app/api/v1/stores/example/orders?limit=20&offset=0&order_status=pending&fulfillment_status=unfulfilled&shipping_status=not_shipped&payment_status=pending&status=pending&customer_email=customer%40example.com&customer_name=Nguyen%20Van%20A&order_number=ORD-2024&search=Nguyen&created_after=2024-01-01T00%3A00%3A00.000Z&created_before=2024-12-31T23%3A59%3A59.000Z&updated_after=2024-01-01T00%3A00%3A00.000Z&updated_before=2024-12-31T23%3A59%3A59.000Z&sort_by=id&sort_order=asc&include_items=false&filters=%5B%7B%22field%22%3A%22order_status%22%2C%22operator%22%3A%22is%22%2C%22values%22%3A%5B%22pending%22%5D%7D%5D';const options = {method: 'GET', headers: {'x-api-key': '<x-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/stores/example/orders?limit=20&offset=0&order_status=pending&fulfillment_status=unfulfilled&shipping_status=not_shipped&payment_status=pending&status=pending&customer_email=customer%40example.com&customer_name=Nguyen%20Van%20A&order_number=ORD-2024&search=Nguyen&created_after=2024-01-01T00%3A00%3A00.000Z&created_before=2024-12-31T23%3A59%3A59.000Z&updated_after=2024-01-01T00%3A00%3A00.000Z&updated_before=2024-12-31T23%3A59%3A59.000Z&sort_by=id&sort_order=asc&include_items=false&filters=%5B%7B%22field%22%3A%22order_status%22%2C%22operator%22%3A%22is%22%2C%22values%22%3A%5B%22pending%22%5D%7D%5D' \ --header 'x-api-key: <x-api-key>'Returns a page of the store’s orders, newest first by default. Use limit and offset to page, the status, customer and date parameters to narrow the list, and search for free text over customer name, email and order number. filters takes a JSON array of {field, operator, values} clauses (at most 10 clauses and 50 values each). Order lines are included only when include_items is true.
Required scopes: read:orders
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
20Number of items per page
Example
0Number of items to skip
Example
pendingFilter by order status (lifecycle state)
Example
fulfilledFilter by fulfillment status
Example
shippedFilter by shipping status
Example
paidFilter by payment status
Example
pendingFilter by legacy order status (DEPRECATED - use order_status, fulfillment_status, shipping_status instead)
Example
customer@example.comFilter by customer email
Example
Nguyen Van AFilter by customer name (partial match)
Example
ORD-2024Filter by order number (partial match)
Example
NguyenSearch across customer name, email, and order number
Example
2024-01-01T00:00:00.000ZFilter orders created after this date
Example
2024-12-31T23:59:59.000ZFilter orders created before this date
Example
2024-01-01T00:00:00.000ZFilter orders updated after this date
Example
2024-12-31T23:59:59.000ZFilter orders updated before this date
Example
created_atSort field
Example
descSort order
Example
trueInclude order items in response
Example
[{"field":"order_status","operator":"is","values":["pending"]}]Admin list-view filters, a JSON array of {field, operator, values}. At most 10 clauses, at most 50 values each.
Responses
Section titled “Responses”object
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.
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.
How the order was captured: online, pos, phone or admin.
ID of the sales channel the order is attributed to, or null.
ID of the staff member who keyed the order in, or null.
The staff member behind created_by_user_id. Present only when a single order is fetched.
object
Staff user ID.
Display name, or null when the member has not set one.
Email address, 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.
Name of the carrier, 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.
object
Total number of items matching the request.
Maximum number of items in this page.
Number of items skipped before this page.
Current page number, starting at 1.
Total number of pages.
Whether a next page exists.
Whether a previous page exists.
Example
{ "data": [ { "order_status": "pending", "previous_order_status": "pending", "fulfillment_status": "unfulfilled", "shipping_status": "not_shipped", "payment_status": "pending" } ]}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 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"}