Kompaniya tarifi
Kompaniya Wasyt da ishlayaptimi, qachongacha va qancha qarzi bor. Faqat direktor uchun. Filialning o‘z tarifi yo‘q — unga bosh kompaniya tarifi qaytariladi.
Har bir yozuvda: id, value — kompaniya nomi, parent_id, company_uuid va subscription:
status—active,test_mode,debt,awaiting_payment,blocked,canceled;is_active— dastur hozir ishlayaptimi;active_until— yangi to‘lovsiz qachongacha ishlaydi;null— kirish yo‘q yoki muddat cheklanmagan;next_payment_at— keyingi yechib olish sanasi;last_payment_at— tarif oxirgi marta qachon to‘ldirilgan;billing_period—monthlyyokiyearly;balance,debt— tarif balansi va qarz;monthly_total,yearly_total,period_total— filiallar bilan birga tarif narxi.
POST
/external/credit/records/subscriptionSarlavhalar (headers)
| Sarlavha | Qiymat | Tavsif |
|---|---|---|
External-System-Secret-Key | {external_system_secret_key} | Tashqi tizim maxfiy kaliti |
Company-Uuid | {company_uuid} | Kompaniya ICAN yoki Wasyt dagi UUID si bo‘yicha |
Accept | application/json | Javob JSON da |
Accept-Language | ru | Xabarlar va nomlar tili: ru, uz, oz |
So‘rov tanasi
| Maydon | Turi | Majburiy | Tavsif |
|---|---|---|---|
filter[company_uuids] | array | Yo‘q | Faqat shu UUID li (ICAN yoki Wasyt dagi) kompaniyalar; filtrsiz — sarlavhadagi kompaniya va uning filiallari |
filter[id] | integer|array | Yo‘q | Faqat shu ID li yozuvlar |
filter[value] | string | Yo‘q | Nomi (value) qismi bo‘yicha qidiruv |
show[] | string | Yo‘q | with-deleted — o‘chirilgan yozuvlar bilan birga, only-deleted — faqat o‘chirilganlar |
page | integer | Yo‘q | Sahifa raqami, 1 dan |
page-size | integer | Yo‘q | Sahifadagi yozuvlar soni, 20 tadan ko‘p emas |
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[].value | string | Ma'nosi |
data[].parent_id | integer | Ota-ona |
data[].company_uuid | null | Kompaniya |
data[].subscription | object | Tarif |
data[].subscription.status | string | Status |
data[].subscription.is_active | boolean | Aktiv |
data[].subscription.active_until | string | Qachongacha ishlaydi |
data[].subscription.next_payment_at | string | Keyingi yechib olish sanasi |
data[].subscription.last_payment_at | string | Oxirgi to‘lov |
data[].subscription.billing_period | string | To‘lov davri |
data[].subscription.balance | integer | Balans |
data[].subscription.debt | integer | Qarz |
data[].subscription.monthly_total | integer | Oylik narx |
data[].subscription.yearly_total | integer | Yillik narx |
data[].subscription.period_total | integer | Davr narxi |
data[].is_deleted | boolean | O‘chirilgan |
json
{
"data": [
{
"id": 2,
"value": "Company 1-1",
"parent_id": 1,
"company_uuid": null,
"subscription": {
"status": "active",
"is_active": true,
"active_until": "2026-11-01 00:00:00",
"next_payment_at": "2026-11-01",
"last_payment_at": "2026-10-01 09:30:00",
"billing_period": "monthly",
"balance": 0,
"debt": 0,
"monthly_total": 249000,
"yearly_total": 5388000,
"period_total": 249000
},
"is_deleted": false
},
{
"id": 1,
"value": "Company 1",
"parent_id": null,
"company_uuid": "wasyt-company-1",
"subscription": {
"status": "active",
"is_active": true,
"active_until": "2026-11-01 00:00:00",
"next_payment_at": "2026-11-01",
"last_payment_at": "2026-10-01 09:30:00",
"billing_period": "monthly",
"balance": 0,
"debt": 0,
"monthly_total": 249000,
"yearly_total": 5388000,
"period_total": 249000
},
"is_deleted": false
}
],
"links": {
"first": "https://api.wasyt.uz/external/credit/records/subscription?page=1",
"last": "https://api.wasyt.uz/external/credit/records/subscription?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [],
"path": "https://api.wasyt.uz/external/credit/records/subscription",
"per_page": 20,
"to": 2,
"total": 2
}
}
