User Tools

Site Tools


en:api_solutions:api_list_category

API-Interface #4: List of categories

API-client interface to send XML-requests and receiving XML/JSON response from the API server categories for products


XML-request (example)

Request URL
https://axefile.com/api/category_list/
Method POST
Request
<?xml version="1.0" encoding="UTF-8"?>
<request api_version="1.0">
    <merchant_data>
        <merchant>120</merchant>
        <signature>J6NDWTCOPZ2GLD3GGODXIYJESHBUGT13</signature>
    </merchant_data>
    <data>
        <language>en</language>
        <format>xml</format>
    </data>
</request>

Request parameters

Name Status Description Data Type
merchantrequiredThe unique identifier of the seller (agent), received at registration (you can view My Office) (integer)
signaturerequiredThe signature request is calculated as follows (PHP):
$sign=sha1(md5($merchant.$shop_hash))

where
$merchant - the unique identifier of the seller (agent)
$shop_hash - secret key, which can be obtained here: https://axefile.com/en/partner/referal

(string)
languageoptionalIn what language to display the product name (ru - Russian, en - English). Default: en (string). The result will be displayed only if there have goods in the name of the requested language. For example, if you set the requested value of “ru”, and product name in Russian is not available, and the name in English is present, the result is absent and vice versa. (string)
formatoptionalThe format of the response to the request (xml/json). Default: xml (string)

XML response to the request (Example)

<?xml version="1.0" encoding="UTF-8"?>
<response api_version="1.0">
  <category id="0">
    <name_category>Design assets</name_category>
  </category>
  <category id="1">
    <name_category>eBooks</name_category>
  </category>
  <category id="2">
    <name_category>Videos and films</name_category>
  </category>
  <category id="3">
    <name_category>Audio files</name_category>
  </category>
  <category id="4">
    <name_category>Software</name_category>
  </category>
  <category id="5">
    <name_category>Games</name_category>
  </category>
  <category id="6">
    <name_category>Codes and accounts</name_category>
  </category>
  <status status_descr="Successful sending a response from the API-server">success</status>
</response>

Response parameters (XML)

Name Description Data Type
categoryCategory for products containing attribute id - unique identifier category (integer). Categories can contain one or a plurality of nested categories, but not more than 4 levels of nesting.
Identifiers of major categories:
Design assets — 0
eBooks — 1
Videos and films — 2
Audio files — 3
Software — 4
Games — 5
Codes and accounts — 6
category/name_categoryCategory name (string)
statusThe status of the response from the API server: success - successfully completed, error - runtime error. For a more complete understanding of the tag is transferred XML-Attribute @status_descr - status description (string)

JSON response to the request (Example)

//The answer comes to JSON format, but we have to render its conclusions in the form of a data array (PHP):
print_r(json_decode($json_data, TRUE);)
Array
(
    [category] => Array
        (
            [0] => Array
                (
                    [category_id] => 0
                    [parent_id] =>
                    [category_title] => Design assets
                )
 
            [1] => Array
                (
                    [category_id] => 1
                    [parent_id] =>
                    [category_title] => eBooks
                )
 
            [2] => Array
                (
                    [category_id] => 2
                    [parent_id] =>
                    [category_title] => Videos and films
                )
 
            [3] => Array
                (
                    [category_id] => 3
                    [parent_id] =>
                    [category_title] => Audio files
                )
 
            [4] => Array
                (
                    [category_id] => 4
                    [parent_id] =>
                    [category_title] => Software
                )
 
            [5] => Array
                (
                    [category_id] => 5
                    [parent_id] =>
                    [category_title] => Games
                )
 
            [6] => Array
                (
                    [category_id] => 6
                    [parent_id] =>
                    [category_title] => Codes and accounts
                )
 
        )
 
    [status] => success
    [status_descr] => Successful sending a response from the API-server
)

Response parameters (JSON)

Name Description Data Type
categoryCategory for products containing attribute id - unique identifier category (integer). Categories can contain one or a plurality of nested categories, but not more than 4 levels of nesting.
Identifiers of major categories:
Design assets — 0
eBooks — 1
Videos and films — 2
Audio files — 3
Software — 4
Games — 5
Codes and accounts — 6
category/category_idUnique identifier category (ID category) (integer)
category/parent_idThe unique ID of the parent category (ID of the parent category) (integer)
category/category_titleThe name of the category. It may be displayed in one of the languages ( ru - Russian, en - English ) that was specified in the query language . (string)
category/childrenPresent in the event that in the current category has sub-subcategories. It may contain a list of hierarchically nested categories of goods (single or multiple nested sub-categories), but no more than 3 levels of investment.
statusThe status of the response from the API server: success - successfully completed, error - runtime error. (string)
status_descrDescription of the status of the response from the API server. (string)

To obtain and use API-solutions you need to log in using the login form for partners / sellers to get seretny key. If you are not registered as a partner, you can do it right now: go to the registration.

en/api_solutions/api_list_category.txt · Last modified: 2016/03/18 10:29 by root