commercetools icon

commercetools

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

Actions671

Store Cart Discount → Query CartDiscounts in Store

AI-generated

Summary

Query cart discounts available in a specified commercetools store using optional filters that control pagination, sorting, and filtering of the results.

Inputs

  • Store Cart Discount Key (required) — The unique key of the store cart discount resource to query within the store context.
  • Store Key (required) — The key identifying the store in which to query cart discounts.
  • Filters — Optional query parameters to refine the cart discounts returned. This includes filters for expand (to include referenced resources), sort (to order results), limit (maximum number of results), offset (starting position), withTotal (whether to include total count), and where (conditional query predicates).

Output shape

A list of cart discount objects matching the query criteria within the specified store context.

The output is paginated according to 'limit' and 'offset' parameters if provided. The response includes expanded related resources if 'expand' filter is set. Any errors during the query will throw an exception unless 'Continue On Fail' is enabled in the node settings.

Examples

Example 1: Query all cart discounts in a store with a limit of 10

Set Store Cart Discount Key and Store Key to target store, and set Filters with Limit=10

Example 2: Query cart discounts where a condition applies

Provide Store Cart Discount Key, Store Key, and a 'where' filter string in Filters.

Links

Discussion