Adding delivery to the receiver's address
General information
The service allows ordering the shipping from the Delovye Linii company terminal to the receiver's address on the basis of the existing order for delivery to the company terminal. The order should have one of the following statuses:
- received;
- received_warehousing;
- inway;
- arrived;
- warehousing;
- arrived_to_airport;
- airport_warehousing.
The service is available to the authorized as well as to the unauthorized users. The authorized users unlike unauthorized users can use the address book data when working with the method.
Adding delivery to the receiver's address
Method request
Request structure
Method address: https://api.dellin.ru/v2/request_delivery.json
{ "appkey":"111", "sessionID":"00000000-0000-0000-0000-000000000000", "docID":"2000000000000", "delivery":{ "arrival":{ "addressID":457824578, "address":{ "search":"Омск, Ленина, 5", "street":"7800000000004380000000000", "house":"4", "building":"3", "structure":"лит.А", "flat":"214а" }, "produceDate":"2020-11-30", "time":{ "worktimeStart":"09:00", "worktimeEnd":"18:00", "exactTime":true, "breakStart":"12:30", "breakEnd":"13:30" }, "handling":{ "freightLift":true, "toFloor":10, "carry":50 }, "requirements":[ "0x9951e0ff97188f6b4b1b153dfde3cfec", "0xabb9c63c596b08f94c3664c930e77778" ], "payer":"third" }, "comment":"комментарий к отправке" }, "members":{ "receiver":{ "contactIDs":[ 12345678, 78456123 ], "contactPersons":[ { "name":"Иван Иванович" }, { "name":"Петр Петрович" } ], "phoneIDs":[ 98765412, 65478921 ], "phoneNumbers":[ { "number":"79213332211", "ext":"0123" } ] }, "third":{ "counteragentID":456783515, "counteragent":{ "form":"0x8F51001438C4D49511DBD774581EDB80", "name":"Ромашка", "inn":"1234567890", "juridicalAddress":{ "search":"Омск, Ленина, 5", "street":"7800000000004380000000000", "house":"4", "building":"2", "structure":"3А", "flat":"Б-234" }, "document":{ "type":"passport", "serial":"0000", "number":"123456" } }, "contactIDs":[ 12345678, 78456123 ], "contactPersons":[ { "name":"Иван Иванович" }, { "name":"Петр Петрович" } ], "phoneIDs":[ 98765412, 65478921 ], "phoneNumbers":[ { "number":"79213332211", "ext":"0123" } ], "email":"test@mail.ru", "dataForReceipt":{ "send":true, "phone":"+79999999999", "email":"test@mail.ru" } } }, "payment":{ "type":"cash", "promocode":"promo123", "email":"test@mail.ru", "paymentCity":"7800000000000000000000000", "paymentCitySearch":{ "search":"Омск" } }, "notify":{ "phone":"79999999999", "email":"test@mail.ru" } }
Method address: https://api.dellin.ru/v2/request_delivery.xml
<request> <appkey>111</appkey> <sessionID>00000000-0000-0000-0000-000000000000</sessionID> <docID>2000000000000</docID> <delivery> <arrival> <addressID>457824578</addressID> <address> <search>Омск, Ленина, 5</search> <street>7800000000004380000000000</street> <house>4</house> <building>3</building> <structure>лит.А</structure> <flat>214а</flat> </address> <produceDate>2020-11-30</produceDate> <time> <worktimeStart>09:00</worktimeStart> <worktimeEnd>18:00</worktimeEnd> <exactTime>true</exactTime> <breakStart>12:30</breakStart> <breakEnd>13:30</breakEnd> </time> <handling> <freightLift>true</freightLift> <toFloor>10</toFloor> <carry>50</carry> </handling> <requirements>0x9951e0ff97188f6b4b1b153dfde3cfec</requirements> <requirements>0xabb9c63c596b08f94c3664c930e77778</requirements> <payer>third</payer> </arrival> <comment>комментарий к отправке</comment> </delivery> <members> <receiver> <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> </receiver> <third> <counteragentID>456783515</counteragentID> <counteragent> <form>0x8F51001438C4D49511DBD774581EDB80</form> <name>Ромашка</name> <inn>1234567890</inn> <juridicalAddress> <search>Омск, Ленина, 5</search> <street>7800000000004380000000000</street> <house>4</house> <building>2</building> <structure>3А</structure> <flat>Б-234</flat> </juridicalAddress> <document> <type>passport</type> <serial>0000</serial> <number>123456</number> </document> </counteragent> <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> <email>test@mail.ru</email> <dataForReceipt> <send>true</send> <phone>+79999999999</phone> <email>test@mail.ru</email> </dataForReceipt> </third> </members> <payment> <type>cash</type> <promocode>promo123</promocode> <email>test@mail.ru</email> <paymentCity>7800000000000000000000000</paymentCity> <paymentCitySearch> <search>Омск</search> </paymentCitySearch> </payment> <notify> <phone>79999999999</phone> <email>test@mail.ru</email> </notify> </request>
Description of parameters
Request
Request | |||
---|---|---|---|
Parameter | Required | Type | Description |
appkey | Yes | string | The application key. To get the key, register |
sessionID | No | string | To get the session ID, use the "User Authorization" method |
docID | Yes | string | Number of order or the waybill |
delivery | Yes | object | Delivery details |
delivery.arrival | Yes | Arrival | Delivery to the address details |
delivery.comment | No | string | Comment to the order. Maximum 500 characters |
members | Yes | object | Shipping parties |
members.receiver | Yes | Member | Receiver data |
members.third | No* | Member | Third party data |
payment | Yes | Payment | Payment data |
notify | No | object | Contact data for the notifications |
notify.phone | No | string | Phone number. Format: "7XXXXXXXXXX" (11 digits starting with 7) |
notify.email | No | string | Email address |
Arrival
Arrival | |||
---|---|---|---|
Parameter | Required | Type | Description |
addressID | No* | integer | Address ID from the "Address book" *If the user is unauthorized ("sessionID" parameter is not passed in the request), then the parameter is ignored. If the user is authorized ("sessionID" parameter is passed in the request), then one of the excluding parameters is required: "addressID" or "address" |
address | No* | Address | Address data *If the user is unauthorized, then the parameter is required. If the user is authorized, then one of the excluding parameters is required: "addressID" or "address" |
produceDate | Yes | string | Date of handover of the cargo to the receiver at his address. Format: YYYY-MM-DD To get the list of dates for which the delivery to the receiver's address can be scheduled use "Delivery dates" method |
time | Yes | object | Information on delivery time |
time.worktimeStart | Yes | string | Period start. Format: HH:MM |
time.worktimeEnd | Yes | string | Period end. Format: HH:MM |
time.exactTime | No | boolean | Delivery at the exact time. Default value: "false" |
time.breakStart | No | string | Break start. Format: HH:MM |
time.breakEnd | No | string | Break end. Format: HH:MM |
handling | No | object | Loading and unloading works at the address |
handling.freightLift | No | boolean | Flag indicating that there is a service lift. Default value: "false" |
handling.toFloor | No | integer | Number of the floor to which the cargo is to be lifted. Maximum number of characters - 5 |
handling.carry | No | integer | Distance to which the cargo is to be carried, m. Maximum number of characters - 5 |
requirements | No | array of string | Array of UID's of special requirements to the truck from the "Directory of special transport requirements" and from the "Directory of vehicle loading types". Special requirements include type of truck loading (side, rear, etc.) and other requirements: crane, removable curtains, etc. |
payer | Yes | string | Payer role. Possible values:
|
Address
Address | |||
---|---|---|---|
Parameter | Required | Type | Description |
search | No (1) | string | Address as a string. It is possible to pass address as text or as coordintaes. The coordinates should not be used to pass the information about the juridical address, that is in blocks "juridicalAddress" of class "Counteragent". 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". Мaximum 1024 symbols (2) |
street | No (1) | string | CLADR* code of the street (see. "CLADR search") (2). *CLADR - Classifier of Addresses of Russian Federation |
house | No (1) | string | House number, including the letter. For example, "13/A" (2). Maximum number of characters - 7 |
building | No | string | Building (2). Maximum number of characters - 5 |
structure | No | string | Structure (2). Maximum number of characters - 7 |
flat | No | string | Apartment/office, including the letter. For example, "222 A" (2). Maximum number of characters - 5 |
Notes:
|
Member
Member | |||
---|---|---|---|
Parameter | Required | Type | Description |
counteragentID | No* | integer | Counterparty ID from the "Address book". *The parameter is used for "request.member.third" object only. If the user is unauthorized, then parameter is ignored. For authorized users one of the excluding parameters is required: "counteragentID" or "counteragent" |
counteragent | No* | Counteragent | Counterparty as a set of parameters. *The parameter is used for "request.member.third" object only. The parameter is required for unauthorized users. For authorized users one of the excluding parameters is required: "counteragentID" or "counteragent" |
contactIDs | No* | array of integers | Contact persons IDs from "Address book". Maximum 3 elements in the array *If the user is unauthorized, then parameter is ignored. For authorized users one of the excluding parameters is required: "contactID" or "contactPersons" |
contactPersons | No* | array of ContactPersons | Contact persons data. Maximum 3 elements in the array for authorized users, 1 - for unauthorized *The parameter is required for unauthorized users. For authorized users one of the excluding parameters is required: "contactID" or "contactPersons" |
contactPersons.name | Yes | string | Name of contact person |
phoneIDs | No* | array of integers | Phone number IDs from "Address book". Maximum 3 elements in the array *If the user is unauthorized, then parameter is ignored. For authorized users one of the excluding parameters is required: "phoneID" or "phoneNumbers" |
phoneNumbers | No* | array of PhoneNumbers | Phone numbers list. Maximum 3 elements in the array for authorized users, 1 - for unauthorized *The parameter is required for unauthorized users. For authorized users one of the excluding parameters is required: "phoneID" or "phoneNumbers" |
phoneNumbers.number | Yes | string | Phone number. Only digits and plus sign are allowed (plus can only be passed at the beginning of the string that starts with 7 or 375) |
phoneNumbers.ext | No | string | Extension phone number. 5 digits maximum |
No | string | Email of the order requester The parameter is used for "request.member.third" object only | |
dataForReceipt | No* | object | Contact information for sending an electronic payment receipt to the payer that is a physical party *The parameter is used for "request.member.third" object only. The parameter is required for a physical party, that is if UID of a physical party is passed as a value of "form" parameter of the "Counteragent" class of the current request or while creating a counterparty with the help of "Counterparties adding and editing" method |
dataForReceipt.send | Yes | boolean | Flag indicating consent to receive an electronic payment receipt |
dataForReceipt.phone | No* | string | Phone number for sending the payment receipt, required format: "+79XXXXXXXXX" (where X is any digit). *If "dataForReceipt.send" parameter value is "true", then at least one of the following parameters is required: "dataForReceipt.phone", "dataForReceipt.email" |
dataForReceipt.email | No* | string | Email address for sending the payment receipt *If "dataForReceipt.send" parameter value is "true", then at least one of the following parameters is required: "dataForReceipt.phone", "dataForReceipt.email" |
Counteragent
Counteragent | |||
---|---|---|---|
Parameter | Required | Type | Description |
form | Yes | integer | UID of legal form of organization, see "Search of forms of organization". |
name | Yes | string | Individual or company name |
inn | No* | string | TIN (taxpayer identification number). Allowed number of characters may vary depending on country and legal form of organization *The parameter is required if the counterparty is a legal entity (that is when legal entity UID is passed in the "form" parameter), if counterparty is a physical entity (physical entity UID is passed in the "form" parameter), then the parameter is ignored |
juridicalAddress | No | Address | Legal address. The parameter is used for legal entities only |
document | No* | object | Personal ID data *The parameter is required if the counterparty is an individual |
document.type | Yes | string | Document type. Possible values:
|
document.serial | Yes* | string | Document series *For some countries the parameter is not required and therefore ignored |
document.number | Yes | string | Document number. Number format may vary depending on the country |
Payment
Payment | |||
---|---|---|---|
Parameter | Required | Type | Description |
type | Yes | string | Payment type (1). Available values:
|
promocode | No | string | Promo code |
No | string | Email to send an invoice. The parameter is used only in case of payment by the bank transfer (that is if "type" parameter value is "noncash") | |
paymentCity | No* | string | CLADR code of the city of payment (1). It's possible to get CLADR code using the services listed on the "Using CLADR codes" page (CLADR - Classifier of Addresses of Russian Federation) *If payer is a third party ("delivery.arrival.payer" parameter value is "third"), then one of the excluding parameters - "paymentCity" or "paymentCitySearch" is required, in other cases the parameter is ignored |
paymentCitySearch | No* | object | City of payment as a string (1) *If payer is a third party ("delivery.arrival.payer" parameter value is "third"), then one of the excluding parameters - "paymentCity" or "paymentCitySearch" is required, in other cases the parameter is ignored |
paymentCitySearch.search | Yes | string | City as a string. Мaximum 1024 symbols. Along with the name of the city it is possible to pass the name of the country, region or district - this will allow refining the search and eliminating errors that may occur since the cities can have the identical names |
Notes:
|
Method response
Response structure
{ "metadata":{ "status":200, "generatedAt":"2020-11-03 12:37:28" }, "data":{ "state":"success", "requestID":3954004, "information":[ "Промокод нельзя применить в заказе" ], "foundAddresses":[ { "field":"delivery.arrival.address", "source":"Омск, Ленина, 5", "result":"Россия, Омская обл, г Омск, ул Ленина, д 5" }, { "field":"members.third.counteragent.juridicalAddress", "source":"Омск, Ленина, 5", "result":"Россия, Омская обл, г Омск, ул Ленина, д 5" }, { "field":"payment.paymentCitySearch", "source":"Омск", "result":"Россия, Омская обл, г Омск" } ] } }
<response> <metadata> <status>200</status> <generatedAt>2020-11-03 12:37:28</generatedAt> </metadata> <data> <state>success</state> <requestID>3954004</requestID> <information>Промокод нельзя применить в заказе</information> <foundAddresses> <field>delivery.arrival.address</field> <source>Омск, Ленина, 5</source> <result>Россия, Омская обл, г Омск, ул Ленина, д 5</result> </foundAddresses> <foundAddresses> <field>members.third.counteragent.juridicalAddress</field> <source>Омск, Ленина, 5</source> <result>Россия, Омская обл, г Омск, ул Ленина, д 5</result> </foundAddresses> <foundAddresses> <field>payment.paymentCitySearch</field> <source>Омск</source> <result>Россия, Омская обл, г Омск</result> </foundAddresses> </data> </response>
Description of parameters
Response
Response | ||
---|---|---|
Parameter | Type | Description |
metadata | object | System information |
metadata.status | integer | Emulated http-code of status. If successful, code 200 is returned |
metadata.generatedAt | string | Server response date and time. Format: YYYY-MM-DD HH:MM:SS |
data | object | Information about the order |
data.state | string | Status. Possible value - "success" |
data.requestID | integer | Number of the created order |
data.information | array of strings | Info message stating that it is impossible to apply the passed promo code for some reason. Possible values:
|
data.foundAddresses | array of FoundAddresses | Data on found addresses/cities. The parameter is present in the response if "search" parameter of the "Address" class or "paymentCitySearch.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/city found |
Error handling
The common API errors are used with the method, for errors format description and errors list see Errors of API methods.