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

This method is used for update an order created earlier.

Request for Update an Order

To use it, send a PATCH-request to the URL:

Request Body

It should be sent in the JSON format (Content-Type: application/json).

The following fields are supported:

No.

Tag/Attribute

Description

Field type

Mandatory

1uuid1

CDEK information system’s order identifier that needs to be updated

UUID

yes, if cdek_number is empty

2cdek_number1

CDEK order number that needs to be updated

long

yes, if uuid is empty

3tariff_code2

Tariff code (old and new tariff modes must be same)

integer

no

4comment

Note to the order

string()

no

5shipment_point

Code of CDEK pickup point to which a shipment will be accepted, or a shipment brought by a client independently

string()

no

6delivery_point

Code of CDEK pickup point to which the parcel will be delivered

string()

no

7delivery_recipient_cost

Additional delivery fee charged by an e-shop from the receiver. The fee’s currency must match the cash on delivery currency.

money

no

7.1value

Additional fee amount

float

yes

7.2vat_sum

VAT amount

float

no

7.3vat_rate

VAT rate (value - 0, 10, 18, 20, null – no VAT)

integer

no

8delivery_recipient_cost_adv

Additional delivery fee charged by an e-shop from the receiver, depends on the order’s price

threshold[]

no

8.1threshold

Goods price threshold (active with conditions “less: or “equal”), in round currency units

integer

yes

8.2sum

Additional delivery fee for goods, the total price of which falls within the interval

float

yes

8.3vat_sum

VAT sum included in the additional delivery fee

float

no

8.4vat_rate

VAT rate (value 0, 10, 18, 20 and so on , null = no VAT)

integer

no

9sender

Sender

contact

no

9.1company

Company name

string(255)

no

9.2name

Contact person full name

string(255)

no

9.3email

E-mail address

string(255)

no

9.4phones

Phone numbers list

phone[]

no

9.4.1number

Phone number

International format is required: country code (+7 for Russia) and the number itself (10 or more figures)

string(255)

yes

9.4.2additional

Additional information (additional number)

string(255)

no

10seller

Real seller’s bank details

seller

no

10.1name

Real seller’s name

string(255)

no

10.2inn

Real seller’s tax ID number

string(20)

no

10.3phone

Real seller’s phone number

string(255)

no

10.4ownership_form

Incorporation form code

integer

no

11recipient

Receiver

contact

no

11.1company

Company’s name

string(255)

no

11.2name

Contact person’

string(255)

no

11.3passport_series

Passport series

string(255)

no

11.4passport_number

Passport number

string(255)

no

11.5passport_date_of_issue

Passport issue date

date (yyyy-MM-dd)

no

11.6passport_organization

Passport issuing authority

string(255)

no

11.7tin

Tax ID number

string(255)

no

11.8passport_date_of_birth

Birthdate

date (yyyy-MM-dd)

no

11.9email

E-mail

string(255)

no

11.10phones

Phone numbers list

phone[]

no

11.10.1number

Phone number

International format is required: country code (+7 for Russia) and the number itself (10 or more figures)

string(255)

yes

11.10.2additional

Additional information (additional number)

string(255)

no

12to_location2

Receiving address

location

no

12.1code

Location code (CDEK register)

string(255)

no

12.2fias_guid

Federal Information Address System unique code

UUID

no

12.3postal_code

Postcode

string(255)

no

12.4longitude

Longitude

float

no

12.5latitude

Latitude

float

no

12.6country_code

Country code in ISO_3166-1_alpha-2 format

string(2)

no

12.7region

Region name

string(255)

no

12.8region_code

Region code (CDEK register)

integer

no

12.9sub_region

Subregion name

string(255)

no

12.10city

City name

string(255)

no

12.11kladr_code

All-Russian Classifier of Addresses code

Deprecated field

string(255)

no

12.12address

Address line

string(255)

yes

13from_location

Sending address

location

no

13.1address

Address line

string(255)

yes

14services2

Additional services

service[]

no

14.1code

Additional service type

integer

yes

14.2parameter

Additional service parameter:

  • number of packages for the Packaging 1 service (all order types)

  • Declared value for the Insurance service (for order with type “Delivery” only)

integer

no

15packages2

List of information on packages

Not transferred packages will be removed

package[]

no

15.1package_id  CDEK information system’s package identifier string  no, if a new package is transferred (with a new number)
15.2number

