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

API
Главная / API - Shipping Cost and Time Calculator

Shipping Cost and Time Calculator

Обновлено 14.08.2019
206 кб

General Information

The service lets you:

  1. Calculate the cost and time of shipping.
  2. Calculate the cost of shipping alternatives and client's personal discounts.

Shipping Cost and Time Calculation

Method Request

Request example

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

{  
   "appkey":"00000000-0000-0000-0000-000000000000",
   "sessionID":"00000000-0000-0000-0000-000000000000"
   "derivalPoint":"7800000000000000000000000",
   "derivalDoor":true,
   "arrivalPoint":"5200000100000000000000000",
   "arrivalDoor":false,
   "sizedVolume":0.5,
   "sizedWeight":15.5,
   "oversizedVolume":0.8,
   "oversizedWeight":23.1,
   "length":0.5,
   "width":1.1,
   "height":0.9,
   "freight_uid":"0x9c2acaea110d75ba48fdc7a83c976269",
   "statedValue":1000.5,
   "packages": [
      "0x8783b183e825d40d4eb5c21ef63fbbfb",
      "0x951783203a254a05473c43733c20fe72"
   ],
   "derivalServices": [
      "0xb83b7589658a3851440a853325d1bf69",
      "0x92fce2284f000b0241dad7c2e88b1655"
   ],
   "arrivalServices": [
      "0xb83b7589658a3851440a853325d1bf69",
      "0x92fce2284f000b0241dad7c2e88b1655"
   ],
   "documentServices":[  
      "0xA11455A5C9BE0000477AB88A272A295B",
      "0xAD28BADA70021EBC41765FC1EC28AFE8"
   ],
   "derivalLoading":[  
      {  
         "uid":"0xa77fcf6a449164ed490133777a68bd51"
      },
      {  
         "uid":"0xadf1fc002cb8a9954298677b22dbde12",
         "value":"4"
      },
      {  
         "uid":"0x9a0d647ddb11ebbd4ddaaf3b1d9f7b74",
         "value":"58"
      }
   ],
   "arrivalUnLoading":[  
      {  
         "uid":"0xa77fcf6a449164ed490133777a68bd51"
      },
      {  
         "uid":"0xadf1fc002cb8a9954298677b22dbde12",
         "value":"4"
      },
      {  
         "uid":"0x9a0d647ddb11ebbd4ddaaf3b1d9f7b74",
         "value":"58"
      }
   ],
   "derivalfixedtimevisit":true,
   "derivalperiodvisit":{  
      "start":"10:00",
      "end":"20:30"
   },
   "arrivalfixedtimevisit":true,
   "arrivalperiodvisit":{  
      "start":"09:00",
      "end":"18:00"
   },
   "calculatedate":"2017-03-21",
   "sessionID": "00000000-0000-0000-0000-000000000000",
   "cauid": "00000000-0000-0000-0000-000000000000",
   "requester":2,
   "packages_count":3,
   "bags_count":3,
   "termInsurance":false 
}

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

<request>
   <appkey>00000000-0000-0000-0000-000000000000</appkey>
   <sessionid>00000000-0000-0000-0000-000000000000</sessionid>
   <derivalpoint>7800000000000000000000000</derivalpoint> 
   <derivaldoor>true</derivaldoor>
   <arrivalpoint>5200000100000000000000000</arrivalpoint> 
   <arrivaldoor>false</arrivaldoor>
   <sizedvolume>1</sizedvolume>
   <sizedweight>1</sizedweight>
   <oversizedvolume>1</oversizedvolume>
   <oversizedweight>1</oversizedweight>
   <length>1</length>
   <width>1</width>
   <height>1</height>
   <freight_uid>0x9c2acaea110d75ba48fdc7a83c976269</freight_uid>
   <statedvalue>1000</statedvalue>
   <packages>0xAD22189D098FB9B84EEC0043196370D6</packages>
   <derivalservices>0xb83b7589658a3851440a853325d1bf69</derivalservices>
   <derivalservices>0x92fce2284f000b0241dad7c2e88b1655</derivalservices>
   <arrivalservices>0xb83b7589658a3851440a853325d1bf69</arrivalservices>
   <arrivalservices>0x92fce2284f000b0241dad7c2e88b1655</arrivalservices>
   <documentServices>0xA11455A5C9BE0000477AB88A272A295B</documentServices>
   <documentServices>0xAD28BADA70021EBC41765FC1EC28AFE8</documentServices>
   <derivalloading> 
      <uid>0xa77fcf6a449164ed490133777a68bd51</uid>
   </derivalloading>
   <derivalloading>
      <uid>0xadf1fc002cb8a9954298677b22dbde12</uid>
      <value>4</value>
   </derivalloading>
   <derivalloading>
      <uid>0x9a0d647ddb11ebbd4ddaaf3b1d9f7b74</uid>
      <value>58</value>
   </derivalloading>
     <arrivalunloading> 
      <uid>0xa77fcf6a449164ed490133777a68bd51</uid> 
   </arrivalunloading>
   <arrivalunloading>
      <uid>0xadf1fc002cb8a9954298677b22dbde12</uid> 
      <value>4</value>
   </arrivalunloading>
   <arrivalunloading>
      <uid>0x9a0d647ddb11ebbd4ddaaf3b1d9f7b74</uid>
      <value>58</value>
   </arrivalunloading>
   <derivalfixedtimevisit>true</derivalfixedtimevisit>
   <derivalperiodvisit>
      <start>10:00</start>
      <end>20:30</end>
   </derivalperiodvisit>
   <arrivalfixedtimevisit>true</arrivalfixedtimevisit>
   <arrivalperiodvisit>
      <start>09:00</start>
      <end>18:00</end>
   </arrivalperiodvisit>
   <calculatedate>2017-03-21</calculatedate>
   <requester>2</requester>  
   <packages_count>3</packages_count>
   <bags_count>3</bags_count>
   <termInsurance>false</termInsurance>
