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 ID

AI-generated

Summary

Check if a specific Business Unit exists within a given Store by its ID using a HEAD request to the commercetools API.

Inputs

  • Store Key (required) — Key of the Store in which to look up the Business Unit.
  • Business Unit ID (required) — The ID of the Business Unit to check for existence in the specified Store.
  • Store Business Unit Key (required) — The key of the Business Unit within the Store (required in the operation properties but appears to be contextually used for some instorebusinessunits operations).

Output shape

a single JSON object per input item

Returns an object indicating whether the Business Unit exists (exists: true or false) along with the HTTP status code and the URL used for the check. If the Business Unit is not found, returns exists: false with a 404 status code. Throws an error for other HTTP errors.

Examples

Example 1: Check if Business Unit exists in Store

Specify Store Key, Business Unit ID, and Business Unit Key. Execute the node to verify existence, receiving a JSON response indicating true or false for existence.

Links

Discussion