commercetools icon

commercetools

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

Actions671

Cart → Check if Cart exists by Query Predicate

AI-generated

Summary

Check whether any Cart exists in the commercetools project that matches the specified query predicate.

Inputs

  • Filters — Optional filters to narrow down the search, including the 'where' string parameter to specify the query predicate expression.

Output shape

a single JSON object indicating whether a matching Cart exists, containing at least the boolean 'exists' field and HTTP status code info

The operation performs a HEAD request using the query predicate as a filter. It returns an object with 'exists' set to true if a Cart matching the criteria is found, otherwise false. The output also includes the HTTP status code and the URL queried. No full cart details are returned.

Examples

Example 1: Check if any Cart exists with a specific customerId

Set resource to 'Cart', operation to 'Check if Cart exists by Query Predicate', and Filters > Where to 'customerId="example-customer-id"'.

Links

Discussion