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

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:

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

time

yes

5

intake_time_to

End time of courier waiting

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
It must be completed if no order number is provided. Otherwise, the value is taken from the order.

string

yes, if the order number has not been transmitted

9

weight

Total weight (in grams)
It must be completed if no order number is provided. Otherwise, the value is taken from the order.

integer

yes, if the order number has not been transmitted

10

length

Package dimensions. Length (in centimeters)
It must be completed if no order number is provided. Otherwise, the value is taken from the order.

integer

yes, if other dimensions are specified

11

width

Package dimensions. Width (in centimeters)
It must be completed if no order number is provided. Otherwise, the value is taken from the order.

integer

yes, if other dimensions are specified

12

height

Package dimensions. Height (in centimeters)
It must be completed if no order number is provided. Otherwise, the value is taken from the order.

integer

yes, if other dimensions are specified

13

comment

Comment for the courier invitation

string(255)

no

14

sender

Sender
It must be completed if no order number is provided. Otherwise, the value is taken from the order.

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

phone[]

yes, if the sender's number has not been specified upon order registration

14.3.1

number

Phone number

string(255)

yes

14.3.2

additional

Additional information (additional number)

string(255)

no

15

from_location2

Sender's address (pickup's address)
It must be completed if no order number is provided. Otherwise, the value is taken from the order.

location

yes, if the order number has not been transmitted

15.1

code

CDEK location code

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

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 city code from the CDEK database. Values are transmitted in from_location.code and to_location.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 postal code of the city. Values are transmitted in from_location.postal_code and to_location.postal_code 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 nameDescriptionField typeMandatory (yes/no)
1entityData of the courier invitation over which request is sent
no
1.1uuidCourier Invitation identifier in the CDEK ISUUIDno
2requestsData on the request/requests over the courier Invitationrequest[]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)
SUCCESSFUL - 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

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.


Sample Request
{
    "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
}
Sample Response
{
    "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": []
        }
    ]
}
  • No labels