This feature in Carts API allows the user to search the cart by the following parameters:

  • Cart Status
  • Order Number
  • Customer Information
  • Promotion Codes
  • Created/Updated Date Range
  • Channel ID

Prerequisites

  • A cart that needs to be searched is created with the required parameters using the create a cart endpoint.

Search Cart Initialization

The search endpoint returns a paginated response, displaying the first 10 search results by default. The total field in the response indicates the number of results found for the search query, capped at 10,000 results. For queries that exceed this limit, use an offset. Querying many carts through this endpoint isn’t recommended, as it’s intended for basic use cases to retrieve a limited number of carts rather than for analytics purposes.

The following code sample provides the structure of limit, offset, and total in the response when searching for a cart:

Examples

Retrieving a cart with an order number

Use the search for multiple carts endpoint and include the order number in the request body as in the following example:

Retrieving a cart with the date range and the customerId

Use the search for multiple carts endpoint and include the date range and the customerId in the request body as in the following example:

Retrieving a cart with the customerId and promotionTitles

Use the search for multiple carts endpoint and include customerId and promotionTitles` in the request body as in the following example: