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

API
Главная / API - Cost calculation and ordering

Cost calculation and ordering

Обновлено 06.12.2019
111 кб

General information

This service allows you to get the data from the directories that are used for cost calculation and ordering.

All methods from this section except for Directory of vehicle loading types have the same structure of requests and responses, for structure examples see below. The description of Directory of vehicle loading types method response structure can be found in the relevant section.

Method request

Request example

{
   "appkey": "00000000-0000-0000-0000-000000000000"
}
<request>
   <appkey>00000000-0000-0000-0000-000000000000</appkey>
</request>

Description of parameters

Request
ParameterR*TypeDescription
appkeyYesstringApplication key. To get the key, register

Method response

Response example

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

Description of parameters

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

Instead of "[filename]" the value of this parameter contains the file name that matches the keyword in the name of the corresponding method.

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

Directory of special requirements for transport

The directory is used to calculate the cost

Method address for the request in JSON format: https://api.dellin.ru/v1/public/services.json

Method address for the request in XML format: https://api.dellin.ru/v1/public/services.xml

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

  • UID — unique service identifier;
  • name — service name.

Directory of available packages

The directory is used to calculate the cost

Method address for the request in JSON format: https://api.dellin.ru/v1/public/packages.json

Method address for the request in XML format: https://api.dellin.ru/v1/public/packages.xml

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

  • id — unique package identifier;
  • description — package name.

Directory of additional services

The directory is used to process an order

Method address for the request in JSON format: https://api.dellin.ru/v1/public/request_services.json

Method address for the request in XML format: https://api.dellin.ru/v1/public/request_services.xml

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

  • id — unique service identifier;
  • uid — unique service identifier for relation with other directories;
  • name — service name.

Directory of shipping types

The directory is used to process an order

Method address for the request in JSON format: https://api.dellin.ru/v1/public/request_delivery_types.json

Method address for the request in XML format: https://api.dellin.ru/v1/public/request_delivery_types.xml

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

  • id — unique shipping type identifier;
  • description — shipping type name.

Directory of payer types

The directory is used to process an order

Method address for the request in JSON format: https://api.dellin.ru/v1/public/payer_types.json

Method address for the request in XML format: https://api.dellin.ru/v1/public/payer_types.xml

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

  • id — unique payer type identifier;
  • name — payer type name.

Directory of payment types

Method address for the request in JSON format: https://api.dellin.ru/v1/public/payment_types.json

Method address for the request in XML format: https://api.dellin.ru/v1/public/payment_types.xml

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

  • id — unique payment type identifier;
  • name — payment type name.

Directory of vehicle loading types

Method address for the request in JSON format: https://api.dellin.ru/v1/references/load_types.json

Method address for the request in XML format: https://api.dellin.ru/v1/references/load_types.xml

Method response

Response example

{
   "metadata":{
      "status":200,
      "generated_at":"2015-06-18 12:37:28"
   },
   "data":[
      {
         "uid":"0xb83b7589658a3851440a853325d1bf69",
         "name":"боковая погрузка",
         "title":"Боковая загрузка",
         "incompatible":[
            "0xabb9c63c596b08f94c3664c930e77778"
         ]
      }
   ]
}
<response>
   <metadata>
      <status>200</status>
      <generated_at>2015-06-18 12:37:28</generated_at>
   </metadata>
   <data>
      <uid>0xb83b7589658a3851440a853325d1bf69</uid>
      <name>боковая погрузка</name>
      <title>Боковая загрузка</title>
      <incompatible>0xabb9c63c596b08f94c3664c930e77778</incompatible>
   </data>
</response>

Description of parameters

Response
ParameterTypeDescription
metadataobjectSystem information
metadata.statusinteger

Emulated status http-code. If successful, code 200 is returned

metadata.generated_atstring

Server response date and time.

Format: YYYY-MM-DD HH:MM:SS

dataarray of DataInformation on loading types
data.uidstring

Loading type UID

data.namestring

Loading type name.

Possible values:

  • "верхняя погрузка" - top loading;
  • "боковая погрузка" - side loading
data.titlestring

Loading type short name.

Possible values:

  • "Верхняя загрузка" - top loading;
  • "Боковая загрузка" - side loading
data.incompatiblearray of stringsUIDs of loading types incompatible with the type which UID is passed in data.name parameter

Error handling

The common API errors are used with the method, for errors format description and errors list see "Errors of API methods".

Directory of vehicle loading/unloading services

Method address for the request in JSON format: https://api.dellin.ru/v1/public/load_params.json

Method address for the request in XML format: https://api.dellin.ru/v1/public/load_params.xml

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

  • UID — unique identifier of additional parameter of loading/unloading service;
  • valueRequired — parameter determining the need to specify the value for additional parameter of loading/unloading service. Possible values: "1" — the value is required; "0" — the value is not required;
  • name — name of additional parameter of loading/unloading service.

Information for ordering an hourly rent

Method address for the request in JSON format: https://api.dellin.ru/v1/public/hourly_rent_info.json

Method address for the request in XML format: https://api.dellin.ru/v1/public/hourly_rent_info.xml

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

  • City;
  • Category;
  • Minimum order time;
  • Vehicle delivery time;
  • Around the city, rub/h;
  • Cost of one kilometer outside the city;
  • Manipulator;
  • Manipulator, cost;
  • Tent removal;
  • Tent removal, cost;
  • Going to the center;
  • Going to the center, cost;
  • Lifting capacity, kg;
  • Volume;
  • Length;
  • Width;
  • Height.

Directory of vehicle loading types (old)

The method is outdated. Use Directory of vehicle loading types method instead

Method address for the request in JSON format: https://api.dellin.ru/v1/public/load_types.json

Method address for the request in XML format: https://api.dellin.ru/v1/public/load_types.xml

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

  • id — unique identifier of vehicle loading type;
  • name — name of loading type.