</request>

Description of parameters

Request
ParameterR*TypeDescription
Basic parameters
appkeyYesstringThe application key. To get the key, register
sessionIDNostringThe session ID that is required to take personal discounts into account. To get the ID, use the User Authorization method
derivalPointYesstring

The CLADR (Classifier of Addresses of Russian Federation) code for an area of shipment departure/arrival. It's possible to pass CLADR code for a city, street of terminal.

To find the CLADR code of the city use our service or use the method "City search". In addition, you can get the table with CLADR codes fully compatible with our API by using the "Places" directory.

To find the CLADR code of the street use the "Streets" directory or use the method "Street search" (by the part of street name).

CLADR codes of terminals are available in the "Terminals" directory. If you pass the CLADR code of the terminal of departure and parameter "DerivalDoor" with value "false", then discounts provided on this terminal will be taken into account when calculating the cost of services.

The format of code is an 25 characters long integer. The length of a code starting with zero is 24 characters (the leading zero is not used in the API). If the length of a code is less than 25 characters, add the required number of zeros to the end of the code

arrivalPointYesstring
derivalDoorNobooleanShipping from an address is required. When false, the additional services of shipping from/to an address ("derivalServices"/"arrivalServices") will not be included in the calculation, even if they have been included in the request  
arrivalDoorNoboolean

Shipping to an address is required. When false, the additional services of shipping from/to an address ("derivalServices"/"arrivalServices") will not be included in the calculation, even if they have been included in the request  

Information about the shipment
sizedVolumeYesfloatTotal cargo volume, m3
sizedWeightYesfloatTotal cargo weight, kg
oversizedVolumeNofloatOutsize cargo volume, m3
oversizedWeightNo
floatOutsize cargo weight, kg
lengthNo
floatThe length of the longest place
widthNo
floatThe width of the widest place
heightNo
floatThe height of the highest place
freight_uidNo
string

UID of a cargo type from the Nature of cargo directory. To search for UID by the name of cargo use the Cargo Type by an Input String method.

statedValueNofloat

The declared cost of cargo in rubles.
Available values:

  • 0 - cargo is insured for not the declared cost
  • more than 0 - cargo is insured for the declared cost

When this parameter is not included in the request, cargo is insured for not the declared cost

packages
Noarray of string

ID of the needed package type. It should be specified using the Directory of available packages. It is possible to order several types of packages at the same time

Additional services
derivalServicesNo
array of string

UID of the additional services for shipping to an address. It should be specified using the Directory of Special Requirements for Transport. The user can order several additional services at once, but not all of them. The cost of the additional services is included in the cost of shipping to/from address.

arrivalServicesNo
array of stringUID of the additional services for shipping from an address. It should be specified using the Directory of Special Requirements for Transport. The user can order several additional services at once, but not all of them. The cost of the additional services is included in the cost of shipping to/from address.
documentServicesNoarray of stringThe transfer of accompanying documents. The parameter can hold 2 standard values: UIDs of documents to be sent and documents to be returned from the Directory of Additional Services
derivalLoadingNoarray of Request.DerivalLoadingThe request to load the vehicle. Additional parameters are required for calculating the cost of loading and unloading the vehicle
arrivalUnLoadingNo
array of Request.ArrivalUnLoadingThe request to unload the vehicle. Additional parameters are required for calculating the cost of loading and unloading the vehicle
quantityNo
integer

The amount of space for cargo.

Default value = "1"

derivalFixedTimeVisitNo
booleanThe time when the shipment is taken is fixed. Ignored, if the period of receiving the shipment (parameter "derivalPeriodVisit") is more than 30 minutes
derivalPeriodVisitNoobjectThe period of taking the shipment
derivalPeriodVisit.startNostringThe beginning of the period of taking the shipment
derivalPeriodVisit.endNostringThe end of the period of taking the shipment
arrivalFixedTimeVisitNo
booleanThe time when the shipment is delivered is fixed. Ignored, if the period of receiving the shipment (parameter "arrivalPeriodVisit") is more than 30 minutes
arrivalPeriodVisitNo
objectThe period of delivering the shipment
arrivalPeriodVisit.startNo
stringThe beginning of the period of delivering the shipment
arrivalPeriodVisit.endNo
stringThe end of the period of delivering the shipment
calculateDateNo
stringThe date for which the calculation will be made
sessionIDNo
string

The session ID. Required for taking personal discounts (if any) of the counterparty into account. Use the User Authorization method to get the ID

