Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

Info

language parameter needs to be passed only one time. It is stored in the session for all next requests.

Table of Contents


Get Single Product

You can get all product details by unique product ID.

Route: a/product/product

Method: GET


Panel


ParameterMeaningNotes
callbackA JavaScript function to run when the response is receivedOptional 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_idUnique product ID on products tableRequired parameter
api_keyUnique API key that is set in the control panelThis 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]

Code Block
languageactionscript3
themeDJango
titleExample response
linenumberstrue
collapsetrue
{
   "product_id":"85",
   "model":"Ck0010",
   "sku":"",
   "location":"",
   "stock_status_id":"1",
   "manufacturer_id":"13",
   "shipping":"1",
   "price":"$45.00",
   "tax_class_id":"1",
   "date_available":"2011-09-01",
   "weight":"0.08",
   "weight_class_id":"5",
   "length":"0.00",
   "width":"0.00",
   "height":"0.00",
   "length_class_id":"0",
   "status":"1",
   "date_added":"2011-09-02 11:48:08",
   "date_modified":"2011-09-07 04:24:25",
   "viewed":"21",
   "sort_order":"0",
   "subtract":"1",
   "minimum":"1",
   "cost":"0.0000",
   "language_id":"1",
   "name":"Forbidden euphoria Eau de Parfum Spray ",
   "meta_keywords":"",
   "meta_description":"",
   "description":"
\r\n\tPossessing an innate confidence and sophistication,
    she is just starting to explore her sexuality. What she doesn't yet know is that she already is every man's fantasy.”,
   "store_id":"0",
   "manufacturer":"Calvin Klein",
   "stock_status":"In Stock",
   "thumbnail":"http:\/\/dev01.algozone.net\/abantecart_branch100\/public_html\/image\/thumbnails\/18\/6d\/azdemoproduct351jpg-100054-180x180.jpg",
   "special":false,
   "discounts":[

   ],
   "product_price":"45.0000",
   "stock":null,
   "options":{
       "323":{
           "product_option_id":"323",
           "attribute_id":"0",
           "group_id":"0",
           "name":"Fragrance Size",
           "option_value":{
               "669":{
                   "product_option_value_id":"669",
                   "attribute_value_id":"0",
                   "group_id":"0",
                   "name":"1 oz",
                   "sku":"",
                   "price":"0.0000",
                   "prefix":"$",
                   "weight":"0.00000000",
                   "weight_type":"lbs"
               },
               "670":{
                   "product_option_value_id":"670",
                   "attribute_value_id":"0",
                   "group_id":"0",
                   "name":"1.7 oz",
                   "sku":"",
                   "price":"18.0000",
                   "prefix":"$",
                   "weight":"0.00000000",
                   "weight_type":"lbs"
               },
               "671":{
                   "product_option_value_id":"671",
                   "attribute_value_id":"0",
                   "group_id":"0",
                   "name":"3.4 oz",
                   "sku":"",
                   "price":"23.5000",
                   "prefix":"$",
                   "weight":"0.00000000",
                   "weight_type":"lbs"
               }
           },
           "sort_order":"0",
           "element_type":"S",
           "html_type":"selectbox",
           "required":"0"
       }
   },
   "text_stars":"",
   "stars":"",
   "average":0,
   "tags":[
       {
           "tag":"fragrance"
       },
       {
           "tag":"women"
       }
   ]
}



Get Product Resources

You can get all product resource by unique product ID.

Route: a/product/resources

Method: GET


Panel


ParameterMeaningNotes
callbackA JavaScript function to run when the response is receivedOptional 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_idUnique product ID on products tableRequired parameter
resource_typeType of resource to show. Now supported only image typeDefault image type
api_keyUnique API key that is set in the control panelThis 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


