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

API
Главная / API - Pre-Alert batch order

Pre-Alert batch order

Обновлено 22.01.2024
171 кб

General information

Combining several existing orders for shipping from the terminal into a batch order allows to speed up the cargo processing at the terminal.  

The service allows creating/cancelling a batch order, passing the data of the driver who is going to hand over the cargo at the terminal and of a car that he will be using as well as the information on cargo places of the combined orders. 

To use the method please contact the company manager and inform them that you would like to use Pre-Alert solution.

The present method allows combining the orders for shipping from the terminal ("pre-orders") into a batch order. Combined orders must be created with "cargoCode" parameter (see "Placing LTL orders").To combine several orders for shipping from the sender's address use "Multi-request" method.

Placing a batch order

Method request

Request structure

Method address: https://api.dellin.ru/v2/batch_request.json

{  
   "appkey":"00000000-0000-0000-0000-000000000000",
   "sessionID":"00000000-0000-0000-0000-000000000000",
   "requestIDs":["1111","2222","3333"],
   "comment":"Текст комментария"
}

Method address: https://api.dellin.ru/v2/batch_request.xml

<request>
   <appkey>00000000-0000-0000-0000-000000000000</appkey>
   <sessionID>00000000-0000-0000-0000-000000000000</sessionID>
   <requestIDs>1111</requestIDs>
   <requestIDs>2222</requestIDs>
   <requestIDs>3333</requestIDs>
   <comment>Текст комментария</comment>
</request>

Description of parameters

Request
Request
ParameterRequiredTypeDescription
appkeyYesstringApplication key. To get the key, register
sessionIDYesstringTo get the session ID, use the User Authorization method
requestIDsYesarray of strings

IDs of the orders that need to be combined into a batch order (to place an order use "Placing LTL orders" method)

Note!

  1. The order must be a pre-order (that is the order for shipping from the terminal).
  2. The order must be created by the current user.
  3. Allowable order statuses:
    1. "В обработке" - processing.
    2. "Ожидает сдачи на терминал" - waiting to be handed over at the terminal.
    3. "Груз принят к перевозке" - the cargo has been received at the terminal.
    4. "Груз принят к перевозке. Платное хранение" - the cargo has been received at the terminal, the paid storage period has started.
    5. "Груз в пути" - in transit
commentNostringComment. Maximum 300 symbols

Method response

Response structure

{  
   "metadata":{
      "status":200,
      "generated_at":"2020-06-17 15:15:58"
   },
   "data":{
      "batchRequestID":12345,
      "state":"success"
   }
}
<response>
   <metadata>
      <status>200</status>
      <generated_at>2020-06-17 15:15:58</generated_at>
   </metadata>
   <data>
      <batchRequestID>12345</batchRequestID>
      <state>success</state>
   </data>
</response>

Description of parameters

Response
Response
ParameterTypeDescription
metadataobjectSystem information
metadata.statusinteger

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

metadata.generated_atstring

Server response date and time.

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

dataobjectInformation on created batch order
data.batchRequestIDintegerID of the created batch order
data.statestringStatus. Possible value - "success"

Error handling

Except for common API errors the method response may contain the following errors:

Error number

http-code

Error title

TitleTranslation

616001

400

Указанные заказы не соответствуют условиям группировки в мультизаявку

The selected orders do not meet the requirements for combining into a batch order

Canceling a batch order

Method request

Request structure

Method address: https://api.dellin.ru/v2/batch_request/cancel.json

{  
   "appkey":"00000000-0000-0000-0000-000000000000",
   "sessionID":"00000000-0000-0000-0000-000000000000",
   "batchRequestID":12345
}

Method address: https://api.dellin.ru/v2/batch_request/cancel.xml

<request>
   <appkey>00000000-0000-0000-0000-000000000000</appkey>
   <sessionID>00000000-0000-0000-0000-000000000000</sessionID>
   <batchRequestID>12345</batchRequestID>
</request>

Description of parameters

Request
Request
ParameterRequiredTypeDescription
appkeyYesstringThe application key. To get the key, register
sessionIDYesstringTo get the session ID, use the User Authorization method
batchRequestIDYesinteger

ID of the batch order that need to be cancelled

The batch order must be created by the current user

Method response

Response structure

{  
   "metadata":{
      "status":200,
      "generated_at":"2020-06-17 15:15:58"
   },
   "data":{
      "state":"success"
   }
}
<response>
   <metadata>
      <status>200</status>
      <generated_at>2020-06-17 15:15:58</generated_at>
   </metadata>
   <data>
      <state>success</state>
   </data>
</response>

Description of parameters