cauidNo
stringUID of a counterparty, discounts of which should be included into calculation. When it is not passed, the calculation is done the default way (see the section "Available counterparties")
requesterNo
integer

The role of the counterparty-client.

Available values:

  • "1" = sender
  • "2" = receiver
  • "3" = payer or third party, if there is no counterparty with full access linked to the personal account

Pass this parameter to include into calculation personal discounts of the counterparty (if there are any)

packages_countNo
integerThe desired number of boxes. The default = 1. Required, only if the "packages" parameter contains the ID of this type of package (box)
bags_countNo
integerThe desired number of bags. The default = 1. Required, only if the "packages" parameter contains the ID of this type of package (bag)

termInsurance

No

boolean

Flag for ordering insurance of delivery time.

Default value = "true"

Request.DerivalLoading
ParameterR*TypeDescription
uidNostringUnique identifiers of additional parameters required for calсulating the cost of loading and unloading the vehicle. It should be specified using the Directory of Loading/Unloading Services. If the parameters are not passed, loading and unloading activities will be ordered, but their cost will not be calculated correctly
valueNostringThe value of an additional parameter, if required. For example, "4" if an additional parameter is "этаж" ("floor")
The "ArrivalUnLoading" parameter contains the same additional parameters as "DerivalLoading" does.

Method response

Response example

{  
   "derival":{  
      "terminal":"Санкт-Петербург",
      "price":"2150.00",
      "terminals":[  
         {  
            "id":"36",
            "address":"193231, Санкт-Петербург г, Латышских Стрелков ул, дом № 31",
            "price":"100",
            "name":"Санкт-Петербург-Восток"
         },
         {  
            "id":"38",
            "address":"194292, Санкт-Петербург г, 2-й Верхний пер, дом № 13 А",
            "price":"100",
            "name":"Санкт-Петербург-Парнас"
         }
      ],
      "terminals_express":[  
         {  
            "price":100,
            "address":"117403, Москва г, Лобненская ул, дом № 18",
            "id":36,
            "name":"Москва Север"
         }
      ]
   },
   "intercity":{  
      "price":"3062.5",
      "premium":"50.00",
      "discount":"10.00",
      "premiumDetails":[  
         {  
            "name":"Наценка 1",
            "value":"50.00",
            "date":"2016-01-01",
            "announcement":"true",
            "public":"true"
         }
      ],
      "discountDetails":[  
         {  
            "name":"Скидка 1",
            "value":"50.00",
            "date":"2016-01-01",
            "announcement":"true",
            "public":"true"
         }
      ],
      "insurance":"350.00",
      "insurance_components":{  
         "cargo_insurance":"50.00",
         "term_insurance":"35.00"
      },
      "notify":{  
         "price":"10.00"
      }
   },
   "small":{  
      "price":"1750.00",
      "premium":"50.00",
      "discount":"10.00",
      "premiumDetails":[  
         {  
            "name":"Наценка 1",
            "value":"50.00",
            "date":"2016-01-01",
            "announcement":"true",
            "public":"true"
         }
      ],
      "discountDetails":[  
         {  
            "name":"Скидка 1",
            "value":"50.00",
            "date":"2016-01-01",
            "announcement":"true",
            "public":"true"
         }
      ],
      "insurance":"350.00",
      "insurance_components":{  
         "cargo_insurance":"50.00",
         "term_insurance":"35.00"
      },
      "notify":{  
         "price":"10.00"
      }
   },
   "air":{  
      "premium":"0.00",
      "premiumDetails":[  

      ],
      "discountDetails":[  

      ],
      "price":"2680.00",
      "discount":"0.00",
      "insurance_components":{  
         "cargo_insurance":"8500.00"
      },
      "notify":{  
         "price":"10.00"
      },
      "insurance":"8500.00"
   },
   "express":{  
      "premium":"0.00",
      "premiumDetails":[  
       {  
         "name":"Наценка 1",
         "value":"50.00",
         "date":"2016-01-01",
         "announcement":"true",
         "public":"true"
       }
      ],
      "discountDetails":[  

      ],
      "price":"670.00",
      "discount":"0.00",
      "insurance_components":{  
         "cargo_insurance":"8500.00"
      },
      "notify":{  
         "price":"10.00"
      },
      "time":{  
         "genitive":"1 дня",
         "nominative":"1 день",
         "value":"1"
      },
      "insurance":"8500.00"
   },
   "arrival":{  
      "terminal":"Москва",
      "price":"15.00",
      "terminals":[  
         {  
            "id":"36",
            "price":"100"
         }
      ],
      "terminals_express":[  
         {  
            "price":100,
            "address":"117403, Москва г, Лобненская ул, дом № 18",
            "id":36,
            "name":"Москва Север"
         }
      ]
   },
   "letter":{  
      "price":"300.00"
   },
   "price":"13657.5",
   "time":{  
      "genitive":"3 дней",
      "nominative":"3 дня",
      "value":"3"
   },
   "loadUnload":{  
      "derival":"3510.00",
      "arrival":"4500.00"
   },
   "packages":{  
      "bag":"70.00",
      "premium":"50.00",
      "discount":"10.00",
      "premiumDetails":[  
         {  
            "name":"Наценка 1",
            "value":"50.00",
            "date":"2016-01-01",
            "announcement":"true",
            "public":"true"
         }
      ],
      "discountDetails":[  
         {  
            "name":"Скидка 1",
            "value":"50.00",
            "date":"2016-01-01",
            "announcement":"true",
            "public":"true"
         }
      ],
   },
   "order_dates":{  
      "pickup":"2019-04-24",
      "arrival_to_osp_sender":"2019-04-24",
      "derrival_from_osp_sender":"2019-04-24",
      "arrival_to_osp_receiver":"2019-04-29",
      "derrival_from_osp_receiver":"2019-04-26",
      "create_to":"14:00",
      "sender_address_time":"16:00",
      "sender_terminal_time":"16:00",
      "arrival_to_airport":"2019-04-25",
      "arrival_to_airport_max":"2019-04-26",
      "giveout_from_osp_receiver":"2019-04-25 00:00:00",
      "giveout_from_osp_receiver_max":"2019-04-26 00:00:00",
      "derrival_to_address":"2019-04-26",
      "derrival_to_address_max": "2019-04-27",
      "limitationTime":"17:00",
      "derival_startTime":"09:00",
      "derival_endTime":"18:00",
      "derival_schedule":"пн-пт: 09:00-18:00; сб, вс: 10:00-16:00",
      "order_dates_info":"Расчетная дата указана при условии сдачи груза на терминал отправки до 18:00"
   },
   "delivery_term":1,
   "shipping_documents":{  
      "send":"150",
      "return":"150"
   },
   "insurance":"350.0",
   "insurance_components":{  
      "cargo_insurance":"50.00",
      "term_insurance":"300.00"
   },
   "notify":{
      "discount": "0.00",
      "price": "10.00",
      "premium": "0.00",
      "premiumDetails":[],
      "discountDetails":[]
    }
}
<response>
   <derival>
      <terminal>Санкт-Петербург</terminal>
      <price>2150.0</price>
      <terminals>
         <id>36</id>
         <address>193231, Санкт-Петербург г, Латышских Стрелков ул, дом № 31</address>
         <price>100</price>
         <name>Санкт-Петербург-Восток</name>
      </terminals>
      <terminals>
         <id>38</id>
         <address>194292, Санкт-Петербург г, 2-й Верхний пер, дом № 13 А</address>
         <price>100</price>
         <name>Санкт-Петербург-Парнас</name>
      </terminals>
      <terminals_express>
         <price>100</price>
         <address>117403, Москва г, Лобненская ул, дом № 18</address>
         <id>36</id>
         <name>Москва Север</name>
      </terminals_express>
   </derival>
   <intercity>
      <price>3062.5</price>
      <premium>50.00</premium>
      <discount>10.00</discount>
      <premiumDetails>
         <name>Наценка 1</name>
         <value>50.00</value>
         <date>2016-01-01</date>
         <announcement>true</announcement>
         <public>true</public>
      </premiumDetails>
      <discountDetails>
         <name>Скидка 1</name>
         <value>50.00</value>
         <date>2016-01-01</date>
         <announcement>true</announcement>
         <public>true</public>
      </discountDetails>
      <insurance>350.00</insurance>
      <insurance_components>
         <cargo_insurance>50.00</cargo_insurance>
         <term_insurance>35.00</term_insurance>
      </insurance_components>
      <notify>
         <price>10.00</price>
      </notify>
   </intercity>
     <small>
      <price>1750.00</price>
      <premium>50.00</premium>
      <discount>10.00</discount>
      <premiumDetails>
         <name>Наценка 1</name>
         <value>50.00</value>
         <date>2016-01-01</date>
         <announcement>true</announcement>
         <public>true</public>
      </premiumDetails>
      <discountDetails>
         <name>Скидка 1</name>
         <value>50.00</value>
         <date>2016-01-01</date>
         <announcement>true</announcement>
         <public>true</public>
      </discountDetails>
      <insurance>350.00</insurance>
      <insurance_components>
         <cargo_insurance>50.00</cargo_insurance>
         <term_insurance>35.00</term_insurance>
      </insurance_components>
      <notify>
         <price>10.00</price>
      </notify>
   </small>      
   <arrival>
      <terminal>Москва</terminal>
      <price>15.0</price>
      <terminals>
         <id>36</id>
         <price>100</price>
      </terminals>
      <terminals_express>
         <price>100</price>
         <address>117403, Москва г, Лобненская ул, дом № 18</address>
         <id>36</id>
         <name>Москва Север</name>
      </terminals_express>
   </arrival>
   <letter>
      <price>300.00</price>
   </letter>
   <price>13657.5</price>
   <insurance>350.0</insurance>
   <time>
      <genitive>3 дней</genitive>
      <nominative>3 дня</nominative>
      <value>3</value>
   </time>
   <loadunload>
      <derival>3510.00</derival>
      <arrival>4500.00</arrival>
   </loadunload>
   <packages>
      <bag>70.00</bag>
      <premium>50.00</premium>
      <discount>10.00</discount>
      <premiumDetails>
         <name>Наценка 1</name>
         <value>50.00</value>
         <date>2016-01-01</date>
         <announcement>true</announcement>
         <public>true</public>
      </premiumDetails>
      <discountDetails>
         <name>Скидка 1</name>
         <value>50.00</value>
         <date>2016-01-01</date>
         <announcement>true</announcement>
         <public>true</public>
      </discountDetails>
      <insurance>350.00</insurance>
      <insurance_components>
         <cargo_insurance>50.00</cargo_insurance>
         <term_insurance>35.00</term_insurance>
      </insurance_components>
      <notify>
         <price>10.00</price>
      </notify>
   </packages>
   <order_dates>
      <pickup>2019-04-24</pickup>
      <arrival_to_osp_sender>2019-04-24</arrival_to_osp_sender>
      <derrival_from_osp_sender>2019-04-24</derrival_from_osp_sender>
      <arrival_to_osp_receiver>2019-04-29</arrival_to_osp_receiver>
      <derrival_from_osp_receiver>2019-04-26</derrival_from_osp_receiver>
      <create_to>14:00</create_to>
      <sender_address_time>16:00</sender_address_time>
      <sender_terminal_time>16:00</sender_terminal_time>
      <arrival_to_airport>2019-04-25</arrival_to_airport>
      <arrival_to_airport_max>2019-04-26</arrival_to_airport_max>
      <giveout_from_osp_receiver>2019-04-25 00:00:00</giveout_from_osp_receiver>
      <giveout_from_osp_receiver_max>2019-04-26 00:00:00</giveout_from_osp_receiver_max>
      <derrival_to_address>2019-04-26</derrival_to_address>
      <derrival_to_address_max>2019-04-27</derrival_to_address_max>
      <limitationTime>17:00</limitationTime>
      <derival_startTime>09:00</derival_startTime>
      <derival_endTime>18:00</derival_endTime>
      <derival_schedule>пн-пт: 09:00-18:00; сб, вс: 10:00-16:00</derival_schedule>
      <order_dates_info>Расчетная дата указана при условии сдачи груза на терминал отправки до 18:00</order_dates_info>
   </order_dates>
   <delivery_term>1</delivery_term>
   <shipping_documents>
      <send>150</send>
      <return>150</return>
   </shipping_documents>
   <insurance_components>
      <cargo_insurance>50.00</cargo_insurance>
      <term_insurance>300.00</term_insurance>
   </insurance_components>
   <notify>
      <discount>0.00</discount>
      <price>10.00</price>
      <premium>10.00</premium>
   </notify>
