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 ID

AI-generated

Summary

Check whether a ProductType exists in commercetools by its ID using a HEAD HTTP request.

Inputs

  • Product-type ID (required) — The unique identifier of the ProductType to check for existence.

Output shape

a JSON object containing 'exists' (boolean), 'statusCode' (number), and 'url' (string).

Outputs no detailed ProductType data, only whether it exists. Returns {exists: true, statusCode: 200, url} if found, or {exists: false, statusCode: 404, url} if not found. Throws error for other HTTP failures.

Examples

Example 1: Checking if a specific ProductType exists by ID to conditionally proceed with workflow steps.

Set resource to 'Product-type', operation to 'Check if ProductType exists by ID', and provide the Product-type ID string.

Links

Discussion