Orders (History)
The Orders page displays a list of the buyer’s recent orders, including the order number, ordered date, order status, and order total for each entry. This page provides buyers with a centralized view of their order history and order status information.
This flow demonstrates how a headless storefront can render order history experiences using B2B Commerce Order Summary APIs.

| Operation | HTTP Method | Endpoint |
|---|---|---|
| List orders | GET | /commerce/webstores/{webstoreId}/order-summaries |
-
Call the following endpoint to retrieve the buyer’s order history:
-
Pass the fields query parameter explicitly. Some org configurations omit Grand Total Amount from the default response projection. Specifying the required fields explicitly ensures that the storefront receives all values needed for the order history page.
-
Use the response to retrieve the
orderSummariescollection. The response returns order summaries sorted from newest to oldest. -
Handle
403and404responses as empty order-history states. Buyers without existing orders can receive these responses instead of an empty collection. -
Read order summary fields defensively when rendering the response. Depending on org configuration, field values can appear in either of the following shapes:
Flat field structure:
Wrapped field structure:
-
Check for both response shapes when rendering table cells to avoid displaying blank values for order details.
-
Use the response data to render:
- Order number
- Ordered date
- Order status
- Total amount
- Grand total amount
- Currency information
- To add date-based filtering, pass the public
earliestDateandlatestDatequery parameters in the Order Summaries API request. - To add server-side pagination support, read the
pagination.nextPageTokenvalue returned in the API response and use it to retrieve the next set of order summaries.