commercetools icon

commercetools

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

Actions671

Product-projection → Check if ProductProjection exists by Query Predicate

AI-generated

Summary

Check the existence of a ProductProjection in commercetools by sending a HEAD request with an optional query predicate as a filter.

Inputs

  • Filters — Optional filters to apply as query parameters; currently supports a 'where' string to specify query predicates.

Output shape

a single JSON object indicating whether the ProductProjection exists (with 'exists' boolean, HTTP 'statusCode', and the requested 'url').

The operation uses an HTTP HEAD request. If the ProductProjection matching the query predicate exists, it returns exists: true with statusCode 200; if not found, it returns exists: false with statusCode 404. Other errors are thrown as exceptions.

Examples

Example 1: Check if any ProductProjection exists matching a filter predicate

Set the 'Filters' parameter with a 'where' string query predicate (e.g., "name(en='example')") to check for matching ProductProjections.

Links

Discussion