</response>

Description of parameters  

Response
ParameterTypeDescription
derivalResponse.DerivalInformation about shipping from the sender's address
intercityResponse.IntercityInformation about terminal-to-terminal shipping
smallResponse.Small

Information about shipping of small-size cargo (additional service)

airResponse.AirInformation about air shipping
expressResponse.ExpressInformation about express-shipping
arrivalResponse.ArrivalInformation about shipping to the sender's address
letterobject

Information about the Letter service. Available if the following criteria are met:

  • "volume" <= 0.01
  • "weight" <= 0.5
  • "length" <= 0.3
  • "width" <= 0.21
  • "height" <= 0.01
  • "quantity" = 1
letter.pricestring

The cost of the Letter service

pricestringThe total cost of shipping including all the services related to terminal-to-terminal shipping. If terminal-to-terminal shipping is not available for the current route, the cost of air shipping will be calculated instead
timeobjectThe earliest possible time of shipping in days for terminal-to-terminal ground shipping
time.genitivestringThe time of delivery in the genetive case
time.nominativestring

The time of delivery in the nominative case

time.valuestringThe time of delivery. Numeric value
loadUnloadobjectThe cost of additional services (shipping to/from an address) (if they have been ordered)
loadUnload.derivalstringThe cost of shipping from an address
loadUnload.arrivalstringThe cost of shipping to an address
packagesResponse.PackagesInformation about the cost of the package
order_datesobjectA shipping timetable
order_dates.pickupstringThe date of taking the shipment
order_dates.arrival_to_osp_senderstringThe date of arrival at a Separate Structural Subdivision-sender
order_dates.derrival_from_osp_senderstringThe date of sending the shipment from a Separate Structural Subdivision-sender
order_dates.arrival_to_osp_receiverstringThe date of arrival at a Separate Structural Subdivision-receiver
order_dates.derrival_from_osp_receiverstringThe date of sending the shipment from a Separate Structural Subdivision-receiver
order_dates.create_tostring

The time until which it is necessary to apply for delivery from the sender's address

order_dates.sender_address_timestring

The time until which it is necessary to transfer the cargo at the sender's address

order_dates.sender_terminal_timestring

The time until which it is necessary to transfer the cargo at the terminal of departure

order_dates.arrival_to_airportstring

Date of cargo arrival at the terminal of arrival / to the airport

order_dates.arrival_to_airport_maxstring

Maximum date of arrival at the terminal of arrival / to the airport (if cargo arrival may be delayed)

order_dates.giveout_from_osp_receiverstring

Date of cargo readiness for delivery from the terminal of arrival

order_dates.giveout_from_osp_receiver_maxstring

Maximum date of cargo readiness for delivery from the terminal of arrival (if cargo readiness for delivery may be delayed)

order_dates.derrival_to_addressstring

Date and time since which delivery to the receiver's address is possible

