Registration of a Courier Invitation
Using this method, you can invite a courier to pick up the cargo from the e-shop's warehouse and then to deliver the cargo to the CDEK warehouse.
Conditions for creating a courier invitation:
a courier cannot be invited to the same address on the same day;
the recommended minimum time interval for courier visits is three hours.
Request for Registration of a Courier Invitation
In order to use this process, a POST request should be sent to URL:
Environment | URL |
testing | |
production |
Request Body
It should be sent in the JSON format (Content-Type: application/json).
The following fields are supported:
No. | Field name | Description | Field type | Mandatory (yes/no) |
1 | cdek_number1 | CDEK order number | long | no |
2 | order_uuid1 | CDEK IS order identifier | UUID | no |
3 | intake_date | Date of courier waiting A courier invitation created on the current date after 15 p.m. by the sender's time can be done the next day | date (yyyy-MM-dd) | yes |
4 | intake_time_from | Start time of courier waiting No earlier than 9:00 AM local time | time | yes |
5 | intake_time_to | End time of courier waiting No later than 10:00 PM local time | time | yes |
6 | lunch_time_from | The lunch start time, should be included in the interval [intake_time_to;intake_time_to] | time | no |
7 | lunch_time_to | The lunch end time, should be included in the interval [intake_time_to;intake_time_to] | time | no |
8 | name | Cargo description | string | yes, if the order number has not been transmitted |
9 | weight | Total weight (in grams) | integer | yes, if the order number has not been transmitted |
10 | length | Package dimensions. Length (in centimeters) | integer | yes, if other dimensions are specified |
11 | width | Package dimensions. Width (in centimeters) | integer | yes, if other dimensions are specified |
12 | height | Package dimensions. Height (in centimeters) | integer | yes, if other dimensions are specified |
13 | comment | Comment for the courier invitation | string(255) | no |
14 | sender | Sender | contact | yes, if the order number has not been transmitted |
14.1 | company | Name of sender's company | string(255) | no |
14.2 | name | Contact person's full name | string(255) | yes |
14.3 | phones | List of phones No more than 10 numbers | phone[] | yes, if the sender's number has not been specified upon order registration |
14.3.1 | number | Phone number | string(24) | yes |
14.3.2 | additional | Additional information (additional number) | string(255) | no |
15 | from_location2 | Sender's address (pickup's address) | location | yes, if the order number has not been transmitted |
15.1 | code | CDEK location code ("List of Cities" method) | integer | no |
15.2 | fias_guid | FIAS unique identifier | UUID | no |
15.3 | postal_code | Postal code | string(255) | no |
15.4 | longitude | Longitude | float | no |
15.5 | latitude | Latitude | float | no |
15.6 | country_code | Country code (two-letter code from the international directory) | string(2) | no |
15.7 | region | Region name | string(255) | no |
15.8 | sub_region | Name of region's district | string(255) | no |
15.9 | city | City name | string(255) | no |
15.10 | kladr_code | KLADR (Russian Classifier of Addresses) code Deprecated field | string(255) | no |
15.11 | address | Address string | string(255) | yes |
16 | need_call | Notification calls to the sender are required (default value: false) | boolean | no |
17 | courier_power_of_attorney | The courier needs a power of attorney (default value - false) | boolean | no |
18 | courier_identity_card | The courier needs an identity document (default value - false) | boolean | no |
1 If cdek_number and order_uuid have not been transmitted, the courier invitation for the consolidated cargo is created.
2 The city is identified according to the following algorithm (listed in order of priority):
By unique CDEK location code. Values are transmitted in from_location.code and to_location.code attributes.
By postal code of the city. Values are transmitted in from_location.postal_code and to_location.postal_code attributes.
- By unique FIAS identifier (code of an address component; for more details, see https://fias.nalog.ru/). Values are transmitted in from_location.fias_guid and to_location.fias_guid attributes.
By country code, region name and city name: from_location.country_code + from_location.region + from_location.city and to_location.country_code + to_location.region + to_location.city. The subregion (from_location.sub_region and to_location.sub_region) can be transmitted as an additional parameter.
By coordinates: values of longitude (from_location_longitude and to_location_longitude) and latitude (from_location_latitude and to_location_latitude) should be transmitted.
By address string. Values are transmitted in from_location.address and to_location.address attributes. KLADR (Russian Classifier of Addresses) code can be transmitted as an additional parameter (for more details, see https://kladr-rf.ru/).
Response to Registration of a Courier Invitation
The response body is returned in the JSON format:
No. | Field name | Description | Field type | Mandatory (yes/no) |
---|---|---|---|---|
1 | entity | Data of the courier invitation over which request is sent | no | |
1.1 | uuid | Courier Invitation identifier in the CDEK IS | UUID | no |
2 | requests | Data on the request/requests over the courier Invitation | request[] | yes |
2.1 | request_uuid | Request identifier in CDEK information system | UUID | no |
2.2 | type | Request type May take on values: CREATE, UPDATE, DELETE, AUTH, GET | string() | yes |
2.3 | state | Current status of the request ACCEPTED - pre-validation passed and request accepted | string() | yes |
2.4 | date_time | Date and time of setting current status of the request (format yyyy-MM-dd'T'HH:mm:ssZ) | datetime | yes |
2.5 | errors | Request processing errors | error[] | no |
2.5.1 | code | Error code | string() | yes |
2.5.2 | message | Error description | string() | yes |
2.6 | warnings | Request processing warnings | warning[] | no |
2.6.1 | code | Warning code | string() | yes |
2.6.2 | message | Warning description | string() | yes |
The received uuid should be used in the Details of a Courier Invitation method in order to get the order number in the CDEK IS. |
{ "intake_date": "2019-10-02", "intake_time_from": "10:00", "intake_time_to": "17:00", "name": "Консолидированный груз", "weight": 1000, "length": 10, "width": 10, "height": 10, "comment": "Комментарий курьеру", "sender": { "company": "Компания", "name": "Иванов Иван", "phones": [ { "number": "+79589441654" } ] }, "from_location": { "code": "44", "fias_guid": "0c5b2444-70a0-4932-980c-b4dc0d3f02b5", "postal_code": "109004", "longitude": 37.6204, "latitude": 55.754, "country_code": "RU", "region": "Москва", "sub_region": "Москва", "city": "Москва", "kladr_code": "7700000000000", "address": "ул. Блюхера, 32" }, "need_call": false } |
{ "entity": { "uuid": "72753031-8f2c-4d67-9511-8c81b6e15919" }, "requests": [ { "request_uuid": "72753031-bc35-4bea-924d-3ad0ed60b7aa", "type": "CREATE", "state": "ACCEPTED", "date_time": "2020-02-10T12:00:23+0700", "errors": [], "warnings": [] } ] } |
© 2000—2024, Курьерская компания СДЭК