Catalog side API provides GET or POST interface to get information about categories, products, manufacturers (brands) and other information related to the products set up in AbanteCart.
Any request can contain GET language parameter. This will switch response data to new language. Example: language=es
language parameter needs to be passed only one time. It is stored in the session for all next requests.
Get Single Product
You can get all product details by unique product ID.
Route: a/product/product
Method: GET
Parameter | Meaning | Notes |
---|---|---|
callback | A JavaScript function to run when the response is received | Optional parameter allows you to specify a JavaScript function to handle query results for pure client-side implementations. Embed the API query in <script> tags. Define the callback function in <script> tags. |
product_id | Unique product ID on products table | Required parameter |
api_key | Unique API key that is set in the control panel | This is optional key that can be set to limit unauthorized (accidental) access to your API |
Example request:
http://demo.abantecart.com/index.php?rt=a/product/product&product_id=85
with key: http://demo.abantecart.com/index.php?rt=a/product/product&product_id=85&api_key=[key_string]
Get Product Resources
You can get all product resource by unique product ID.
Route: a/product/resources
Method: GET
Parameter | Meaning | Notes |
---|---|---|
callback | A JavaScript function to run when the response is received | Optional parameter allows you to specify a JavaScript function to handle query results for pure client-side implementations. Embed the API query in <script> tags. Define the callback function in <script> tags. |
product_id | Unique product ID on products table | Required parameter |
resource_type | Type of resource to show. Now supported only image type | Default image type |
api_key | Unique API key that is set in the control panel | This is optional key that can be set to limit unauthorized (accidental) access to your API |
Example request:
http://demo.abantecart.com/index.php?rt=a/product/resources&product_id=85
{ "total":3, "resources":[ { "original":"http:\/\/dev01.algozone.net\/abantecart_branch100\/public_html\/resources\/image\/18\/6d\/6.jpg", "thumb":"http:\/\/dev01.algozone.net\/abantecart_branch100\/public_html\/image\/thumbnails\/18\/6d\/azdemoproduct351jpg-100054-45x45.jpg" }, { "origial":"http:\/\/dev01.algozone.net\/abantecart_branch100\/public_html\/resources\/image\/18\/6d\/7.jpg", "thumb":"http:\/\/dev01.algozone.net\/abantecart_branch100\/public_html\/image\/thumbnails\/18\/6d\/azdemoproduct352jpg-100055-45x45.jpg" }, { "origial":"http:\/\/dev01.algozone.net\/abantecart_branch100\/public_html\/resources\/image\/18\/6d\/8.jpg", "thumb":"http:\/\/dev01.algozone.net\/abantecart_branch100\/public_html\/image\/thumbnails\/18\/6d\/azdemoproduct35jpg-100056-45x45.jpg" } ] }
Get Related Products
You can get all related products to given product with unique product ID.
Route: a/product/related
Method: GET
Parameter | Meaning | Notes |
---|---|---|
callback | A JavaScript function to run when the response is received | Optional parameter allows you to specify a JavaScript function to handle query results for pure client-side implementations. Embed the API query in <script> tags. Define the callback function in <script> tags. |
product_id | Unique product ID on products table | Required parameter |
api_key | Unique API key that is set in the control panel | This is optional key that can be set to limit unauthorized (accidental) access to your API |
Example request: http://demo.abantecart.com/index.php?rt=a/product/related&product_id=85
Get Product Reviews
You can get product reviews by unique product ID.
Route: a/product/product/review
Method: GET
Parameter | Meaning | Notes |
---|---|---|
callback | A JavaScript function to run when the response is received | Optional parameter allows you to specify a JavaScript function to handle query results for pure client-side implementations. Embed the API query in <script> tags. Define the callback function in <script> tags. |
product_id | Unique product ID on products table | Required parameter |
api_key | Unique API key that is set in the control panel | This is optional key that can be set to limit unauthorized (accidental) access to your API |
Example request: http://demo.abantecart.com/index.php?rt=a/product/product&product_id=85
{ "average":4, "records":"1", "page":"1", "total":1, "rows":[ { "author":"Stefania V", "rating":"4", "text":"it works very well moisturing and cleaning and unlike many other healthy shampoos it doesn't open the hair platelets too far and therefore doesn't feel so dry and sticky so I can get away without using a conditioner. Great value.", "date_added":"07\/09\/2011" } ] }
Get Categories
You can get category details and subcategories if available. If category ID or path is provided you will get details for matched category and list (array) of available immediate children.
Route: a/product/category
Method: GET
Parameter | Meaning | Notes |
---|---|---|
callback | A JavaScript function to run when the response is received | Optional parameter allows you to specify a JavaScript function to handle query results for pure client-side implementations. Embed the API query in <script> tags. Define the callback function in <script> tags. |
category_id | Unique category ID on products table | Optional parameter. If not provided all root categories are returned |
path | list of category IDs from parent to child to represent path to last category. | Optional path is separated by “_”. Example: 36_38 |
api_key | Unique API key that is set in the control panel | This is optional key that can be set to limit unauthorized (accidental) access to your API |
Example request: http://demo.abantecart.com/index.php?rt=a/product/category&category_id=36
with key: http://demo.abantecart.com/index.php?rt=a/product/category&category_id=36&api_key=[key_string]
{ "category_id":"36", "parent_id":"0", "sort_order":"1", "date_added":"2011-08-29 10:24:45", "date_modified":"2011-08-31 06:29:25", "status":"1", "language_id":"1", "name":"Makeup", "meta_keywords":"Makeup", "meta_description":"", "description":" \r\n\tAll your makeup needs, from foundation to eye shadow in hundreds of different assortments and colors.<\/p>\r\n", "store_id":"0", "thumbnail":"http:\/\/dev01.algozone.net\/abantecart_branch100\/public_html\/image\/thumbnails\/18\/71\/demoproduct04jpg-100124-120x120.jpg", "total_products":"7", "total_subcategories":"6", "subcategories":[ { "name":"Eyes", "category_id":"39", "sort_order":"0", "thumb":"http:\/\/dev01.algozone.net\/abantecart_branch100\/public_html\/image\/thumbnails\/18\/72\/demoproduct47png-100136-120x120.png" }, { "name":"Lips", "category_id":"41", "sort_order":"0", "thumb":"http:\/\/dev01.algozone.net\/abantecart_branch100\/public_html\/image\/thumbnails\/18\/72\/demoproduct083jpg-100134-120x120.jpg" }, { "name":"Nails", "category_id":"42", "sort_order":"0", "thumb":"http:\/\/dev01.algozone.net\/abantecart_branch100\/public_html\/image\/thumbnails\/18\/72\/demoproduct102jpg-100135-120x120.jpg" }, { "name":"Value Sets", "category_id":"37", "sort_order":"0", "thumb":"http:\/\/dev01.algozone.net\/abantecart_branch100\/public_html\/image\/thumbnails\/18\/72\/demoproduct112jpg-100137-120x120.jpg" }, { "name":"Face", "category_id":"38", "sort_order":"1", "thumb":"http:\/\/dev01.algozone.net\/abantecart_branch100\/public_html\/image\/thumbnails\/18\/72\/demoproduct05jpg-100132-120x120.jpg" }, { "name":"Cheeks", "category_id":"40", "sort_order":"9", "thumb":"http:\/\/dev01.algozone.net\/abantecart_branch100\/public_html\/image\/thumbnails\/18\/72\/demoproduct07jpg-100133-120x120.jpg" } ] }