order_dates.derrival_to_address_maxstring

Maximum date and time until which delivery to the receiver's address is possible

order_dates.limitationTimestring

The limit time: if the shipment is received before this time, the delivery time will be calculated correctly.

The parameter is included in the response only for M500 routes (used for expedited shipping).

The parameter is not included in the response for certain M500 routes - for which the limit time has not been defined.

The parameter contains an empty value if the request has been made later than the limit time defined for the current route.

The format is: HH:MM

order_dates.derival_startTimestring

The time when activities related to recieving cargo at a terminal-sender on the day of sending the cargo from the terminal-sender begin.

The parameter is included in the response for all routes except M500 routes, and on condition that the date of sending the cargo from the terminal-sender is the same as the date of arrival at a terminal-reciever.

The parameter may not be included in the response or contain an empty value, if working hours of the terminal have not been defined.

The format is: HH:MM

order_dates.derival_endTimestring

The time when activities related to recieving cargo at a terminal-sender on the day of sending the cargo from the terminal-sender end.

The parameter is included in the response for all routes except M500 routes, and on condition that the date of sending the cargo from the terminal-sender is the same as the date of arrival at a terminal-reciever.

The parameter may not be included in the response or contain an empty value, if working hours of the terminal have not been defined.

The format is: HH:MM

order_dates.derival_schedulestring

Schedule of receiving cargo by the terminal of cargo departure.
The parameter is included in the response for all routes except M500 routes, and on condition that the date of sending the cargo from the terminal-sender is the same as the date of arrival at a terminal-reciever.

The parameter may contain an empty value, if this information is not available

order_dates.order_dates_infostring

Additional information about the shipping timetable based on the following template:: "Расчетная дата указана при условии сдачи груза на терминал отправки до <ЧЧ:ММ>" (translation: the delivery date is calculated based on the assumption that the shipment is received at the terminal-sender before <HH:MM>)

The parameter is not included in the response if the "order_dates.limitationTime" parameter contains an empty value, or "order_dates.limitationTime"  "order_dates.derival_endTime" are not present

delivery_termintegerThe time of delivery
shipping_documentsobjectThe shipping of accompanying documents
shipping_documents.sendstringThe amount of accompanying documents to be sent
shipping_documents.returnstringThe amount of accompanying documents to be returned
insurancestringThe total cost of cargo insurance
insurance_componentsobject

Complete list of cargo insurance services and their cost

insurance_components.cargo_insurancestringThe total cost of Cargo Insurance service
insurance_components.term_insurancestringThe total cost of Shipping Time Insurance service. If it is not present, the service is not available for the current route or cargo

notify

object

Information about Updates on Delivery service

notify.discount

string

The amount of discount for the service

notify.price

string

The cost of the service

notify.premium

string

The amount of surcharge for the service

notify.premiumDetails

array of Response.PremiumDetails

Detailed information about surcharge for the service

notify.discountDetails

array of Response. discountDetails

Detailed information about discounts for the service

Response.Derival
ParameterTypeDescription
terminalstringThe city of a subdivision of cargo departure
pricestringIf the request included the "derivalDoor" = "false" parameter, then the current parameter contains the cost of entering the terminal; in the case of "derivalDoor" = "true" then the cost of shipping to an address. See the section "Algorithm of total cost calculation"
terminalsarray of Response.Derival.Terminals

A list of warehouses when you can handover cargo of a specific weight, volume and size to send it from a terminal

terminals_expressarray of Response.Derival.Terminals_expressA list of warehouses when you can handover cargo of a specific weight, volume and size to send it using express-shipping. If such warehouses are not present in the current city, then the parameter will contain an empty value. The parameter is included in the response, if the express-shiping service is available
The "response.arrival.terminals" and "response.arrival.terminals_express" parameters do not include terminals that are points of issue of orders, and terminals that provide services of receiving and giving out 3PL cargo, but do not provide services related to groupage cargo.

Response.Derival.Terminals
ParameterTypeDescription
idstringID of a terminal from the "Terminals" directory
addressstringThe address of a terminal
pricestringThe cost of entering the territory of a terminal
namestringThe name of a warehouse

Response.Derival.Terminals_express
ParameterTypeDescription
pricefloatThe cost of entering the territory of a terminal
addressstringThe address of a terminal
idintegerID of a terminal from the "Terminals" directory
namestringThe name of a warehouse

Response.Intercity
ParameterTypeDescription
pricestringThe cost of terminal-to-terminal shipment
premiumstringThe amount of surcharge for the service
discountstringThe amount of discount for the service
premiumDetailsarray of Response.PremiumDetailsDetailed information about surcharge for the service
discountDetailsarray of Response.DiscountDetailsDetailed information about discounts for the service
insurancestringThe cost of cargo insurance for terminal-to-terminal shipping (the total cost of all services)
insurance_componentsobject

The list of insurance services and their cost

insurance_components.Cargo_insurancestringThe cost of Cargo Insurance service for terminal-to-terminal shipping
insurance_components.Term_insurancestringThe cost of Shipping Time Insurance service for terminal-to-terminal shipping. If it is not present, the service is not available for the current route or cargo
notifyobjectInformation about Updates on Delivery service
notify.pricestringThe cost of the service "Updates on Delivery service"

