Introduction

KartRocket API is a service that enables the user to make an http call for various operations.

The following are few services that is provided by KartRocket API:

  • Get Category and Categories
  • Get Product(s)
  • Get Order(s)
  • Update Order History
  • Add Order

Authentication

API Key based Authentication

KartRocket API uses Key to identify a customer and authenticate.


Get Category and Categories

Get Category

Request

Category information can be fetch by making a HTTP GET Request on the following URL.

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

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

Response

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

[cc lang=”php”]

{
“success”:true,
“category”:{
“id”:”1″,
“name”:”Accessories”,
“description”:””,
“href”:”http:\/\/saahil.kartrocket.co\/index.php?route=product\/category&category_id=1″
}
}

[/cc]

 

Parameters Description

key : API Key provided by KartRocket.(Required)

id : Category Id. (Required)

 

Get Categories

Request

Category information can be fetch by making a HTTP GET Request on the following URL.

[cc lang=”php”]

YOUR_STORE_URL_ON_KARTROCKET.’index.php?route=feed/web_api/categories&key=’.WEB_API_KEY. ‘&parent=’.CATEGORY_PARENT_ID. ‘&level=’.CATEGORY_LEVEL;

e.g.; http://test.kartrocket.co/index.php?route=feed/web_api/categories &key=1234XYZ&parent=0&level=1;

[/cc]

Response

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

[cc lang=”php”]

{
“success”:true,
“categories”:[
{
“category_id”:”1″,
“parent_id”:”0″,
“name”:”Accessories”,
“image”:false,
“href”:”http:\/\/test.kartrocket.co\/index.php?route=product\/category&category_id=1″,
“categories”:null
},
{
“category_id”:”9″,
“parent_id”:”0″,
“name”:”Bindass “,
“image”:false,
“href”:”http:\/\/test.kartrocket.co\/index.php?route=product\/category&category_id=9″,
“categories”:null
},
{
“category_id”:”4″,
“parent_id”:”0″,
“name”:”Clothing “,
“image”:false,
“href”:”http:\/\/test.kartrocket.co\/index.php?route=product\/category&category_id=4″,
“categories”:null
},
{
“category_id”:”6″,
“parent_id”:”0″,
“name”:”Consumables”,
“image”:false,
“href”:”http:\/\/test.kartrocket.co\/index.php?route=product\/category&category_id=6″,
“categories”:null
}
]
}

[/cc]

 

Parameters Description

key : API Key provided by KartRocket.(Required)

parent : Parent of the category. Used when you want to get subcategories of a particular category. (Optional)

level : Up to which level you want the API to traverse in category tree. (Optional)

 


Get Product(s)

Get Product

Request

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

[cc lang=”php”]

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

e.g.; 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;

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

[/cc]

Response

[cc lang=”php”]

{
“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”
}
]
}
]
}
}

[/cc]

Parameters Description

key : API Key provided by KartRocket.(Required)

id : Product Id in KartRocket system. (Required)

sku : Product SKU in KartRocket system. (Optional)

 

Note: If product id is not provided then SKU can be used and vice-versa.

Get Products

Request

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

[cc lang=”php”]

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

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

[/cc]

Response

[cc lang=”php”]

