Cashback settings
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 /cashback-setting/create
This method allows adding cashback-settings into the account.
So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
type | string | Ha | Mumkin qiymatlar: by_amount, all. Standart: "by_amount" |
is_active | boolean | Ha | Standart: true |
organization_id | string | Ha | |
organization_ids | string[] | Yo‘q | |
cashbacks | object[] | Ha | |
cashbacks[].cashback_type | string | Ha | Mumkin qiymatlar: percent, cash. Standart: "percent" |
cashbacks[].min_amount | number | Yo‘q | |
cashbacks[].amount | number | Ha | |
cashbacks[].percent | number | Ha | |
cashbacks[].currency_id | string | Ha |
{
"type": "by_amount",
"is_active": true,
"organization_id": "67b486d242ed76693cd2cc59",
"organization_ids": [
"63f8b0c4e4b0d3a2f8e4b0c4"
],
"cashbacks": [
{
"cashback_type": "percent",
"min_amount": 0,
"amount": 0,
"percent": 0,
"currency_id": "67b486d242ed76693cd2cc59"
}
]
}Javob
| Maydon | Tur | Tavsif |
|---|---|---|
type | string | Mumkin qiymatlar: all, by_amount |
is_active | boolean | Standart: false |
organization_id | string | |
cashbacks | object[] | |
cashbacks[].cashback_type | string | Mumkin qiymatlar: percent, cash |
cashbacks[].min_amount | number | |
cashbacks[].amount | number | |
cashbacks[].percent | number | |
cashbacks[].currency_id | string |
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"type": "all",
"is_active": false,
"organization_id": "string",
"cashbacks": [
{
"cashback_type": "percent",
"min_amount": 0,
"amount": 0,
"percent": 0,
"currency_id": "67b486d242ed76693cd2cc59"
}
]
},
"time": "2025-05-01T12:00:00Z"
}PUT /cashback-setting/update
This method allows updating cashback-settings in the account.
So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
_id | string | Ha | |
type | string | Ha | Mumkin qiymatlar: by_amount, all. Standart: "by_amount" |
is_active | boolean | Ha | Standart: true |
organization_id | string | Ha | |
organization_ids | string[] | Yo‘q | |
cashbacks | object[] | Ha | |
cashbacks[].cashback_type | string | Ha | Mumkin qiymatlar: percent, cash. Standart: "percent" |
cashbacks[].min_amount | number | Yo‘q | |
cashbacks[].amount | number | Ha | |
cashbacks[].percent | number | Ha | |
cashbacks[].currency_id | string | Ha |
{
"_id": "63f8b0c4e4b0d3a2f8e4b0c4",
"type": "by_amount",
"is_active": true,
"organization_id": "67b486d242ed76693cd2cc59",
"organization_ids": [
"63f8b0c4e4b0d3a2f8e4b0c4"
],
"cashbacks": [
{
"cashback_type": "percent",
"min_amount": 0,
"amount": 0,
"percent": 0,
"currency_id": "67b486d242ed76693cd2cc59"
}
]
}Javob
Javob tuzilishi quyidagi bilan bir xil: POST /cashback-setting/create.
DELETE /cashback-setting/delete/{id}
Delete a cashback-settings
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 /cashback-setting/get-all
Get all cashback-settings
So‘rov tanasi
So‘rov tanasi talab qilinmaydi.
Javob
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": [
{
"type": "all",
"is_active": false,
"organization_id": "string",
"cashbacks": [
{
"cashback_type": null,
"min_amount": null,
"amount": null,
"percent": null,
"currency_id": null
}
]
}
],
"time": "2025-05-01T12:00:00Z"
}GET /cashback-setting/get-by-id/{id}
Get cashback-settings 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 /cashback-setting/create.
GET /cashback-setting/get-deleted
Get deleted cashback-settings 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"
}GET /cashback-setting/get-by-organization_id/{organization_id}
Get cashback-settings using organization_id
Yo‘l parametrlari
| Parametr | Tur | Majburiy | Tavsif |
|---|---|---|---|
organization_id | string | Ha | organization_id |
So‘rov tanasi
So‘rov tanasi talab qilinmaydi.
Javob
Javob tuzilishi quyidagi bilan bir xil: POST /cashback-setting/create.
Bu sahifa OpenAPI spetsifikatsiyasidan yaratilgan.