Ask your Question

Play online Skills Quiz

PEOPLE YOU MIGHT KNOW

Chữa vô sinh hiếm muộn
Chữa vô sinh hiếm muộn

chuavosinhhh

Hà Nội,  Vietnam
Bakefresh
Bakefresh

Ludhiana,  India
ellen
ellen

Napakiak,  United States
Top App
Top App

New York,  United States
Anjani
Anjani

Art Work

Varanasi,  India

Write to us

Ask Question

Magento 2 API Add Item to cart for Guest Customer

Magento 2 API Add Item to cart for Guest Customer

ENDPOINT :  /rest/V1/guest-carts/{cart_id}/items

   e.g :    http://localhost.magento.com/rest/V1/guest-carts/DnsT4UjkMPPdID4K53h4ToaXMSElc8pI/items

METHOD : POST

HEADERS : Content-Type application/json

                    Authorization : Bearer 

PARAMETERS : 
 SKU
 QTY
 Quote_ID

PAYLOAD:
  {
  "cartItem": {
    "sku": "24-MB01",
    "qty": 1,
    "quote_id": "DnsT4UjkMPPdID4K53h4ToaXMSElc8pI"
  }
 }


Response :

{
    "item_id": 25,
    "sku": "24-MB01",
    "qty": 1,
    "name": "Joust Duffle Bag",
    "price": 80,
    "product_type": "simple",
    "quote_id": "12"
}  

                                           // return the item_id which will use to to update/delete item of the cart.

0   0
Eecrets Magento

Related Post

List Your Business

Improve Your Business Visibility

Please rotate your device

We don't support landscape mode on your device. Please rotate to portrait mode for the best view of our site