Add Channel Product

From KartRocket API
Jump to: navigation, search

Add Channel Product

Request

User can add channel product by sending a HTTP POST Request on the following URL.


YOUR_STORE_URL_ON_KARTROCKET.'index.php?route=feed/web_api/addchannelproduct&key='.WEB_API_KEY;

Example

e.g.; http://test.kartrocket.co/index.php?route=feed/web_api/addchannelproduct&key=1234XYZ;


Following is the JSON data format to be posted on above URL.

'data' is the parameter name consisting JSON data to create product. Parameter ‘data’ is critical for the system. System expects 'data' parameter and JSON data has to be sent into it.


data={
   "channel_id":"1", #Required
   "kartrocket_product_id":"139", #Required
   "kartrocket_product_sku":"ID00001", #Required
   "channel_product_sku":"AZZID0001", #Required
	}



Response

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


Successful request:
{
   "success":true,
   "channel_product_id":"5"
}

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


Parameters Description

key : API Key provided by KartRocket.(Required)

channel_id : Channel Id at KartRocket.(Required)

kartrocket_product_id : Kartrocket Product ID. (Required)

kartrocket_product_sku : Kartrocket Product SKU. (Required)

channel_product_sku : Product SKU or ID or Unique value at channel's system. (Required)


NOTE: you can send either kartrocket_product_id or kartrocket_product_sku or both since these are treated as filters. channel_product_sku is the channel's product sku/id that needs to be updated.

Sample File

[View Sample on Github]