Package number (Can be counting number of order package or order number), unique within the order Order ID in Client IS

string(255)

yes

15.3weight

Total weight (in grams)

integer

yes

15.4length

Package dimensions. Length (in centimeters)

integer

yes, if other dimensions are specified

15.5width

Package dimensions. Width (in centimeters)

integer

yes, if other dimensions are specified

15.6height

Package dimensions. Height (in centimeters)

integer

yes, if other dimensions are specified

15.7comment

Note to the package

string(255)

yes, if order type is “Delivery”

15.8items

Goods positions in the package

Only for “E-shop” orders

item[]

yes

15.8.1name

Goods name (may also contain description: size, color)

string(255)

yes

15.8.2ware_key

Goods ID/item number

string(20)

yes

15.8.3payment

Payment when the goods are delivered (for one unit, in the specified currency, value >=0) — cash on delivery, value = 0 in case of preliminary payment

money

yes

15.8.3.1value

Cash on delivery sum (in case of preliminary payment = 0)

float

yes

15.8.3.2vat_sum

VAT amount

float

no

15.8.3.3vat_rate

VAT rate (value - 0, 10, 18, 20 and so on. , null - no VAT)

integer

no

15.8.4cost

Declared value (for one unit, in the specified currency, value >=0). This value is used for payment calculation

float

yes

15.8.5weight

Weight (for one unit, in grams)

integer

yes

15.8.6weight_gross

Gross weight

integer

yes, if order is international

15.8.7amount

Number of the good’s units (in pieces)

integer

yes

15.8.8name_i18n

Name in the foreign language

string(255)

yes

15.8.9brand

Brand in the foreign language

string(255)

no

15.8.10country_code

Country code in ISO_3166-1_alpha-2 format

string(2)

no

15.8.11material

Material code

string(255)

no

15.8.12wifi_gsm

Contains wifi/gsm

boolean

no

15.8.13url

Link to the e-shops website with the goods description

string(255)

no

1Orders are identified on the basis of these fields (cdek_number has the highest priority).

2Order amount can be re-calculated if new values are entered in these fields.

Response to Update an Order

The response body is returned in the JSON format:

No.Field nameDescriptionField typeMandatory (yes/no)
1entityData of the order over which request is sent
no
1.1uuidOrder identifier in the CDEK ISUUIDno
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)
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


Sample Request
{
   "uuid":"72753031-5427-4d1b-b1e4-7c4c26be00a0",
   "cdek_number":"1105660806",
   "tariff_code":"10",
   "sender":{
      "company":"Pogoda",
      "name":"Петров Петр",
      "email":"react@cdek.ru",
      "phones":[
         {
            "number":"+79134637228",
            "additional":"1234"
         }
      ]
   },
   "recipient":{
      "company":"NUMM",
      "name":"Константинов Константин",
      "email":"pochta@gmail.com",
      "phones":[
         {
            "number":"+79134635628",
            "additional":"123"
         }
      ]
   },
   "to_location":{
      "code":"137"
   },
   "from_location":{
      "address":"Новосибирск, Большевистская 101"
   },
   "services":[
      {
         "code":"DANGER_CARGO"
      },
      {
         "code":"PACKAGE_1",
         "parameter":"1"
      }
   ],
   "packages":[
      {
         "number":"bar-666",
         "height":20,
         "length":20,
         "weight":4000,
         "width":20,
         "items":[
            {
               "name":"Товар",
               "ware_key":"00055",
               "payment":{
                  "value":3000
               },
               "cost":300,
               "amount":1,
               "weight":700
            }
         ]
      }
   ]
}
Sample Response
{
   "entity":{
      "uuid":"72753031-5427-4d1b-b1e4-7c4c26be00a0"
   },
   "requests":[
      {
         "request_uuid":"72753031-35cc-4ef6-a353-25a09d3a973a",
         "type":"UPDATE",
         "state":"ACCEPTED",
         "date_time":"2020-01-23T11:48:40Z",
         "errors":[
            
         ],
         "warnings":[
            {
               "code":"v2_cost_change_by_tariff",
               "message":"New tariff code can trigger change order cost"
            },
            {
               "code":"v2_cost_change_by_services",
               "message":"New services can trigger change order cost"
            },
            {
               "code":"v2_cost_change_by_parameters",
               "message":"New parameters (weight, dimensions, items cost) can trigger change order cost"
            }
         ]
      }
   ]
}

