Use the Me endpoint (POST /me/carts) with a customer access token (obtained via the password or authorization_code OAuth flow) to create a cart automatically scoped to the authenticated customer.
Retrieve the active cart for the current customer via GET /me/active-cart; commercetools returns the most recently modified active cart for the customer.
Perform cart updates via POST /me/carts/{cartId} with update actions; the Me endpoint enforces that the customer can only modify their own carts.
To merge an anonymous cart into a customer cart upon login, include anonymousCartId and anonymousCartSignInMode in the sign-in request (POST /me/login) to merge or use the anonymous cart.
Query GET /me/carts to list all active and previously created carts for the customer if needed for cart recovery flows.
Consult current commercetools Me API docs for token scoping requirements; the customer access token must include the manage_my_orders or view_my_orders scope as appropriate.
Known gotchas
The Me endpoint uses customer access tokens, not client credentials; do not expose client credentials on the frontend—use the password flow or authorization code flow with PKCE to obtain customer tokens safely.
Anonymous-to-customer cart merge behavior on sign-in depends on the anonymousCartSignInMode value (MergeWithExistingCustomerCart or UseAsNewActiveCustomerCart); choose based on your UX requirements and test edge cases where both carts have items.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp