commercetools icon

commercetools

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

Actions671

Associate Shopping List → Check if ShoppingList exists in BusinessUnit by Query Predicate as Associate

AI-generated

Summary

Check if a shopping list exists within a business unit as a specified associate by applying a query predicate filter.

Inputs

  • Associate Shopping List Key (required) — The unique key identifier of the associate's shopping list to check.
  • Associate ID (required) — The identifier of the associate within the business unit.
  • Filters — Optional query parameters including a 'where' predicate string to filter the shopping lists when checking for existence.

Output shape

a JSON object indicating existence status with fields 'exists' (boolean), 'statusCode' (HTTP status code), and 'url' (the request URL).

Performs an HTTP HEAD request to the commercetools API with authentication as an associate; returns 'exists: true' if found (status 200), or 'exists: false' if not found (status 404). Throws error for other failure statuses.

Examples

Example 1: Verify if a shopping list matching a query exists for a specific associate in a business unit.

Set 'Associate Shopping List Key' and 'Associate ID' to target the associate context, optionally provide a 'Where' filter query predicate to narrow the search. Run the node to receive an existence confirmation object.

Links

Discussion