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 ID

AI-generated

Summary

Check if a specific customer exists in a given store by their Customer ID using the Store Key and Store Customer Key.

Inputs

  • Store Key (required) — The unique key of the store in which to check for the customer.
  • Store Customer Key (required) — The unique key of the customer resource in the store.
  • Customer ID (required) — The ID of the customer to check existence for in the store.

Output shape

a single JSON object with properties 'exists' (boolean), 'statusCode' (number), and 'url' (string) indicating if the customer exists in the specified store.

This operation performs an HTTP HEAD request to verify existence, returning exists=false if a 404 status is received. Errors other than 404 are thrown as NodeApiError.

Examples

Example 1: Check if a customer with ID '12345' exists in store with key 'my-store' and customer key 'customer-key-xyz'.

Set Store Key to 'my-store', Store Customer Key to 'customer-key-xyz', and Customer ID to '12345'.

Links

Discussion