Registration of Pre-alert document
The method is used to create a pre-alert document that contains all orders to be transmitted for delivery.
In order to work with the pre-Alert, it is necessary that the "Pre-Alert" service is connected under the contract. You should contact your assigned manager or the assigned office of CDEK (with whom you signed the contract).
Request for Registration of Pre-alert document
To use it, sent a POST-request to the URL:
Environment | URL |
---|---|
testing | https://api.edu.cdek.ru/v2/prealert |
production | https://api.cdek.ru/v2/prealert |
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_date | Planned date of transmit of orders to CDEK | dateTime | yes |
2 | shipment_point | Code of the CDEK pickup point to which orders will be transmit | string() | yes |
3 | orders | Orders which will be transmit to CDEK | [ ] | yes |
3.1 | order_uuid | Order identifier in the CDEK IS | UUID | yes, if cdek_number and im_number are not sent |
3.2 | cdek_number | CDEK order number | long | yes, if order_uuid and im_number are not sent |
3.3 | im_number | Order number in the Client IS | string(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 name | Description | Field type | Mandatory (yes/no) |
---|---|---|---|---|
1 | entity | Data of the pre-alert document over which request is sent | no | |
1.1 | uuid | Pre-alert document identifier in the CDEK IS | UUID | no |
2 | requests | Data on the request/requests over the pre-alert document | 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 |
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. |
{ "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" } ] } |
{ "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" } ] } |
© 2000—2024, Курьерская компания СДЭК