Add To Cart

From KartRocket API
Jump to: navigation, search

Request

User can Add To Cart making a HTTP GET Request on the following URL:


YOUR_STORE_URL_ON_KARTROCKET.'index.php?route=checkout/cart/addMultiple&key'=TESTAPI

Example

http://test.kartrocket.co/index.php?route=checkout/cart/addMultiple&key=TESTAPI

Following is the JSON data format to be posted on above URL with POST request as key => value format. Here key is "payload" and value is "JSON data" as following.

    payload : {"products":[{"product_id":1, "quantity":1}]}
    

Response

You will get the following response to the above GET request.

{
 {"success":"Success: You have added Product 1<\/a> to your shopping cart<\/a>!",
  "total":"1 item(s) - Rs.10"
  }
}