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

The method is used to create a pre-alert document that contains all orders to be transmitted for delivery.

Request for Registration of Pre-alert document

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

planned_datePlanned date of transmit of orders to CDEKdateTimeyes
2shipment_pointCode of the CDEK pickup point to which orders will be transmitstring()yes
3ordersOrders which will be transmit to CDEK[ ]yes
3.1order_uuidOrder identifier in the CDEK ISUUIDyes, if cdek_number and im_number are not sent
3.2cdek_numberCDEK order numberlongyes, if order_uuid and im_number are not sent
3.3im_numberOrder number in the Client ISstring(40)yes, if order_uuid and cdek_number are not sent

Response to Registration of Pre-alert document

The response body is returned in the JSON format:

No.Field nameDescriptionField typeMandatory (yes/no)
1entityData of the pre-alert document over which request is sent
no
1.1uuidPre-alert document identifier in the CDEK ISUUIDno
2requestsData on the request/requests over the pre-alert documentrequest[]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 pre-alert document method in order to get the pre-alert document number in the CDEK IS.

Sample request
{
    "planned_date": "2021-08-03T13:08:49+0000",
    "shipment_point": "NSK27",
    "orders": [
        {
            "order_uuid": "72753031-924c-4db8-b158-9a5148fc3e83",
            "cdek_number": "1107487669",
            "im_number": "1627452531640"
        },
        {
            "order_uuid": "72753031-bce5-4f06-801a-45c047f94269",
            "cdek_number": "1107487670",
            "im_number": "1627452533178"
        },
        {
            "order_uuid": "72753031-7657-4d64-81a8-ff00c0870d25",
            "cdek_number": "1107487671",
            "im_number": "1627452534559"
        }
    ]
}
Sample response
{
    "entity": {
        "uuid": "72753031-8bc2-446f-9ed5-0a5fb62f61e9"
    },
    "requests": [
        {
            "request_uuid": "c8417197-0ea5-47ab-849e-0c37756ebe34",
            "type": "CREATE",
            "date_time": "2021-08-03T11:12:44+0700",
            "state": "ACCEPTED"
        }
    ]
}
  • No labels