commercetools icon

commercetools

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

Actions671

Product-discount → Check if ProductDiscount exists by Query Predicate

AI-generated

Summary

Check whether a ProductDiscount matching a specified query predicate exists by sending a HEAD request to the commercetools API.

Inputs

  • Filters — Optional filter parameters to refine the query. Includes the 'where' predicate string to specify the search criteria for the ProductDiscount.

Output shape

a JSON object indicating existence with properties: 'exists' (boolean), 'statusCode' (number), and 'url' (string).

Returns 'exists: true' with status code 200 if a matching ProductDiscount exists; returns 'exists: false' with status code 404 if none found. Throws an error on other failures.

Examples

Example 1: Check if a ProductDiscount exists with a specific predicate

Set the 'where' field inside Filters to a valid query predicate string describing the desired ProductDiscount condition.

Links

Discussion