{
“success”:true,
“products”:[
{
“id”:”141″,
“name”:”Ajrak Hand Block Print Cotton Saree”,
“description”:”SKU : SR_JP_142<\/p>\nSize -: Length – 5.5 metre,\u00a0Blouse – 80 cm
Ajrak Hand Block Print Cotton Saree<\/span><\/span><\/p>\nWash Care – Wash\u00a0<\/span>separately\u00a0for the first time<\/span><\/span><\/p>\nPre-finished saree with fall & peko\u00a0<\/strong><\/p>\nThe colors in the image may vary a little from the actual product as a camera can’t match perspective of an eye. We have tried to keep it as close as possible.\u00a0<\/p>\nNo part returns would be accepted.\u00a0
If the product page shows SOLD OUT, you can mail with the product SKU or LINK to itokri@gmail.com If we finds something close to your choice or similar to it, we would definitely let you know on priority.\u00a0<\/p>\n

Shipping & Delivery:<\/a>\u00a0We ship within 24 hours of\u00a0receiving\u00a0the payment\u00a0confirmation through Blue Dart. We don’t sell what we don’t have in stock.\u00a0
Refund:<\/a><\/strong>\u00a0If you\u00a0don’t\u00a0like the product, or if it reaches you wrong, we’ll refund the way you want us to…Cash, Replacement or otherwise.\u00a0<\/h4>\n

ALL PRODUCTS ON ITOKRI<\/a><\/h4>\n\u00a0<\/span><\/p>”,
“pirce”:”Rs.2,400″,
“href”:”http:\/\/test.kartrocket.co\/index.php?route=product\/product&product_id=141″,
“thumb”:”\/\/cdn.kartrocket.com\/all-stores\/image_test\/data\/Fotor01028112824-300×500.jpg”,
“special”:false,
“rating”:0
},
{
“id”:”194″,
“name”:”Batik Maheshwari Silk with Zari Border Saree”,
“description”:”SKU : SR_JP_125<\/p>\nBatik Maheshwari Silk with Zari Border<\/p>\nSize -: Length – 5.5 metre,\u00a0Blouse – 70 cm
Wash Care -\u00a0<\/span>Dry Clean\u00a0<\/span><\/p>\nPre-finished saree with fall & peko\u00a0<\/strong><\/p>\nThe colors in the image may vary a little from the actual product as a camera can’t match perspective of an eye. We have tried to keep it as close as possible.\u00a0<\/p>\nNo part returns would be accepted.\u00a0
If the product page shows SOLD OUT, you can mail with the product SKU or LINK to itokri@gmail.com If we finds something close to your choice or similar to it, we would definitely let you know on priority.\u00a0<\/p>\n

Shipping & Delivery:<\/a>\u00a0We ship within 24 hours of\u00a0receiving\u00a0the payment\u00a0confirmation through Blue Dart. We don’t sell what we don’t have in stock.\u00a0
Refund:<\/a><\/strong>\u00a0If you\u00a0don’t\u00a0like the product, or if it reaches you wrong, we’ll refund the way you want us to…Cash, Replacement or otherwise.\u00a0<\/h4>\n

ALL PRODUCTS ON ITOKRI<\/a><\/h4>”,
“pirce”:”Rs.2,800″,
“href”:”http:\/\/test.kartrocket.co\/index.php?route=product\/product&product_id=194″,
“thumb”:”\/\/cdn.kartrocket.com\/all-stores\/image_test\/data\/Fotor01026193541-300×500.jpg”,
“special”:false,
“rating”:0
}
]
}

[/cc]

Parameters Description

key : API Key provided by KartRocket.(Required)

category : Category Id in KartRocket system. (Optional)

 

 


Get Order(s)
User can get Order data by sending a HTTP GET Request to the following URL.
Request
[cc lang=”php”]
YOUR_STORE_URL_ON_KARTROCKET.’index.php?route=feed/web_api/orders&key=’.WEB_API_KEY.’&order_id=’.ORDER_ID’
e.g.; http://test.kartrocket.co/index.php?route=feed/web_api/orders&key=1234XYZ &order_id=442
[/cc]

Response

[cc lang=”php”]

{
“success”:true,
“orders”:[
{
“order_id”:”462″,
“invoice_number”:”INV-2011-0013″,
“store_name”:”Test Store: Please Ignore”,
“firstname”:”Albert”,
“lastname”:”Pinto”,
“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″
}
]
}
Parameters Description
key : API Key provided by KartRocket.(Required)
order_id : Order Id Id in KartRocket system. (Required)

[/cc]

Note: If you did not provide the order_id it will give all orders in response.
Update Order Status

User can update order statuses by sending a HTTP GET Request to the following URL.

Request

[cc lang=”php”]

