Skip to main content

Create barcode

Generates a PDF barcode CP for orders

Function CreateBarcode(Val Token, Val UUIDArray, Val Copies = 1, Val Format = "A4", Val Lang = "RUS", Val TestAPI = False) Export

ParameterCLI optionTypeRequiredDescription
Token--tokenStringAuth token
UUIDArray--uuidsString, Array of StringOne or an array of order UUIDs
Copies--countNumberNumber of copies
Format--formatStringPrint format: A4, A5, A6, A7
Lang--langStringBarcode language: RUS, ENG
TestAPI--testapiBooleanFlag to use test API for requests

Returns: Map Of KeyAndValue - serialized JSON response from CDEK


tip

Method at API documentation: Creating barcode CP for the order


1C:Enterprise/OneScript code example
    Token  = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6WyJsb2NhdGlvbjphbGwiLCJvcmRlcjphbGwiLCJwYXltZW50OmFsbCJdLCJleHAiOjE3MzIyNjMyNTYsImF1dGhvcml0aWVzIjpbInNoYXJkLWlkOnJ1LTAxIiwiY2xpZW50LWNpdHk60J3QvtCy0L7RgdC40LHQuNGA0YHQuiwg0J3QvtCy0L7RgdC40LHQuNGA0YHQutCw0Y8g0L7QsdC70LDRgdGC0YwiLCJjb250cmFjdDrQmNCcLdCg0KQt0JPQm9CTLTIyIiwiYWNjb3VudC1sYW5nOnJ1cyIsImFwaS12ZXJzaW9uOjEuMSIsImFjY291bnQtdXVpZDplOTI1YmQwZi0wNWE2LTRjNTYtYjczNy00Yjk5YzE0ZjY2OWEiLCJjbGllbnQtaWQtZWM1OmVkNzVlY2Y0LTMwZWQtNDE1My1hZmU5LWViODBiYjUxMmYyMiIsImNvbnRyYWN0LWlkOmRlNDJjYjcxLTZjOGMtNGNmNS04MjIyLWNmYjY2MDQ0ZThkZiIsImNsaWVudC1pZC1lYzQ6MTQzNDgyMzEiLCJjb250cmFnZW50L...";
UUID = "42efa26d-4dc4-4431-b446-c73e59461cfe";
Format = "A5";
Copies = 1;

Result = OPI_CDEK.CreateBarcode(Token, UUID, Copies, Format, , True);
    oint cdek CreateBarcode \
--token "***" \
--uuids "a179655d-f769-4ccf-b69f-25f719729112" \
--count 1 \
--format "A5" \
--testapi "***"
Result
{
"entity": {
"uuid": "72753031-9cab-476e-b091-50d4c511afd2"
},
"requests": [
{
"request_uuid": "42c93f2b-bfe5-40eb-8927-04dcfb72457d",
"type": "CREATE",
"date_time": "2024-10-21T21:27:30+03:00",
"state": "ACCEPTED"
}
],
"related_entities": []
}