commercetools icon

commercetools

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

Actions671

Store Customer → Check if Customer exists in Store by Key

AI-generated

Summary

Check whether a customer identified by a given customer key exists within a specified store by making a HEAD request to the commercetools API.

Inputs

  • Store Customer Key (required) — Key of the store to identify the store in which to check for the customer.
  • Store Key (required) — Key of the store in commercetools where the customer should be checked.
  • Customer Key (required) — Key of the customer to check for existence in the specified store.

Output shape

a single JSON object indicating existence status

Returns a JSON object with properties 'exists' (boolean), 'statusCode' (HTTP status code), and 'url' (the API endpoint called). If the customer exists, 'exists' is true and 'statusCode' is 200; if not found, 'exists' is false and 'statusCode' is 404. Throws an error for other HTTP failures.

Examples

Example 1: Check if a customer with key 'cust123' exists in store 'storeABC' identified by store customer key 'storeCustKey1'.

Set 'Store Customer Key' to 'storeCustKey1', 'Store Key' to 'storeABC', and 'Customer Key' to 'cust123'.

Links

Discussion