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

API
Главная / API - Cargo handover intervals

Cargo handover intervals

Обновлено 06.02.2023
154 кб

General information

The service allows getting information on available intervals of forwarding driver arrival to the sender/receiver in order to get/hand over the cargo. Unauthorized users can check the available intervals of handing the cargo at sender's address, meanwhile checking the delivere intervals is available only to authorized users.

Intervals of handing the cargo at the sender's address

Method request

Request structure

Method address: https://api.dellin.ru/v2/request/address/time_interval.json

{
   "appkey":"00000000-0000-0000-0000-000000000000",
   "sessionID":"00000000-0000-0000-0000-000000000000",
   "delivery":{
      "deliveryType":{
         "type":"auto"
      },
      "derival":{
         "produceDate":"2020-06-03",
         "addressID":3357,
         "address":{
            "search":"Омск, Ленина, 5",
            "street":"5500000100005970000000000",
            "house":"5",
            "building":"1",
            "structure":"4",
            "flat":"1"
         },
         "city":"5500000100000000000000000"
      }
   }
}

Method address: https://api.dellin.ru/v2/request/address/time_interval.xml

<request>
   <appkey>00000000-0000-0000-0000-000000000000</appkey>
   <sessionID>00000000-0000-0000-0000-000000000000</sessionID>
   <delivery>
      <deliveryType>
         <type>auto</type>
      </deliveryType>
      <derival>
         <produceDate>2020-06-03</produceDate>
         <addressID>3357</addressID>
         <address>
            <search>Омск, Ленина, 5</search>
            <street>5500000100005970000000000</street>
            <house>5</house>
            <building>1</building>
            <structure>4</structure>
            <flat>1</flat>
         </address>
         <city>5500000100000000000000000</city>
      </derival>
</request>

Description of parameters

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

To get the session ID, use the "User Authorization" method

deliveryYesobjectInformation on delivery
delivery.deliveryTypeYesDeliveryTypeInformation on type of terminal-to-terminal shipping
delivery.derivalYesDerival

Information on shipping from sender's the address

DeliveryType
DeliveryType
ParameterRequiredTypeDescription

type

Yesstring

Shipping type.

Possible values:

  • auto- by truck;
  • express;
  • letter;
  • avia;
  • small - shipping of small-size cargo.
Small size cargo is the cargo with parameters that do not exceed the following values:
  • weight is less than or equal to 30 kg;
  • LWH is less than or equal to 0.54*0.39*0.39 m;
  • volume is less than or equal to 0.1 cubic meters.
It is only possible to order Small Cargo Delivery service if there are Delovye Linii company terminals in the city of departure and city of arrival. For more information see company website

Derival
Derival
ParameterRequiredTypeDescription
produceDateYesstring

Date of handover of the cargo to the forwarding driver at the sender's address

Format: YYYY-MM-DD

addressIDNo*integer

Address ID from "Address book"

*One of the excluding parameters is required: "addressID", "address" or "city"
addressNo*Address

Address data

*One of the excluding parameters is required: "addressID", "address" or "city"
cityNo*string

City CLADR code. To get CLADR code use the services listed on "CLADR search" page

*One of the excluding parameters is required: "addressID", "address" or "city"

Address

Address

ParameterRequiredTypeDescription

search

No (1)string

Address as a string.

It is possible to pass address as text or as coordintaes.

When passing address as a text along with the address it is necessary to pass the name of the city, the address elements should be separated by comma, for example "Омск, Ленина, 5".

The coordinates should be separated by comma as well, the first number - latitude "59.924501, 30.241762".

Minimum 2 symbols, maximum 1024 (2)

streetNo (1)string

CLADR* code of the street (see. "CLADR search") (2).

*CLADR - Classifier of Addresses of Russian Federation 

houseNo (1)string

House number, including the letter. For example, "13/A" (2).

Maximum 7 characters

buildingNostring

Building (2).

Maximum 5 characters

structureNostring

Structure (2).

Maximum 7 characters

flatNostring

Apartment/office, including the letter. For example, "222 A" (2).

Maximum 5 characters

Notes:

  1. Address information must be passed in the request therefore either "search" parameter is required or "street" and "house" parameters are required.
  2. If "search" parameter is passed in the request, then "street", "house", "building" and "structure" parameters must not be passed, but "flat" parameter may be passed (in this case the value of the "flat" parameter will be used as an apartment/office number)

Method response

Response structure

{
   "metadata":{
      "status":200,
      "generated_at":"2020-06-03 09:06:54"
   },
   "data":{
      "interval_from":"00:00:00",
      "interval_to":"23:59:00",
      "default_min_same_day_period":6,
      "min_same_day_period":2,
      "min_period":0,
      "same_day":false,
      "foundAddresses": [
         {
            "field": "delivery.derival.address",
            "source": "Омск, Ленина, 5",
            "result": "Россия, Омская обл, г Омск, ул Ленина, д 5"
         }
      ]
   }
}
<response>
   <metadata>
      <status>200</status>
      <generated_at>2020-06-30 06:33:53</generated_at>
   </metadata>
   <data>
      <interval_from>00:00:00</interval_from>
      <interval_to>23:59:00</interval_to>
      <default_min_same_day_period>6</default_min_same_day_period>
      <min_same_day_period>2</min_same_day_period>
      <min_period>0</min_period>
      <same_day>false</same_day>
      <foundAddresses>
         <field>delivery.derival.address</field>
         <source>Омск, Ленина, 5</source>
         <result>Россия, Омская обл, г Омск, ул Ленина, д 5</result>
      </foundAddresses>
   </data>
