Buyurtma stickeri
Buyurtma stickeri
GET
/v1/order/sticker?orderId=<orderId>&decode=<decode>
Ushbu bo‘lim orqali mavjud buyurtma uchun sticker (yuk yorlig‘i) olinadi.
So‘rov yuborilganda tizim buyurtmaga tegishli yuk yorlig‘ini shakllantiradi va yuklab olish uchun tayyor holatda qaytaradi. Javobda stikerni PDF ko‘rinishida olish mumkin bo‘lgan havola mavjud bo‘ladi.
Ushbu endpoint faqat stikerni olish uchun ishlatiladi, buyurtma ma’lumotlarini o‘zgartirmaydi.
decode=1 yuborilganda
{
"labelEncode_base64": "data:application/pdf;base64,dfbkfbekwrjhgbjergbjerbg",
"labelSticker_base64": "data:application/pdf;base64,1111"
}
REQUEST
| Field | Type | Description |
|---|---|---|
orderId * |
integer | Buyurtma ID. Query parametr: GET /v1/order/sticker?orderId={id}. orderIds yuborilmasa majburiy |
decode |
integer | Query parametr. 0 (default) — PDF URL qaytariladi; 1 — PDF base64 (data:application/pdf;base64,...) qaytariladi |
RESPONSE
HTTP 200
Response Body
{
"status": true,
"message": "Ma’lumot muvaffaqiyatli olindi",
"status_code": 200,
"data": {
"labelEncode": null,
"labelSticker": "{pdf_url}",
// Only returns when decode=1 is received.
"labelEncode_base64": "data:application/pdf;base64,dfbkfbekwrjhgbjergbjerbg",
"labelSticker_base64": "data:application/pdf;base64,1111",
}
}
| Field | Type | Description |
|---|---|---|
labelEncode |
string | Yuk xatini katta varianti pdf url sifatida qaytadi |
labelSticker |
string | Yuk xatini kichik o'lchamdagi varianti, pdf url qaytadi. |
labelEncode_base64 |
string | Yuk xatini katta o'lchamdagi pdf urlni decode qilingan varianti |
labelSticker_base64 |
string | Yuk xatini kichik o'lchamdagi pdf urlni decode qilingan varianti |
HTTP 400
Response Body
{
"name": "Bad Request",
"message": "Quyidagi zarur parametrlar mavjud emas: orderId",
"code": 0,
"status": 400,
"type": "yii\\web\\BadRequestHttpException"
}
No schema defined.
HTTP 401
Response Body
{
"name": "Unauthorized",
"message": "Your request was made with invalid credentials.",
"code": 0,
"status": 401,
"type": "yii\\web\\UnauthorizedHttpException"
}
No schema defined.
HTTP 404
Response Body
{
"status": false,
"message": "error.not_found",
"status_code": 404
}
No schema defined.