Hisobdan chiqarilgan tovarlar
Hisobdan chiqarish hujjatlari qatorlari: tovar, miqdor, sabab va izoh.
| Metod | Manzil | Vazifasi |
|---|---|---|
| GET | /company/trade/writeoff-product | Hisobdan chiqarilgan tovarlar ro‘yxati |
| GET | /company/trade/writeoff-product/{model} | Hisobdan chiqarish qatori |
Hisobdan chiqarilgan tovarlar ro‘yxati
GET
/company/trade/writeoff-productHisobdan chiqarish qatorlari sahifalab va filtrlar bilan; format=excel bilan — Excel’ga eksport.
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 |
|---|---|---|---|
format | string | Yo‘q | Javob formati: excel — ro‘yxatni JSON o‘rniga Excel fayl sifatida yuklab olish (xuddi shu filtrlar qo‘llanadi) |
filter[id] | — | Yo‘q | ID — aniq qiymat |
filter[writeoff_id] | — | Yo‘q | aniq qiymat |
filter[product_id] | — | Yo‘q | Mahsulot — aniq qiymat |
filter[reason] | — | Yo‘q | Sabab — 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 |
with[] | — | Yo‘q | Bog‘liq ma’lumotlarni qo‘shish: writeoff, product, product.unit, product.category.ancestors |
page | — | Yo‘q | Sahifa raqami, 1 dan |
page-size | — | Yo‘q | Sahifadagi yozuvlar soni, ko‘pi bilan 20 |
Javob · 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[].company_id | integer | Kompaniya |
data[].writeoff_id | integer | |
data[].product_id | integer | Mahsulot |
data[].stock_product_id | integer | |
data[].quantity | integer | Miqdori |
data[].reason | string | Sabab |
data[].comment | string | Izoh |
data[].stock_product_source_data | object | |
data[].stock_product_source_data.source_type | string | Manba |
data[].stock_product_source_data.source_id | integer | Manba |
data[].stock_product_source_data.source_product_id | integer | |
data[].stock_product_source_data.quantity | integer | Miqdori |
data[].stock_product_source_data.purchase_price | integer | Sotib olish narxi |
data[].stock_product_source_data.purchase_currency | string | Sotib olayotganda valyuta |
data[].stock_product_source_data.created_at | string | Yaratilgan |
data[].created_at | string | Yaratilgan |
data[].updated_at | string | Yangilangan |
json
{
"data": [
{
"id": 1,
"company_id": 1,
"writeoff_id": 1,
"product_id": 1,
"stock_product_id": 1,
"quantity": 1,
"reason": "stock_damage",
"comment": "Comment 1",
"stock_product_source_data": {
"source_type": "purchase",
"source_id": 1,
"source_product_id": 1,
"quantity": 1,
"purchase_price": 1000,
"purchase_currency": "uzs",
"created_at": "2026-09-30 12:47:59"
},
"created_at": "2026-09-30 12:47:59",
"updated_at": "2026-09-30 12:47:59"
}
],
"links": {
"first": "https://api.wasyt.uz/company/trade/writeoff-product?page=1",
"last": "https://api.wasyt.uz/company/trade/writeoff-product?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [],
"path": "https://api.wasyt.uz/company/trade/writeoff-product",
"per_page": 20,
"to": 1,
"total": 1
}
}Hisobdan chiqarish qatori
GET
/company/trade/writeoff-product/{model}Hisobdan chiqarishning bitta qatori: tovar, miqdor, sabab va izoh.
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 |
company_id | integer | Kompaniya |
writeoff_id | integer | |
product_id | integer | Mahsulot |
stock_product_id | integer | |
quantity | integer | Miqdori |
reason | string | Sabab |
comment | string | Izoh |
stock_product_source_data | object | |
stock_product_source_data.source_type | string | Manba |
stock_product_source_data.source_id | integer | Manba |
stock_product_source_data.source_product_id | integer | |
stock_product_source_data.quantity | integer | Miqdori |
stock_product_source_data.purchase_price | integer | Sotib olish narxi |
stock_product_source_data.purchase_currency | string | Sotib olayotganda valyuta |
stock_product_source_data.created_at | string | Yaratilgan |
created_at | string | Yaratilgan |
updated_at | string | Yangilangan |
json
{
"id": 1,
"company_id": 1,
"writeoff_id": 1,
"product_id": 1,
"stock_product_id": 1,
"quantity": 1,
"reason": "stock_damage",
"comment": "Comment 1",
"stock_product_source_data": {
"source_type": "purchase",
"source_id": 1,
"source_product_id": 1,
"quantity": 1,
"purchase_price": 1000,
"purchase_currency": "uzs",
"created_at": "2026-09-30 12:47:59"
},
"created_at": "2026-09-30 12:47:59",
"updated_at": "2026-09-30 12:47:59"
}
