Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

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:

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

If the request has been accepted successfully, the system returns the request body in JSON with filled barcode CP fields, uuid identifier value and barcode CP status in CDEK system.
In case of error, the system returns the error description in the Error format; the HTTP status is set in accordance with the error’s status.

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.

Sample Request
{
    "orders": [
        {
            "order_uuid": "72753031-4f64-4f21-a06a-f082443c9a54",
            "cdek_number": "1105088384"
        }
    ]
}
Sample Response
{
    "uuid": "72753031-e83d-4865-838b-d7a07f33dd3c",
    "orders": [
        {
            "order_uuid": "72753031-4f64-4f21-a06a-f082443c9a54"
        }
    ],
    "copy_count": 1,
    "type": "barcode",
    "format": "A4",
    "statuses": [
        {
            "code": "ACCEPTED",
            "name": "Принят",
            "date_time": "2019-12-03T15:46:31+0700"
        },
        {
            "code": "PROCESSING",
            "name": "Формируется",
            "date_time": "2019-12-03T15:46:31+0700"
        }
    ],
    "errors": [],
    "warnings": []
}
  • No labels