commercetools icon

commercetools

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

Actions671

Store Cart Discount → Check if CartDiscount exists in Store by Query Predicate

AI-generated

Summary

Check if a CartDiscount exists within a specified store in the commercetools project by applying a query predicate filter.

Inputs

  • Store Cart Discount Key (required) — The key identifying the CartDiscount resource (though for this operation it serves as an additional context parameter).
  • Store Key (required) — The key identifying the store in which to check for the CartDiscount existence.
  • Filters — An optional collection of filter parameters, including the 'where' predicate string to specify query conditions to identify the CartDiscounts in the store.

Output shape

a JSON object indicating existence with 'exists' (boolean), 'statusCode' (HTTP status), and the URL used ('url').

Performs an HTTP HEAD request to determine existence; returns exists: true if the resource matches the query predicate in the store, otherwise exists: false if not found (404). On other errors, an exception is thrown.

Links

Discussion