Response.PremiumDetails
ParameterTypeDescription
namestringThe type of surcharge. For example, "oversize surcharge", "package surcharge"
valuestringThe amount of surcharge
datestringThe period when surcharge is valid
announcementstring

The attribute of a promotional surcharge:

  • "true" = promotional surcharge;
  • "false" = regular surcharge
publicstring

The attribute of a public surcharge:

  • "true" = public surcharge;
  • "false" = personal surcharge.

*Surcharge can be either public or personal for an authorized user, and public only for unauthorized user

Response.DiscountDetails
ParameterTypeDescription
namestringThe type of discount. For example, "Current promo"
valuestringThe amount of discount
datestringThe period when discount is valid
announcementstring

The attribute of a promotional discount:

  • "true" = promotional discount;
  • "false" = regular discount
publicstring

The attribute of a public discount:

  • "true" = public discount;
  • "false" = personal discount.

*Discount can be either public or personal for an authorized user, and public only for unauthorized user

The "Response.Small", "Response.Air" and "Response.Express" objects include the same paramaters, as "intercity" does.

Response.Arrival
ParameterTypeDescription
terminalstringThe city of a subdivision of cargo arrival
pricestring

If the request included the "arrivalDoor" = "false" parameter, then the current parameter contains the cost of entering the terminal; in the case of "arrivalDoor" = "true" then the cost of shipping to an address. See the Cost Calculation Algorithm

terminalsarray of Response.Arrival.Terminals

A list of warehouses when you can receive cargo of a specific weight, volume and size to send it from a terminal

terminals_expressarray of Response.Arrival.Terminals_expressA list of warehouses when you can receive cargo of a specific weight, volume and size to send it using express-shipping. If such warehouses are not present in the current city, then the parameter will contain an empty value. The parameter is included in the response, if the express-shiping service is available
The "response.arrival.terminals" and "response.arrival.terminals_express" parameters do not include terminals that provide services of receiving and giving out 3PL cargo, but do not provide service related to groupage cargo.

Response.Arrival.Terminals
ParameterTypeDescription
idstringID of a terminal from the "Terminals" directory
pricestringThe cost of a requested type of package

Response.Arrival.Terminals_express
ParameterTypeDescription
pricefloatThe cost of entering the territory of a terminal
addressstringThe address of a terminal
idintegerID of a terminal from the "Terminals" directory
namestringThe name of a warehouse

Response.Packages
ParameterTypeDescription
bagstringThe cost of a requested type of package
premiumstringThe amount of surchage for the service
discountstringThe amount of discount for the service
premiumDetailsarray of Response.PremiumDetailsDetailed information about surcharge for the service
discountDetailsarray of Response.DiscountDetailsDetailed information about discounts for the service

Error handling

If the request contained an error, the response will contain unvalidated parameters.

Response example

{  
   "errors":{  
      "messages":[  
         "Доставка от адреса отправителя невозможна. Проверьте адрес отправителя.",
         "Доставка до адреса получателя невозможна. Проверьте адрес получателя.",
         "Параметры груза превышают допустимые для забора груза в подразделении-отправителе. Проверьте параметры груза.",
         "Параметры груза превышают допустимые для доставки груза в подразделении-получателе. Проверьте параметры груза.",
         "Для расчета стоимости перевозки груза объемом более 80 кубических метров или весом более 20 тонн необходимо обратиться к нашему специалисту."
      ]
   }
}
<errors>
   <messages>Доставка от адреса отправителя невозможна. Проверьте адрес отправителя.</messages>
   <messages>Доставка до адреса получателя невозможна. Проверьте адрес получателя.</messages>
   <messages>Параметры груза превышают допустимые для забора груза в подразделении-отправителе. Проверьте параметры груза.</messages>
   <messages>Параметры груза превышают допустимые для доставки груза в подразделении-получателе. Проверьте параметры груза.</messages>
   <messages>Для расчета стоимости перевозки груза объемом более 80 кубических метров или весом более 20 тонн необходимо обратиться к нашему специалисту.</messages>
</errors>

Response example

{  
   "errors":{  
      "derivalDoor":"Доступные значения: true или false",
      "sizedWeight":"\"пять\" не является числом",
      "arrivalPoint":"Код КЛАДР/Почтовый индекс не найден",
      "arrivalDoor":"Доступные значения: true или false",
      "statedValue":"\"два\" не является числом",
      "sizedVolume":"\"три\" не является числом",
      "oversizedVolume":"\"четыре\" не является числом",
      "packages":{  
         "error":"Неверный uid упаковки 111222333"
      },
      "oversizedWeight":"\"восемь\" не является числом",
      "derivalPoint":"Код КЛАДР/Почтовый индекс не найден",
      "derivalServices":"Неверный uid дополнительной услуги 333222111",
      "arrivalServices":"Неверный uid дополнительной услуги 333222111"
   }
}
<errors>
   <derivaldoor>Доступные значения: true или false</derivaldoor>
   <sizedweight>"пять" не является числом</sizedweight>
   <arrivalpoint>Код КЛАДР/Почтовый индекс не найден</arrivalpoint>
   <arrivaldoor>Доступные значения: true или false</arrivaldoor>
   <statedvalue>"два" не является числом</statedvalue>
   <sizedvolume>"три" не является числом</sizedvolume>
   <oversizedvolume>"четыре" не является числом</oversizedvolume>
   <packages>
      <error>Неверный uid упаковки "111222333"</error>
   </packages>
   <oversizedweight>"восемь" не является числом</oversizedweight>
   <derivalpoint>Код КЛАДР/Почтовый индекс не найден</derivalpoint>
   <derivalservices>Неверный uid дополнительной услуги "333222111"</derivalservices>
   <arrivalservices>Неверный uid дополнительной услуги "333222111"</arrivalservices>
