Either via using GraphQL or the Rest API, I create a cart for a customer (Either by sending customer_id in REST, or x-bc-customer-id in GraphQL).
GraphQL: Create customer Impersonation Token and Create Cart
Note: There’s also an Assign Cart to Customer mutation, but it only took a cart and didn’t do anything.
REST: Create a Cart (With customer_id)
However, when I try to obtain a cart for a customer using GraphQL and x-bc-customer-id using:
I find that I only receive null results. As such, I’m not able to obtain the cart ID anymore post cart-creation.
I’ve created 3 links:
/login (Saves the customer ID in a cookie)
/get-cart?cust={CustId} (Gets the customer’s cart, null if one doesn’t exist)
/add-to-cart?part={ProductEntityId} (Creates a cart for the customer ID if cart doesn’t exist, otherwise adds to the existing cart)
My issue is that despite my program creating a cart (Either thru GraphQL or REST), the /get-cart function still returns a null result.
1
I have the same problem. Did you already find a solution?
1 hour ago