commercetools icon

commercetools

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

Actions671

Cart Discount → Check if CartDiscount exists by Query Predicate

AI-generated

Summary

Check whether a Cart Discount exists in commercetools by executing a query with a specified predicate filter.

Inputs

  • Filters — Specify query filter parameters to search Cart Discounts, including the 'Where' string predicate to filter the discounts.

Output shape

a single JSON object indicating existence status

Returns an object with 'exists' (boolean), 'statusCode', and 'url' reflecting the check result. No list of items is returned, only existence confirmation; errors are thrown unless 404 (not found), which returns 'exists': false.

Examples

Example 1: Check if a Cart Discount exists filtered by a predicate

Set the 'Where' filter string with a valid query predicate expression to filter Cart Discounts.

Links

Discussion