Поиск по сайту

API
Главная / API - Price list

Price list

Обновлено 04.10.2021
151 кб

General information

The service allows receiving the information on the prices for the transportation between the cities present in the price list. No additional cost negotiation is needed to send the the load to the city.

Price list

Method request

Request example

Method address: https://api.dellin.ru/v1/public/pricelist.json

{  
   "appkey":"00000000-0000-0000-0000-000000000000",
   "city_from_uid":"0x834f00112fdd658311da4c6326ef0e13",
   "city_to_uid":"0x834f00112fdd658311da4c6326ef0e13"
}

Method address: https://api.dellin.ru/v1/public/pricelist.xml

<request>
   <appkey>00000000-0000-0000-0000-000000000000</appkey>
   <city_from_uid>0x834f00112fdd658311da4c6326ef0e13</city_from_uid>
   <city_to_uid>0x834f00112fdd658311da4c6326ef0e13</city_to_uid>
</request>

Description of parameters

Request
Request
ParameterRequiredTypeDescription
appkeyYesstringApplication key. To get the key, register

city_from_uid

No*string

UID of the city of departure, see "Directory of cities from the price-list"

*At least one of the parameters "city_to_uid" or "city_from_uid" is required

city_to_uid

No*string

UID of the city of arrival, see "Directory of cities from the price-list"

*At least one of the parameters "city_to_uid" or "city_from_uid" is required

Method response

Response example

{  
   "data":{  
      "header":"Межтерминальная доставка",
      "table":{  
         "caption":"Отправка из г. Москва (7 (495) 775-55-30)",
         "header":[  
            {  
               "name":"city_to",
               "text":"направление"
            },
            {  
               "name":"min_cost",
               "text":"мин. ст-ть"
            },
            {  
               "name":"weight_cost",
               "text":"стоимость за 1 кг. (руб)",
               "value":[  
                  "5000 - 10000",
                  "3000 - 5000",
                  "2000 - 3000",
                  "1500 - 2000",
                  "800 - 1500",
                  "300 - 800",
                  "150 - 300",
                  "0 - 150"
               ]
            },
            {  
               "name":"volume_cost",
               "text":"стоимость за 1 куб.м. (руб)",
               "value":[  
                  "25 - 45",
                  "15 - 25",
                  "10 - 15",
                  "7 - 10",
                  "4 - 7",
                  "1.3 - 4",
                  "0.6 - 1.3",
                  "0 - 0.6"
               ]
            }
         ],
         "body":[  
            {  
               "city_to":"Абакан",
               "min_cost":570,
               "weight_cost":[  
                  17.9,
                  18.7,
                  19.4,
                  20,
                  20.4,
                  22.3,
                  23,
                  23.7
               ],
               "volume_cost":[  
                  4650,
                  4860,
                  5040,
                  5200,
                  5300,
                  5800,
                  5980,
                  6160
               ]
            },
            {  
               "city_to":"Адлер",
               "min_cost":450,
               "weight_cost":[  
                  11.5,
                  12.2,
                  12.6,
                  12.8,
                  13.2,
                  14.4,
                  14.8,
                  15.3
               ],
               "volume_cost":[  
                  2990,
                  3170,
                  3280,
                  3330,
                  3430,
                  3740,
                  3850,
                  3980
               ]
            }
         ]
      }
   }
}
<response>
   <data>
      <header>Межтерминальная доставка</header>
      <table>
         <caption>Отправка из г. Москва (7 (495) 775-55-30)</caption>
         <thead>      
            <tr>
               <th rowspan="2">направление</th>
               <th rowspan="2" class="brighten">мин. ст-ть</th>
               <th colspan="8" class="brighten">стоимость за 1 кг. (руб)</th>
               <th colspan="8" class="brighten">стоимость за 1 куб.м. (руб)</th>
            </tr>
            <tr>
               <th class="nowrap">5000 - 10000</th>
               <th class="nowrap">3000 - 5000</th>
               <th class="nowrap">2000 - 3000</th>
               <th class="nowrap">1500 - 2000</th>
               <th class="nowrap">800 - 1500</th>
               <th class="nowrap">300 - 800</th>
               <th class="nowrap">150 - 300</th>
               <th class="nowrap">0 - 150</th>
               <th class="nowrap">25 - 45</th>
               <th class="nowrap">15 - 25</th>
               <th class="nowrap">10 - 15</th>
               <th class="nowrap">7 - 10</th>
               <th class="nowrap">4 - 7</th>
               <th class="nowrap">1.3 - 4</th>
               <th class="nowrap">0.6 - 1.3</th>
               <th class="nowrap">0 - 0.6</th>
            </tr>
         </thead> 
         <tbody>
            <tr class="odd">
               <td>Абакан</td>
               <td class="numeric">570</td>
               <td class="numeric">17.9</td>
               <td class="numeric">18.7</td>
               <td class="numeric">19.4</td>
               <td class="numeric">20</td>
               <td class="numeric">20.4</td>
               <td class="numeric">22.3</td>
               <td class="numeric">23</td>
               <td class="numeric">23.7</td>
               <td class="numeric">4650</td>
               <td class="numeric">4860</td>
               <td class="numeric">5040</td>
               <td class="numeric">5200</td>
               <td class="numeric">5300</td>
               <td class="numeric">5800</td>
               <td class="numeric">5980</td>
               <td class="numeric">6160</td>
            </tr>
            <tr class="odd">
               <td>Адлер</td>
               <td class="numeric">450</td>
               <td class="numeric">11.5</td>
               <td class="numeric">12.2</td>
               <td class="numeric">12.6</td>
               <td class="numeric">12.8</td>
               <td class="numeric">13.2</td>
               <td class="numeric">14.4</td>
               <td class="numeric">14.8</td>
               <td class="numeric">15.3</td>
               <td class="numeric">2990</td>
               <td class="numeric">3170</td>
               <td class="numeric">3280</td>
               <td class="numeric">3330</td>
               <td class="numeric">3430</td>
               <td class="numeric">3740</td>
               <td class="numeric">3850</td>
               <td class="numeric">3980</td>
            </tr>
         </tbody>
      </table>
   </data>
