cancel
Showing results for 
Search instead for 
Did you mean: 

Change storeId in quote via Magento API, is it possible?

Change storeId in quote via Magento API, is it possible?

Hello,
I have this situation: a Magento 2.3.3 installation that serves 2 domains, and a Java application that uses the Rest api to create the quote.
My problem is that I create the quote for the store_id of the main domain, and only after the customer chooses the delivery method will I have defined the correct store_id.
What I need is to change the store_id in the quote after the definition. I tried to change using put with admin token https: // musite / rest / V1 / carts / 11677 with the parameters {"customerId": "1", "storeId": "2", "quoteId": "11677"}, but I get the answer
{"message": "The customer cannot be added to the cart because the cart is not anonymous."}
Using the client token, the answer is
{"message": "The consumer is not authorized to access% resources.", "parameters": {"resources": "Magento_Cart :: manage"}}
Is it not possible to change only the store_id with the standard Magento api?
What would be the correct solution?