Changing the dispatch address/time
General information
The service allows changing the dispatch address, date and time in case shipping from the address has been ordered. To check the possibility of changing the dispatch address and time, use "Checking possibility to change the order" method. The changes do not come into effect immediately. After further verification the request can be approved or declined. To check the change request status use "Change history" method. The changes do not come into effect immediately. After further verification the request can be approved or declined. To check the change request status use "Change history" method.
Changing the dispatch address and time
Method request
Request structure
Method address: https://api.dellin.ru/v3/orders/change_pickup.json
{ "appkey":"00000000-0000-0000-0000-000000000000", "sessionID":"00000000-0000-0000-0000-000000000000", "orderID":"00000000", "variant":"address", "addressID":457824578, "address":{ "street":"7800000000004380000000000", "search":"Санкт-Петербург, ул. Ленина, 1", "house":"4", "building":"3", "structure":"лит. А", "flat":"214а" }, "produce_date":"2020-10-01", "time":{ "worktimeStart":"09:00", "worktimeEnd":"18:00", "breakStart":"12:30", "breakEnd":"13:30", "exactTime":true }, "contactIDs":[ 12345678, 78456123 ], "contactPersons":[ { "name":"Иван Иванович" }, { "name":"Петр Петрович" } ], "phoneIDs":[ 98765412, 65478921 ], "phoneNumbers":[ { "number":"79213332211", "ext":"0123" } ] } }
Method address: https://api.dellin.ru/v3/orders/change_pickup.xml
<request> <appkey>00000000-0000-0000-0000-000000000000</appkey> <sessionID>00000000-0000-0000-0000-000000000000</sessionID> <orderID>00000000</orderID> <variant>address</variant> <addressID>457824578</addressID> <address> <street>7800000000004380000000000</street> <search>Санкт-Петербург, ул. Ленина, 1</search> <house>4</house> <building>3</building> <structure>лит. А</structure> <flat>214а</flat> </address> <produce_date>2020-10-01</produce_date> <time> <worktimeStart>09:00</worktimeStart> <worktimeEnd>18:00</worktimeEnd> <breakStart>12:30</breakStart> <breakEnd>13:30</breakEnd> <exactTime>true</exactTime> </time> <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 change the dispatch address and time |
variant | Yes | string | Shipping method. The method allows to change the dispatch address, but it does not provide for changing the shipping from the address to the shipping from the terminal, therefore the only possible value is - "address" (shipping from the address) |
addressID | No* | integer | Address ID from the "Address book" One of the excluding parameters is required: "addressID" or "address" |
address | No* | object | Address. The new address must be in the same region as the one originally specified One of the excluding parameters is required: "addressID" or "address" |
address.search | No* | 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". Maximum 1024 symbols Address information must be passed in the request therefore either "search" parameter is required or "street" and "house" parameters are required |
address.street | No* | string | CLADR* code of the street (see. "CLADR search"). *CLADR - Classifier of Addresses of Russian Federation Address information must be passed in the request therefore either "search" parameter is required or "street" and "house" parameters are required |
address.house | No* | string | House number, including the letter. For example, "13/A". Maximum 7 characters Address information must be passed in the request therefore either "search" parameter is required or "street" and "house" parameters are required |
address.building | No | string | Building. Maximum 5 characters If "search" parameter is passed in the request, then "building" and "structure" parameters must not be passed |
address.structure | No | string | Structure. Maximum 7 characters If "search" parameter is passed in the request, then "building" and "structure" parameters must not be passed |
address.flat | No | string | Apartment/office, including the letter. For example, "222 A". Maximum 5 characters If "search" and "flat" parameters are passed in the request together then the value of the "flat" parameter will be used as an apartment/office number |
produce_date | No* | string | Date of cargo transfer to the terminal of departure or date of forwarding driver arrival to the sender. Format: YYYY-MM-DD Passing the current date as the parameter value, consider that pickup on the day of ordering is possible only if the order is placed on a weekday before 16:00 local time and if in the settlement there is a Delovye Linii company terminal which works two or more hours from the moment of placing an order, and the dimensions of the cargo do not exceed:
*If "variant" parameter value is "address", then parameter is required |
time | No* | object | Time of cargo hand over at the address. *If "variant" parameter value is "address", then parameter is required |
time.worktimeStart | Yes | string | Period start. Format: HH:MM |
time.worktimeEnd | Yes | string | Period end. Format: HH:MM |
time.breakStart | No | string | Break start. Format: HH:MM |
time.breakEnd | No | string | Break start. Format: HH:MM |
time.exactTime | No | boolean | Flag indicating that delivery at the exact time is required. Default value: "false" |
contactIDs | No* | array of integers | 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 integers | 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 structure
{ "metadata":{ "status":200, "generated_at":"2019-11-18 12:52:26" }, "data":{ "state":"success", "information": "Смена адреса и времени отправки груза будет бесплатной при подаче запроса до 17:00 (по местному времени) дня, предшествующего дню отправки.", "foundAddresses": [ { "source": "Санкт-Петербург, ул. Ленина, 1", "result": "Россия, г Санкт-Петербург, г Санкт-Петербург, ул Ленина, д 1", "field": "address" } ] } }
<response> <metadata> <status>200</status> <generated_at>2019-11-18 12:52:26</generated_at> </metadata> <data> <state>success</state> <information>Смена адреса и времени отправки груза будет бесплатной при подаче запроса до 17:00 (по местному времени) дня, предшествующего дню отправки.</information> <foundAddresses> <source>Санкт-Петербург, ул. Ленина, 1</source> <result>Россия, г Санкт-Петербург, г Санкт-Петербург, ул Ленина, д 1</result> <field>address</field> </foundAddresses> </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.state | string | Status in English. Possible value - "success" "Success" status indicates that the request was accepted. After further verification the request can be approved or declined. To check the change request status use "Change history" method |
data.information | string | Information on conditions when the dispatch address and time can be changed free of charge |
data.foundAddresses | array of FoundAddresses | Data on found addresses. The parameter is present in the response if "address.search" parameter was passed in the request |
FoundAddresses
FoundAddresses | ||
---|---|---|
Parameter | Type | Description |
field | string | The parent object that was used to pass the "search" parameter |
source | string | Entered value |
result | string | Address found |
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 | ||
621001 | 400 | По данному заказу изменение адреса и времени недоступно | The dispatch address and time for the order can not be changed | - | - |
621002 | 400 | По данному заказу изменение адреса и времени недоступно | The dispatch address and time for the order can not be changed | Изменение по данному заказу недоступно в связи с отсутствием доступа | It is not possible to change the order details since there is no access |