commercetools icon

commercetools

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

Actions671

Product Selection → Check if ProductSelection exists by Query Predicate

AI-generated

Summary

Check if a Product Selection exists in commercetools by querying with a specified predicate using a HEAD request.

Inputs

  • Filters — Specify query filters to construct the 'where' predicate string for filtering Product Selections. The 'where' string defines conditions to match specific Product Selections.

Output shape

a JSON object indicating existence status, including boolean 'exists', numeric 'statusCode', and the requested 'url'.

Performs a HEAD request to the commercetools Product Selection endpoint with the given query predicate. Returns an 'exists' boolean reflecting whether any Product Selection matches the predicate, along with the HTTP status code (200 if exists, 404 if not). Throws an error for other HTTP errors.

Examples

Example 1: Check if a Product Selection exists with a name equal to 'Summer Deals'.

Set Filters > Where to "name = "Summer Deals"".

Links

Discussion