Payment type
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 /payment-type/create
This method allows adding payment-type into the account.
So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
name | string | Ha | |
parent_id | string | Yo‘q | |
transaction_type | string | Yo‘q | Mumkin qiymatlar: income, expense, transfer, exchange, nothing, exchange_method. Standart: "income" |
user_type | string | Yo‘q | Mumkin qiymatlar: supplier, employee, customer, person, other. Standart: "supplier" |
can_be_canceled | boolean | Yo‘q | Standart: false |
{
"name": "string",
"parent_id": "67b486d242ed76693cd2cc59",
"transaction_type": "income",
"user_type": "supplier",
"can_be_canceled": false
}Javob
| Maydon | Tur | Tavsif |
|---|---|---|
_id | string | |
name | string | |
short_cut | string | |
type | string | Mumkin qiymatlar: cash, card, debt, gift, transfer, terminal, by_balance, by_cashback |
is_enabled | boolean | Standart: true |
is_default | boolean | Standart: false |
is_visible | boolean | Standart: false |
created_at | string (date-time) | |
updated_at | string (date-time) |
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"_id": "string",
"name": "string",
"short_cut": "string",
"type": "cash",
"is_enabled": true,
"is_default": false,
"is_visible": false,
"created_at": "2025-05-01T12:00:00Z",
"updated_at": "2025-05-01T12:00:00Z"
},
"time": "2025-05-01T12:00:00Z"
}PUT /payment-type/update
This method allows updating payment-type in the account.
So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
_id | string | Ha | |
name | string | Ha | |
parent_id | string | Yo‘q | |
transaction_type | string | Yo‘q | Mumkin qiymatlar: income, expense, transfer, exchange, nothing, exchange_method. Standart: "income" |
user_type | string | Yo‘q | Mumkin qiymatlar: supplier, employee, customer, person, other. Standart: "supplier" |
can_be_canceled | boolean | Yo‘q | Standart: false |
{
"_id": "67b486d242ed76693cd2cc59",
"name": "string",
"parent_id": "67b486d242ed76693cd2cc59",
"transaction_type": "income",
"user_type": "supplier",
"can_be_canceled": false
}Javob
Javob tuzilishi quyidagi bilan bir xil: POST /payment-type/create.
DELETE /payment-type/delete/{id}
Delete a payment-type
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"
}POST /payment-type/get-all
Get all payment-types
So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
transaction_type | string | Yo‘q | Mumkin qiymatlar: income, expense, transfer, exchange, nothing, exchange_method |
user_type | string | Yo‘q | Mumkin qiymatlar: supplier, employee, customer, person, other |
is_visible | boolean | Yo‘q | Standart: false |
is_active | boolean | Yo‘q | Standart: true |
search | string | Yo‘q |
{
"transaction_type": "income",
"user_type": "supplier",
"is_visible": false,
"is_active": true,
"search": "string"
}Javob
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": [
{
"_id": "string",
"name": "string",
"short_cut": "string",
"type": "cash",
"is_enabled": true,
"is_default": false,
"is_visible": false,
"created_at": "2025-05-01T12:00:00Z",
"updated_at": "2025-05-01T12:00:00Z"
}
],
"time": "2025-05-01T12:00:00Z"
}GET /payment-type/get-by-id/{id}
Get payment-type 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 /payment-type/create.
GET /payment-type/get-deleted
Get deleted payment-type 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"
}PUT /payment-type/set-state
This method allows setActive payment-type in the account.
So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
is_active | boolean | Ha | Standart: true |
_id | string | Ha |
{
"is_active": true,
"_id": "67b486d242ed76693cd2cc59"
}Javob
Javob tuzilishi quyidagi bilan bir xil: POST /payment-type/create.
Bu sahifa OpenAPI spetsifikatsiyasidan yaratilgan.