Receiving barcode CP for the order


 

This technique is used to receive a barcode cargo package for the order/orders in the PDF format.

The link to the file with a barcode CP for the order\orders will be available during one hour.

To download the printed order form file, you need to send a GET request to the URL from the method response. Authentication method: Bearer token

Request to receive barcode CP for the order 

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

EnvironmentURL
testinghttps://api.edu.cdek.ru/v2/print/barcodes/{uuid}
productionhttps://api.cdek.ru/v2/print/barcodes/{uuid}

{uuid} – identifier of the barcode CP to which the link is requested

Answer to receive the barcode CP for the order

The response body is returned in the JSON format:

Field name

Description

Field type

Mandatory

1entityData of the barcode CP over which request is sent
no

1.1

uuidIdentifier of the barcode CP fileUUIDyes
1.2ordersList of ordersorder[ ]yes
1.2.1order_uuidOrder identifier in CDEK information systemUUIDno
1.2.2cdek_numberCDEK order numberlongno
1.3copy_countQuantity of copies on one pageintegerno
1.4formatPrinting formatstring(2)no
1.5url1Link to download the file. Contained in the answer only in the “Formed” status
Format: https://api.cdek.ru/v2/print/barcodes/{uuid}.pdf
string()no
1.6statusesFile statusstatus[ ]yes
1.6.1codeStatus code (see Appendix 1)string()yes
1.6.2nameStatus namestring()yes
1.6.3date_timeDate and time of status setting (format yyyy- MM-dd'T'HH:mm:ssZ)datetimeyes
2requestsData on the request/requests over the barcode CPrequest[]yes
2.1request_uuidBarcode CP 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

1 To receive a file with a barcode CP for order/orders receipt, send a GET-request to the received URL with authorization token in the heading

https://api.cdek.ru/v2/print/barcodes/72753034-c617-46ef-b70a-8f5f520b6be4


{
    "entity": {
        "uuid": "72753034-c617-46ef-b70a-8f5f520b6be4",
        "orders": [
            {
                "order_uuid": "72753034-bd61-45fc-be66-da4a03ed2ed8"
            }
        ],
        "copy_count": 1,
        "type": "barcode",
        "format": "A4",
        "url": "http://api.cdek.ru/v2/print/barcodes/72753034-c617-46ef-b70a-8f5f520b6be4.pdf",
        "statuses": [
            {
                "code": "ACCEPTED",
                "name": "Принят",
                "date_time": "2020-03-19T11:25:53+0700"
            },
            {
                "code": "PROCESSING",
                "name": "Формируется",
                "date_time": "2020-03-19T11:25:53+0700"
            },
            {
                "code": "READY",
                "name": "Сформирован",
                "date_time": "2020-03-19T11:25:54+0700"
            }
        ]
    },
    "requests": [
        {
            "request_uuid": "72753034-e836-499d-bee7-e02053498521",
            "type": "CREATE",
            "date_time": "2020-03-19T11:25:54+0700",
            "state": "SUCCESSFUL"
        }
    ]
}

Appendix 1. Barcode CP statuses

Code

Status name

Note

ACCEPTED

Accepted

Request to create the receipt has been accepted

PROCESSING

Processing

File with the receipt is being processed

READY

Ready

File with the receipt and file download link are ready

REMOVED

Removed

The file download link’s time-to-live has expired

INVALID

Invalid

Invalid request to create the receipt


 

© 2000—2024, Курьерская компания СДЭК