</errors>

If neither of warehouses in the required city cannot receive cargo of a specific weight, volume and size, the following error will be displayed:

Response example

{  
   "errors":{  
      "messages":[  
         "Весогабаритные характеристики груза превышают допустимые для приёма на терминалах города <название города>."
      ]
   }
}
<errors>
   <messages>Весогабаритные характеристики груза превышают допустимые для приёма на терминалах города <название города>.</messages>
</errors>

Algorithm of total cost calculation

The "response.price", "response.insurance_components", "response.notify" and "response.insurance" parameters at the root level of the method response contain information about the default cost of shipping.
The default shipping type is shipping by ground. When it is not available, then the default shipping type is shipping by air. When neither by ground, nor by air shipping types are available, the service is not provided.

Shipping with a pickup or entering a terminal

Basic calculation

If the Shipping with a Pickup service has been requested (with the "request.derivalDoor" = true parameter) then the "response.derival.price" parameter will contain the cost of shipping with a pickup.

Otherwise the parameter will contain the cost of entering a terminal. To know the cost of entering a different terminal, refer to the "response.derival.price" parameter corresponding to the requried terminal.

If express shipping is available (the response includes the "response.express" parameter), then the cost of entering a terminal when express shipping is used will be included in the "response.derival.terminals_express.price" parameter corresponding to the required terminal.
To calculate the cost of shipping small size cargo do not take into account the cost from the "response.derival" section, because it is already included in the cost from the "response.small" section. In the case of other types of shipping, take it into account.
Calculating the cost of a pickup from the sender and additional requirements for transport

If the Shipping with a Pickup service has been requested (with the "request.derivalDoor" = true parameter) as well as additional requirements for transport (with the "request.derivalServices" parameter listing services from the Directory of Special Requirements for Transport), then the "response.derival.premiumDetails.price" parameter corresponding to each service will contain the cost of it. The cost of all of those services will be included into the "response.derival.price" parameter.

Thus to know the cost of the shipping with a pickup service only (without additional requirements taken into account), contract the sum of values of each "response.derival.premiumDetails.price" parameter from the "response.derival.price" parameter.

Calculating the cost of a pickup from the sender including discounts

If the shipping with a pickup service has been requested (with the "request.derivalDoor" = true parameter) and parameters to include the discount of the counterparty (or a shared discount), then the "response.derival.discountDetails.price" parameter corresponding to each discount will contain the amount of it. All of those discounts will be included into the "response.derival.price" parameter.

Thus to know the cost of the shipping with a pickup service only (without additional requirements taken into account), add the sum of values of each "response.derival.discountDetails.price" parameter to the "response.derival.price" parameter.

The Vehicle Loading at the Sender's Address service

If the shipping with a pickup service has been requested (with the "request.derivalDoor" = true parameter) as well as vehicle loading/unloading activities, then add the value of response.loadUnload parameter to the total cost.

Services at a Terminal

If cargo packages were mentioned in the request, then add the cost of each package from the response.packages object to the total cost (e.g. response.packages.bag or response.packages.crate). If there is a discount or surcharge for a package, the amount of it will be displayed in the "response.packages.discountDetails" or "response.packages.premiumDetails" section, the discount or surcharge will be included to the cost of each package.

Terminal-to-terminal shipping

Depeding on which type of shipping the cost is calculated for, choose the cost from the relevant parameter "[shipping_type].price".

Use names of sections instead of "[shipping_type].price" (see table 1).

Table 1 - Types of shipping matching the names of sections in the method response

Shipping type

Section name

Terminal-to-terminal ground shipping

intercity

Air transportation

air

Small cargo

small

Express

express

Letter

letter

For example, the "air.price" parameter contains the cost of terminal-to-terminal shipping. 

If the response does not contain the required section, then shipping for the required route and given weight/size properties of cargo.

Notice: the cost does not include the cost of insurance and the Updates on Delivery service. You must add these costs to the total cost. They are contained in the following parameters (table 2):

Table 2 - Parameters containing the cost of services:

Service

Parameter with a cost

Updates on Delivery

response.[shipping_type].notify.price

Cargo and Shipping Time Insurance

response.[shipping_type].insurance

If it is required to take into account one type of insurance (cargo or shipping time), then the cost can be found in the "response.[shipping_type].insurance_components.cargo_insurance" or "response.[shipping_type].insurance_components.term_insurance".

Those sections include discounts and surcharge similarly to the "response.derival" section. The discounts and surcharge are already included in "response.[shipping_type].price" parameters.

Delivery to an address and additional services

The "response.arrival" section is processed similarly to the "response.derival" section.