Page tree
Skip to end of metadata
Go to start of metadata

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:

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

2order_uuid

Order identifier in CDEK information system

UUID

yes, if cdek_number is not sent

3date

Delivery date agreed with the receiver

date

yes

4time_from

Delivery time FROM, agreed with the receiver

time

yes, if the order "to door"

5time_to

Delivery time TO, agreed with the receiver

time

yes, if the order "to door"

6

comment

Note

string

no

7delivery_point

New code of CDEK pickup point to where the parcel will be delivered (if needs to be changed).
Can't be filled together with to_location

string()

no

8

to_location

New delivery address (if needs to be changed).
Can't be filled together with delivery_point

location

no

8.1

code

Location code (CDEK register)

string(255)

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.5latitude

Latitude

float

no

8.6country_code

Country code in ISO_3166-1_alpha-2 format

string(2)

no

8.7

region

Region name

string(255)

no

8.8region_code

Region code (CDEK register)

integer

no

8.9sub_region

Subregion name

string(255)

no

8.10city

City name

string(255)

no

8.11kladr_code

All-Russian Classifier of Addresses code

string(255)

no

8.12address

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

1entityData of the order over which request is sententityno
1.1uuid

Delivery date appointment identifier in CDEK system

UUID

yes

2requestsData on the request/requests over the orderrequest[]yes
2.1request_uuidRequest identifier in CDEK information systemUUIDno
2.2typeRequest type
May take on values: CREATE, UPDATE, DELETE, AUTH, GET
string()yes
2.3state

Current status of the request
May take on values: 

ACCEPTED - pre-validation passed and request accepted
WAITING - the request is awaiting processing (depends on the execution of another request)
SUCCESSUL - the request was processed successfully
INVALID - the request was processed with an error

string()yes
2.4date_timeDate and time of setting current status of the request (format yyyy-MM-dd'T'HH:mm:ssZ)datetimeyes
2.5errorsRequest processing errorserror[]no
2.5.1codeError codestring()yes
2.5.2messageError descriptionstring()yes
2.6warningsRequest processing warningswarning[]no
2.6.1codeWarning codestring()yes
2.6.2messageWarning descriptionstring()yes
Sample Request
{
	"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"
	}
}
Sample Response
{
  "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": []
    }
  ]
}


  • No labels