commercetools icon

commercetools

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

Actions671

Type → Check if Type exists by Query Predicate

AI-generated

Summary

Check whether a Type resource exists in the commercetools project by specifying a Query Predicate filter ('where' clause).

Inputs

  • Filters — An optional set of filters; currently supports the 'Where' string parameter to specify the Query Predicate for filtering Types.

Output shape

a single JSON object indicating existence, including 'exists' boolean, HTTP status code, and the requested URL.

Returns { exists: true } if a Type matching the query predicate exists, or { exists: false } if not (HTTP 404). Other errors throw a NodeApiError.

Examples

Example 1: Check if a Type with a specific key exists

Set 'Filters.Where' to key="my-type-key" to filter Types by key.

Links

Discussion