From 403ce75b1050641fb9f9ab2de9bcfd3dc9022f63 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Tue, 19 Nov 2024 13:22:06 +0200 Subject: [PATCH] docs: add more clarification on updating a cart's customer --- .../app/storefront-development/cart/update/page.mdx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/www/apps/resources/app/storefront-development/cart/update/page.mdx b/www/apps/resources/app/storefront-development/cart/update/page.mdx index 03e0bf445b5b7..f367e6ec4e003 100644 --- a/www/apps/resources/app/storefront-development/cart/update/page.mdx +++ b/www/apps/resources/app/storefront-development/cart/update/page.mdx @@ -53,6 +53,11 @@ The Update Cart API route accepts a `region_id` request body parameter, whose va If a guest customer logs in, you must update the cart to be associated with the logged-in customer. +The request to update the cart's associated customer must be authenticated: + +- If the customer is authenticated by a session, include `credentials: include` in the fetch requests. +- If the customer is authenticated by a JWT token, include it in the Bearer Authorization header. + You can't change the `customer_id` if the cart was associated with a customer previously.