This method is used for changing an order created earlier.

Request for changing an Order

To use it, send a PATCH-request to the URL:

Request Body

It should be sent in the JSON format (Content-Type: application/json).

The following fields are supported:

No.

Tag/Attribute

Description

Field type

Mandatory

1uuid1

CDEK information system’s order identifier that needs to be changed

UUID

yes, if cdek_number is empty

2cdek_number1

CDEK order number that needs to be changed

long

yes, if uuid is empty

3tariff_code2

Tariff code (old and new tariff modes must be same)

integer

no

4comment

Note to the order

string()

no

5shipment_point

Code of CDEK pickup point to which a shipment will be accepted, or a shipment brought by a client independently

string()

no

6delivery_point

Code of CDEK pickup point to which the parcel will be delivered

string()

no

7delivery_recipient_cost

Additional delivery fee charged by an e-shop from the receiver. The fee’s currency must match the cash on delivery currency.

money

no

7.1value

Additional fee amount

float

yes

7.2vat_sum

VAT amount

float

no

7.3vat_rate

VAT rate (value - 0, 10, 18, 20, null – no VAT)

integer

no

8delivery_recipient_cost_adv

Additional delivery fee charged by an e-shop from the receiver, depends on the order’s price

threshold[]

no

8.1threshold

Goods price threshold (active with conditions “less: or “equal”), in round currency units

integer

yes

8.2sum

Additional delivery fee for goods, the total price of which falls within the interval

float

yes

8.3vat_sum

VAT sum included in the additional delivery fee

float

no

8.4vat_rate

VAT rate (value 0, 10, 18, 20 and so on , null = no VAT)

integer

no

9sender

Sender

contact

no

9.1company

Company name

string(255)

no

9.2name

Contact person full name

string(255)

no

9.3email

E-mail address

string(255)

no

9.4phones

Phone numbers list

phone[]

no

9.4.1number

Phone number

International format is required: country code (+7 for Russia) and the number itself (10 or more figures)

string(255)

yes

9.4.2additional

Additional information (additional number)

string(255)

no

10seller

Real seller’s bank details

seller

no

10.1name

Real seller’s name

string(255)

no

10.2inn

Real seller’s tax ID number

string(20)

no

10.3phone

Real seller’s phone number

string(255)

no

10.4ownership_form

Incorporation form code

integer

no

11recipient

Receiver

contact

no

11.1company

Company’s name

string(255)

no

11.2name

Contact person’

string(255)

no

11.3passport_series

Passport series

string(255)

no

11.4passport_number

Passport number

string(255)

no

11.5passport_date_of_issue

Passport issue date

date (yyyy-MM-dd)

no

11.6passport_organization

Passport issuing authority

string(255)

no

11.7tin

Tax ID number

string(255)

no

11.8passport_date_of_birth

Birthdate

date (yyyy-MM-dd)

no

11.9email

E-mail

string(255)

no

11.10phones

Phone numbers list

phone[]

no

11.10.1number

Phone number

International format is required: country code (+7 for Russia) and the number itself (10 or more figures)

string(255)

yes

11.10.2additional

Additional information (additional number)

string(255)

no

12to_location2

Receiving address

location

no

12.1code

Location code (CDEK register)

string(255)

no

12.2fias_guid

Federal Information Address System unique code

UUID

no

12.3postal_code

Postcode

string(255)

no

12.4longitude

Longitude

float

no

12.5latitude

Latitude

float

no

12.6country_code

Country code in ISO_3166-1_alpha-2 format

string(2)

no

12.7region

Region name

string(255)

no

12.8region_code

Region code (CDEK register)

integer

no

12.9sub_region

Subregion name

string(255)

no

12.10city

City name

string(255)

no

12.11kladr_code

All-Russian Classifier of Addresses code

string(255)

no

12.12address

Address line

string(255)

yes

13from_location

Sending address

location

no

13.1address

Address line

string(255)

yes

14services2

Additional services

service[]

no

14.1code

Additional service type

integer

yes

14.2parameter

Additional service parameter:

  • number of packages for the Packaging 1 service (all order types)

  • Declared value for the Insurance service (for order with type “Delivery” only)

integer

no

15packages2

List of information on packages

Not transferred packages will be removed

package[]

no

15.1package_id  CDEK information system’s package identifier string  no, if a new package is transferred (with a new number)
15.2number