Response
Response
ParameterTypeDescription
metadataobjectSystem information
metadata.statusinteger

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

metadata.generated_atstring

Server response date and time.

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

dataobjectInformation on the operation completion
data.statestringStatus. Possible value - "success"

Error handling

Except for common API errors the method response may contain the following errors:

Error number

http-code

Error title

TitleTranslation

617001

400

Невозможно отменить данную мультизаявку

Impossible to cancel the batch order

Passing the car and the driver data

Method request

Request structure

Method address: https://api.dellin.ru/v2/batch_request/update.json

{  
   "appkey":"00000000-0000-0000-0000-000000000000",
   "sessionID":"00000000-0000-0000-0000-000000000000",
   "batchRequestID":12345,
   "carNumber": "С690ТН55", 
   "driverName": "Иванов Петр Викторович" 
}

Method address: https://api.dellin.ru/v2/batch_request/update.xml

<request>
   <appkey>00000000-0000-0000-0000-000000000000</appkey>
   <sessionID>00000000-0000-0000-0000-000000000000</sessionID>
   <batchRequestID>12345</batchRequestID>
   <carNumber>С690ТН55</carNumber>
   <driverName>Иванов Петр Викторович</driverName>
</request>

Description of parameters

Request
Request
ParameterRequiredTypeDescription
appkeyYesstringApplication key. To get the key, register
sessionIDYesstringTo get the session ID, use the User Authorization method
batchRequestIDYesinteger

ID of the batch order

The batch order must be created by the current user
carNumberNostringNumber of the car that will be used to deliver the cargo to the terminal (1)
driverNameNostringName of the driver who is going to deliver the cargo to the terminal (1)

Notes:

  1. If an empty value is passed, the previously passed value will be voided (if the parameter is not passed in the request - the previously passed value remain unchanged) 

Method response

Response of the method "Passing the car and the driver data" is similar to the response of the method "Cancelling a batch order"

Error handling

Except for common API errors the method response may contain the following errors:

Error number

http-code

Error title

TitleTranslation

618001

400

Невозможно обновить данные по этой мультизаявке

Impossible to update the batch order details

Passing the cargo places information

Method request

Request structure

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

{
   "appkey":"00000000-0000-0000-0000-000000000000",
   "sessionID":"00000000-0000-0000-0000-000000000000",
   "requestID":"111111",
   "cargoPlaces":[
      {
         "cargoPlace":"123123",
         "amount":1,
         "volume":1,
         "weight":2.3,
         "length":1,
         "width":1,
         "height":1
      },
      {
         "cargoPlace":"22222",
         "amount":1,
         "volume":1,
         "weight":2.3,
         "length":1,
         "width":1,
         "height":1
      }
   ]
}

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

<request>
   <appkey>00000000-0000-0000-0000-000000000000</appkey>
   <sessionID>00000000-0000-0000-0000-000000000000</sessionID>
   <requestID>111111</requestID>
   <cargoPlaces>
      <cargoPlace>123123</cargoPlace>
      <amount>1</amount>
      <volume>1</volume>
      <weight>2.3</weight>
      <length>1</length>
      <width>1</width>
      <height>1</height>
   </cargoPlaces>
   <cargoPlaces>
      <cargoPlace>22222</cargoPlace>
      <amount>1</amount>
      <volume>1</volume>
      <weight>2.3</weight>
      <length>1</length>
      <width>1</width>
      <height>1</height>
   </cargoPlaces>
</request>

Description of parameters

Request
Request
ParameterRequiredTypeDescription
appkeyYesstringApplication key. To get the key, register
sessionIDYesstringTo get the session ID, use the User Authorization method
requestIDYesstring

Oder ID (to place an order use "Placing LTL orders" method)

The order must be created by the current user

cargoPlaces

Yesarray of CargoPlacesCargo places data

cargoPlaces.cargoPlace

YesstringCargo place number (cargo places to be marked by the client)

cargoPlaces.amount

YesintegerNumber of the cargo places with the same mark

cargoPlaces.volume

NofloatCargo place volume, m3 (1)

cargoPlaces.weight

NofloatCargo place weight, kg (1)

cargoPlaces.length

NofloatCargo place length, m (1)

cargoPlaces.width

NofloatCargo place width, m (1)

cargoPlaces.height

NofloatCargo place height, m (1)

Notes:

  1. The default value - 0.1

Method response

Response of the method "Passing the cargo places information" is similar to the response of the method "Cancelling a batch order"

Error handling

Except for common API errors the method response may contain the following errors:

Error number

http-code

Error title

TitleTranslation

619001

400

Невозможно внести данные по грузоместам в предзаказ

Not possible to update pre-order with the cargo places details