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

API
Главная / API - Multi-request

Multi-request

Обновлено 18.01.2022
96 кб

General information

The service allows combining several orders for shipping from the same address in one multi-request for multi-shipping.

The present method allows combining the orders for delivery from the sender's address, to combine the orders for delivery from the terminal into a batch order use "Pre-Alert batch order" method

Multi-request

Method request

Request structure

Method address: https://api.dellin.ru/v1/customers/multi_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/v1/customers/multi_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
appkeyДаstringApplication key. To get the key, register
sessionIDДаstringTo get the session ID, use the User Authorization method
requestidsДаarray of strings

IDs of the orders that need to be combined into a multi-request

To place an order use "Placing LTL orders" method, pass "false" as the value of "inOrder" request parameter. Thus the order will not be processed immediately after being created. After the orders are combined with the help of v1/customers/multi_request method, they will be automatically queued to be processed
commentНетstringComment

Method response

Response structure

{  
   "answer":{  
      "requestID":112,
      "state":"success"
   }
}
<response>
   <answer>
      <requestid>112</requestid>
      <state>success</state>
   </answer>
</response>

Description of parameters

Response
Response
ParameterTypeDescription
answerobjectInformation on created multi-request
answer.requestIDintegerID of the created multi-request
answer.statestringStatus

Error handling

In case incorrect order ID is passed or if "true" was passed as the value of the "inOrder" parameter when creating the order, the following error message will be displayed:

Response example

{  
   "errors":{  
      "requestids":"Error: id заявок не соответствует условиям: 12345678"
   }
}
<response>
   <errors>
      <requestids>Error: id заявок не соответствует условиям: 12345678</requestids>
   </errors>
</response>

In case the orders were created in different accounts, the following error message will be displayed:

Response example

{  
   "errors":{  
      "requestids":"ошибка c контрагентом отправителя"
   }
}
<response>
   <errors>
      <requestids>ошибка c контрагентом отправителя</requestids>
   </errors>
</response>

In case the orders have different dispatch addresses, the following error message will be displayed:

Response example

{  
   "errors":{  
      "requestids":"ошибка с адресом отправки"
   }
}
<response>
   <errors>
      <requestids>ошибка с адресом отправки</requestids>
   </errors>
</response>

If only one order ID is passed, the following error message will be displayed:

Response example

{  
   "errors":{  
      "requestids":"Количество id необходимо более одного"
   }
}
<response>
   <errors>
      <requestids>Количество id необходимо более одного</requestids>
   </errors>
</response>