</response>

Description of parameters

Response
Response
ParameterTypeDescription
metadataobjectSystem information
metadata.statusintegerEmulated status http-code. If successful, code 200 is returned
metadata.generated_atstring

Server response date and time.

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

dataobjectData of the interval of cargo handover at the sender/receiver address (the client can indicate at what time the forwarding driver should arrive, the object contains information on the interval parameters)
data.interval_fromstring

Allowable interval start 

Format: HH:MM:SS

data.interval_tostring

Allowable interval end

Format: HH:MM:SS

data.default_min_same_day_periodintegerStandard interval duration, in the case the arrival of the driver is scheduled on the day of placing the order, h
data.min_same_day_periodintegerMinimum interval duration, in the case the arrival of the driver is scheduled on the day of placing the order, h
data.min_periodintegerMinimum interval duration, h
data.same_dayboolean

Flag indicating that the arrival of the driver can be scheduled on the day of placing the order

data.foundAddressesarray of FoundAddressesData on found addresses. The parameter is present in the response if "search" parameter of the "Address" class was passed in the request

FoundAddresses
FoundAddresses
ParameterTypeDescription
fieldstringThe parent object that was used to pass the "search" parameter
sourcestring

Entered value

resultstring

Address found

Error handling

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

Intervals of handing the cargo at the receiver's address

Method request

Request structure

Method address: https://api.dellin.ru/v2/request_delivery/address/time_interval.json

{   
   "appkey":"00000000-0000-0000-0000-000000000000",
   "sessionID":"00000000-0000-0000-0000-000000000000",
   "docID":"2000085063763",
   "delivery":{
      "arrival":{
         "produceDate":"2020-06-03",
         "addressID":3357,
         "address":{
            "search":"Омск, Ленина, 5",
            "street":"5500000100005970000000000",
            "house":"5",
            "building":"1",
            "structure":"4",
            "flat":"1"
         },
         "city":"5500000100000000000000000"
      }
   }
}

Method address: https://api.dellin.ru/v2/request_delivery/address/time_interval.xml

<request>
   <appkey>00000000-0000-0000-0000-000000000000</appkey>
   <sessionID>00000000-0000-0000-0000-000000000000</sessionID>
   <docID>2000085063763</docID>
   <delivery>
      <arrival>
         <produceDate>2020-06-03</produceDate>
         <addressID>3357</addressID>
         <address>
            <search>Омск, Ленина, 5</search>
            <street>5500000100005970000000000</street>
            <house>5</house>
            <building>1</building>
            <structure>4</structure>
            <flat>1</flat>
         </address>
         <city>5500000100000000000000000</city>
      </arrival>
   </delivery>
</request>

Description of parameters

Request
Request
ParameterRequiredTypeDescription
appkeyYesstring

Application key. To get the key, register

sessionID

YesstringTo get the session ID, use the "User Authorization" method
docIDYesstring

Number of order, waybill or order for shipping for which it is necessary to receive the information on possible intervals of delivery to the receiver's address

deliveryYesobjectInformation on delivery
delivery.arrivalYesArrivalInformation on delivery to the receiver's address

Arrival
Arrival
ParameterRequiredTypeDescription
produceDateYesstring

Date of handover of the cargo to the receiver at his address

Format: YYYY-MM-DD

addressIDNointeger

Address ID from "Address book"

Allows getting information on available intervals in case of delivery to the address different from the one indicated in the waybill. Only one of the following parameters can be passed: "addressID", "address" or "city"
addressNoAddress

Address data

Allows getting information on available intervals in case of delivery to the address different from the one indicated in the waybill. Only one of the following parameters can be passed: "addressID", "address" or "city"
cityNostring

City CLADR code. To get CLADR code use the services listed on "CLADR search" page

Allows getting information on available intervals in case of delivery to the city different from the one indicated in the waybill. Only one of the following parameters can be passed: "addressID", "address" or "city"

Address

Address

ParameterRequiredTypeDescription

search

No (1)string

Address as a string.

It is possible to pass address as text or as coordintaes.

When passing address as a text along with the address it is necessary to pass the name of the city, the address elements should be separated by comma, for example "Омск, Ленина, 5".

The coordinates should be separated by comma as well, the first number - latitude "59.924501, 30.241762".

Minimum 2 symbols, maximum 1024 (2)

streetNo (1)string

CLADR* code of the street (see. "CLADR search") (2).

*CLADR - Classifier of Addresses of Russian Federation 

houseNo (1)string

House number, including the letter. For example, "13/A" (2).

Maximum 7 characters

buildingNostring

Building (2).

Maximum 5 characters

structureNostring

Structure (2).

Maximum 7 characters

flatNostring

Apartment/office, including the letter. For example, "222 A" (2).

Maximum 5 characters

Notes:

  1. Address information must be passed in the request therefore either "search" parameter is required or "street" and "house" parameters are required.
  2. If "search" parameter is passed in the request, then "street", "house", "building" and "structure" parameters must not be passed, but "flat" parameter may be passed (in this case the value of the "flat" parameter will be used as an apartment/office number)

Method response

Response of the method "Intervals of handing the cargo at the receiver's address"  is similar to the response of the method "Intervals of handing the cargo at the sender's address"

Error handling

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