Currency
INFO
Каждый ответ приходит в общем конверте — code, message, messages, status_code, time — а полезная нагрузка лежит в data. Таблицы ниже описывают содержимое data.
GET /currency/get-all
Get all currencies
Тело запроса
Тело запроса не требуется.
Ответ
json
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": [
{
"completely_deleted": false,
"code": "string",
"created_at": "2025-05-01T12:00:00Z",
"is_deleted": false,
"is_main": false,
"name": "string",
"side": "start",
"symbol": "string",
"updated_at": "2025-05-01T12:00:00Z",
"values": {
"to_currency_id": "string",
"value": 0,
"name": "string",
"numerator": 0,
"denominator": 0
}
}
],
"time": "2025-05-01T12:00:00Z"
}GET /currency/get-main
Get the main (default) currency of the tenant.
Тело запроса
Тело запроса не требуется.
Ответ
| Поле | Тип | Описание |
|---|---|---|
completely_deleted | boolean | |
code | string | |
created_at | string (date-time) | |
is_deleted | boolean | |
is_main | boolean | |
name | string | |
side | string | Допустимые значения: start, end |
symbol | string | |
updated_at | string (date-time) | |
values | object | |
values.to_currency_id | string | |
values.value | number | |
values.name | string | |
values.numerator | number | |
values.denominator | number |
json
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"completely_deleted": false,
"code": "string",
"created_at": "2025-05-01T12:00:00Z",
"is_deleted": false,
"is_main": false,
"name": "string",
"side": "start",
"symbol": "string",
"updated_at": "2025-05-01T12:00:00Z",
"values": {
"to_currency_id": "string",
"value": 0,
"name": "string",
"numerator": 0,
"denominator": 0
}
},
"time": "2025-05-01T12:00:00Z"
}GET /currency/get-by-id/{id}
Get a currency by its _id.
Параметры пути
| Параметр | Тип | Обязательно | Описание |
|---|---|---|---|
id | string | Да |
Тело запроса
Тело запроса не требуется.
Ответ
Структура ответа совпадает с GET /currency/get-main.
GET /currency/get-to-local
Get the conversion rate from a source currency to the local (main) currency.
Параметры запроса
| Параметр | Тип | Обязательно | Описание |
|---|---|---|---|
currency_id | string | Да | |
amount | number | Нет |
Тело запроса
Тело запроса не требуется.
Ответ
| Поле | Тип | Описание |
|---|---|---|
from_currency_id | string | |
to_currency_id | string | |
rate | number | |
converted_amount | number |
json
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"from_currency_id": "string",
"to_currency_id": "string",
"rate": 0,
"converted_amount": 0
},
"time": "2025-05-01T12:00:00Z"
}Эта страница сгенерирована из спецификации OpenAPI.