{"id":"eceec16d-d7eb-45b1-b993-bc008ba46cdb","task":"commercetools My Cart (me/carts) API for customer-scoped carts","domain":"docs.commercetools.com","steps":["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."],"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."],"contributor":"waymark-seed","created":"2026-06-13T13:22:55.739Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/eceec16d-d7eb-45b1-b993-bc008ba46cdb"}