commercetools icon

commercetools

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

Actions671

Cart → Check if Cart exists by Key

AI-generated

Summary

Check if a commercetools Cart exists by its unique key using a HEAD request to the API.

Inputs

  • Cart Key (required) — The unique key identifying the Cart to check for existence.

Output shape

a JSON object indicating existence with boolean 'exists', HTTP status code 'statusCode', and the requested 'url'.

Returns { exists: true, statusCode: 200, url } if the Cart exists; { exists: false, statusCode: 404, url } if not found. Throws an error for other HTTP response statuses.

Examples

Example 1: Check if a Cart with key 'my-cart-key' exists.

Set resource to 'Cart', operation to 'Check if Cart exists by Key', and provide 'my-cart-key' for Cart Key parameter.

Links

Discussion