User Tools

Site Tools


API-Interface # 5: List of products by category

API-client interface to send XML-requests and receiving XML / JSON response from the server API with a list of items in the category

XML-request (example)

Request URL
Method POST
<?xml version="1.0" encoding="UTF-8"?>
<request api_version="1.0">

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):

$merchant - the unique identifier of the seller (agent)
$shop_hash - secret key, which can be obtained here:

categoryrequiredUnique identifier category (integer)
pageoptionalThe page number at which to start output results. По умолчанию: 0 (integer)
rowsoptionalThe number of entries per page. Default: 25 (integer)
currencyoptionalIn what currency to deduce the value of the goods. Available Currency: uah,usd,rub,eur. Default: usd (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)
orderoptionalThe sort of results:
dateASC - by date - Old to New
dateDESC - by date - New to Old
titleASC - by title A - Z
titleDESC - by title Z - A
priceASC - by price - ASC
priceDESC - by price - DESC
ratingASC - rated Seller - ASC
ratingDESC - rated Seller - DESC
Default: rated Seller - ratingDESC
If not specified, the list is sorted by the seller
Values ​​are case sensitive.
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">
  <goods cnt="2">
    <good id="0">
      <title>Russian release Discuz X3.1 20140301 from TEAM</title>
      <username>John Wallker</username>
    <good id="1">
      <title>Announced shopping mall ECMall on 26.02.2011</title>
      <username>Andrew Akishin</username>
  <status status_descr="Successful sending a response from the API-server">success</status>
    <title>Site Manager CMS </title>

JSON response to the request (Example)

//Ответ приходит в JSON формате, но для визуализации мы его выводим в виде массива данных (PHP):
print_r(json_decode($json_data, TRUE);)
    [goods] => Array
            [0] => Array
                    [id] => 1222
                    [title] => Russian release Discuz X3.1 20140301 from TEAM
                    [price] => 250.00
                    [currency] => usd
                    [type] => 0
                    [unique] => 0
                    [good_num] => 0
                    [size_file] => 15434840
                    [mime] => zip
                    [hash_md5] => da77efae02883c240c12f177f5a5f212
                    [sales] => 0
                    [seller] => 169
                    [agent] => 10
                    [gift] => 5
                    [return] => 0
                    [moneyback] => 30
                    [seller_rating] => 101.00364067
                    [date_create] => 1432646361
                    [cnt_reviews_negative] => 0
                    [cnt_reviews_positive] => 0
                    [username] => John Wallker
                    [shop] => Banshee
            [1] => Array
                    [id] => 1220
                    [title] => Announced shopping mall ECMall on 26.02.2011
                    [price] => 0.18
                    [currency] => usd
                    [type] => 0
                    [unique] => 0
                    [good_num] => 0
                    [size_file] => 16780296
                    [mime] => zip
                    [hash_md5] => 66b9b573df99294e7f40c24eda1d5c51
                    [sales] => 47
                    [seller] => 145
                    [agent] => 5
                    [gift] => 5
                    [return] => 0
                    [moneyback] => 30
                    [date_create] => 1432288354
                    [seller_rating] => 101.00364067
                    [cnt_reviews_negative] => 0
                    [cnt_reviews_positive] => 2
                    [username] => Andrew Akishin
                    [shop] => Fortuna
    [cnt_goods] => 2
    [category_id] => 409
    [category_title] => Site Manager CMS
    [status] => success
    [status_descr] => Successful sending a response from the API-server

Response parameters (XML/JSON)

Name Description Date Type
goods/ Goods of the Seller. Attribute cnt - the total number of goods
goods/good/ Item ID seller outputted cycle. Attribute id - serial number
goods/good/idProduct ID(integer)
goods/good/titleProduct Name. It may be displayed in one of the languages (ru - Russian, en - English) that was specified in request parameter language. (string)
goods/good/priceThe cost of goods in the currency, which has been specified in the request (example: 250.00) (decimal(12,2))
goods/good/currencyCurrencies of commodity, which has been specified in the request. Possible values​​: uah,usd,rub,eur (string)
goods/good/typeProduct Type: 0 - archive file, 1 - the text of an arbitrary, 2 - arbitrary code on a single line, 3 - 16-digit code (integer)
goods/good/uniqueThe uniqueness of the product (single sale). 0 - sold unlimited times, 1 - only sold once (integer)
goods/good/good_numThe number of units available for sale (integer)
goods/good/size_fileSize of file in bytes. If the parameter is displayed type == 0 (архивный файл), for other values output: 0 (integer)
goods/good/mimeMIME-type of the digital product (more.... Displayed only when the parameters of the goods type == 0 (archive file), the remaining values ​​output: null (string)
goods/good/hash_md5The calculation of the checksum file MD5 algorithm. Displayed only when the parameters of the goods type == 0 (archive file), the remaining values ​​output: null (string)
goods/good/salesThe number of sales of goods (integer)
goods/good/sellerSeller ID (integer)
goods/good/agentPartner remuneration to the agent for the sale of this item is displayed as a percentage (%). (integer)
goods/good/giftBonus buyer a percentage (%) of the value of goods for the positive feedback on this product (integer)
goods/good/returnThe number of product returns (integer)
goods/good/moneybackMoneyback - is number of days period to return the funds paid by the buyer (integer)
goods/good/date_createDate Product format *unix time stamp (integer)
goods/good/seller_ratingSeller Rating (example: 101.00364067) (decimal(12,8))
goods/good/cnt_reviews_negativeNegative feedbacks Product (integer)
goods/good/cnt_reviews_positivePositive feedbacks Product (integer)
goods/good/usernameFirst and Last Name of Seller (string)
goods/good/shopName of shop (string)
category/idcategory ID (integer)
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)
cnt_goodsNumber of products in the category (integer)
status (XML)The status of the response from the API server: success - successfully completed, error - error. For a more complete understanding of the tag is transferred XML-Attribute @status_descr - status description (string)
status (JSON)The status of the response from the API server: success - successfully completed, error - error. (string)
status_descr (JSON)Description 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_of_products_by_category.txt · Last modified: 2015/09/26 10:44 by root