Difference between revisions of "Update Product Option Stock"

From KartRocket API
Jump to: navigation, search
(Created page with "== Update Product Option Stock == === Request === User can get Order data by sending a HTTP GET Request to the following URL. <pre> YOUR_STORE_URL_ON_KARTROCKET.'index.ph...")
 
Line 4: Line 4:
 
=== Request ===
 
=== Request ===
  
User can get Order data by sending a HTTP GET Request to the following URL.
+
User can update quantity and price and weight of a product's option value by making a HTTP GET Request on the following URL.
  
 
<pre>
 
<pre>
  
YOUR_STORE_URL_ON_KARTROCKET.'index.php?route=feed/web_api/orders&key='.WEB_API_KEY.'&order_id='.ORDER_ID'
+
YOUR_STORE_URL_ON_KARTROCKET.'index.php?route=feed/web_api/optionstock&key='.WEB_API_KEY. '&sku='.PRODUCT_SKU. '&option_sku='.PRODUCT_OPTION_SKU.'&qty='.PRODUCT_OPTION_QUANTITY. '&price='.PRODUCT_OPTION_PRICE.'&weight='.PRODUCT_OPTION_WEIGHT;
  
 
</pre>
 
</pre>
Line 15: Line 15:
  
 
<pre>
 
<pre>
http://api.kartrocket.co/index.php?route=feed/web_api/orders&key=APITEST&order_id=442;
+
http://test.kartrocket.co/index.php?route=feed/web_api/ optionstock &key=1234XYZ&sku=SKU01&option_sku=OPTIONSKU01&qty=10&price=999&weight=1;
 
</pre>
 
</pre>
  
Line 21: Line 21:
  
 
<pre>
 
<pre>
Response
+
Successful request:
 
{
 
{
 
   "success":true,
 
   "success":true,
   "orders":[
+
   "message":"Product with SKU : PRODUCT_OPTION_SKU has been updated."
      {
+
}
        "order_id":"462",
+
 
        "invoice_number":"INV-2011-0013",
+
Failed request:  
        "store_name":"Test Store: Please Ignore",
+
{
        "firstname":"Albert",
+
  "success": false,
        "lastname":"Pinto",
+
  "message":"Respective Error Message."
        "email":"no-reply-4138465@bigfootretail.com",
 
        "telephone":"9999999999",
 
        "mobile":"",
 
        "shipping_firstname":"Albert",
 
        "shipping_lastname":"Pinto",
 
        "shipping_company":"",
 
        "shipping_address_1":"Street Address 1",
 
        "shipping_address_2":" Street Address 2",
 
        "shipping_city":"New Delhi",
 
        "shipping_state":"Delhi",
 
        "shipping_postcode":"110070",
 
        "shipping_country":"India",
 
        "shipping_method":"Amazon",
 
        "order_total":"5399.0000",
 
        "entered_weight":"",
 
        "currency":"INR",
 
        "date_added":"2013-09-15 18:54:36",
 
        "date_modified":"2013-11-15 13:37:51",
 
        "order_status":"Ready for Dispatch",
 
        "coupon_amount":null,
 
        "coupon":null,
 
        "payment_method":"Amazon",
 
        "customer_group":null,
 
        "product_name":"Sena Cases * MacBook Air 13? * Folio-Croco Black (816016)",
 
        "model":"",
 
        "quantity":"1",
 
        "product_price":"5129.0500",
 
        "product_tax":"0.0000",
 
        "tax_class":null,
 
        "option":null,
 
        "option_value":null,
 
        "courier":"BLUEDART",
 
        "awb_number":"43917861304"
 
      }
 
  ]
 
 
}
 
}
  
Line 77: Line 42:
 
'''key''' : API Key provided by KartRocket.(Required)
 
'''key''' : API Key provided by KartRocket.(Required)
  
==== Filters ====
+
'''sku''' : Product SKU in KartRocket system. (Required)
 
 
'''order_id''' : Order Id Id in KartRocket system.
 
 
 
'''date_from''': Order added date (Min). UNIX Time Stamp e.g. 1388998982.
 
 
 
'''date_to''': Order added date (Max). UNIX Time Stamp e.g. 1388998982.
 
  
'''updated_at_from''': Order modified date (Min). UNIX Time Stamp e.g. 1388998982.
+
'''option_sku''' : Product option SKU in KartRocket system. (Required)
  
'''updated_at_to''': Order modified date (Max). UNIX Time Stamp e.g. 1388998982.
+
'''qty''' : New quantity of product. (Optional)
  
'''order_status_id''': Order status id. Refer Appendix 1.
+
'''price''' : New price of product. (Optional)
  
Note: If you did not provide the order_id it will give all orders in response.
+
'''weight''' : New weight of product. (Optional)

Revision as of 08:12, 29 May 2014

Update Product Option Stock

Request

User can update quantity and price and weight of a product's option value by making a HTTP GET Request on the following URL.


YOUR_STORE_URL_ON_KARTROCKET.'index.php?route=feed/web_api/optionstock&key='.WEB_API_KEY. '&sku='.PRODUCT_SKU. '&option_sku='.PRODUCT_OPTION_SKU.'&qty='.PRODUCT_OPTION_QUANTITY. '&price='.PRODUCT_OPTION_PRICE.'&weight='.PRODUCT_OPTION_WEIGHT;

Example

http://test.kartrocket.co/index.php?route=feed/web_api/ optionstock &key=1234XYZ&sku=SKU01&option_sku=OPTIONSKU01&qty=10&price=999&weight=1;

Response

Successful request:
{
   "success":true,
   "message":"Product with SKU : PRODUCT_OPTION_SKU has been updated."
}

Failed request: 
{
   "success": false,
   "message":"Respective Error Message."
}



Parameters Description

key : API Key provided by KartRocket.(Required)

sku : Product SKU in KartRocket system. (Required)

option_sku : Product option SKU in KartRocket system. (Required)

qty : New quantity of product. (Optional)

price : New price of product. (Optional)

weight : New weight of product. (Optional)