</response>

Description of parameters

Response
Response
ParameterTypeDescription

data

objectInformation on rates
data.headerstringTable name
data.tableTableTable with rates

Table
JSON object structure is different from XML object structure, see the description of each of the formats below
JSON
Table
ParameterTypeDescription

caption

string

Information about the direction of transportation

header

array of HeaderHeadings of the table columns

header.name

stringColumn heading (name of the corresponding parameter of the "body" object)
header.textstringColumn heading (textual representation, in Russian)

header.value

array of stringsValue ranges (names of the sub-columns of the column)
bodyarray of BodyTable body
city_fromstring

City of departure

The parameter is present in the response only if "city_to_uid" parameter is passed in the request, meanwhile "city_from_uid" is not passed
city_tostring

City of arrival

The parameter is present in the response only if "city_from_uid" parameter is passed in the request, meanwhile "city_to_uid" is not passed
min_costintegerMinimal price, rub.
weight_costarray of floatsPrice, rub./kg. Values of the relevant weight ranges transferred in "header.value" parameter (of the "header" object that has "header.name" parameter with "weight_cost" value)
volume_costarray of integersPrice, rub./m3. Values of the relevant volume ranges transferred in "header.value" parameter (of the "header" object that has "header.name" parameter with "volume_cost" value)
XML
Table
ParameterTypeDescription

caption

stringInformation about the direction of transportation
theadarray of TableRowHeadings of the table columns
tbodyarray of TableRowTable body
TableRow
ParameterTypeDescription

tr

array of TrTable row content
tr.tharray of strings

Content of the table cell of the heading

For  "thead.tr" object only
tr.tdarray of strings

Table cell content

For  "tbody.tr" object only

Error handling

If the request misses of required parameters, the following error message will be displayed:

Response example - Required parameters not passed

{  
   "errors":"Некорректный запрос"
}
<response>
   <errors>Некорректный запрос</errors>
</response>

If the required parameter value is empty, the following error message will be displayed:

Response example - Required parameters values are empty

{  
   "errors":{  
      "city_from_uid":"Это поле не может быть пустым."
   }
}
<response>
   <errors>
      <city_from_uid>Это поле не может быть пустым.</city_from_uid>
   </errors>
</response>

If the parameter value is incorrect, the following error message will be displayed:

Response example - Incorrect parameters values passed

{
   "errors":{
      "city_from_uid": "Некорректный uid города",
      "city_to_uid": "Некорректный uid города"
   }
}
<response>
   <errors>
      <city_from_uid>Некорректный uid города</city_from_uid>
      <city_to_uid>Некорректный uid города</city_to_uid>
   </errors>
</response>

Directory of cities from the price-list

Method request

Request example

Method address: https://api.dellin.ru/v1/public/cities.json  

{  
   "appkey":"00000000-0000-0000-0000-000000000000"
}

Method address: https://api.dellin.ru/v1/public/cities.xml 

<request>
   <appkey>00000000-0000-0000-0000-000000000000</appkey>
</request>

Description of parameters

Request
Request
ParameterRequiredTypeDescription
appkeyYesstringApplication key. To get the key, register

Method response

Response example

{  
   "hash": "1707aea20f301fd0a8787b5a68608dd6cf270347ea04c266f1b4c6aa540088a4",
   "url": "https://api.dellin.ru/catalog/cities.csv?sk=Kn0OtWJcumDYUqRjtCEvhg&e=1401285434"
}
<request>
   <hash>1707aea20f301fd0a8787b5a68608dd6cf270347ea04c266f1b4c6aa540088a4</hash>
   <url>https://api.dellin.ru/catalog/cities.csv?sk=Kn0OtWJcumDYUqRjtCEvhg&e=1401285434</url>
</request>

Description of parameters

Response
Response
ParameterTypeDescription
hashstringFile hash code (MD5). By comparing the hash codes of two files received at different times, you can understand whether the data in the directory has changed or not
urlstring

Link to the file with directory data in csv format in utf-8 encoding (the link is valid for 10 minutes). The file should be updated once a month.

The line delimiter in the file is the character "\n", the column delimiter is comma (","), and the text delimiter is the quotation mark (" " ").

The file located on the link in the response contains the next columns:

  • id — city ID;
  • name — city name;
  • codeKLADR — city CLADR code (CLADR - Classifier of Addresses of Russian Federation);
  • isTerminal — flag indicating that there is a company terminal in the city