Get barcode
Gets the barcode CP for the order
Function GetBarcode(Val Token, Val UUID, Val GetFile = False, Val TestAPI = False) Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| Token | --token | String | ✔ | Auth token |
| UUID | --uuid | String | ✔ | The UID of the barcode received when the barcode was created |
| GetFile | --getfile | Boolean | ✖ | True > PDF file data will be received, False > receives CDEK server response |
| TestAPI | --testapi | Boolean | ✖ | Flag to use test API for requests |
Returns: Map Of KeyAndValue, BinaryData - serialized JSON response from CDEK or a PDF file
tip
The barcode must be previously created. See CreateBarcode
The link to the file with the barcode CP is available within 1 hour
Method at API documentation: Receiving barcode CP for the order
1C:Enterprise/OneScript code example
Token = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6WyJsb2NhdGlvbjphbGwiLCJvcmRlcjphbGwiLCJwYXltZW50OmFsbCJdLCJleHAiOjE3NjA0MzY3MTIsImF1dGhvcml0aWVzIjpbInNoYXJkLWlkOnJ1LTAxIiwiY2xpZW50LWNpdHk60J3QvtCy0L7RgdC40LHQuNGA0YHQuiwg0J3QvtCy0L7RgdC40LHQuNGA0YHQutCw0Y8g0L7QsdC70LDRgdGC0YwiLCJhY2NvdW50LWxhbmc6cnVzIiwiY29udHJhY3Q60JjQnC3QoNCkLdCT0JvQky0yMiIsImFjY291bnQtdXVpZDplOTI1YmQwZi0wNWE2LTRjNTYtYjczNy00Yjk5YzE0ZjY2OWEiLCJhcGktdmVyc2lvbjoxLjEiLCJjbGllbnQtaWQtZWM1OmVkNzVlY2Y0LTMwZWQtNDE1My1hZmU5LWViODBiYjUxMmYyMiIsImNvbnRyYWN0LWlkOmRlNDJjYjcxLTZjOGMtNGNmNS04MjIyLWNmYjY2MDQ0ZThkZiIsImNsaWVudC1pZC1lYzQ6MTQzNDgyMzEiLCJjb250cmFnZW50L...";
UUID = "ed42ca74-05e4-4609-a0e6-c12f72e252f7";
Result = OPI_CDEK.GetBarcode(Token, UUID, , True); // Server response with a URL
- Bash
- CMD/Bat
oint cdek GetBarcode \
--token "***" \
--uuid "a86e5d1e-3f4a-421f-8108-691bfa43b039" \
--getfile true \
--testapi "***" \
--out "C:\Users\bayse\AppData\Local\Temp\m3wy4uxzmho.pdf"
oint cdek GetBarcode ^
--token "***" ^
--uuid "a86e5d1e-3f4a-421f-8108-691bfa43b039" ^
--getfile true ^
--testapi "***" ^
--out "C:\Users\bayse\AppData\Local\Temp\m3wy4uxzmho.pdf"
Result
{
"entity": {
"uuid": "8c51d0dc-c13e-4a3f-a29a-1fe965156465",
"orders": [
{
"order_uuid": "ae2ba595-fbac-4572-80f5-03f20395a70a"
}
],
"copy_count": 1,
"format": "A5",
"url": "https://api.edu.cdek.ru/v2/print/barcodes/8c51d0dc-c13e-4a3f-a29a-1fe965156465.pdf",
"lang": "RUS",
"statuses": [
{
"code": "ACCEPTED",
"name": "Принят",
"date_time": "2025-10-15T10:14:37+00:00"
},
{
"code": "PROCESSING",
"name": "Формируется",
"date_time": "2025-10-15T10:14:37+00:00"
},
{
"code": "READY",
"name": "Сформирован",
"date_time": "2025-10-15T10:14:38+00:00"
}
]
},
"requests": [
{
"request_uuid": "4d168c03-140c-4287-b332-52df02e1088b",
"type": "CREATE",
"date_time": "2025-10-15T10:14:37+00:00",
"state": "SUCCESSFUL"
}
],
"related_entities": []
}