commercetools icon

commercetools

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

Actions671

Cart → Query Carts

AI-generated

Summary

Query carts in the commercetools project using optional filters to control the results.

Inputs

  • Filters — Optional filters to refine the query results; includes parameters: Expand (string) to include referenced resources, Sort (string) to order results, Limit (string) to cap the number of returned carts, Offset (string) to skip a number of carts, With Total (string) to include total count, and Where (string) to specify conditions for filtering carts.

Output shape

a list of cart objects matching the query filters, returned as JSON from the commercetools API

The operation returns the raw response JSON from the commercetools API's carts query endpoint. Pagination can be controlled via Limit and Offset. Expand allows including referenced resources. With Total indicates whether the total count is included. Errors are returned in NodeApiError format.

Examples

Example 1: Retrieve up to 10 carts sorted by creation date.

Set Limit to 10, Sort to 'createdAt desc' in Filters.

Links

Discussion