commercetools icon

commercetools

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

Actions671

Product-type → Check if ProductType exists by Query Predicate

AI-generated

Summary

Check if a ProductType exists in commercetools by applying a Query Predicate filter in the 'where' parameter.

Inputs

  • Filters (where) — A string representing the Query Predicate to filter ProductTypes, enabling conditional checks on ProductType existence.

Output shape

a single JSON object containing at least the 'exists' boolean field indicating existence, the HTTP status code in 'statusCode', and the queried URL in 'url'.

The operation performs an HTTP HEAD request to the commercetools API with the specified query predicate as a filter. If the ProductType exists matching the criteria, 'exists' is true; if not found, 'exists' is false with statusCode 404. Other errors throw an exception.

Links

Discussion