commercetools icon

commercetools

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

Actions671

Category → Check if Category exists by ID

AI-generated

Summary

Check whether a Category resource exists in commercetools by its ID, returning existence status and related HTTP information.

Inputs

  • Category ID (required) — The unique identifier of the Category to check for existence.

Output shape

A JSON object indicating existence with fields: 'exists' (boolean), 'statusCode' (number), and 'url' (string) used for the HEAD request.

Uses an HTTP HEAD request to verify existence. If the Category exists, returns { exists: true, statusCode: 200, url }. If not found, returns { exists: false, statusCode: 404, url }. Throws an error for other HTTP failures.

Links

Discussion