YOUR_STORE_URL_ON_KARTROCKET.’index.php?route=feed/web_api/updateorder&key=’.WEB_API_KEY.’&order_id=’.ORDER_ID. ‘&order_status_id=’.ORDER_STATUS_ID. ‘&courier_company=’.COURIER_COMPANY_NAME. ‘&awb_number=’.AWB_NUMBER;

e.g.; http://test.kartrocket.co/index.php?route=feed/web_api/updateorders&key=1234XYZ &order_id=442&order_status_id=18&courier_company=BLAHBLAH&awb_number=9090909090

[/cc]

Response

[cc lang=”php”]

{
“success”:true,
“order_update”:true
}
[/cc]

 

Parameters Description

key : API Key provided by KartRocket.(Required)

order_id : Order Id Id in KartRocket system. (Required)

order_status_id : Order Status Id as per. Appendix 1. (Required)

courier_company : Courier Company name. (Required)

awb_number : Airway Bill Number.

 


Add Order

User can create order by sending a HTTP POST Request on the following URL.

[cc lang=”php”]

YOUR_STORE_URL_ON_KARTROCKET.’index.php?route=feed/web_api/addorder&key=’.WEB_API_KEY;

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

[/cc]

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

Request

[cc lang=”php”]

$params is the array consisting JSON data to create order. Index ‘data’ is critical for the system.

$params[‘data’] = {

“import_order_id”:”1234567890″, #Reference Order Id, Not Required.
“firstname”:”Albert”,
“lastname”:”Pinto”,
“email”:”albert.pinto@xyz.com”,
“company”:””,
“address_1″:”Address Line 1”,
“address_2″:” Address Line 2″,
“city”:”Shipment City”,
“postcode”:” Shipment Postcode”,
“state”:” Shipment State “,
“country_code”:”IN”,
“telephone”:”98XXXXXXXX”,
“mobile”:”98XXXXXXXX”,
“fax”:”98XXXXXXXX “,
“payment_method”:” Payment Method”,
“payment_code”:”Payment Code”,
“shipping_method”:”Shipment Method”,
“shipping_code”:”Shipment Code”,
“products”:[
{
“name”:”Apple iPhone 4Sx”,
“model”:”MB0010″,
“sku”:”MB0010″,
“quantity”:1,
“subtract”:1,
“price”:145,
“total”:145,
“tax”:6.9047619047619,
“reward”:0
},

{
“name”:”Apple iPhone 4C”,
“model”:”MB0011″,
“sku”:”MB0011″,
“quantity”:1,
“subtract”:1,
“price”:145,
“total”:145,
“tax”:6.9047619047619,
“reward”:0
}
],
“totals”:{
“handling”:44,
“low_order_fee”:77,
“sub_total”:145,
“tax”:7,
“total”:266
},
“weight”:1,
“comment”:””,
“total”:266
}

[/cc]

Response

If your request was successful and order was created.

[cc lang=”php”]
{
“success”:true,
“order_added”:{
“status”:”Order created successfully”,
“order_id”:”513″
}
}
If your request was unsuccessful because of some error or data problem.
{
“success”:false,
“error”:”Respective Error Message.”
}
[/cc]

If your request was unsuccessful because of some error or data problem.

[cc lang=”php”]
{
“success”:false,
“error”:”Respective Error Message.”
}
[/cc]

 


Appendix 1

 

Order Status Id Order Status
1 Pending
3 Shipped
5 Complete
7 Canceled
10 Failed CC
17 Pending-COD Confirmed
18 Ready to Dispatch
19 Pending-CC Confirmed
20 Returned
21 Cancelled Against New
22 RTO Initiated-Logistics Partner
23 RTO Initiated-Customer
24 RTO Received-Logisitics Partner
25 RTO Received-Customer
26 Lost/Stolen
27 Delivered

 


Download the PDF File


KARTROCKET API Version 1.1

Prabhat Singh
11/27/2013

Thank You for contacting us. Our executives will call
you shortly.