User Tools

Site Tools


en:api_solutions:api_good_list_seller

API-Interface #2: List of products by Seller

API-client interface to send XML-requests and receiving XML/JSON response from the server API with a list of digital goods of seller


XML-request (example)

URL для передачи запроса
https://axefile.com/api/goods_user/
Метод POST
Запрос
<?xml version="1.0" encoding="UTF-8"?>
<request api_version="1.0">
    <merchant_data>
        <merchant>120</merchant>
        <signature>J6NDWTCOPZ2GLD3GGODXIYJESHBUGT13</signature>
    </merchant_data>
    <data>
        <seller>169</seller>
        <page>0</page>
        <rows>25</rows>
        <currency>usd</currency>
        <language>en</language>
        <order>dateDESC</order>
        <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)
sellerrequiredThe unique identifier of the seller of goods (integer)
pageoptionalThe page number at which to start output results. Default: 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
Default: by date of adding goods - dateDESC
If not specified, it is sorted by date of goods
Values ​​are case sensitive.
(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">
  <goods cnt="2">
    <good id="0">
      <id>1220</id>
      <title>Announced shopping mall ECMall on 26.02.2011</title>
      <price>150.00</price>
      <currency>usd</currency>
      <type>0</type>
      <unique>0</unique>
      <good_num>1</good_num>
      <size_file>16780296</size_file>
      <mime>zip</mime>
      <hash_md5>66b9b573df99294e7f40c24eda1d5c51</hash_md5>
      <sales>108</sales>
      <seller>169</seller>
      <agent>5</agent>
      <gift>5</gift>
      <return>0</return>
      <moneyback>30</moneyback>
      <id_category>403</id_category>
      <date_create>1442067677</date_create>
      <cnt_reviews_negative>0</cnt_reviews_negative>
      <cnt_reviews_positive>0</cnt_reviews_positive>
    </good>
    <good id="1">
      <id>1222</id>
      <title>Russian release CMS Discuz X3.1 20140301 from TEAM Chinascript.ru</title>
      <price>0.00</price>
      <currency>usd</currency>
      <type>0</type>
      <unique>0</unique>
      <good_num>1</good_num>
      <size_file>15434840</size_file>
      <mime>zip</mime>
      <hash_md5>da77efae02883c240c12f177f5a5f212</hash_md5>
      <sales>81</sales>
      <seller>169</seller>
      <agent>10</agent>
      <gift>5</gift>
      <return>0</return>
      <moneyback>30</moneyback>
      <id_category>409</id_category>
      <date_create>1442066442</date_create>
      <cnt_reviews_negative>0</cnt_reviews_negative>
      <cnt_reviews_positive>0</cnt_reviews_positive>
    </good>
  </goods>
  <status status_descr="Successful sending a response from the API-server">success</status>
  <cnt_goods>2</cnt_goods>
  <username>John Wallker</username>
  <shop>Banshee</shop>
</response>

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
(
    [goods] => Array
        (
            [0] => Array
                (
                    [id] => 1220
                    [title] => Announced shopping mall ECMall on 26.02.2011
                    [price] => 150.00
                    [currency] => usd
                    [type] => 0
                    [unique] => 0
                    [good_num] => 1
                    [size_file] => 16780296
                    [mime] => zip
                    [hash_md5] => 66b9b573df99294e7f40c24eda1d5c51
                    [sales] => 108
                    [seller] => 169
                    [agent] => 5
                    [gift] => 5
                    [return] => 0
                    [moneyback] => 30
                    [id_category] => 403
                    [date_create] => 1442067677
                    [cnt_reviews_negative] => 0
                    [cnt_reviews_positive] => 0
                )
 
            [1] => Array
                (
                    [id] => 1222
                    [title] => Russian release CMS Discuz X3.1 20140301 from TEAM Chinascript.ru
                    [price] => 0.00
                    [currency] => usd
                    [type] => 0
                    [unique] => 0
                    [good_num] => 1
                    [size_file] => 15434840
                    [mime] => zip
                    [hash_md5] => da77efae02883c240c12f177f5a5f212
                    [sales] => 81
                    [seller] => 169
                    [agent] => 10
                    [gift] => 5
                    [return] => 0
                    [moneyback] => 30
                    [id_category] => 409
                    [date_create] => 1442066442
                    [cnt_reviews_negative] => 0
                    [cnt_reviews_positive] => 0
                )
 
        )
 
    [status] => success
    [status_descr] => Successful sending a response from the API-server
    [cnt_goods] => 2
    [username] => John Wallker
    [shop] => Banshee
)

Response parameters (XML/JSON)

Name Description Data 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/id_categoryCategory ID for the goods (integer)
goods/good/date_createDate Product format *unix time stamp (integer)
goods/good/cnt_reviews_negativeNegative feedbacks Product (integer)
goods/good/cnt_reviews_positivePositive feedbacks Product (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)
cnt_goodsNumber of products seller (integer)
usernameLast name, first name seller (string)
shopName of shop (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_good_list_seller.txt · Last modified: 2015/09/26 11:19 (external edit)