commercetools icon

commercetools

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

Actions671

Store Cart → Check if Cart exists in Store by Key

AI-generated

Summary

Check whether a cart with a specific key exists within a specified store in commercetools by performing a HEAD request to the relevant API endpoint.

Inputs

  • Store Cart Key (required) — The key identifier of the cart to check within the store.
  • Store Key (required) — The key identifier of the store in which to look for the cart.
  • Cart Key (required) — The unique key of the cart to verify existence for.

Output shape

a JSON object indicating the existence status, including properties exists (boolean), statusCode (numeric HTTP status), and the requested URL (string).

Returns an object with exists: true and statusCode: 200 if the cart exists; returns exists: false and statusCode: 404 if not found. Other HTTP errors result in a thrown error.

Examples

Example 1: Check if a specific cart exists in a store by its keys.

Provide the Store Cart Key, Store Key, and Cart Key to identify and verify the cart's existence.

Links

Discussion