commercetools icon

commercetools

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

Actions671

Subscription → Check if Subscription exists by Key

AI-generated

Summary

Check the existence of a Subscription in commercetools by its unique key using a HEAD request.

Inputs

  • Subscription Key (required) — The unique key of the Subscription to check for existence.

Output shape

a JSON object indicating whether the Subscription exists, including 'exists' (boolean), 'statusCode' (number), and 'url' (string) fields.

Returns { exists: true, statusCode: 200, url } if the Subscription exists; { exists: false, statusCode: 404, url } if it does not. Throws an error for other HTTP status codes.

Examples

Example 1: Subscription exists

Subscription Key set to 'example-key'.

Example 2: Subscription does not exist

Subscription Key set to a non-existing key.

Links

Discussion