Lavozimlar
Lavozimlar ma’lumotnomasi, har biri bo‘limga bog‘langan.
| Metod | Manzil | Vazifasi |
|---|---|---|
| GET | /admin/department/position | Lavozimlar ro‘yxati |
| GET | /admin/department/position/{model} | Lavozim kartasi |
| POST | /admin/department/position | Lavozim yaratish |
| PUT | /admin/department/position/{model} | Lavozimni tahrirlash |
| DELETE | /admin/department/position/{model} | Lavozimni o‘chirish |
| DELETE | /admin/department/position/{value}/restore | Lavozimni tiklash |
Lavozimlar ro‘yxati
GET
/admin/department/positionLavozimlarning sahifali ro‘yxati.
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[department_id] | Sanoat — aniq qiymat |
filter[name] | Nomlanish — qator qismi bo‘yicha qidiruv |
sort[] | Saralash, - — kamayish bo‘yicha: id, -id, name, -name |
with[] | Bog‘liq ma’lumotlarni qo‘shish: department |
page | Sahifa raqami, 1 dan |
page-size | Sahifadagi yozuvlar soni, ko‘pi bilan 20 |
http
GET /admin/department/position?sort[0]=id&sort[1]=-id&sort[2]=name&sort[3]=-nameJavob · 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[].department_id | integer | Sanoat |
data[].name | object | Nomlanish |
data[].name.oz | string | |
data[].name.ru | string | |
data[].name.uz | string | |
data[].description | object | Tavsif |
data[].description.oz | string | |
data[].description.ru | string | |
data[].description.uz | string | |
data[].created_at | string | Yaratilgan |
data[].updated_at | string | Yangilangan |
data[].is_deleted | boolean |
json
{
"data": [
{
"id": 1,
"department_id": 1,
"name": {
"oz": "Department 1 oz",
"ru": "Department 1 ru",
"uz": "Department 1 uz"
},
"description": {
"oz": "Description 1 oz",
"ru": "Description 1 ru",
"uz": "Description 1 uz"
},
"created_at": "2026-09-30 12:47:58",
"updated_at": "2026-09-30 12:47:58",
"is_deleted": false
},
{
"id": 2,
"department_id": 1,
"name": {
"oz": "Department 2 oz",
"ru": "Department 2 ru",
"uz": "Department 2 uz"
},
"description": {
"oz": "Description 2 oz",
"ru": "Description 2 ru",
"uz": "Description 2 uz"
},
"created_at": "2026-09-30 12:47:58",
"updated_at": "2026-09-30 12:47:58",
"is_deleted": false
}
],
"links": {
"first": "https://api.wasyt.uz/admin/department/position?page=1",
"last": "https://api.wasyt.uz/admin/department/position?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [],
"path": "https://api.wasyt.uz/admin/department/position",
"per_page": 20,
"to": 2,
"total": 2
}
}Lavozim kartasi
GET
/admin/department/position/{model}Lavozimni ID bo‘yicha qaytaradi.
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 |
department_id | integer | Sanoat |
name | object | Nomlanish |
name.oz | string | |
name.ru | string | |
name.uz | string | |
description | object | Tavsif |
description.oz | string | |
description.ru | string | |
description.uz | string | |
created_at | string | Yaratilgan |
updated_at | string | Yangilangan |
is_deleted | boolean |
json
{
"id": 1,
"department_id": 1,
"name": {
"oz": "Department 1 oz",
"ru": "Department 1 ru",
"uz": "Department 1 uz"
},
"description": {
"oz": "Description 1 oz",
"ru": "Description 1 ru",
"uz": "Description 1 uz"
},
"created_at": "2026-09-30 12:47:58",
"updated_at": "2026-09-30 12:47:58",
"is_deleted": false
}Lavozim yaratish
POST
/admin/department/positiondepartment_id bo‘limida lavozim yaratadi; nom har bir tilda majburiy va noyob.
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 |
|---|---|---|---|
department_id | integer | Ha | Sanoat. Foydalanuvchiga ochiq mavjud yozuv ID si |
name.{lang} | string | Ha | Nomlanish. Maks. 255 belgi. Kompaniyada takrorlanmas qiymat |
description.{lang} | string | Ha (null bo‘lishi mumkin) | Tavsif |
json
{
"department_id": 1,
"name": {
"ru": "Position 3 ru",
"uz": "Position 3 uz",
"oz": "Position 3 oz"
},
"description": {
"ru": "Description 3 ru",
"uz": "Description 3 uz",
"oz": "Description 3 oz"
}
}bash
curl -X POST "https://api.wasyt.uz/admin/department/position" \
-H "Accept: application/json" \
-H "Accept-Language: ru" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"department_id":1,"name":{"ru":"Position 3 ru","uz":"Position 3 uz","oz":"Position 3 oz"},"description":{"ru":"Description 3 ru","uz":"Description 3 uz","oz":"Description 3 oz"}}'Javob · 200
Javob maydonlari
| Maydon | Turi | Tavsif |
|---|---|---|
department_id | integer | Sanoat |
name | object | Nomlanish |
name.ru | string | |
name.uz | string | |
name.oz | string | |
description | object | Tavsif |
description.ru | string | |
description.uz | string | |
description.oz | string | |
updated_at | string | Yangilangan |
created_at | string | Yaratilgan |
id | integer | ID |
is_deleted | boolean |
json
{
"department_id": 1,
"name": {
"ru": "Position 3 ru",
"uz": "Position 3 uz",
"oz": "Position 3 oz"
},
"description": {
"ru": "Description 3 ru",
"uz": "Description 3 uz",
"oz": "Description 3 oz"
},
"updated_at": "2026-09-30 12:49:57",
"created_at": "2026-09-30 12:49:57",
"id": 3,
"is_deleted": false
}Lavozimni tahrirlash
PUT
/admin/department/position/{model}Lavozimning bo‘limi, nomi va tavsifini yangilaydi.
Formadan (
multipart/form-data)PUTmetodiPOST+?_method=PUTparametri 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 |
|---|---|---|---|
department_id | integer | Ha | Sanoat. Foydalanuvchiga ochiq mavjud yozuv ID si |
name.{lang} | string | Ha | Nomlanish. Maks. 255 belgi. Kompaniyada takrorlanmas qiymat |
description.{lang} | string | Ha (null bo‘lishi mumkin) | Tavsif |
json
{
"department_id": 1,
"name": {
"ru": "Position 1 ru",
"uz": "Position 1 uz",
"oz": "Position 1 oz"
},
"description": {
"ru": "Description 1 ru",
"uz": "Description 1 uz",
"oz": "Description 1 oz"
}
}bash
curl -X PUT "https://api.wasyt.uz/admin/department/position/1" \
-H "Accept: application/json" \
-H "Accept-Language: ru" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"department_id":1,"name":{"ru":"Position 1 ru","uz":"Position 1 uz","oz":"Position 1 oz"},"description":{"ru":"Description 1 ru","uz":"Description 1 uz","oz":"Description 1 oz"}}'Javob · 200
Javob maydonlari
| Maydon | Turi | Tavsif |
|---|---|---|
id | integer | ID |
department_id | integer | Sanoat |
name | object | Nomlanish |
name.ru | string | |
name.uz | string | |
name.oz | string | |
description | object | Tavsif |
description.ru | string | |
description.uz | string | |
description.oz | string | |
created_at | string | Yaratilgan |
updated_at | string | Yangilangan |
is_deleted | boolean |
json
{
"id": 1,
"department_id": 1,
"name": {
"ru": "Position 1 ru",
"uz": "Position 1 uz",
"oz": "Position 1 oz"
},
"description": {
"ru": "Description 1 ru",
"uz": "Description 1 uz",
"oz": "Description 1 oz"
},
"created_at": "2026-09-30 12:47:58",
"updated_at": "2026-09-30 12:49:59",
"is_deleted": false
}Lavozimni o‘chirish
DELETE
/admin/department/position/{model}Lavozimni yumshoq o‘chiradi; uni tiklash mumkin.
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 |
Yo‘l parametrlari
| Parametr | Tavsif |
|---|---|
model | Yozuv ID si |
Javob · 200
Javob maydonlari
| Maydon | Turi | Tavsif |
|---|---|---|
message | string | Xabar |
json
{
"message": "Success"
}Lavozimni tiklash
DELETE
/admin/department/position/{value}/restoreO‘chirilgan lavozimni {value} ID si bo‘yicha tiklaydi.
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 |
Yo‘l parametrlari
| Parametr | Tavsif |
|---|---|
value | Yozuv ID si (o‘chirilgani ham) |
Javob · 200
Javob maydonlari
| Maydon | Turi | Tavsif |
|---|---|---|
message | string | Xabar |
json
{
"message": "Success"
}
