commercetools icon

commercetools

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

Actions671

Inventory → Check if InventoryEntry exists by Key

AI-generated

Summary

Check whether an InventoryEntry exists in commercetools by its specified inventory key.

Inputs

  • Inventory Key (required) — The unique key string of the InventoryEntry to check for existence.

Output shape

a single JSON object

Returns an object with an 'exists' boolean property indicating presence (true if exists, false if not), along with HTTP status code and the requested URL. If the InventoryEntry is not found, it returns exists as false with statusCode 404; other HTTP errors are thrown as node errors.

Examples

Example 1: Check if an InventoryEntry with key 'my-inventory-key' exists to conditionally proceed in a workflow.

Set the Inventory Key parameter to 'my-inventory-key'. On execution, the node returns { exists: true/false, statusCode: 200/404, url: '...' } indicating presence or absence.

Links

Discussion