Tovar narxlari
Kompaniya tovarlarining belgilangan sotuv narxlari — «Tovarlarni qayta baholash» bo‘limi: narxlar ro‘yxati, xulosa va minimal sotuv narxi.
| Metod | Manzil | Vazifasi |
|---|---|---|
| GET | /company/product/price/stats | Qayta baholash xulosasi |
| GET | /company/product/price/import-template | Qayta baholash import shabloni |
| POST | /company/product/price/import | Qayta baholashni Excel’dan import qilish |
| PATCH | /company/product/price/min-price-percent | Minimal narx foizini belgilash |
| PATCH | /company/product/price/{model}/min-price | Tovarning minimal narxini belgilash |
| GET | /company/product/price | Narxlar ro‘yxati |
| GET | /company/product/price/{model} | Narxni ko‘rish |
Qayta baholash xulosasi
«Tovarlarni qayta baholash» bo‘limi sarlavhasi: avg_markup_percent — har bir tovarning oxirgi qayta baholashi bo‘yicha o‘rtacha ustama, potential_profit_uzs — narxi bor barcha tovarlar bo‘yicha (sotuv narxi − oxirgi kirim tannarxi) yig‘indisi, kompaniya kurslari bo‘yicha UZS da, price_tag — chop etish uchun kompaniyaning birinchi narx yorlig‘i.
/company/product/price/statsSarlavhalar (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 |
Javob · 200
Javob maydonlari
| Maydon | Turi | Tavsif |
|---|---|---|
avg_markup_percent | null | |
potential_profit_uzs | integer | |
price_tag | object | |
price_tag.id | integer | ID |
price_tag.creator_id | integer | Yaratuvchi |
price_tag.company_id | integer | Kompaniya |
price_tag.name | string | Nomlanish |
price_tag.width | integer | Kenglik |
price_tag.height | integer | Balandlik |
price_tag.elements | object[] | Elementlar |
price_tag.elements[].x | integer | |
price_tag.elements[].y | integer | |
price_tag.elements[].text | string | Matn |
price_tag.elements[].type | string | Turi |
price_tag.elements[].color | string | Rang |
price_tag.elements[].fontSize | integer | |
price_tag.is_default | boolean | |
price_tag.created_at | string | Yaratilgan |
price_tag.updated_at | string | Yangilangan |
price_tag.is_deleted | boolean | O‘chirilgan |
{
"avg_markup_percent": null,
"potential_profit_uzs": 2398100,
"price_tag": {
"id": 1,
"creator_id": 2,
"company_id": 1,
"name": "Price tag 1",
"width": 512,
"height": 512,
"elements": [
{
"x": 20,
"y": 20,
"text": "АКЦИЯ",
"type": "text",
"color": "#e11d48",
"fontSize": 28
},
{
"x": 380,
"y": 20,
"src": "https://api-minio.icangroup.uz/wasyt/uploads/logo.png",
"type": "image",
"width": 110,
"height": 60
}
],
"is_default": false,
"created_at": "2026-11-25 16:42:00",
"updated_at": "2026-11-25 16:42:00",
"is_deleted": false
}
}Qayta baholash import shabloni
«Narxlarni yangilash» uchun .xlsx fayl: narxi bor har bir kompaniya tovari uchun bitta qator. A–E ustunlari (ID, nomi, kategoriya, UZS dagi tannarx va joriy narx) to‘ldirilgan va o‘zgartirilmaydi, F–I ni (yangi narx, min. narx, ustama %, ustama summasi) foydalanuvchi to‘ldiradi; yashirin J ustuni — A–E nazorat summasi. Sarlavhalar so‘rov tilida (Accept-Language), tovarlar soni — X-Products-Count javob sarlavhasida.
/company/product/price/import-templateSarlavhalar (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 |
Javob · 200
Javob — fayl yoki matn, JSON emas.
Qayta baholashni Excel’dan import qilish
To‘ldirilgan shablonni o‘qiydi (faqat .xlsx, yangi qiymatli 10 000 qatorgacha va jami 50 000 qatorgacha) va hech narsani saqlamaydi: products (qayta baholash jadvali munosabatlari bilan tovarlar), values — har bir tovar uchun sale_price, min_price, markup_percent, markup_amount (bo‘sh — o‘zgartirmaslik), loaded va not_found (mavjud bo‘lmagan ID li qatorlar) ni qaytaradi. Tovar ID bo‘yicha, ID bo‘sh bo‘lsa — aniq nomi bo‘yicha qidiriladi; qiymatsiz qatorlar o‘tkazib yuboriladi. 400 — A–E ustunlari o‘zgartirilgan yoki faylda yangi qiymat yo‘q; 422 — XLSX emas, fayl o‘qilmaydi, noto‘g‘ri son yoki H va I birga to‘ldirilgan.
/company/product/price/importSarlavhalar (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 |
|---|---|---|---|
file | file | Ha | Fayl. Maks. 10240 KB |
{}curl -X POST "https://api.wasyt.uz/company/product/price/import" \
-H "Accept: application/json" \
-H "Accept-Language: ru" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '[]'Javob · 200
Javob maydonlari
| Maydon | Turi | Tavsif |
|---|---|---|
products | object[] | Mahsulotlar |
products[].id | integer | ID |
products[].parent_id | null | Ota-ona |
products[].creator_id | integer | Yaratuvchi |
products[].company_id | integer | Kompaniya |
products[].category_id | integer | Kategoriya |
products[].brand_id | integer | Brend |
products[].unit_id | integer | O'lchov birligi |
products[].name | string | Nomlanish |
products[].full_text | string | To'liq matn |
products[].plu | string | Artikul (PLU) |
products[].custom_id | null | Mahsulot ID |
products[].description | string | Tavsif |
products[].is_free_price | boolean | Erkin narxda sotish |
products[].is_favorite | boolean | Sevimli |
products[].has_variants | boolean | Modifikatsiyali mahsulot |
products[].is_imei | boolean | IMEI bo'yicha hisob |
products[].variant_attributes | array | Xususiyatlar |
products[].variant_values | array | Variant qiymatlari |
products[].min_quantity | null | Minimal qoldiq |
products[].barcode | string | Shtrix kod |
products[].additional_barcodes | array | Qo‘shimcha shtrix kod |
products[].industrial_barcode | null | Sanoat shtrix kodi |
products[].additional_industrial_barcodes | array | |
products[].images_list | array | Tasvirlar |
products[].images_list_thumbs | array | |
products[].created_at | string | Yaratilgan |
products[].updated_at | string | Yangilangan |
products[].stock_quantity | integer | Ombordagi miqdor |
products[].is_deleted | boolean | O‘chirilgan |
products[].company | object | Kompaniya |
products[].company.id | integer | ID |
products[].company.parent_id | null | Ota-ona |
products[].company.partner_id | integer | Hamkor |
products[].company.district_id | integer | Tuman |
products[].company.industry_id | integer | Faoliyat turlari |
products[].company.name | string | Nomlanish |
products[].company.company_name | string | Kompaniya |
products[].company.logo | object | Logotip |
products[].company.logo.original | object | |
products[].company.logo.original.raw | string | |
products[].company.logo.original.webp | string | |
products[].company.logo.widen_25 | object | |
products[].company.logo.widen_25.raw | string | |
products[].company.logo.widen_25.webp | string | |
products[].company.logo.widen_100 | object | |
products[].company.logo.widen_100.raw | string | |
products[].company.logo.widen_100.webp | string | |
products[].company.logo.widen_500 | object | |
products[].company.logo.widen_500.raw | string | |
products[].company.logo.widen_500.webp | string | |
products[].company.inn | string | INN |
products[].company.mfo | string | MFO |
products[].company.address | string | Manzil |
products[].company.latitude | null | Kenglik |
products[].company.longitude | null | Uzunlik |
products[].company.comment | string | Izoh |
products[].company.telegram_phone | string | Telegramdagi telefon |
products[].company.director_full_name | string | Direktorning FISH |
products[].company.bank | string | Bank |
products[].company.payment_account | string | To'lov hisob raqami |
products[].company.agreement_number | string | Shartnoma raqami |
products[].company.agreement_date | null | |
products[].company.atmos_terminal_id | integer | Atmos Terminalining ID raqami |
products[].company.uniaccess_auto_payment_credit_overdue_days | integer | |
products[].company.uniaccess_branch_id | integer | Uniaccess branch ID |
products[].company.field_of_activity | string | Faoliyat yo‘nalishi |
products[].company.vat_percent | string | QQS (%) |
products[].company.is_using_new_my_uzcard_auto_payment_by_pinfl | boolean | Yangi MyUzcard PINFL bo'yicha avtomatik yechib olish uchun foydalanish |
products[].company.bonus_entry_period | integer | Bonuslar hisob davri (oylarda) |
products[].company.abc_segment_a | integer | |
products[].company.abc_segment_b | integer | |
products[].company.abc_segment_c | integer | |
products[].company.is_pos_window_enabled | boolean | |
products[].company.is_multi_currency_sale | boolean | |
products[].company.cashbox_shift_settings | object | |
products[].company.cashbox_shift_settings.is_enabled | boolean | Yoqilgan |
products[].company.pos_layout_settings | null | |
products[].company.manual_discount_settings | null | |
products[].company.is_manual_sale_price | boolean | |
products[].company.wholesale_settings | null | |
products[].company.product_settings | null | |
products[].company.has_bank_payment_type | boolean | |
products[].company.payment_type_names | null | |
products[].company.is_ican_turned_on | boolean | ICAN yoqilgan |
products[].company.created_at | string | Yaratilgan |
products[].company.updated_at | string | Yangilangan |
products[].company.is_deleted | boolean | O‘chirilgan |
products[].category | object | Kategoriya |
products[].category.id | integer | ID |
products[].category.company_id | integer | Kompaniya |
products[].category.lft | integer | |
products[].category.rgt | integer | |
products[].category.parent_id | integer | Ota-ona |
products[].category.name | object | Nomlanish |
products[].category.name.oz | string | |
products[].category.name.ru | string | |
products[].category.name.uz | string | |
products[].category.created_at | string | Yaratilgan |
products[].category.updated_at | string | Yangilangan |
products[].category.is_deleted | boolean | O‘chirilgan |
products[].category.text | string | Matn |
products[].category.state | object | Holat |
products[].category.state.disabled | boolean | |
products[].category.state.hidden | boolean | |
products[].category.state.opened | boolean | |
products[].price | object | Narxi |
products[].price.id | integer | ID |
products[].price.updater_id | integer | Yangilovchi |
products[].price.company_id | integer | Kompaniya |
products[].price.product_id | integer | Mahsulot |
products[].price.source_type | string | Manba |
products[].price.source_id | integer | Manba |
products[].price.price | integer | Narxi |
products[].price.currency | string | Valyuta |
products[].price.min_price | null | |
products[].price.min_price_percent | null | |
products[].price.wholesale_price | null | Ulgurji narx |
products[].price.created_at | string | Yaratilgan |
products[].price.updated_at | string | Yangilangan |
{
"products": [
{
"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",
"custom_id": null,
"description": "Description 1",
"is_free_price": false,
"is_favorite": false,
"has_variants": false,
"is_imei": false,
"variant_attributes": [],
"variant_values": [],
"min_quantity": null,
"barcode": "0000000000001",
"additional_barcodes": [],
"industrial_barcode": null,
"additional_industrial_barcodes": [],
"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-11-25 16:42:00",
"updated_at": "2026-11-25 16:42:00",
"stock_quantity": 1,
"is_deleted": false,
"company": {
"id": 1,
"parent_id": null,
"partner_id": 1,
"district_id": 1,
"industry_id": 1,
"name": "Company 1",
"company_name": "Company 1",
"logo": {
"original": {
"raw": "https://api.wasyt.uz/test_data/images/1.png",
"webp": "https://api.wasyt.uz/storage/thumbs/original/cac08f877f130e3c368a053b62984ee51778568717.webp"
},
"widen_25": {
"raw": "https://api.wasyt.uz/storage/thumbs/widen/25/cac08f877f130e3c368a053b62984ee51778568717.png",
"webp": "https://api.wasyt.uz/storage/thumbs/widen/25/cac08f877f130e3c368a053b62984ee51778568717.webp"
},
"widen_100": {
"raw": "https://api.wasyt.uz/storage/thumbs/widen/100/cac08f877f130e3c368a053b62984ee51778568717.png",
"webp": "https://api.wasyt.uz/storage/thumbs/widen/100/cac08f877f130e3c368a053b62984ee51778568717.webp"
},
"widen_500": {
"raw": "https://api.wasyt.uz/storage/thumbs/widen/500/cac08f877f130e3c368a053b62984ee51778568717.png",
"webp": "https://api.wasyt.uz/storage/thumbs/widen/500/cac08f877f130e3c368a053b62984ee51778568717.webp"
}
},
"inn": "000000001",
"mfo": "00001",
"address": "Address 1",
"latitude": null,
"longitude": null,
"comment": "Comment 1",
"telegram_phone": "998000000001",
"director_full_name": "Director 1",
"bank": "Bank 1",
"payment_account": "00000000000000000001",
"agreement_number": "001/2026",
"agreement_date": null,
"atmos_terminal_id": 97007302,
"uniaccess_auto_payment_credit_overdue_days": 3,
"uniaccess_branch_id": 1,
"field_of_activity": "trading",
"vat_percent": "12.00",
"is_using_new_my_uzcard_auto_payment_by_pinfl": true,
"bonus_entry_period": 12,
"abc_segment_a": 75,
"abc_segment_b": 15,
"abc_segment_c": 10,
"is_pos_window_enabled": true,
"is_multi_currency_sale": false,
"cashbox_shift_settings": {
"is_enabled": true
},
"pos_layout_settings": null,
"manual_discount_settings": null,
"is_manual_sale_price": false,
"wholesale_settings": null,
"product_settings": null,
"has_bank_payment_type": false,
"payment_type_names": null,
"is_ican_turned_on": true,
"created_at": "2026-11-25 16:42:00",
"updated_at": "2026-11-25 16:43:30",
"is_deleted": false
},
"category": {
"id": 4,
"company_id": 1,
"lft": 4,
"rgt": 5,
"parent_id": 3,
"name": {
"oz": "Category 1-1-1 oz",
"ru": "Category 1-1-1 ru",
"uz": "Category 1-1-1 uz"
},
"created_at": "2026-11-25 16:42:00",
"updated_at": "2026-11-25 16:42:00",
"is_deleted": false,
"text": "Category 1-1-1 ru",
"state": {
"disabled": false,
"hidden": false,
"opened": true
}
},
"price": {
"id": 1,
"updater_id": 2,
"company_id": 1,
"product_id": 1,
"source_type": "purchase",
"source_id": 1,
"price": 1100,
"currency": "uzs",
"min_price": null,
"min_price_percent": null,
"wholesale_price": null,
"created_at": "2026-11-25 16:42:00",
"updated_at": "2026-11-25 16:42:00",
"effective_min_price": 0,
"price_uzs": 1100,
"effective_min_price_uzs": 0,
"wholesale_price_uzs": null,
"price_usd": 1.1,
"effective_min_price_usd": 0,
"wholesale_price_usd": null,
"price_eur": 1.1,
"effective_min_price_eur": 0,
"wholesale_price_eur": null,
"price_rub": 1.1,
"effective_min_price_rub": 0,
"wholesale_price_rub": null
},
"last_purchase_product": {
"id": 1,
"company_id": 1,
"purchase_id": 1,
"product_id": 1,
"purchase_price": 1000,
"sale_price": 1100,
"wholesale_price": null,
"quantity": 1,
"actual_quantity": 1,
"returned_quantity": 0,
"is_product_created": false,
"imeis": [],
"imei_prices": [],
"created_at": "2026-11-25 16:42:00",
"updated_at": "2026-11-25 16:42:00",
"purchase": {
"id": 1,
"creator_id": 2,
"company_id": 1,
"stock_id": 1,
"supplier_id": 1,
"inventory_id": null,
"name": "Purchase 1",
"datetime": "2026-11-25 16:42:00",
"currency": "uzs",
"status": "waiting_for_confirmation",
"return_status": "not_returned",
"purchase_price": 5000,
"sale_price": 5900,
"created_at": "2026-11-25 16:42:00",
"updated_at": "2026-11-25 16:42:00",
"sale_price_uzs": 5900
},
"currency": "uzs",
"purchase_price_uzs": 1000,
"sale_price_uzs": 1100,
"purchase_price_usd": 1,
"sale_price_usd": 1.1,
"purchase_price_eur": 1,
"sale_price_eur": 1.1,
"purchase_price_rub": 1,
"sale_price_rub": 1.1
},
"latest_recalculation": {
"id": 1,
"company_id": 1,
"creator_id": 2,
"product_id": 1,
"batch_id": null,
"previous_price": null,
"sale_price": 1100,
"sale_currency": "uzs",
"markup_percent": null,
"previous_markup_percent": null,
"price_without_rounding": null,
"min_price": null,
"min_price_percent": null,
"wholesale_price": null,
"created_at": "2026-11-25 16:42:00"
},
"unit": {
"id": 1,
"company_id": 1,
"source_id": 3,
"name": {
"oz": "Unit 1 oz",
"ru": "Unit 1 ru",
"uz": "Unit 1 uz"
},
"accuracy": 4,
"created_at": "2026-11-25 16:42:00",
"updated_at": "2026-11-25 16:42:00",
"is_deleted": false
}
},
{
"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",
"custom_id": null,
"description": "Description 1-1",
"is_free_price": false,
"is_favorite": false,
"has_variants": false,
"is_imei": false,
"variant_attributes": [],
"variant_values": [],
"min_quantity": null,
"barcode": "0000000000011",
"additional_barcodes": [],
"industrial_barcode": null,
"additional_industrial_barcodes": [],
"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-11-25 16:42:00",
"updated_at": "2026-11-25 16:42:00",
"stock_quantity": 2,
"is_deleted": false,
"company": {
"id": 1,
"parent_id": null,
"partner_id": 1,
"district_id": 1,
"industry_id": 1,
"name": "Company 1",
"company_name": "Company 1",
"logo": {
"original": {
"raw": "https://api.wasyt.uz/test_data/images/1.png",
"webp": "https://api.wasyt.uz/storage/thumbs/original/cac08f877f130e3c368a053b62984ee51778568717.webp"
},
"widen_25": {
"raw": "https://api.wasyt.uz/storage/thumbs/widen/25/cac08f877f130e3c368a053b62984ee51778568717.png",
"webp": "https://api.wasyt.uz/storage/thumbs/widen/25/cac08f877f130e3c368a053b62984ee51778568717.webp"
},
"widen_100": {
"raw": "https://api.wasyt.uz/storage/thumbs/widen/100/cac08f877f130e3c368a053b62984ee51778568717.png",
"webp": "https://api.wasyt.uz/storage/thumbs/widen/100/cac08f877f130e3c368a053b62984ee51778568717.webp"
},
"widen_500": {
"raw": "https://api.wasyt.uz/storage/thumbs/widen/500/cac08f877f130e3c368a053b62984ee51778568717.png",
"webp": "https://api.wasyt.uz/storage/thumbs/widen/500/cac08f877f130e3c368a053b62984ee51778568717.webp"
}
},
"inn": "000000001",
"mfo": "00001",
"address": "Address 1",
"latitude": null,
"longitude": null,
"comment": "Comment 1",
"telegram_phone": "998000000001",
"director_full_name": "Director 1",
"bank": "Bank 1",
"payment_account": "00000000000000000001",
"agreement_number": "001/2026",
"agreement_date": null,
"atmos_terminal_id": 97007302,
"uniaccess_auto_payment_credit_overdue_days": 3,
"uniaccess_branch_id": 1,
"field_of_activity": "trading",
"vat_percent": "12.00",
"is_using_new_my_uzcard_auto_payment_by_pinfl": true,
"bonus_entry_period": 12,
"abc_segment_a": 75,
"abc_segment_b": 15,
"abc_segment_c": 10,
"is_pos_window_enabled": true,
"is_multi_currency_sale": false,
"cashbox_shift_settings": {
"is_enabled": true
},
"pos_layout_settings": null,
"manual_discount_settings": null,
"is_manual_sale_price": false,
"wholesale_settings": null,
"product_settings": null,
"has_bank_payment_type": false,
"payment_type_names": null,
"is_ican_turned_on": true,
"created_at": "2026-11-25 16:42:00",
"updated_at": "2026-11-25 16:43:30",
"is_deleted": false
},
"category": {
"id": 4,
"company_id": 1,
"lft": 4,
"rgt": 5,
"parent_id": 3,
"name": {
"oz": "Category 1-1-1 oz",
"ru": "Category 1-1-1 ru",
"uz": "Category 1-1-1 uz"
},
"created_at": "2026-11-25 16:42:00",
"updated_at": "2026-11-25 16:42:00",
"is_deleted": false,
"text": "Category 1-1-1 ru",
"state": {
"disabled": false,
"hidden": false,
"opened": true
}
},
"price": {
"id": 2,
"updater_id": 2,
"company_id": 1,
"product_id": 2,
"source_type": "purchase",
"source_id": 1,
"price": 2400,
"currency": "usd",
"min_price": null,
"min_price_percent": null,
"wholesale_price": null,
"created_at": "2026-11-25 16:42:00",
"updated_at": "2026-11-25 16:42:00",
"effective_min_price": 0,
"price_uzs": 2400000,
"effective_min_price_uzs": 0,
"wholesale_price_uzs": null,
"price_usd": 2400,
"effective_min_price_usd": 0,
"wholesale_price_usd": null,
"price_eur": 2400,
"effective_min_price_eur": 0,
"wholesale_price_eur": null,
"price_rub": 2400,
"effective_min_price_rub": 0,
"wholesale_price_rub": null
},
"last_purchase_product": {
"id": 2,
"company_id": 1,
"purchase_id": 1,
"product_id": 2,
"purchase_price": 2000,
"sale_price": 2400,
"wholesale_price": null,
"quantity": 2,
"actual_quantity": 2,
"returned_quantity": 0,
"is_product_created": false,
"imeis": [],
"imei_prices": [],
"created_at": "2026-11-25 16:42:00",
"updated_at": "2026-11-25 16:42:00",
"purchase": {
"id": 1,
"creator_id": 2,
"company_id": 1,
"stock_id": 1,
"supplier_id": 1,
"inventory_id": null,
"name": "Purchase 1",
"datetime": "2026-11-25 16:42:00",
"currency": "uzs",
"status": "waiting_for_confirmation",
"return_status": "not_returned",
"purchase_price": 5000,
"sale_price": 5900,
"created_at": "2026-11-25 16:42:00",
"updated_at": "2026-11-25 16:42:00",
"sale_price_uzs": 5900
},
"currency": "uzs",
"purchase_price_uzs": 2000,
"sale_price_uzs": 2400,
"purchase_price_usd": 2,
"sale_price_usd": 2.4,
"purchase_price_eur": 2,
"sale_price_eur": 2.4,
"purchase_price_rub": 2,
"sale_price_rub": 2.4
},
"latest_recalculation": {
"id": 2,
"company_id": 1,
"creator_id": 2,
"product_id": 2,
"batch_id": null,
"previous_price": null,
"sale_price": 2400,
"sale_currency": "uzs",
"markup_percent": null,
"previous_markup_percent": null,
"price_without_rounding": null,
"min_price": null,
"min_price_percent": null,
"wholesale_price": null,
"created_at": "2026-11-25 16:42:00"
},
"unit": {
"id": 1,
"company_id": 1,
"source_id": 3,
"name": {
"oz": "Unit 1 oz",
"ru": "Unit 1 ru",
"uz": "Unit 1 uz"
},
"accuracy": 4,
"created_at": "2026-11-25 16:42:00",
"updated_at": "2026-11-25 16:42:00",
"is_deleted": false
}
}
],
"values": [
{
"product_id": 1,
"sale_price": 150000,
"min_price": 120000,
"markup_percent": null,
"markup_amount": null
},
{
"product_id": 2,
"sale_price": null,
"min_price": null,
"markup_percent": 25,
"markup_amount": null
}
],
"loaded": 2,
"not_found": 0
}Xato misoli · 422
{
"message": "Строка 3: заполните только одну из колонок «Наценка %» или «Наценка сумма»",
"errors": {
"file": [
"Строка 3: заполните только одну из колонок «Наценка %» или «Наценка сумма»"
]
}
}Minimal narx foizini belgilash
product_ids dagi tovarlarga, ular berilmasa — kompaniyaning barcha narxlariga min_price_percent ni o‘rnatadi (minimal narx = tannarx + foiz); aniq min_price summalari tozalanadi, 0 foiz minimumni olib tashlaydi. «Minimal sotuv narxi» huquqini talab qiladi (aks holda 403); count — yangilangan narxlar sonini qaytaradi.
/company/product/price/min-price-percentFormadan (
multipart/form-data)PATCHmetodiPOST+?_method=PATCHparametri 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 |
|---|---|---|---|
min_price_percent | number | Ha | Tannarx ustiga foiz, 0 dan 10000 gacha |
product_ids | array | Yo‘q | Tovarlar ID lari; maydonsiz — kompaniyaning barcha tovarlari |
{
"min_price_percent": 5,
"product_ids": [
1
]
}curl -X PATCH "https://api.wasyt.uz/company/product/price/min-price-percent" \
-H "Accept: application/json" \
-H "Accept-Language: ru" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"min_price_percent":5,"product_ids":[1]}'Javob · 200
Javob maydonlari
| Maydon | Turi | Tavsif |
|---|---|---|
count | integer | Soni |
{
"count": 1
}Tovarning minimal narxini belgilash
Narx qatori uchun uning valyutasida aniq minimal sotuv narxini belgilaydi. U tovar tannarxidan past bo‘lishi mumkin emas (422); null tovarni foizga qaytaradi, 0 minimumni olib tashlaydi. «Minimal sotuv narxi» huquqini talab qiladi (aks holda 403); yangilangan narxni qaytaradi.
/company/product/price/{model}/min-priceFormadan (
multipart/form-data)PATCHmetodiPOST+?_method=PATCHparametri 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 |
Yo‘l parametrlari
| Parametr | Tavsif |
|---|---|
model | Yozuv ID si |
So‘rov tanasi
| Maydon | Turi | Majburiy | Tavsif |
|---|---|---|---|
min_price | number | Yo‘q | Narx valyutasidagi minimal sotuv narxi; null — foizga qaytarish |
{
"min_price": 3000
}curl -X PATCH "https://api.wasyt.uz/company/product/price/1/min-price" \
-H "Accept: application/json" \
-H "Accept-Language: ru" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"min_price":3000}'Javob · 200
Javob maydonlari
| Maydon | Turi | Tavsif |
|---|---|---|
id | integer | ID |
updater_id | integer | Yangilovchi |
company_id | integer | Kompaniya |
product_id | integer | Mahsulot |
source_type | string | Manba |
source_id | integer | Manba |
price | integer | Narxi |
currency | string | Valyuta |
min_price | integer | |
min_price_percent | null | |
wholesale_price | null | Ulgurji narx |
created_at | string | Yaratilgan |
updated_at | string | Yangilangan |
effective_min_price | integer | |
price_uzs | integer | |
effective_min_price_uzs | integer | |
wholesale_price_uzs | null | |
price_usd | number | |
effective_min_price_usd | integer | |
wholesale_price_usd | null | |
price_eur | number | |
effective_min_price_eur | integer | |
wholesale_price_eur | null | |
price_rub | number | |
effective_min_price_rub | integer | |
wholesale_price_rub | null |
{
"id": 1,
"updater_id": 2,
"company_id": 1,
"product_id": 1,
"source_type": "purchase",
"source_id": 1,
"price": 1100,
"currency": "uzs",
"min_price": 3000,
"min_price_percent": null,
"wholesale_price": null,
"created_at": "2026-11-25 16:42:00",
"updated_at": "2026-11-25 16:47:47",
"effective_min_price": 3000,
"price_uzs": 1100,
"effective_min_price_uzs": 3000,
"wholesale_price_uzs": null,
"price_usd": 1.1,
"effective_min_price_usd": 3,
"wholesale_price_usd": null,
"price_eur": 1.1,
"effective_min_price_eur": 3,
"wholesale_price_eur": null,
"price_rub": 1.1,
"effective_min_price_rub": 3,
"wholesale_price_rub": null
}Narxlar ro‘yxati
Joriy kompaniya tovarlarining sotuv narxlari tovar va uning kategoriyasi bilan. Filtrlar: product_id, currency, product.name, product.barcode, product.category_id (ichki kategoriyalar bilan); id va price bo‘yicha saralash.
/company/product/priceSarlavhalar (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[updater_id] | Yangilovchi — aniq qiymat |
filter[company_id] | Kompaniya — aniq qiymat |
filter[product_id] | Mahsulot — aniq qiymat |
filter[currency] | Valyuta — aniq qiymat |
filter[created_at] | Yaratilgan — davr: [0] — dan, [1] — gacha (Y-m-d) |
filter[product.category_id] | Kategoriya — aniq qiymat (ichki elementlar bilan) |
filter[product.name] | Nomlanish — aniq qiymat |
filter[product.barcode] | Shtrix kod — aniq qiymat |
sort[] | Saralash, - — kamayish bo‘yicha: id, -id, price, -price |
with[] | Bog‘liq ma’lumotlarni qo‘shish: updater.profile, company, product, product.category, product.category.ancestors |
page | Sahifa raqami, 1 dan |
page-size | Sahifadagi yozuvlar soni, ko‘pi bilan 20 |
GET /company/product/price?sort[0]=id&sort[1]=-id&sort[2]=price&sort[3]=-priceJavob · 200
Sahifalangan javob: yozuvlar data[] ichida, sahifalash links va meta da.
Javob maydonlari
| Maydon | Turi | Tavsif |
|---|---|---|
data | object[] | Ma'lumotlar |
data[].id | integer | ID |
data[].updater_id | integer | Yangilovchi |
data[].company_id | integer | Kompaniya |
data[].product_id | integer | Mahsulot |
data[].source_type | string | Manba |
data[].source_id | integer | Manba |
data[].price | integer | Narxi |
data[].currency | string | Valyuta |
data[].min_price | null | |
data[].min_price_percent | null | |
data[].wholesale_price | null | Ulgurji narx |
data[].created_at | string | Yaratilgan |
data[].updated_at | string | Yangilangan |
data[].effective_min_price | integer | |
data[].price_uzs | integer | |
data[].effective_min_price_uzs | integer | |
data[].wholesale_price_uzs | null | |
data[].price_usd | number | |
data[].effective_min_price_usd | integer | |
data[].wholesale_price_usd | null | |
data[].price_eur | number | |
data[].effective_min_price_eur | integer | |
data[].wholesale_price_eur | null | |
data[].price_rub | number | |
data[].effective_min_price_rub | integer | |
data[].wholesale_price_rub | null |
{
"data": [
{
"id": 1,
"updater_id": 2,
"company_id": 1,
"product_id": 1,
"source_type": "purchase",
"source_id": 1,
"price": 1100,
"currency": "uzs",
"min_price": null,
"min_price_percent": null,
"wholesale_price": null,
"created_at": "2026-11-25 16:42:00",
"updated_at": "2026-11-25 16:42:00",
"effective_min_price": 0,
"price_uzs": 1100,
"effective_min_price_uzs": 0,
"wholesale_price_uzs": null,
"price_usd": 1.1,
"effective_min_price_usd": 0,
"wholesale_price_usd": null,
"price_eur": 1.1,
"effective_min_price_eur": 0,
"wholesale_price_eur": null,
"price_rub": 1.1,
"effective_min_price_rub": 0,
"wholesale_price_rub": null
},
{
"id": 2,
"updater_id": 2,
"company_id": 1,
"product_id": 2,
"source_type": "purchase",
"source_id": 1,
"price": 2400,
"currency": "usd",
"min_price": null,
"min_price_percent": null,
"wholesale_price": null,
"created_at": "2026-11-25 16:42:00",
"updated_at": "2026-11-25 16:42:00",
"effective_min_price": 0,
"price_uzs": 2400000,
"effective_min_price_uzs": 0,
"wholesale_price_uzs": null,
"price_usd": 2400,
"effective_min_price_usd": 0,
"wholesale_price_usd": null,
"price_eur": 2400,
"effective_min_price_eur": 0,
"wholesale_price_eur": null,
"price_rub": 2400,
"effective_min_price_rub": 0,
"wholesale_price_rub": null
}
],
"links": {
"first": "https://api.wasyt.uz/company/product/price?page=1",
"last": "https://api.wasyt.uz/company/product/price?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [],
"path": "https://api.wasyt.uz/company/product/price",
"per_page": 20,
"to": 2,
"total": 2
}
}Narxni ko‘rish
Joriy kompaniya tovarining sotuv narxini ID bo‘yicha qaytaradi.
/company/product/price/{model}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 · 200
Javob maydonlari
| Maydon | Turi | Tavsif |
|---|---|---|
id | integer | ID |
updater_id | integer | Yangilovchi |
company_id | integer | Kompaniya |
product_id | integer | Mahsulot |
source_type | string | Manba |
source_id | integer | Manba |
price | integer | Narxi |
currency | string | Valyuta |
min_price | null | |
min_price_percent | null | |
wholesale_price | null | Ulgurji narx |
created_at | string | Yaratilgan |
updated_at | string | Yangilangan |
effective_min_price | integer | |
price_uzs | integer | |
effective_min_price_uzs | integer | |
wholesale_price_uzs | null | |
price_usd | number | |
effective_min_price_usd | integer | |
wholesale_price_usd | null | |
price_eur | number | |
effective_min_price_eur | integer | |
wholesale_price_eur | null | |
price_rub | number | |
effective_min_price_rub | integer | |
wholesale_price_rub | null |
{
"id": 1,
"updater_id": 2,
"company_id": 1,
"product_id": 1,
"source_type": "purchase",
"source_id": 1,
"price": 1100,
"currency": "uzs",
"min_price": null,
"min_price_percent": null,
"wholesale_price": null,
"created_at": "2026-11-25 16:42:00",
"updated_at": "2026-11-25 16:42:00",
"effective_min_price": 0,
"price_uzs": 1100,
"effective_min_price_uzs": 0,
"wholesale_price_uzs": null,
"price_usd": 1.1,
"effective_min_price_usd": 0,
"wholesale_price_usd": null,
"price_eur": 1.1,
"effective_min_price_eur": 0,
"wholesale_price_eur": null,
"price_rub": 1.1,
"effective_min_price_rub": 0,
"wholesale_price_rub": null
}
