Units of measure
INFO
Har bir javob umumiy konvertda qaytadi — code, message, messages, status_code, time — foydali yuk esa data ichida. Quyidagi jadvallar faqat data ichini tavsiflaydi.
POST /units-of-measure/create
This method allows adding units-of-measure into the account.
So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
name | string | Ha | |
short_name | string | Yo‘q | |
code | string | Yo‘q | |
status | string | Yo‘q | Mumkin qiymatlar: active, inactive. Standart: "active" |
decimal_count | integer | Ha | Standart: 0 |
type | string | Ha | Mumkin qiymatlar: inventory, service |
{
"name": "string",
"short_name": "string",
"code": "string",
"status": "active",
"decimal_count": 0,
"type": "inventory"
}Javob
| Maydon | Tur | Tavsif |
|---|---|---|
_id | string | |
name | string | |
code | string | |
short_name | string | |
status | string | Mumkin qiymatlar: active, inactive |
system_code | string | |
decimal_count | integer | Standart: 0 |
type | string | Mumkin qiymatlar: inventory, service |
is_default | boolean | |
created_at | string (date-time) | |
updated_at | string (date-time) |
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"_id": "string",
"name": "string",
"code": "string",
"short_name": "string",
"status": "active",
"system_code": "string",
"decimal_count": 0,
"type": "inventory",
"is_default": false,
"created_at": "2025-05-01T12:00:00Z",
"updated_at": "2025-05-01T12:00:00Z"
},
"time": "2025-05-01T12:00:00Z"
}PUT /units-of-measure/update
This method allows updating units-of-measure in the account.
So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
_id | string | Ha | |
name | string | Ha | |
short_name | string | Yo‘q | |
code | string | Yo‘q | |
status | string | Yo‘q | Mumkin qiymatlar: active, inactive. Standart: "active" |
decimal_count | integer | Ha | Standart: 0 |
type | string | Yo‘q | Mumkin qiymatlar: inventory, service |
{
"_id": "67b486d242ed76693cd2cc59",
"name": "string",
"short_name": "string",
"code": "string",
"status": "active",
"decimal_count": 0,
"type": "inventory"
}Javob
Javob tuzilishi quyidagi bilan bir xil: POST /units-of-measure/create.
DELETE /units-of-measure/delete/{id}
Delete a units-of-measure
Yo‘l parametrlari
| Parametr | Tur | Majburiy | Tavsif |
|---|---|---|---|
id | string | Ha |
So‘rov tanasi
So‘rov tanasi talab qilinmaydi.
Javob
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": "ok",
"time": "2025-05-01T12:00:00Z"
}GET /units-of-measure/get-all
Get all units-of-measures
So‘rov parametrlari
| Parametr | Tur | Majburiy | Tavsif |
|---|---|---|---|
search | string | Yo‘q | Search units-of-measure |
type | string | Yo‘q | Mumkin qiymatlar: inventory, service |
status | string | Yo‘q | Mumkin qiymatlar: active, inactive |
So‘rov tanasi
So‘rov tanasi talab qilinmaydi.
Javob
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": [
{
"_id": "string",
"name": "string",
"code": "string",
"short_name": "string",
"status": "active",
"system_code": "string",
"decimal_count": 0,
"type": "inventory",
"is_default": false,
"created_at": "2025-05-01T12:00:00Z",
"updated_at": "2025-05-01T12:00:00Z"
}
],
"time": "2025-05-01T12:00:00Z"
}GET /units-of-measure/get-by-id/{id}
Get units-of-measure using its _id
Yo‘l parametrlari
| Parametr | Tur | Majburiy | Tavsif |
|---|---|---|---|
id | string | Ha |
So‘rov tanasi
So‘rov tanasi talab qilinmaydi.
Javob
Javob tuzilishi quyidagi bilan bir xil: POST /units-of-measure/create.
GET /units-of-measure/get-deleted
Get deleted units-of-measure ids
So‘rov parametrlari
| Parametr | Tur | Majburiy | Tavsif |
|---|---|---|---|
deleted_at | string | Ha |
So‘rov tanasi
So‘rov tanasi talab qilinmaydi.
Javob
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": [
"string"
],
"time": "2025-05-01T12:00:00Z"
}POST /units-of-measure/get-paging
Get units-of-measure by paging
So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
page | number | Ha | Standart: 1 |
limit | number | Ha | Standart: 20 |
search | string | Yo‘q | |
type | string | Yo‘q | Mumkin qiymatlar: inventory, service |
status | string | Yo‘q | Mumkin qiymatlar: active, inactive |
{
"page": 1,
"limit": 20,
"search": "string",
"type": "inventory",
"status": "active"
}Javob
data.total — jami yozuvlar soni, data.data[] — joriy sahifadagi yozuvlar. Quyidagi jadval bitta yozuvni tavsiflaydi.
| Maydon | Tur | Tavsif |
|---|---|---|
name | string | |
code | string | |
short_name | string | |
status | string | Mumkin qiymatlar: active, inactive |
system_code | string | |
decimal_count | integer | Standart: 0 |
type | string | Mumkin qiymatlar: inventory, service |
updated_by_user | object | |
updated_by_user._id | string | |
updated_by_user.full_name | string | |
created_by_user | object | |
created_by_user._id | string | |
created_by_user.full_name | string | |
created_at | string (date-time) | |
updated_at | string (date-time) | |
is_default | boolean |
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"total": 0,
"data": [
{
"name": "string",
"code": "string",
"short_name": "string",
"status": "active",
"system_code": "string",
"decimal_count": 0,
"type": "inventory",
"updated_by_user": {
"_id": "string",
"full_name": "string"
},
"created_by_user": {
"_id": "string",
"full_name": "string"
},
"created_at": "2025-05-01T12:00:00Z",
"updated_at": "2025-05-01T12:00:00Z",
"is_default": false
}
]
},
"time": "2025-05-01T12:00:00Z"
}Bu sahifa OpenAPI spetsifikatsiyasidan yaratilgan.