Get Products

From KartRocket API
Jump to: navigation, search

Get Product

Request

User can get Product information by making a HTTP GET Request on the following URL:


YOUR_STORE_URL_ON_KARTROCKET.’index.php?route=feed/web_api/product&key=’.WEB_API_KEY. ‘&id=’.PRODUCT_ID;

Example

http://test.kartrocket.co/index.php?route=feed/web_api/product &key=1234XYZ&id=1;

OR


YOUR_STORE_URL_ON_KARTROCKET.’index.php?route=feed/web_api/product&key=’.WEB_API_KEY. ‘&sku=’.PRODUCT_SKU;

Example

http://test.kartrocket.co/index.php?route=feed/web_api/product &key=1234XYZ&sku=SC001;


Response

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

{
		“success”:true,
				“product”:{
				“id”:”1″,
				“seo_h1″:null,
				“name”:”Bamboo Bangle (small)”,
				“manufacturer”:null,
				“model”:”JAGT-BGS-04″,
				“reward”:null,
				“points”:”0″,
				“image”:”//cdn.kartrocket.com/all-stores/image_saahil/data/IMG_9587_Itokri.com-600×800.jpg”,
				“images”:[
				null
				],
				“price”:”Rs.70″,
				“special”:false,
				“discounts”:[
				],
				“options”:[
				],
				“minimum”:”1″,
				“rating”:0,
				“description”:”Description of the Product.”,
				“attribute_groups”:[
				{
				"attribute_group_id":"1",
				"name":"Type",
				"attribute":[
					{
					"attribute_id":"1",
					"name":"Type",
					"text":"Accessories"
					}
				]
		}
		]
		}
}


Parameters Description

key : API Key provided by KartRocket.(Required)

id : Product Id in KartRocket system. (Required)

sku : Product SKU in KartRocket system. (Optional)

Get Products

Request

User can get all Products information by making a HTTP GET Request on the following URL.


YOUR_STORE_URL_ON_KARTROCKET.’index.php?route=feed/web_api/products&key=’.WEB_API_KEY. ‘&category=’.CATEGORY_ID;

Example

http://api.kartrocket.co/index.php?route=feed/web_api/products&key=APITEST&category=76

Response

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


{"success":true,
"products":
	[{"id":"140","name":"YOUR PRODUCT 2",
	"description":"SAMPLE PRODUCT DESCRIPTION","model":"","sku":"ID00002","pirce":"Rs.750",
	"href":"https:\/\/api.kartrocket.co\/index.php?route=product\/product&product_id=140",
	"thumb":"http:\/\/api.kartrocket.co\/nfs\/image_api\/cache\/data\/yourproduct2_image1-300x500.jpg",
	"special":false,"rating":0},{"id":"141","name":"YOUR PRODUCT 3",
	"description":"<p>SAMPLE PRODUCT DESCRIPTION ","model":"sdfsdf","sku":"ID00003",
	"pirce":"Rs.750","href":"https:\/\/api.kartrocket.co\/your-product-3","thumb":"http:\/\/api.kartrocket.co\/nfs\/image_api\/cache\/data\/yourproduct3_image1-300x500.jpg","special":"Rs.100","rating":0}
	]
}


Limits

When you send request:

http://api.kartrocket.co/index.php?route=feed/web_api/product&key=APITEST

It will fetch first hundred records. So, you may not get all products in that response.

Now for new chunk of products you have to send following request.

http://api.kartrocket.co/index.php?route=feed/web_api/product&key=APITEST&page=2


For next 100:

http://api.kartrocket.co/index.php?route=feed/web_api/product&key=APITEST&page=3

Parameters Description

key : API Key provided by KartRocket.(Required)

category : Category Id in KartRocket system. (Optional)