Code Block
languageactionscript3
themeDJango
titleExample response
linenumberstrue
{
   "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


Panel


ParameterMeaningNotes
callbackA JavaScript function to run when the response is receivedOptional 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_idUnique product ID on products tableRequired parameter
api_keyUnique API key that is set in the control panelThis 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 

Code Block
languageactionscript3
themeDJango
titleExample response
linenumberstrue
collapsetrue
{
   "total":2,
   "related_products":[
       {
           "product_id":"83",
           "name":"Armani Code Sport",
           "model":"GRM004",
           "rating":0,
           "stars":"",
           "price":"$37.50",
           "options":[

           ],
           "special":null,
           "image":"http:\/\/dev01.algozone.net\/abantecart_branch100\/public_html\/image\/thumbnails\/18\/6b\/azdemoproduct32jpg-100021-38x38.jpg",
           "thumb":"http:\/\/dev01.algozone.net\/abantecart_branch100\/public_html\/image\/thumbnails\/18\/6b\/azdemoproduct32jpg-100021-120x120.jpg",
           "cart_add_rt":"a\/checkout\/cart"
       },
       {
           "product_id":"84",
           "name":"Armani Code Pour Femme",
           "model":"GRM005",
           "rating":0,
           "stars":"",
           "price":"$30.00",
           "options":{
               "322":{
                   "product_option_id":"322",
                   "attribute_id":"0",
                   "group_id":"0",
                   "name":"Size",
                   "option_value":{
                       "666":{
                           "product_option_value_id":"666",
                           "attribute_value_id":"0",
                           "group_id":"0",
                           "name":"30 ml",
                           "sku":"",
                           "price":"0.0000",
                           "prefix":"$",
                           "weight":"0.00000000",
                           "weight_type":"lbs"
                       },
                       "667":{
                           "product_option_value_id":"667",
                           "attribute_value_id":"0",
                           "group_id":"0",
                           "name":"50 ml",
                           "sku":"",
                           "price":"20.0000",
                           "prefix":"$",
                           "weight":"0.00000000",
                           "weight_type":"lbs"
                       },
                       "668":{
                           "product_option_value_id":"668",
                           "attribute_value_id":"0",
                           "group_id":"0",
                           "name":"75 ml",
                           "sku":"",
                           "price":"32.0000",
                           "prefix":"$",
                           "weight":"0.00000000",
                           "weight_type":"lbs"
                       }
                   },
                   "sort_order":"0",
                   "element_type":"S",
                   "html_type":"selectbox",
                   "required":"0"
               }
           },
           "special":null,
           "image":"http:\/\/dev01.algozone.net\/abantecart_branch100\/public_html\/image\/thumbnails\/18\/6b\/azdemoproduct34jpg-100018-38x38.jpg",
           "thumb":"http:\/\/dev01.algozone.net\/abantecart_branch100\/public_html\/image\/thumbnails\/18\/6b\/azdemoproduct34jpg-100018-120x120.jpg",
           "cart_add_rt":"a\/product\/product"
       }
   ]
}



Get Product Reviews

You can get product reviews by unique product ID.

Route: a/product/product/review

Method: GET


Panel


ParameterMeaningNotes
callbackA JavaScript function to run when the response is receivedOptional 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_idUnique product ID on products tableRequired parameter
api_keyUnique API key that is set in the control panelThis 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

Code Block
languageactionscript3
themeDJango
titleExample response
linenumberstrue
{
   "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


Panel


ParameterMeaningNotes
callbackA JavaScript function to run when the response is receivedOptional 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_idUnique category ID on products tableOptional parameter. If not provided all root categories are returned
pathlist of category IDs from parent to child to represent path to last category.Optional path is separated by “_”. Example: 36_38
api_keyUnique API key that is set in the control panelThis 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

Code Block
languageactionscript3
themeDJango
titleExample response
linenumberstrue
{
   "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"
       }
   ]
}



Get Manufacturers

You can get manufacturer details and all manufacturers available. If manufacturer ID is provided you will get details for matched manufacturer and list (array) of available manufacturers if no input is provided.

Route: a/product/manufacturer

Method: GET


Panel


ParameterMeaningNotes
callbackA JavaScript function to run when the response is receivedOptional 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.

manufacturer_idUnique manufacturer IDOptional parameter. If not provided all manufacturers are returned
api_keyUnique API key that is set in the control panelThis 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/manufacturer&manufacturer_id=12 

Code Block
languageactionscript3
themeDJango
titleExample response
linenumberstrue
{
   "manufacturer_id":"12",
   "name":"Benefit",
   "sort_order":"0",
   "store_id":"0"
}



Get Products With Flexible Filtering

You can get all products assigned to matching category ID, Manufacturer ID, keyword, etc

Info

Filtering is based on jQgrid advanced search concept. You can check more details here: 
http://www.trirand.com/jqgridwiki/doku.php?id=wiki:advanced_searching

Route: a/product/filter

Method: GET


Panel


ParameterMeaningNotes
callbackA JavaScript function to run when the response is receivedOptional 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.

-Quit filter parameters-
category_idUnique category IDOptional parameter
manufacturer_idUnique manufacturer IDOptional parameter.
keywordKeyword text to be searched in product name, mode or SKUspace separated words to be searched
matchIdentify type of match for keyword based search. Allowed values: any, all or exact

any - result will contain any of the matched keywords separated by space all - all keywords must be present in the result exact - will do matching of whole keyword.

match works only in combination with keyword

Default is exact match

pfrom and ptosearch for price range from pfrom to pto priceOnly starting pfrom or finishing price range pto can be specified.
-Advanced filter parameters-
pageShow specific page for the resultin combination with rows
rowsNumber or results in one page setdefault 10
sidxData result to use for sorting (Sort Index)

Sorting is possible by name, model, price and sort_order

Default sorting is done by sort_order data column.
sordSorting order direction. Possible values DESC descending and ASC ascendingDefault ASC sorting order
_searchParameter to identify that advanced search is performed with JSON based filter string.Possible values true or false
filtersJSON based string with set of parameters to perform advanced search and filtering.This filter string is based on advanced jGgrid searching. See below
api_keyUnique API key that is set in the control panelThis is optional key that can be set to limit unauthorized (accidental) access to your API



Note

One of following search parameters is required category_id, manufacturer_id or keyword

- Advanced jqGrid based search and filtering: Please refer to page below for more details on advanced filter construction http://www.trirand.com/jqgridwiki/doku.php?id=wiki:advanced_searching


Example requests:

Extract products in category ID 36 
http://demo.abantecart.com/index.php?rt=a/product/filter&category_id=36


Extract product for manufacturer with ID 14 
http://demo.abantecart.com/index.php?rt=a/product/filter&manufacturer_id=14


Search for product with keyword ab and sort by price. 
http://demo.abantecart.com/index.php?rt=a/product/filter&keyword=ab&page=1&rows=10&sidx=price&sort=ACS


Search for product name only with ab as part of the name 
http://demo.abantecart.com/index.php?rt=a/product/filter&keyword=a&page=1&rows=10&sidx=price&sord=ACS&_search=true&filters={"groupOp":"AND","rules":[{"field":"name","op":"cn","data":"ab"}]}