- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2015
05:15 AM
12-15-2015
05:15 AM
How to add items to cart using REST API
API: [PUT] http://192.168.1.180/magento/index.php/rest/V1/carts/items/15
Headers: Authrorization, Bearer Token
Error: "message": "Request does not match any route."
A put request to add item ID 15 to my cart. Any idea whats wrong ?
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2016
09:03 AM
04-05-2016
09:03 AM
Re: How to add items to cart using REST API
api call is wrong
if it is PUT then /V1/carts/{cartId}/items/{itemId}
and if it is POST /V1/carts/{cartId}/items
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2016
10:40 PM
05-30-2016
10:40 PM
Re: How to add items to cart using REST API
Hi there,
In magento 2.0 REST API to add item in cart POST api call (/V1/carts/{cartId}/items) is used and to edit the item of the cart PUT api(/V1/carts/{cartId}/items/{itemId}) call is called. You can refer to the below blog to add item into your cart: http://www.ipragmatech.com/magento-mobile-app-shopping-cart/