commercetools icon

commercetools

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

Actions671

Cart → Check if Cart exists by Customer ID

AI-generated

Summary

Check if a cart exists for a given customer ID by performing a HEAD request to the commercetools API.

Inputs

  • Customer ID (required) — The unique identifier of the customer whose cart existence you want to verify.

Output shape

a single JSON object per input item indicating existence, status code, and the request URL.

Returns { exists: true } with status code 200 if the cart exists; returns { exists: false } with status code 404 if no cart is found for the given customer ID. Throws an error for other failures.

Examples

Example 1: Check if a cart exists by customer ID '12345'.

Set the resource to 'Cart', operation to 'Check if Cart exists by Customer ID', and provide '12345' as the Customer ID input.

Links

Discussion