Customer category
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 /customer-category/create
This method allows adding customer-category into the account.
So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
name | string | Ha | |
parent_id | string | Yo‘q | |
organization_ids | string[] | Yo‘q | |
image | string | Yo‘q |
{
"name": "string",
"parent_id": "string",
"organization_ids": [
"string"
],
"image": "string"
}Javob
| Maydon | Tur | Tavsif |
|---|---|---|
_id | string | id of customer-category |
name | string | |
child_count | number | |
item_count | number | |
image | string | |
organization_ids | string[] | |
parent | object | |
parent._id | string | |
parent.name | string |
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"_id": "string",
"name": "string",
"child_count": 0,
"item_count": 0,
"image": "string",
"organization_ids": [
"string"
],
"parent": {
"_id": "string",
"name": "string"
}
},
"time": "2025-05-01T12:00:00Z"
}PUT /customer-category/update
This method allows updating customer-category in the account.
So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
name | string | Ha | |
parent_id | string | Yo‘q | |
organization_ids | string[] | Yo‘q | |
image | string | Yo‘q | |
_id | string | Ha | id of customer-category |
{
"name": "string",
"parent_id": "string",
"organization_ids": [
"string"
],
"image": "string",
"_id": "string"
}Javob
Javob tuzilishi quyidagi bilan bir xil: POST /customer-category/create.
DELETE /customer-category/delete/{id}
Delete a customer-category
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 /customer-category/get-by-id/{id}
Get customer-category 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 /customer-category/create.
POST /customer-category/get-paging
Get customer-categories by paging
So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
page | number | Ha | Standart: 1 |
limit | number | Ha | Standart: 20 |
updated_at | string | Yo‘q | |
organization_id | string | Yo‘q | |
organization_ids | string[] | Yo‘q |
{
"page": 1,
"limit": 20,
"updated_at": "string",
"organization_id": "string",
"organization_ids": [
"string"
]
}Javob
data.total — jami yozuvlar soni, data.data[] — joriy sahifadagi yozuvlar. Quyidagi jadval bitta yozuvni tavsiflaydi.
| Maydon | Tur | Tavsif |
|---|---|---|
_id | string | id of customer-category |
name | string | |
child_count | number | |
item_count | number | |
image | string | |
organization_ids | string[] | |
parent | object | |
parent._id | string | |
parent.name | string |
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"total": 0,
"data": [
{
"_id": "string",
"name": "string",
"child_count": 0,
"item_count": 0,
"image": "string",
"organization_ids": [
"string"
],
"parent": {
"_id": "string",
"name": "string"
}
}
]
},
"time": "2025-05-01T12:00:00Z"
}GET /customer-category/get-deleted
Get deleted customer-category 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"
}Bu sahifa OpenAPI spetsifikatsiyasidan yaratilgan.