commercetools icon

commercetools

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

Actions671

Customer Group → Check if CustomerGroup exists by Query Predicate

AI-generated

Summary

Check if a Customer Group exists in commercetools by querying with a specified predicate string.

Inputs

  • Filters — Optional filter criteria including a 'Where' string to define the query predicate to match Customer Groups.

Output shape

A single JSON object indicating existence with properties 'exists' (boolean), 'statusCode' (HTTP status code), and 'url' (the API endpoint queried).

This operation performs an HTTP HEAD request to check existence. If the Customer Group matches the predicate, it returns exists: true with status 200; if not found, exists: false with status 404. Other errors throw exceptions.

Examples

Example 1: Check if any Customer Group matches a given condition

Set 'Where' filter to the desired predicate string, e.g., 'name="VIP Customers"', then execute to receive existence status.

Links

Discussion