Package number (Can be counting number of order package or order number), unique within the order Order ID in Client IS

string(255)

yes

15.3weight

Total weight (in grams)

integer

yes

15.4length

Package dimensions. Length (in centimeters)

integer

yes, if other dimensions are specified

15.5width

Package dimensions. Width (in centimeters)

integer

yes, if other dimensions are specified

15.6height

Package dimensions. Height (in centimeters)

integer

yes, if other dimensions are specified

15.7comment

Note to the package

string(255)

yes, if order type is “Delivery”

15.8items

Goods positions in the package

Only for “E-shop” orders

item[]

yes

15.8.1name

Goods name (may also contain description: size, color)

string(255)

yes

15.8.2ware_key

Goods ID/item number

string(20)

yes

15.8.3payment

Payment when the goods are delivered (for one unit, in the specified currency, value >=0) — cash on delivery, value = 0 in case of preliminary payment

money

yes

15.8.3.1value

Cash on delivery sum (in case of preliminary payment = 0)

float

yes

15.8.3.2vat_sum

VAT amount

float

no

15.8.3.3vat_rate

VAT rate (value - 0, 10, 18, 20 and so on. , null - no VAT)

integer

no

15.8.4cost

Declared value (for one unit, in the specified currency, value >=0). This value is used for payment calculation

float

yes

15.8.5weight

Weight (for one unit, in grams)

integer

yes

15.8.6weight_gross

Gross weight

integer

yes, if order is international

15.8.7amount

Number of the good’s units (in pieces)

integer

yes

15.8.8name_i18n

Name in the foreign language

string(255)

yes

15.8.9brand

Brand in the foreign language

string(255)

no

15.8.10country_code

Country code in ISO_3166-1_alpha-2 format

string(2)

no

15.8.11material

Material code

string(255)

no

15.8.12wifi_gsm

Contains wifi/gsm

boolean

no

15.8.13url

Link to the e-shops website with the goods description

string(255)

no

1Orders are identified on the basis of these fields (cdek_number has the highest priority).

2Order amount can be re-calculated if new values are entered in these fields.

Response to Changing an Order

The response body is returned in the JSON format:

No.Field nameDescriptionField typeMandatory (yes/no)
1entityData of the order over which request is sent
no
1.1uuidOrder identifier in the CDEK ISUUIDno
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)
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


Sample Request
{
   "uuid":"72753031-5427-4d1b-b1e4-7c4c26be00a0",
   "cdek_number":"1105660806",
   "tariff_code":"10",
   "sender":{
      "company":"Pogoda",
      "name":"Петров Петр",
      "email":"react@cdek.ru",
      "phones":[
         {
            "number":"+79134637228",
            "additional":"1234"
         }
      ]
   },
   "recipient":{
      "company":"NUMM",
      "name":"Константинов Константин",
      "email":"pochta@gmail.com",
      "phones":[
         {
            "number":"+79134635628",
            "additional":"123"
         }
      ]
   },
   "to_location":{
      "code":"137"
   },
   "from_location":{
      "address":"Новосибирск, Большевистская 101"
   },
   "services":[
      {
         "code":"DANGER_CARGO"
      },
      {
         "code":"PACKAGE_1",
         "parameter":"1"
      }
   ],
   "packages":[
      {
         "number":"bar-666",
         "height":20,
         "length":20,
         "weight":4000,
         "width":20,
         "items":[
            {
               "name":"Товар",
               "ware_key":"00055",
               "payment":{
                  "value":3000
               },
               "cost":300,
               "amount":1,
               "weight":700
            }
         ]
      }
   ]
}
Sample Response
{
   "entity":{
      "uuid":"72753031-5427-4d1b-b1e4-7c4c26be00a0"
   },
   "requests":[
      {
         "request_uuid":"72753031-35cc-4ef6-a353-25a09d3a973a",
         "type":"UPDATE",
         "state":"ACCEPTED",
         "date_time":"2020-01-23T11:48:40Z",
         "errors":[
            
         ],
         "warnings":[
            {
               "code":"v2_cost_change_by_tariff",
               "message":"New tariff code can trigger change order cost"
            },
            {
               "code":"v2_cost_change_by_services",
               "message":"New services can trigger change order cost"
            },
            {
               "code":"v2_cost_change_by_parameters",
               "message":"New parameters (weight, dimensions, items cost) can trigger change order cost"
            }
         ]
      }
   ]
}
  • No labels