commercetools icon

commercetools

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

Actions671

Product-discount → Check if ProductDiscount exists by ID

AI-generated

Summary

Check whether a ProductDiscount with a specified ID exists in the commercetools project by performing a HEAD request to its endpoint.

Inputs

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

Output shape

a single JSON object indicating existence status and HTTP status code

Returns an object with 'exists' (boolean), 'statusCode' (HTTP status), and 'url' of the request. If the ProductDiscount exists, 'exists' is true with a 200 status; if not found, 'exists' is false with 404 status. Other errors will raise a NodeApiError.

Links

Discussion