Skip to main content

Create receipt

Generates pdf receipts for orders

Function CreateReceipt(Val Token, Val UUIDArray, Val Type = "tpl_russia", Val CopiesPerSheet = 2, Val TestAPI = False) Export

ParameterCLI optionTypeRequiredDescription
Token--tokenStringAuth token
UUIDArray--uuidsString, Array of StringOne or an array of order UUIDs
Type--typeStringReceipt type (language)
CopiesPerSheet--countNumberNumber of copies of one receipt per sheet
TestAPI--testapiBooleanFlag to use test API for requests

Returns: Map Of KeyAndValue - serialized JSON response from CDEK


tip

Available receipt types (languages): tpl_china, tpl_armenia, tpl_russia, tpl_english, tpl_italian, tpl_korean, tpl_latvian, tpl_lithuanian, tpl_german, tpl_turkish, tpl_czech, tpl_thailand, tpl_invoice

It is recommended to specify at least 2 copies per sheet (parameter CopiesPerSheet): one to be glued on the shipment, the other to be kept by the sender

Method at API documentation: Creating order receipt


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

Result = OPI_CDEK.CreateReceipt(Token, UUID, Type, Copies, True);
    oint cdek CreateReceipt \
--token "***" \
--uuids "a179655d-f769-4ccf-b69f-25f719729112" \
--type "tpl_russia" \
--count 1 \
--testapi "***"
Result
{
"entity": {
"uuid": "72753031-318f-4249-ab65-4c7e08244c6d"
},
"requests": [
{
"request_uuid": "8f0331c9-6bbc-4ec9-9357-ecc9af47342b",
"type": "CREATE",
"date_time": "2024-10-21T21:27:30+03:00",
"state": "ACCEPTED"
}
],
"related_entities": []
}