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 Customer ID

AI-generated

Summary

Check if a cart exists in a specific store for a given customer ID.

Inputs

  • Store Cart Key (required) — The unique key identifier of the store cart to check within the specified store.
  • Customer ID (required) — The unique identifier of the customer to check the cart for.
  • Store Key (required) — The unique key of the store in which to check for the cart.

Output shape

a JSON object containing 'exists' (boolean), 'statusCode' (HTTP status), and 'url' (string) indicating if the cart exists.

The operation performs an HTTP HEAD request and returns an object with existence status. If the cart exists, 'exists' is true with statusCode 200; if not found, 'exists' is false with statusCode 404. Other HTTP errors throw a node-level error.

Examples

Example 1: Check if a customer cart exists in a given store.

Provide the Store Cart Key, Customer ID, and Store Key as inputs to check the existence of the customer's cart within the store.

Links

Discussion