commercetools icon

commercetools

Interact with the commercetools API. Operations are auto-generated from the official Postman collection.

Actions671

Order → Search Orders

AI-generated

Summary

Search for orders in commercetools matching specific criteria with customizable sorting, pagination, and filtering.

Inputs

  • Query › And — A JSON array of query predicates combined with a logical AND to filter the orders returned. Defaults to an empty array, meaning no additional filtering.
  • Sort (required) — A JSON array specifying sorting criteria for the search results.
  • Limit (required) — A number indicating the maximum number of orders to return in the response.
  • Offset (required) — A number specifying the offset from which to start returning orders, used for pagination.

Output shape

a single JSON object representing the search result set of orders matching the query.

The output JSON contains the orders returned by the commercetools API according to the specified query, sort, limit, and offset. The operation calls the /orders/search API endpoint with a POST method including the filters and sorting, and no additional pagination handling beyond limit and offset parameters provided.

Examples

Example 1: Search for orders with a specific status and customer ID, sorted by creation date descending, paginated by 10 per page starting at offset 0.

Set Query › And to filter conditions (e.g., [{'status':'Confirmed'},{'customerId':'123'}]), Sort to [{'createdAt desc'}], Limit to 10, and Offset to 0.

Links

Discussion