commercetools icon

commercetools

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

Actions671

Inventory → Check if InventoryEntry exists by Query Predicate

AI-generated

Summary

Check whether an InventoryEntry exists in the commercetools project by performing a HEAD request with an optional query predicate filter.

Inputs

  • Filters — Optional filter parameters to refine the existence check, including a 'where' string predicate to specify conditions on InventoryEntry fields.

Output shape

A JSON object containing 'exists' (boolean), 'statusCode' (number), and 'url' (string) indicating the existence status of the InventoryEntry queried by the predicate.

Returns 'exists' true with a 200 status code if the InventoryEntry exists, or 'exists' false with a 404 status code if not found. Other HTTP errors will cause the node to throw an error unless 'Continue On Fail' is enabled.

Examples

Example 1: Check if there is an InventoryEntry with SKU '12345'

Set Filters > Where to 'sku="12345"' and run the node to return existence status.

Links

Discussion