commercetools icon

commercetools

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

Actions671

Store Business Unit → Check if BusinessUnit exists in Store by Query Predicate

AI-generated

Summary

Check if any Business Unit exists within a specific Store by querying using a custom predicate filter.

Inputs

  • Store Key (required) — The unique key identifying the Store in which to check for the Business Unit.
  • Filters — Optional filter parameters, including a 'where' predicate string to define query conditions for the Business Unit existence check.

Output shape

a JSON object indicating whether matching Business Units exist (boolean 'exists'), with HTTP status code and request URL details.

This operation performs a HTTP HEAD request with the provided query predicate as a filter. If the response returns a 200 status, the Business Unit exists; if 404, it does not. Other errors throw exceptions. The main input besides Store Key is an optional 'where' filter string.

Examples

Example 1: Check for the existence of any Business Unit in Store 'store-123' matching a certain predicate

Set 'Store Key' to 'store-123' and 'Filters > Where' to your query predicate, then run the node.

Links

Discussion