Hi I am following this flow to add products to a guest cart:

1.Create a guest cart (this will give me the cartID)-> POST:

2. Get cart details-> GET:{cartID}

3. add items to cart-> POST:

  "cartItem": {
      "sku" : "For JAIIB Principles and Practices Of Banking (English) ",
  "qty": 1,

3rd step gives 404 not found. IS there something missing?


The endpoint was wrong for the third request. But also, the first request generates the guest cartID, something like this 6089be92f22d8cd70f24d33d3588c1c2. We need this cart id to be added as a quoteId parameter for the third request. Not the "id" received in the 2nd request. If it was for a customer (not guest) then we would use the "id" instead.

  • 1
    Just FYI, encrypted cart ID is used in guest API to prevent your cart being stolen. If ordinary ID is used, it is possible to create a cart, see current ID and steal carts with adjacent IDs. Commented Jan 5, 2016 at 7:43

1 Answer 1


index.php/rest part is missing in third request, try POST

  • Can you verify that this works on magento 2.1?
    – Mackelito
    Commented Aug 26, 2016 at 14:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.