Get orders with filtering criteria

Learn how to use the Orders API to get orders with filtering criteria.

Learn how to use the Orders API to retrieve a list of orders that match the criteria you specify.

Prerequisites

To complete this tutorial, you need:

To access Personally Identifiable Information (PII), you must have approval for the following roles:

You do not need a Restricted Data Token to access PII with the Orders API v2026-01-01.

Search for orders with basic information

Call the searchOrders operation. If you do not include includedData, the response will include only basic information about the orders, such as orderId, createdTime, salesChannel, programs, orderItemId, product, and other relevant details.

Search for orders with custom data sets

Call the searchOrders operation and include the includedData parameter with the information you want the response to include.

Supported valuesDescriptionCorresponding attribute in the Order Schema
BUYERThe information of the buyer who purchased the order.Order.buyer
RECIPIENTThe information of the recipient to whom the order is delivered.Order.recipient
FULFILLMENTThe information about how this order is being processed and shipped applied to the order and order items.Order.fulfillment
Order.orderItems.fulfillment
PROCEEDSThe revenue and financial breakdown for the order and order items.Order.proceeds
Order.orderItems.proceeds
EXPENSEThe cost information applied to the order and order items.Order.orderItems.expense
PROMOTIONThe discount and promotional offer details applied to the order and order items.Order.orderItems.promotion
CANCELLATIONThe cancellation information applied to the order and order items.Order.orderItems.cancellation
PACKAGESThe shipping packages and tracking information.Order.packages

📘

Note

The searchOrders operation uses pagination when there are too many results to include in a single response. When this happens, the response includes a pagination object, which includes a nextToken value. To get the next page of results, make the same API call and use the nextToken value as the value for the paginationToken query parameter. All values in the subsequent request must remain the same as in the first request, with the exception of maxResultsPerPage and includedData, which may be modified between requests.

The nextToken returned by searchOrders expires after 24 hours.