commercetools icon

commercetools

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

Actions671

Cart Discount → Check if CartDiscount exists by ID

AI-generated

Summary

Check the existence of a Cart Discount in commercetools by its ID using an HTTP HEAD request.

Inputs

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

Output shape

A JSON object containing 'exists' (boolean), 'statusCode' (number), and 'url' (string) confirming if the Cart Discount exists.

Returns an object with 'exists' set to true if found (HTTP 200) or false if not found (HTTP 404). Throws an error for other HTTP status codes.

Examples

Example 1: Check if a Cart Discount with ID 'cd123' exists.

Set 'Cart Discount ID' to 'cd123'. Output indicates existence.

Links

Discussion