Cashback settings
INFO
Every response arrives in the shared envelope — code, message, messages, status_code, time — with the payload in data. The tables below describe what is inside data.
POST /cashback-setting/create
This method allows adding cashback-settings into the account.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | One of: by_amount, all. Default: "by_amount" |
is_active | boolean | Yes | Default: true |
organization_id | string | Yes | |
organization_ids | string[] | No | |
cashbacks | object[] | Yes | |
cashbacks[].cashback_type | string | Yes | One of: percent, cash. Default: "percent" |
cashbacks[].min_amount | number | No | |
cashbacks[].amount | number | Yes | |
cashbacks[].percent | number | Yes | |
cashbacks[].currency_id | string | Yes |
{
"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"
}
]
}Response
| Field | Type | Description |
|---|---|---|
type | string | One of: all, by_amount |
is_active | boolean | Default: false |
organization_id | string | |
cashbacks | object[] | |
cashbacks[].cashback_type | string | One of: 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.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
_id | string | Yes | |
type | string | Yes | One of: by_amount, all. Default: "by_amount" |
is_active | boolean | Yes | Default: true |
organization_id | string | Yes | |
organization_ids | string[] | No | |
cashbacks | object[] | Yes | |
cashbacks[].cashback_type | string | Yes | One of: percent, cash. Default: "percent" |
cashbacks[].min_amount | number | No | |
cashbacks[].amount | number | Yes | |
cashbacks[].percent | number | Yes | |
cashbacks[].currency_id | string | Yes |
{
"_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"
}
]
}Response
Same response shape as POST /cashback-setting/create.
DELETE /cashback-setting/delete/{id}
Delete a cashback-settings
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
Request body
No request body.
Response
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": "ok",
"time": "2025-05-01T12:00:00Z"
}GET /cashback-setting/get-all
Get all cashback-settings
Request body
No request body.
Response
{
"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
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
Request body
No request body.
Response
Same response shape as POST /cashback-setting/create.
GET /cashback-setting/get-deleted
Get deleted cashback-settings ids
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
deleted_at | string | Yes |
Request body
No request body.
Response
{
"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
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | string | Yes | organization_id |
Request body
No request body.
Response
Same response shape as POST /cashback-setting/create.
This page is generated from the OpenAPI spec.