commercetools icon

commercetools

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

Actions671

Product-projection → Check if ProductProjection exists by Key

AI-generated

Summary

Check if a ProductProjection exists in commercetools by its unique key using a HEAD request.

Inputs

  • Product-projection Key (required) — The unique key of the ProductProjection to check for existence.

Output shape

a single JSON object indicating existence, with properties: 'exists' (boolean), 'statusCode' (HTTP status code), and 'url' (the request URL).

Returns exists=true with statusCode=200 if the ProductProjection exists; returns exists=false with statusCode=404 if it does not. Throws an error for other HTTP status codes.

Examples

Example 1: Check existence of a ProductProjection with key 'my-product-key'

Set resource to Product-projection, operation to Check if ProductProjection exists by Key, and provide 'my-product-key' as the Product-projection Key parameter.

Links

Discussion