Registration of delivery appointment
This technique is intended for e-shops to formalize date and time of delivery (courier arrival) agreed with clients, as well as to change delivery address.
Request for registration of delivery appointment
To use it, sent a POST-request to the URL:
Environment | URL |
---|---|
testing | https://api.edu.cdek.ru/v2/delivery |
production | https://api.cdek.ru/v2/delivery |
Request body
Must be sent in JSON format (Content-Type: application/json).
The following fields are supported:
No. | Tag/Attribute | Description | Field type | Mandatory |
---|---|---|---|---|
1 | cdek_number | CDEK order number | string | yes, if order_uuid is not sent |
2 | order_uuid | Order identifier in CDEK information system | UUID | yes, if cdek_number is not sent |
3 | date | Delivery date agreed with the receiver | date | yes |
4 | time_from | Delivery time FROM, agreed with the receiver | time | yes, if the order "to door" |
5 | time_to | Delivery time TO, agreed with the receiver | time | yes, if the order "to door" |
6 | comment | Note | string | no |
7 | delivery_point | New code of CDEK pickup point to where the parcel will be delivered (if needs to be changed). | string() | no |
8 | to_location | New delivery address (if needs to be changed). | location | no |
8.1 | code | CDEK location code ("List of Cities" method) | integer | no |
8.2 | fias_guid | Federal Information Address System unique code | UUID | no |
8.3 | postal_code | Postcode | string(255) | no |
8.4 | longitude | Longitude | float | no |
8.5 | latitude | Latitude | float | no |
8.6 | country_code | Country code in ISO_3166-1_alpha-2 format | string(2) | no |
8.7 | region | Region name | string(255) | no |
8.8 | region_code | Region code (CDEK register) | integer | no |
8.9 | sub_region | Subregion name | string(255) | no |
8.10 | city | City name | string(255) | no |
8.11 | kladr_code | All-Russian Classifier of Addresses code Deprecated field | string(255) | no |
8.12 | address | Address line | string(255) | no |
Reply to registration of delivery appointment
The response body is returned in the JSON format:
No. | Tag/Attribute | Description | Field type | Mandatory |
---|---|---|---|---|
1 | entity | Data of the order over which request is sent | entity | no |
1.1 | uuid | Delivery date appointment identifier in CDEK system | UUID | yes |
2 | requests | Data on the request/requests over the order | 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 |
{ "cdek_number" : "1106207236", "order_uuid" : "72753031-df04-44a4-bc60-11e8b5253b1d", "date" : "2020-02-27", "time_from": "10:00", "time_to": "15:00", "comment" : "Офис группы компаний Ланит ?", "delivery_point" : "", "to_location" : { "code" : "137", "fias_guid" : "c2deb16a-0330-4f05-821f-1d09c93331e6", "postal_code" : "190000", "longitude" : "30.3159", "latitude" : "59.9391", "country_code" : "RU", "region" : "Санкт-Петербург", "region_code" : "82", "sub_region" : "Санкт-Петербург", "city" : "Санкт-Петербург", "kladr_code" : "78", "address" : "г.Бердск ул.Ленина 16" } } |
{ "entity": { "uuid": "72753031-3d4b-42c4-8a87-53ecae1881e3" }, "requests": [ { "request_uuid": "72753031-8ab1-4ed2-ab9c-363cce859817", "type": "CREATE", "state": "ACCEPTED", "date_time": "2020-02-26T14:46:17+0700", "errors": [], "warnings": [] } ] } |
© 2000—2024, Курьерская компания СДЭК