Guruhli qayta baholash
«Qayta baholashlar tarixi»: bitta qayta baholash — guruhli yoki yakka — qayta baholangan tovarlar to‘plami, yaxlitlash usuli va hisoblangan kurs bilan.
| Metod | Manzil | Vazifasi |
|---|---|---|
| GET | /company/trade/recalculation-batch | Qayta baholashlar ro‘yxati |
| GET | /company/trade/recalculation-batch/{model} | Qayta baholash tafsilotlari |
| POST | /company/trade/recalculation-batch | Guruhli qayta baholash |
Qayta baholashlar ro‘yxati
/company/trade/recalculation-batchQayta baholashlar tarixi (guruhli va yakka) tovarlar soni, ustama xulosasi, yaxlitlash va kurs bilan, sahifalab va filtrlar bilan.
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
| Parametr | Tavsif |
|---|---|
filter[id] | ID — aniq qiymat |
filter[company_id] | Kompaniya — bitta qiymat yoki ro‘yxat filter[company_id][] |
filter[creator_id] | Yaratuvchi — aniq qiymat |
filter[created_at] | Yaratilgan — davr: [0] — dan, [1] — gacha (Y-m-d) |
sort[] | Saralash, - — kamayish bo‘yicha: id, -id |
with[] | Bog‘liq ma’lumotlarni qo‘shish: creator.profile, products.product |
page | Sahifa raqami, 1 dan |
page-size | Sahifadagi yozuvlar soni, ko‘pi bilan 20 |
GET /company/trade/recalculation-batch?filter[id]=1&filter[company_id][0]=1&filter[company_id][1]=2&filter[creator_id]=1&filter[created_at][0]=2026-09-29&filter[created_at][1]=2026-09-30Javob · 200
Sahifalangan javob: yozuvlar data[] ichida, sahifalash links va meta da.
Javob maydonlari
| Maydon | Turi | Tavsif |
|---|---|---|
data | array | Ma'lumotlar |
{
"data": [],
"links": {
"first": "https://api.wasyt.uz/company/trade/recalculation-batch?page=1",
"last": "https://api.wasyt.uz/company/trade/recalculation-batch?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": null,
"last_page": 1,
"links": [],
"path": "https://api.wasyt.uz/company/trade/recalculation-batch",
"per_page": 20,
"to": null,
"total": 0
}
}Qayta baholash tafsilotlari
/company/trade/recalculation-batch/{model}Bitta qayta baholash: turi (single/group), yaxlitlash usuli, kurs va muallif.
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 |
Yo‘l parametrlari
| Parametr | Tavsif |
|---|---|
model | Yozuv ID si |
Javob
Javob misoli hali testlar tomonidan yozib olinmagan.
Guruhli qayta baholash
/company/trade/recalculation-batchTovarlar to‘plamini bitta tranzaksiyada qayta baholaydi. Qayta baholab bo‘lmaydigan qatorlar (faol sotuvdagi tovar, tannarxdan past minimal narx) o‘tkazib yuboriladi va sabablari bilan skipped_productsda qaytariladi; xato faqat birorta qator o‘tmasa. currency_rate («yangi kurs bo‘yicha») kompaniyaning USD kursiga aylanadi.
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 |
rounding_type | string | Yo‘q | Mumkin qiymatlar: none, smart, 1000 |
currency_rate | number | Yo‘q | Kurs. Verguldan keyin 2 tagacha raqam. Kamida 1. 999999999999.99 dan oshmasin |
products | object[] | Ha | Mahsulotlar. Kamida 1 ta element |
products[].product_id | integer | Ha | Tovar. Mavjud yozuv ID si |
products[].sale_price | number | Ha | Sotish narxi. Verguldan keyin 2 tagacha raqam. Kamida 0.01. 999999999999.99 dan oshmasin |
products[].sale_currency | string | Ha | Sotish paytida valyuta. Mumkin qiymatlar: uzs, usd, eur, rub |
products[].markup_percent | number | Yo‘q | Ustama %. Verguldan keyin 2 tagacha raqam. Kamida 0.01. 999999999999.99 dan oshmasin |
products[].price_without_rounding | number | Yo‘q | Verguldan keyin 2 tagacha raqam. Kamida 0.01. 999999999999.99 dan oshmasin |
products[].previous_price | number | Yo‘q | Oldingi narx. Verguldan keyin 2 tagacha raqam. Kamida 0.01. 999999999999.99 dan oshmasin |
products[].min_price | number | Yo‘q | Verguldan keyin 2 tagacha raqam. Kamida 0. 999999999999.99 dan oshmasin |
products[].min_price_percent | number | Yo‘q | Kamida 0. 10000 dan oshmasin |
{
"company_id": 1,
"products": [
{
"product_id": 1,
"sale_price": 50000,
"sale_currency": "uzs",
"markup_percent": 25.5,
"price_without_rounding": 49875
},
{
"product_id": 2,
"sale_price": 120000,
"sale_currency": "uzs",
"markup_percent": 20,
"price_without_rounding": 119800
}
]
}curl -X POST "https://api.wasyt.uz/company/trade/recalculation-batch" \
-H "Accept: application/json" \
-H "Accept-Language: ru" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"company_id":1,"products":[{"product_id":1,"sale_price":50000,"sale_currency":"uzs","markup_percent":25.5,"price_without_rounding":49875},{"product_id":2,"sale_price":120000,"sale_currency":"uzs","markup_percent":20,"price_without_rounding":119800}]}'Javob · 200
Javob maydonlari
| Maydon | Turi | Tavsif |
|---|---|---|
id | integer | ID |
company_id | integer | Kompaniya |
creator_id | integer | Yaratuvchi |
rounding_type | null | |
currency_rate | null | Kurs |
created_at | string | Yaratilgan |
skipped_products | array | |
type | string | Turi |
products_count | integer | |
markup_summary | null | |
creator | object | |
creator.id | integer | ID |
creator.type | string | Turi |
creator.role_id | integer | Roli |
creator.company_id | integer | Kompaniya |
creator.partner_id | null | Hamkor |
creator.username | string | Login |
creator.pinfl | null | PINFL |
creator.phone | string | Telefon |
creator.sipuni_sip_number | string | Sipuni (SIP-raqam) |
creator.is_confirmed | boolean | |
creator.are_all_companies_available | boolean | |
creator.last_login_at | null | |
creator.created_at | string | Yaratilgan |
creator.updated_at | string | Yangilangan |
creator.is_deleted | boolean | |
creator.profile | object | |
creator.profile.first_name | null | Ism |
creator.profile.last_name | null | Familiya |
creator.profile.position | null | Lavozim |
creator.profile.birth_date | null | Tug'ilgan kuni |
creator.profile.gender | null | Jinsi |
products | object[] | Mahsulotlar |
products[].id | integer | ID |
products[].company_id | integer | Kompaniya |
products[].creator_id | integer | Yaratuvchi |
products[].product_id | integer | Mahsulot |
products[].batch_id | integer | |
products[].previous_price | integer | Oldingi narx |
products[].sale_price | integer | Sotish narxi |
products[].sale_currency | string | Sotish paytida valyuta |
products[].markup_percent | number | Ustama % |
products[].previous_markup_percent | null | |
products[].price_without_rounding | integer | |
products[].min_price | null | |
products[].min_price_percent | null | |
products[].created_at | string | Yaratilgan |
products[].product | object | |
products[].product.id | integer | ID |
products[].product.parent_id | null | Ota-ona |
products[].product.creator_id | integer | Yaratuvchi |
products[].product.company_id | integer | Kompaniya |
products[].product.category_id | integer | Kategoriya |
products[].product.brand_id | integer | Brend |
products[].product.unit_id | integer | O'lchov birligi |
products[].product.name | string | Nomlanish |
products[].product.full_text | string | To'liq matn |
products[].product.plu | string | Artikul (PLU) |
products[].product.description | string | Tavsif |
products[].product.is_free_price | boolean | Erkin narxda sotish |
products[].product.is_favorite | boolean | |
products[].product.min_quantity | null | |
products[].product.barcode | string | Shtrix kod |
products[].product.images_list | array | Tasvirlar |
products[].product.images_list_thumbs | array | |
products[].product.created_at | string | Yaratilgan |
products[].product.updated_at | string | Yangilangan |
products[].product.is_deleted | boolean |
{
"id": 2,
"company_id": 1,
"creator_id": 2,
"rounding_type": null,
"currency_rate": null,
"created_at": "2026-09-30 12:54:40",
"skipped_products": [],
"type": "group",
"products_count": 2,
"markup_summary": null,
"creator": {
"id": 2,
"type": "director",
"role_id": 2,
"company_id": 1,
"partner_id": null,
"username": "director_1@local.host",
"pinfl": null,
"phone": "998020000001",
"sipuni_sip_number": "210",
"is_confirmed": true,
"are_all_companies_available": false,
"last_login_at": null,
"created_at": "2026-09-30 12:47:59",
"updated_at": "2026-09-30 12:47:59",
"is_deleted": false,
"profile": {
"first_name": null,
"last_name": null,
"position": null,
"birth_date": null,
"gender": null
}
},
"products": [
{
"id": 4,
"company_id": 1,
"creator_id": 2,
"product_id": 1,
"batch_id": 2,
"previous_price": 1100,
"sale_price": 50000,
"sale_currency": "uzs",
"markup_percent": 25.5,
"previous_markup_percent": null,
"price_without_rounding": 49875,
"min_price": null,
"min_price_percent": null,
"created_at": "2026-09-30 12:54:40",
"product": {
"id": 1,
"parent_id": null,
"creator_id": 1,
"company_id": 1,
"category_id": 4,
"brand_id": 1,
"unit_id": 1,
"name": "Product 1",
"full_text": "Product 1",
"plu": "0001",
"description": "Description 1",
"is_free_price": false,
"is_favorite": false,
"min_quantity": null,
"barcode": "0000000000001",
"images_list": [
"https://api-minio.icangroup.uz/wasyt/test_data/images/1.png",
"https://api-minio.icangroup.uz/wasyt/test_data/images/2.png"
],
"images_list_thumbs": [],
"created_at": "2026-09-30 12:47:59",
"updated_at": "2026-09-30 12:47:59",
"is_deleted": false
}
},
{
"id": 5,
"company_id": 1,
"creator_id": 2,
"product_id": 2,
"batch_id": 2,
"previous_price": 2400,
"sale_price": 120000,
"sale_currency": "uzs",
"markup_percent": 20,
"previous_markup_percent": null,
"price_without_rounding": 119800,
"min_price": null,
"min_price_percent": null,
"created_at": "2026-09-30 12:54:40",
"product": {
"id": 2,
"parent_id": 1,
"creator_id": 1,
"company_id": 1,
"category_id": 4,
"brand_id": 1,
"unit_id": 1,
"name": "Product 1-1",
"full_text": "Product 1-1 full text",
"plu": "0011",
"description": "Description 1-1",
"is_free_price": false,
"is_favorite": false,
"min_quantity": null,
"barcode": "0000000000011",
"images_list": [
"https://api-minio.icangroup.uz/wasyt/test_data/images/1.png",
"https://api-minio.icangroup.uz/wasyt/test_data/images/2.png"
],
"images_list_thumbs": [],
"created_at": "2026-09-30 12:47:59",
"updated_at": "2026-09-30 12:47:59",
"is_deleted": false
}
}
]
}Xato misoli · 422
{
"message": "Поле Продукты обязательно для заполнения.",
"errors": {
"products": [
"Поле Продукты обязательно для заполнения."
]
}
}
