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

API
Главная / API - Changing the dispatch address/time

Changing the dispatch address/time

Обновлено 20.01.2023
134 кб

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
ParameterRequiredTypeDescription

appkey

YesstringApplication key. To get the key, register
sessionIDYesstringSession ID. To get the session ID, use "User authorization" service

orderID

YesstringThe number of the order for which it is necessary to change the dispatch address and time
variantYesstringShipping 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)
addressIDNo*integer

Address ID from the "Address book"

One of the excluding parameters is required: "addressID" or "address"
addressNo*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.streetNo*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.houseNo*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.buildingNostring

Building.

Maximum 5 characters

If "search" parameter is passed in the request, then "building" and "structure" parameters must not be passed
address.structureNostring

Structure.

Maximum 7 characters

If "search" parameter is passed in the request, then "building" and "structure" parameters must not be passed
address.flatNostring

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_dateNo*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:

  • weight - 4999 kg;
  • volume - 21,99 m3;
  • length - 6 m;
  • width - 2 m;
  • height - 2,2 m
*If "variant" parameter value is "address", then parameter is required
timeNo*object

Time of cargo hand over at the address.

*If "variant" parameter value is "address", then parameter is required
time.worktimeStartYesstring

Period start.

Format: HH:MM

time.worktimeEndYesstring

Period end.

Format: HH:MM

time.breakStartNostring

Break start.

Format: HH:MM

time.breakEndNostring

Break start.

Format: HH:MM

time.exactTimeNoboolean

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

YesstringContact 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

YesstringPhone number. 15 characters maximum (the only valid non-digit sign is the plus sign at the beginning of the string)

phoneNumbers.ext

NostringExtension 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
ParameterTypeDescription
metadataobjectSystem information
metadata.statusinteger

Emulated status http-code. If successful, code 200 is returned. In case of error - 400

metadata.generated_atstring

Server response date and time.

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

dataobjectSuccess confirmation
data.statestring

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.informationstringInformation on conditions when the dispatch address and time can be changed free of charge
data.foundAddressesarray of FoundAddressesData on found addresses. The parameter is present in the response if "address.search" parameter was passed in the request

FoundAddresses
FoundAddresses
ParameterTypeDescription
fieldstringThe parent object that was used to pass the "search" parameter
sourcestring

Entered value

resultstring

Address found

Error handling

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

Error numberhttp-codeError titleError description
TitleTranslationDescriptionTranslation

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