Hi,
I'm facing a really weird behaviour from the API, that I just can't understand.
First of all, I create a guest cart by calling the following endpoint:
POST /V1/guest-carts
This returns me the cart ID, let's say N3EYfSb9lomhlNOO2LKQ5EEAPy7QfAlP.
Then I'm adding a product by using the following endpoint:
guest-carts/{cartId}/items/{itemId}
cartId: N3EYfSb9lomhlNOO2LKQ5EEAPy7QfAlP
itemId: 2346
Indeed, a product is added to the cart... but not the requested product!
Indeed, while I'm passing the item ID 2346 as a path parameter, in the response I'm getting:
item_id: 1983
What's happening here?
Regards,
Dave
Solved! Go to Solution.
Thank you @Damian Culotta, the link you provided was usefull!
By reading carefully, I picked up 2 crucial points, pretty confusing IMHO. I'm writing them down right here, in case it can help anyone:
This last point was causing my issue. To delete a product, you have to pass the item ID, not the product ID.
Hi @david_iux.
Can you confirm if the explanation here is correct? https://magento.stackexchange.com/questions/106474/what-is-step-by-step-process-for-add-products-to-...
Thank you @Damian Culotta, the link you provided was usefull!
By reading carefully, I picked up 2 crucial points, pretty confusing IMHO. I'm writing them down right here, in case it can help anyone:
This last point was causing my issue. To delete a product, you have to pass the item ID, not the product ID.