Creating barcode CP for the order


 

This technique is used to create a barcode cargo package for the order/orders in the PDF format.
To avoid the platform’s overload, don’t send more than 100 order numbers in one request.

Request to create barcode CP for the order

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

Environment

URL

testinghttps://api.edu.cdek.ru/v2/print/barcodes
productionhttps://api.cdek.ru/v2/print/barcodes

Body of the request

Must be sent in the JSON format (Content-Type: application/json).
The following fields are supported:

Field name

Description

Field type

Mandatory

1

orders

List of orders

order[ ]

yes

1.1

order_uuid

Order identifier in CDEK information system

UUID

yes, if cdek_number

was not sent

1.2

cdek_number

CDEK order number

long

yes, if order_uuid

was not sent

2

copy_count

Quantity of copies. Default value 1

integer

no

3

format

Printing format. May take on values: A4, A5, A6 (A is a Latin letter).

Default value A4

string(2)

no

Answer to create barcode CP for the order

The response body is returned in the JSON format:

No.

Field name

Description

Field type

Mandatory (yes/no)

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

Identifier of the barcode CP in the CDEK IS

UUIDno
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


The received uuid must be used in the technique " Request to receive barcode CP for the order" to receive a link to download the PDF file.


{
    "orders": [
        {
            "order_uuid": "72753034-bd61-45fc-be66-da4a03ed2ed8"
        }
    ],
    "copy_count": 1,
    "format": "A4"
}


{
    "entity": {
        "uuid": "72753034-c617-46ef-b70a-8f5f520b6be4"
    },
    "requests": [
        {
            "request_uuid": "72753034-e836-499d-bee7-e02053498521",
            "type": "CREATE",
            "state": "ACCEPTED",
            "date_time": "2020-03-19T11:25:53+0700",
            "errors": [],
            "warnings": []
        }
    ]
}


 

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