0

I tried this link http://devdocs.magento.com/swagger/index.html#/ - But not able to understand what exactly to do?

Please help me.

13

1 Answer 1

0

Hi Below is the code for add simple product running code ::

Add Simple Product To Cart ::

URL ::<<YOUR URL >>/rest/V1/carts/mine/items
Content-Type application/json
Authorization Bearer {TOKEN_ID}
REQUEST BODY ::
{
  "cart_item": {
    "quote_id": 2470,
    "sku": "59331563",
    "qty": 1
  }
}

RESPONSE ::
{
  "item_id": 17778,
  "sku": "59331563",
  "qty": 1,
  "name": "Physics XII art II  Class-12  NCERT1",
  "price": 0,
  "product_type": "simple",
  "quote_id": "2470"
}
4
  • is this code for magento 1.9 ? Commented Apr 3, 2017 at 6:14
  • @Taslim Waris - Can you explain me little more detail?
    – jassi
    Commented Apr 3, 2017 at 6:15
  • above Code is for magento 2 Commented Apr 3, 2017 at 6:21
  • @GopalPatel Yes I am just confirming it. Commented Apr 3, 2017 at 8:28

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.