Cancelling delivery from/to the address
General information
The service allows to cancel the delivery from the sender'/to the receiver's address. In case of cancelling the delivery from the sender's address the client will have to place a new order for the delivery from the terminal (see "Orders for shipping from the personal account" method). In case of cancelling the delivery to the sender's address the receiver will have to pick up the cargo from Delovye Linii company terminal.
To check the possibility of cancelling the delivery from/to the address, use Checking possibility to change the order method.
Cancelling delivery from the sender's address
Method request
Request example
Method address: https://api.dellin.ru/v3/orders/cancel_pickup.json
{ "appkey":"00000000-0000-0000-0000-000000000000", "sessionID":"00000000-0000-0000-0000-000000000000", "orderID":"00000000", "contactIDs":[ 12345678, 78456123 ], "contactPersons":[ { "name":"Иван Иванович" }, { "name":"Петр Петрович" } ], "phoneIDs":[ 98765412, 65478921 ], "phoneNumbers":[ { "number":"79213332211", "ext":"0123" } ] }
Method address: https://api.dellin.ru/v3/orders/cancel_pickup.xml
<request> <appkey>00000000-0000-0000-0000-000000000000</appkey> <sessionID>00000000-0000-0000-0000-000000000000</sessionID> <orderID>00000000</orderID> <contactIDs>12345678</contactIDs> <contactIDs>78456123</contactIDs> <contactPersons> <name>Иван Иванович</name> </contactPersons> <contactPersons> <name>Петр Петрович</name> </contactPersons> <phoneIDs>98765412</phoneIDs> <phoneIDs>65478921</phoneIDs> <phoneNumbers> <number>79213332211</number> <ext>0123</ext> </phoneNumbers> </request>
Description of parameters
Request
Request | |||
---|---|---|---|
Parameter | Required | Type | Description |
appkey | Yes | string | Application key. To get the key, register |
sessionID | Yes | string | Session ID. To get the session ID, use User authorization service |
orderID | Yes | string | The number of the order for which it is necessary to cancel the delivery from the sender's address |
contactIDs | No* | array of integer | Contact persons IDs from address book. Maximum 3 elements in the array. *One of the two excluding parameters - "contactIDs" or"contactPersons" - is required |
contactPersons | No* | array of contactPersons | Contact persons data. Maximum 3 elements in the array. *One of the two excluding parameters - "contactIDs" or"contactPersons" - is required |
contactPersons.name | Yes | string | Contact person name |
phoneIDs | No* | array of integer | Phone number IDs from address book. Maximum 3 elements in the array *One of the two excluding parameters - "phoneIDs" or"phoneNumbers" - is required |
phoneNumbers | No* | array of phoneNumbers | Phone numbers list. Maximum 3 elements in the array *One of the two excluding parameters - "phoneIDs" or"phoneNumbers" - is required |
phoneNumbers.number | Yes | string | Phone number. 15 characters maximum (the only valid non-digit sign is the plus sign at the beginning of the string) |
phoneNumbers.ext | No | string | Extension phone number. 5 digits maximum |
Method response
Response example
{ "metadata":{ "status":200, "generated_at":"2019-11-18 12:52:26" }, "data":{ "status":"success", "info": "Отмена доставки от адреса будет бесплатной до 17:00 (по местному времени) дня, предшествующего дню доставки." } }
<response> <metadata> <status>200</status> <generated_at>2019-11-18 12:52:26</generated_at> </metadata> <data> <status>success</status> <info>Отмена доставки от адреса будет бесплатной до 17:00 (по местному времени) дня, предшествующего дню доставки.</info> </data> </response>
Description of parameters
Response
Response | ||
---|---|---|
Parameter | Type | Description |
metadata | object | System information |
metadata.status | integer | Emulated status http-code. If successful, code 200 is returned. In case of error - 400 |
metadata.generated_at | string | Server response date and time. Format: YYYY-MM-DD HH:MM:SS |
data | object | Success confirmation |
data.status | string | Status in English. Possible value - "success" |
data.info | string | Free cancellation information |
Error handling
Except for common API errors the method response may contain the following errors:
Error number | http-code | Error title | Error description | ||
---|---|---|---|---|---|
Title | Translation | Description | Translation | ||
620001 | 400 | По данному заказу отмена доставки груза от адреса недоступна | The delivery from the address for the order can not be cancelled | - | - |
620002 | 400 | По данному заказу отмена доставки груза от адреса недоступна | The delivery from the address for the order can not be cancelled | Изменение по данному заказу недоступно в связи с отсутствием доступа | It is not possible to change the order details since there is no access |
Cancelling delivery to the receiver's address
Method request
Request example
Method address: https://api.dellin.ru/v3/orders/cancel_delivery.json
{ "appkey":"00000000-0000-0000-0000-000000000000", "sessionID":"00000000-0000-0000-0000-000000000000", "orderID":"00000000", "requester":"customer", "contactIDs":[ 12345678, 78456123 ], "contactPersons":[ { "name":"Иван Иванович" }, { "name":"Петр Петрович" } ], "phoneIDs":[ 98765412, 65478921 ], "phoneNumbers":[ { "number":"79213332211", "ext":"0123" } ] }
Method address: https://api.dellin.ru/v3/orders/cancel_delivery.xml
<request> <appkey>00000000-0000-0000-0000-000000000000</appkey> <sessionID>00000000-0000-0000-0000-000000000000</sessionID> <orderID>00000000</orderID> <requester>customer</requester> <contactIDs>12345678</contactIDs> <contactIDs>78456123</contactIDs> <contactPersons> <name>Иван Иванович</name> </contactPersons> <contactPersons> <name>Петр Петрович</name> </contactPersons> <phoneIDs>98765412</phoneIDs> <phoneIDs>65478921</phoneIDs> <phoneNumbers> <number>79213332211</number> <ext>0123</ext> </phoneNumbers> </request>
Description of parameters
Request
Request | |||
---|---|---|---|
Parameter | Required | Type | Description |
appkey | Yes | string | Application key. To get the key, register |
sessionID | Yes | string | Session ID. To get the session ID, use User authorization service |
orderID | Yes | string | The number of the order for which it is necessary to cancel the delivery to the receiver's address or the number of the related document - the waybill or the order |
requester | Yes | string | Role of the user requesting to cancel the delivery. Possible values:
|
contactIDs | No* | array of integer | Contact persons IDs from address book. Maximum 3 elements in the array *If the request to cancel the delivery is submitted by the customer ("requester" parameter value is "customer"), then one of the two excluding parameters - "contactIDs" or"contactPersons" - is required |
contactPersons | No* | array of contactPersons | Contact persons data. Maximum 3 elements in the array *If the request to cancel the delivery is submitted by the customer ("requester" parameter value is "customer"), then one of the two excluding parameters - "contactIDs" or"contactPersons" - is required |
contactPersons.name | Yes | string | Contact person name |
phoneIDs | No* | array of integer | Phone number IDs from address book. Maximum 3 elements in the array *If the request to cancel the delivery is submitted by the customer ("requester" parameter value is "customer"), then one of the two excluding parameters - "phoneIDs" or"phoneNumbers" - is required |
phoneNumbers | No* | array of phoneNumbers | Phone numbers list. Maximum 3 elements in the array *If the request to cancel the delivery is submitted by the customer ("requester" parameter value is "customer"), then one of the two excluding parameters - "phoneIDs" or"phoneNumbers" - is required |
phoneNumbers.number | Yes | string | Phone number. 15 characters maximum (the only valid non-digit sign is the plus sign at the beginning of the string) |
phoneNumbers.ext | No | string | Extension phone number. 5 digits maximum |
Method response
Error handling
Except for common API errors the method response may contain the following errors:
Error number | http-code | Error title | Error description | ||
---|---|---|---|---|---|
Title | Translation | Description | Translation | ||
615001 | 400 | По данному заказу отмена доставки груза до адреса недоступна | The delivery to the address for the order can not be cancelled | - | - |
615002 | 400 | По данному заказу отмена доставки груза до адреса недоступна | The delivery to the address for the order can not be cancelled | Изменение по данному заказу недоступно в связи с отсутствием доступа | It is not possible to change the order details since there is no access |
615003 | 400 | Указанная роль заказчика для данного заказа недоступна | The specified requester role is not allowable for the order | - | - |
615004 | 400 | Нет доступа к контрагенту заказа | No access to the counterparty | - | - |