Chek qoralamalari
Kassirning kassadagi tugallanmagan cheklari (har bir kassa va ombor uchun 3 tagacha parallel chek). Qoralama savatni qayta yuklashlar orasida saqlaydi va chek bo‘yicha sotuv o‘tganda yoki bron yaratilganda o‘chiriladi.
| Metod | Manzil | Vazifasi |
|---|---|---|
| DELETE | /company/trade/temporary-cart | Chek qoralamasini tozalash |
| GET | /company/trade/temporary-cart | Kassir chek qoralamalari |
| POST | /company/trade/temporary-cart | Chek qoralamasini saqlash |
Chek qoralamasini tozalash
/company/trade/temporary-cartJoriy foydalanuvchining cashbox_id kassasi va stock_id omboridagi qoralamalarini o‘chiradi: cheque bilan — faqat shu chek, usiz — kassaning barcha cheklari. product_id bilan faqat shu qator o‘chiriladi, tovarsiz qolgan chek esa butunlay o‘chiriladi.
Formadan (
multipart/form-data)DELETEmetodiPOST+?_method=DELETEparametri bilan yuboriladi.
Sarlavhalar (headers)
| Sarlavha | Qiymat | Tavsif |
|---|---|---|
Authorization | Bearer {token} | POST /common/auth/login dan olingan token |
Accept | application/json | Javob JSON da |
Accept-Language | ru | Xabarlar va nomlar tili: ru, uz, oz |
So‘rov tanasi
| Maydon | Turi | Majburiy | Tavsif |
|---|---|---|---|
cashbox_id | integer | Yo‘q | Kassa |
stock_id | integer | Yo‘q | Ombor |
cheque | integer | Yo‘q | Kamida 1. 3 dan oshmasin |
product_id | integer | Yo‘q | Mahsulot |
Javob · 200
Javob maydonlari
| Maydon | Turi | Tavsif |
|---|---|---|
message | string | Xabar |
{
"message": "Success"
}Kassir chek qoralamalari
/company/trade/temporary-cartJoriy foydalanuvchi qoralamalari chek raqami bo‘yicha tartiblangan, tovar, xizmat, komplekt va mijoz bilan; qatorlar dolzarb narxlar va mavjud qoldiq bilan to‘ldirilgan. Kassa va ombor bo‘yicha toraytirish mumkin.
Sarlavhalar (headers)
| Sarlavha | Qiymat | Tavsif |
|---|---|---|
Authorization | Bearer {token} | POST /common/auth/login dan olingan token |
Accept | application/json | Javob JSON da |
Accept-Language | ru | Xabarlar va nomlar tili: ru, uz, oz |
So‘rov parametrlari
| Maydon | Turi | Majburiy | Tavsif |
|---|---|---|---|
cashbox_id | integer | Yo‘q | Faqat shu kassa qoralamalari |
stock_id | integer | Yo‘q | Faqat shu ombor qoralamalari |
filter[id] | — | Yo‘q | ID — aniq qiymat |
filter[creator_id] | — | Yo‘q | Yaratuvchi — aniq qiymat |
filter[company_id] | — | Yo‘q | Kompaniya — aniq qiymat |
filter[cashbox_id] | — | Yo‘q | Kassa — aniq qiymat |
filter[stock_id] | — | Yo‘q | Ombor — aniq qiymat |
filter[client_id] | — | Yo‘q | Mijoz — aniq qiymat |
filter[cheque] | — | Yo‘q | aniq qiymat |
filter[currency] | — | Yo‘q | Valyuta — aniq qiymat |
filter[created_at] | — | Yo‘q | Yaratilgan — davr: [0] — dan, [1] — gacha (Y-m-d) |
sort[] | — | Yo‘q | Saralash, - — kamayish bo‘yicha: id, -id, cheque, -cheque |
with[] | — | Yo‘q | Bog‘liq ma’lumotlarni qo‘shish: products.product.category, products.product.unit, client.bonus_tariff |
page | — | Yo‘q | Sahifa raqami, 1 dan |
page-size | — | Yo‘q | Sahifadagi yozuvlar soni, ko‘pi bilan 20 |
Javob · 200
Javob maydonlari
| Maydon | Turi | Tavsif |
|---|---|---|
cheques | object | |
cheques.1 | object | |
cheques.1.discount_mode | string | |
cheques.1.discount_value | integer | |
cheques.1.client | object | |
cheques.1.client.id | integer | ID |
cheques.1.client.full_name | string | FISH |
cheques.1.client.main_phone | string | Asosiy telefon |
cheques.1.client.bonus_accumulations_amount | integer | Bonus balansi |
cheques.1.client.bonus_tariff | integer | |
cheques.1.client.force_bonus | object | |
cheques.1.client.force_bonus.percent | integer | Foiz |
cheques.1.client.force_bonus.reason_type | string | Sabab turi |
cheques.1.client.force_bonus.comment | string | Izoh |
cheques.1.products | object[] | Mahsulotlar |
cheques.1.products[].id | integer | ID |
cheques.1.products[].is_service | boolean | |
cheques.1.products[].is_bundle | boolean | |
cheques.1.products[].bundle_id | null | Komplekt |
cheques.1.products[].service_id | null | |
cheques.1.products[].name | string | Nomlanish |
cheques.1.products[].category | string | Kategoriya |
cheques.1.products[].barcode | string | Shtrix kod |
cheques.1.products[].quantity | integer | Miqdori |
cheques.1.products[].max_quantity | integer | |
cheques.1.products[].price | integer | Narxi |
cheques.1.products[].currency | string | Valyuta |
cheques.1.products[].img | null | |
cheques.1.products[].discount | integer | Chegirma |
cheques.1.products[].unit | string | |
cheques.1.products[].unit_accuracy | integer | |
cheques.1.products[].is_free_price | boolean | Erkin narxda sotish |
cheques.1.products[].min_price | integer | |
cheques.1.products[].min_price_currency | string | |
cheques.1.products[].images_list_thumbs | array | |
cheques.1.products[].description | string | Tavsif |
cheques.2 | object | |
cheques.2.discount_mode | null | |
cheques.2.discount_value | null | |
cheques.2.client | null | |
cheques.2.products | object[] | Mahsulotlar |
cheques.2.products[].id | integer | ID |
cheques.2.products[].is_service | boolean | |
cheques.2.products[].is_bundle | boolean | |
cheques.2.products[].bundle_id | null | Komplekt |
cheques.2.products[].service_id | null | |
cheques.2.products[].name | string | Nomlanish |
cheques.2.products[].category | string | Kategoriya |
cheques.2.products[].barcode | string | Shtrix kod |
cheques.2.products[].quantity | integer | Miqdori |
cheques.2.products[].max_quantity | integer | |
cheques.2.products[].price | integer | Narxi |
cheques.2.products[].currency | string | Valyuta |
cheques.2.products[].img | null | |
cheques.2.products[].discount | integer | Chegirma |
cheques.2.products[].unit | string | |
cheques.2.products[].unit_accuracy | integer | |
cheques.2.products[].is_free_price | boolean | Erkin narxda sotish |
cheques.2.products[].min_price | integer | |
cheques.2.products[].min_price_currency | string | |
cheques.2.products[].images_list_thumbs | array | |
cheques.2.products[].description | string | Tavsif |
cashbox_id | integer | Kassa |
stock_id | integer | Ombor |
company_id | integer | Kompaniya |
currency | string | Valyuta |
{
"cheques": {
"1": {
"discount_mode": "percent",
"discount_value": 10,
"client": {
"id": 1,
"full_name": "Full name 1",
"main_phone": "998000000001",
"bonus_accumulations_amount": 1000,
"bonus_tariff": 1,
"force_bonus": {
"percent": 5,
"reason_type": "loyalty",
"comment": "Comment 1"
}
},
"products": [
{
"id": 1,
"is_service": false,
"is_bundle": false,
"bundle_id": null,
"service_id": null,
"name": "Product 1",
"category": "Category 1-1-1 ru",
"barcode": "0000000000001",
"quantity": 2,
"max_quantity": 1,
"price": 1100,
"currency": "uzs",
"img": null,
"discount": 300,
"unit": "Unit 1 ru",
"unit_accuracy": 4,
"is_free_price": false,
"min_price": 0,
"min_price_currency": "uzs",
"images_list_thumbs": [],
"description": "Description 1"
},
{
"id": 2,
"is_service": false,
"is_bundle": false,
"bundle_id": null,
"service_id": null,
"name": "Product 1-1",
"category": "Category 1-1-1 ru",
"barcode": "0000000000011",
"quantity": 1,
"max_quantity": 2,
"price": 2400000,
"currency": "uzs",
"img": null,
"discount": 0,
"unit": "Unit 1 ru",
"unit_accuracy": 4,
"is_free_price": false,
"min_price": 0,
"min_price_currency": "uzs",
"images_list_thumbs": [],
"description": "Description 1-1"
}
]
},
"2": {
"discount_mode": null,
"discount_value": null,
"client": null,
"products": [
{
"id": 1,
"is_service": false,
"is_bundle": false,
"bundle_id": null,
"service_id": null,
"name": "Product 1",
"category": "Category 1-1-1 ru",
"barcode": "0000000000001",
"quantity": 3,
"max_quantity": 1,
"price": 1100,
"currency": "uzs",
"img": null,
"discount": 0,
"unit": "Unit 1 ru",
"unit_accuracy": 4,
"is_free_price": false,
"min_price": 0,
"min_price_currency": "uzs",
"images_list_thumbs": [],
"description": "Description 1"
}
]
}
},
"cashbox_id": 2,
"stock_id": 1,
"company_id": 1,
"currency": "uzs"
}Chek qoralamasini saqlash
/company/trade/temporary-cartKassa va ombordagi cheque (1–3) chek savatini saqlaydi: qoralama bo‘lsa, u qayta yoziladi. Kamida bitta qator kerak; tovar, xizmat va komplektlar kompaniyaga tegishli bo‘lishi kerak. Qoldiq band qilinmaydi.
Sarlavhalar (headers)
| Sarlavha | Qiymat | Tavsif |
|---|---|---|
Authorization | Bearer {token} | POST /common/auth/login dan olingan token |
Accept | application/json | Javob JSON da |
Accept-Language | ru | Xabarlar va nomlar tili: ru, uz, oz |
So‘rov tanasi
| Maydon | Turi | Majburiy | Tavsif |
|---|---|---|---|
company_id | integer | Ha | Kompaniya. Foydalanuvchiga ochiq mavjud yozuv ID si |
cashbox_id | integer | Ha | Kassa. Foydalanuvchiga ochiq mavjud yozuv ID si |
stock_id | integer | Ha | Ombor. Foydalanuvchiga ochiq mavjud yozuv ID si |
client_id | integer | Yo‘q | Mijoz. Foydalanuvchiga ochiq mavjud yozuv ID si |
currency | string | Ha | Valyuta. Mumkin qiymatlar: uzs |
cheque | integer | Ha | Kamida 1. 3 dan oshmasin |
discount_mode | string | Yo‘q | Mumkin qiymatlar: percent, integer |
discount_value | number | Yo‘q | Verguldan keyin 2 tagacha raqam. Kamida 0 |
force_bonus | array | Yo‘q | |
force_bonus.percent | number | force_bonus yuborilsa | Foiz. Verguldan keyin 2 tagacha raqam. Kamida 0. 100 dan oshmasin |
force_bonus.reason_type | string | Yo‘q | Sabab turi. Maks. 100 belgi |
force_bonus.comment | string | Yo‘q | Izoh. Maks. 1000 belgi |
products | object[] | Yo‘q | Mahsulotlar. Maks. 100 ta element |
products[].id | integer | Ha | ID. Takrorlanmasin |
products[].quantity | number | Ha | Miqdori. Verguldan keyin 8 tagacha raqam. Kamida 0.00000001 |
products[].amount | number | Ha | Summa. Verguldan keyin 2 tagacha raqam. Kamida 0.01. 999999999999.99 dan oshmasin |
products[].discount | number | Yo‘q | Chegirma. Verguldan keyin 2 tagacha raqam. Kamida 0. 999999999999.99 dan oshmasin |
services | object[] | Yo‘q | Maks. 100 ta element |
services[].id | integer | Ha | ID. Takrorlanmasin |
services[].amount | number | Ha | Summa. Verguldan keyin 2 tagacha raqam. Kamida 0.01. 999999999999.99 dan oshmasin |
services[].discount | number | Yo‘q | Chegirma. Verguldan keyin 2 tagacha raqam. Kamida 0. 999999999999.99 dan oshmasin |
bundles | object[] | Yo‘q | Komplektlar. Maks. 100 ta element |
bundles[].id | integer | Ha | ID |
bundles[].quantity | integer | Yo‘q | Miqdori. Kamida 1. 1000 dan oshmasin |
bundles[].amount | number | Ha | Summa. Verguldan keyin 2 tagacha raqam. Kamida 0.01. 999999999999.99 dan oshmasin |
bundles[].discount | number | Yo‘q | Chegirma. Verguldan keyin 2 tagacha raqam. Kamida 0. 999999999999.99 dan oshmasin |
{
"company_id": 1,
"cashbox_id": 2,
"stock_id": 1,
"client_id": 1,
"currency": "uzs",
"discount_mode": "percent",
"discount_value": 10,
"force_bonus": {
"percent": 5,
"reason_type": "loyalty",
"comment": "Test comment"
},
"products": [
{
"id": 1,
"quantity": 2,
"amount": 9000,
"discount": 300
},
{
"id": 2,
"quantity": 1,
"amount": 5000,
"discount": 0
}
],
"cheque": 3
}curl -X POST "https://api.wasyt.uz/company/trade/temporary-cart" \
-H "Accept: application/json" \
-H "Accept-Language: ru" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"company_id":1,"cashbox_id":2,"stock_id":1,"client_id":1,"currency":"uzs","discount_mode":"percent","discount_value":10,"force_bonus":{"percent":5,"reason_type":"loyalty","comment":"Test comment"},"products":[{"id":1,"quantity":2,"amount":9000,"discount":300},{"id":2,"quantity":1,"amount":5000,"discount":0}],"cheque":3}'Javob · 200
Javob maydonlari
| Maydon | Turi | Tavsif |
|---|---|---|
company_id | integer | Kompaniya |
cashbox_id | integer | Kassa |
stock_id | integer | Ombor |
client_id | integer | Mijoz |
currency | string | Valyuta |
cheque | integer | |
discount_mode | string | |
discount_value | integer | |
force_bonus | object | |
force_bonus.percent | integer | Foiz |
force_bonus.reason_type | string | Sabab turi |
force_bonus.comment | string | Izoh |
updated_at | string | Yangilangan |
created_at | string | Yaratilgan |
creator_id | integer | Yaratuvchi |
id | integer | ID |
{
"company_id": 1,
"cashbox_id": 2,
"stock_id": 1,
"client_id": 1,
"currency": "uzs",
"cheque": 3,
"discount_mode": "percent",
"discount_value": 10,
"force_bonus": {
"percent": 5,
"reason_type": "loyalty",
"comment": "Test comment"
},
"updated_at": "2026-09-30 12:25:03",
"created_at": "2026-09-30 12:25:03",
"creator_id": 2,
"id": 5
}
