Multi-request
General information
The service allows combining several orders for shipping from the same address in one multi-request for multi-shipping.
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 | |||
---|---|---|---|
Parameter | Required | Type | Description |
appkey | Да | string | Application key. To get the key, register |
sessionID | Да | string | To 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 | Нет | string | Comment |
Method response
Response structure
{ "answer":{ "requestID":112, "state":"success" } }
<response> <answer> <requestid>112</requestid> <state>success</state> </answer> </response>
Description of parameters
Response
Response | ||
---|---|---|
Parameter | Type | Description |
answer | object | Information on created multi-request |
answer.requestID | integer | ID of the created multi-request |
answer.state | string | Status |
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>