Files
online-backend/docs/swagger.json
GuwandykA 11e1fa4972
Some checks failed
CI/CD / Vet, test, build (push) Has been cancelled
CI/CD / Docker image (push) Has been cancelled
CI/CD / Deploy binary to server (push) Has been cancelled
visamaster: record order actions for the "Ammallar" table
Every create, update and delete of a visa/master or sber order is now
recorded in visa_master_order_actions: who did it, finished or failed
(with the exception), and for an update only the columns that changed -
original before, changes after. Marking an order paid when a payment is
finalized is recorded the same way, with no user when the GBÜS callback
did it.

Actions are written in the transaction that changes the order, so one is
on record exactly when its change is; failed ones are written after the
rollback with the values they attempted. The payment finalize records
after its commit instead, so recording never holds up a payment GBÜS has
already taken. Updates that change nothing and creates that fail (no
order to attach to) are not recorded.

GET /visa-master-payment-orders/{id}/actions lists them, newest first;
GET /visa-master-payment-orders/{id}/actions/{actionId} adds original,
changes and exception. Both are staff-only and order-scoped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 22:39:42 +05:00

13419 lines
463 KiB
JSON

{
"schemes": [
"http"
],
"swagger": "2.0",
"info": {
"description": "Online payment system admin API. Localized fields ({en, ru, tm} objects) come back as a plain string in the language of the `lang` query parameter: tm, ru or en (default tm), falling back to tm, ru, en when that translation is empty. lang=all returns the full {en, ru, tm} objects (for edit forms); any other value is 400.",
"title": "Service APIs",
"contact": {},
"version": "1.0"
},
"host": "localhost:5005",
"basePath": "/api/admin",
"paths": {
"/activity-logs": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a paginated audit trail of user actions (create/update/delete). Each log includes the actor's username and role code.",
"produces": [
"application/json"
],
"tags": [
"activity-logs"
],
"summary": "List activity logs",
"parameters": [
{
"type": "integer",
"description": "Filter by user ID",
"name": "user_id",
"in": "query"
},
{
"type": "string",
"description": "Filter by module (e.g. cards, branch-users)",
"name": "module",
"in": "query"
},
{
"type": "string",
"description": "Filter by action (create, update, delete)",
"name": "action",
"in": "query"
},
{
"type": "integer",
"default": 1,
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Items per page",
"name": "limit",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/activity-logs/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a single activity log entry",
"produces": [
"application/json"
],
"tags": [
"activity-logs"
],
"summary": "Get activity log by ID",
"parameters": [
{
"type": "integer",
"description": "Activity log ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/backups": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns paginated SQL backup files",
"produces": [
"application/json"
],
"tags": [
"backups"
],
"summary": "List backups",
"parameters": [
{
"type": "string",
"description": "Filter by file name",
"name": "search",
"in": "query"
},
{
"type": "string",
"description": "Filter by status (pending, completed, failed)",
"name": "status",
"in": "query"
},
{
"type": "integer",
"default": 1,
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Items per page",
"name": "limit",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Runs pg_dump and stores the resulting .sql file",
"produces": [
"application/json"
],
"tags": [
"backups"
],
"summary": "Create SQL backup",
"parameters": [
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/backups/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a single backup record",
"produces": [
"application/json"
],
"tags": [
"backups"
],
"summary": "Get backup by ID",
"parameters": [
{
"type": "integer",
"description": "Backup ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Deletes a backup record and its SQL file",
"produces": [
"application/json"
],
"tags": [
"backups"
],
"summary": "Delete backup",
"parameters": [
{
"type": "integer",
"description": "Backup ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/backups/{id}/download": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Downloads the .sql dump for a completed backup",
"produces": [
"application/sql"
],
"tags": [
"backups"
],
"summary": "Download backup SQL file",
"parameters": [
{
"type": "integer",
"description": "Backup ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "file"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/branch-users": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Assigns a user to a branch. Users and branches are many-to-many: a user keeps their other branch assignments, and re-assigning the same pair is a no-op.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"branch-users"
],
"summary": "Assign user to branch",
"parameters": [
{
"description": "Branch-user payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/userbranch.CreateUserBranchDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/branch-users/{id}": {
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Deletes a branch-user assignment",
"produces": [
"application/json"
],
"tags": [
"branch-users"
],
"summary": "Remove user from branch",
"parameters": [
{
"type": "integer",
"description": "Branch-user ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/branches": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns paginated branches with optional filters",
"produces": [
"application/json"
],
"tags": [
"branches"
],
"summary": "List branches",
"parameters": [
{
"type": "integer",
"description": "Filter by province ID",
"name": "province_id",
"in": "query"
},
{
"type": "string",
"description": "Filter by province name (en, ru, tm)",
"name": "province_name",
"in": "query"
},
{
"type": "string",
"description": "Filter by branch name (en, ru, tm)",
"name": "branch_name",
"in": "query"
},
{
"type": "string",
"description": "Filter by unique code",
"name": "unique_code",
"in": "query"
},
{
"type": "integer",
"default": 1,
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Items per page",
"name": "limit",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Creates a new branch",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"branches"
],
"summary": "Create branch",
"parameters": [
{
"description": "Branch payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/branches.CreateBranchDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/branches/etraps": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns provinces (etraps) for the selected region; pick id as provinceId",
"produces": [
"application/json"
],
"tags": [
"branches"
],
"summary": "List etraps by region for branch create",
"parameters": [
{
"type": "string",
"description": "Region name (en, ru or tm)",
"name": "region",
"in": "query",
"required": true
},
{
"type": "boolean",
"default": true,
"description": "Only active etraps",
"name": "active",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/branches/regions": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns distinct regions from provinces (use before selecting etrap/provinceId)",
"produces": [
"application/json"
],
"tags": [
"branches"
],
"summary": "List regions for branch create",
"parameters": [
{
"type": "boolean",
"default": true,
"description": "Only active provinces",
"name": "active",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/branches/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a single branch",
"produces": [
"application/json"
],
"tags": [
"branches"
],
"summary": "Get branch by ID",
"parameters": [
{
"type": "integer",
"description": "Branch ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Updates an existing branch",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"branches"
],
"summary": "Update branch",
"parameters": [
{
"type": "integer",
"description": "Branch ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Branch payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/branches.UpdateBranchDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Deletes a branch",
"produces": [
"application/json"
],
"tags": [
"branches"
],
"summary": "Delete branch",
"parameters": [
{
"type": "integer",
"description": "Branch ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/card-balances": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns paginated card balance checks with optional filters",
"produces": [
"application/json"
],
"tags": [
"card-balances"
],
"summary": "List card balances",
"parameters": [
{
"type": "string",
"description": "Filter by status",
"name": "status",
"in": "query"
},
{
"type": "string",
"description": "Filter by passport number",
"name": "passport_number",
"in": "query"
},
{
"type": "integer",
"description": "Filter by creator user ID",
"name": "created_by",
"in": "query"
},
{
"type": "integer",
"default": 1,
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Items per page",
"name": "limit",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Creates a new card balance check record",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"card-balances"
],
"summary": "Create card balance",
"parameters": [
{
"description": "Card balance payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/cardbalance.CreateCardBalanceDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/card-balances/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a single card balance check",
"produces": [
"application/json"
],
"tags": [
"card-balances"
],
"summary": "Get card balance by ID",
"parameters": [
{
"type": "integer",
"description": "Card balance ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Updates an existing card balance check record",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"card-balances"
],
"summary": "Update card balance",
"parameters": [
{
"type": "integer",
"description": "Card balance ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Card balance payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/cardbalance.UpdateCardBalanceDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Soft-deletes a card balance check record",
"produces": [
"application/json"
],
"tags": [
"card-balances"
],
"summary": "Delete card balance",
"parameters": [
{
"type": "integer",
"description": "Card balance ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/card-orders": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns paginated card orders with optional filters",
"produces": [
"application/json"
],
"tags": [
"card-orders"
],
"summary": "List card orders",
"parameters": [
{
"type": "string",
"description": "Filter by status",
"name": "status",
"in": "query"
},
{
"type": "integer",
"description": "Filter by branch ID",
"name": "branch_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by user ID",
"name": "user_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by card state ID",
"name": "card_state_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by card type ID",
"name": "card_type_id",
"in": "query"
},
{
"type": "string",
"description": "Filter by region",
"name": "region",
"in": "query"
},
{
"type": "integer",
"default": 1,
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Items per page",
"name": "limit",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Creates a new card order",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"card-orders"
],
"summary": "Create card order",
"parameters": [
{
"description": "Card order payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/cardorder.CreateCardOrderDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/card-orders/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a single card order",
"produces": [
"application/json"
],
"tags": [
"card-orders"
],
"summary": "Get card order by ID",
"parameters": [
{
"type": "integer",
"description": "Card order ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Updates an existing card order",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"card-orders"
],
"summary": "Update card order",
"parameters": [
{
"type": "integer",
"description": "Card order ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Card order payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/cardorder.UpdateCardOrderDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Deletes a card order",
"produces": [
"application/json"
],
"tags": [
"card-orders"
],
"summary": "Delete card order",
"parameters": [
{
"type": "integer",
"description": "Card order ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/card-pin-orders": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns paginated card pin orders with optional filters",
"produces": [
"application/json"
],
"tags": [
"card-pin-orders"
],
"summary": "List card pin orders",
"parameters": [
{
"type": "string",
"description": "Filter by status",
"name": "status",
"in": "query"
},
{
"type": "integer",
"description": "Filter by branch ID",
"name": "branch_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by user ID",
"name": "user_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by card type ID",
"name": "card_type_id",
"in": "query"
},
{
"type": "string",
"description": "Filter by region",
"name": "region",
"in": "query"
},
{
"type": "integer",
"default": 1,
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Items per page",
"name": "limit",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Creates a new card pin order",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"card-pin-orders"
],
"summary": "Create card pin order",
"parameters": [
{
"description": "Card pin order payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/cardpinorders.CreateCardPinOrderDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/card-pin-orders/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a single card pin order",
"produces": [
"application/json"
],
"tags": [
"card-pin-orders"
],
"summary": "Get card pin order by ID",
"parameters": [
{
"type": "integer",
"description": "Card pin order ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Updates an existing card pin order",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"card-pin-orders"
],
"summary": "Update card pin order",
"parameters": [
{
"type": "integer",
"description": "Card pin order ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Card pin order payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/cardpinorders.UpdateCardPinOrderDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Deletes a card pin order",
"produces": [
"application/json"
],
"tags": [
"card-pin-orders"
],
"summary": "Delete card pin order",
"parameters": [
{
"type": "integer",
"description": "Card pin order ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/card-rekwizit-orders": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns paginated card rekwizit (card details) orders with optional filters",
"produces": [
"application/json"
],
"tags": [
"card-rekwizit-orders"
],
"summary": "List card rekwizit orders",
"parameters": [
{
"type": "string",
"description": "Filter by status",
"name": "status",
"in": "query"
},
{
"type": "integer",
"description": "Filter by branch ID",
"name": "branch_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by user ID",
"name": "user_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by card type ID",
"name": "card_type_id",
"in": "query"
},
{
"type": "string",
"description": "Filter by region",
"name": "region",
"in": "query"
},
{
"type": "integer",
"default": 1,
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Items per page",
"name": "limit",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Creates a new card rekwizit (card details) order",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"card-rekwizit-orders"
],
"summary": "Create card rekwizit order",
"parameters": [
{
"description": "Card rekwizit order payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/cardrekwizit.CreateCardRekwizitOrderDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/card-rekwizit-orders/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a single card rekwizit order",
"produces": [
"application/json"
],
"tags": [
"card-rekwizit-orders"
],
"summary": "Get card rekwizit order by ID",
"parameters": [
{
"type": "integer",
"description": "Card rekwizit order ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Updates an existing card rekwizit order",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"card-rekwizit-orders"
],
"summary": "Update card rekwizit order",
"parameters": [
{
"type": "integer",
"description": "Card rekwizit order ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Card rekwizit order payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/cardrekwizit.UpdateCardRekwizitOrderDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Deletes a card rekwizit order",
"produces": [
"application/json"
],
"tags": [
"card-rekwizit-orders"
],
"summary": "Delete card rekwizit order",
"parameters": [
{
"type": "integer",
"description": "Card rekwizit order ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/cards": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns paginated cards with optional filters",
"produces": [
"application/json"
],
"tags": [
"cards"
],
"summary": "List cards",
"parameters": [
{
"type": "integer",
"description": "Filter by user ID",
"name": "user_id",
"in": "query"
},
{
"type": "string",
"description": "Filter by card type",
"name": "type",
"in": "query"
},
{
"type": "integer",
"default": 1,
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Items per page",
"name": "limit",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Creates a new card",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"cards"
],
"summary": "Create card",
"parameters": [
{
"description": "Card payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/cards.CreateCardDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/cards/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a single card",
"produces": [
"application/json"
],
"tags": [
"cards"
],
"summary": "Get card by ID",
"parameters": [
{
"type": "integer",
"description": "Card ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Updates an existing card",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"cards"
],
"summary": "Update card",
"parameters": [
{
"type": "integer",
"description": "Card ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Card payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/cards.UpdateCardDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Deletes a card",
"produces": [
"application/json"
],
"tags": [
"cards"
],
"summary": "Delete card",
"parameters": [
{
"type": "integer",
"description": "Card ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/currencies": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns paginated currency exchange rates",
"produces": [
"application/json"
],
"tags": [
"currencies"
],
"summary": "List currency rates",
"parameters": [
{
"type": "string",
"description": "Filter by currency code",
"name": "search",
"in": "query"
},
{
"type": "string",
"description": "Filter by source currency",
"name": "currency_from",
"in": "query"
},
{
"type": "string",
"description": "Filter by target currency",
"name": "currency_to",
"in": "query"
},
{
"type": "integer",
"default": 1,
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Items per page",
"name": "limit",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/currency.ListCurrencyDTO"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Creates a new currency exchange rate",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"currencies"
],
"summary": "Create currency rate",
"parameters": [
{
"description": "Currency rate payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/currency.CreateCurrencyDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/currency.CurrencyDTO"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"409": {
"description": "Conflict",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/currencies/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a single currency exchange rate",
"produces": [
"application/json"
],
"tags": [
"currencies"
],
"summary": "Get currency rate by ID",
"parameters": [
{
"type": "integer",
"description": "Currency ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/currency.CurrencyDTO"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Updates an existing currency exchange rate",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"currencies"
],
"summary": "Update currency rate",
"parameters": [
{
"type": "integer",
"description": "Currency ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Currency rate payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/currency.UpdateCurrencyDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/currency.CurrencyDTO"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"409": {
"description": "Conflict",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Deletes a currency exchange rate",
"produces": [
"application/json"
],
"tags": [
"currencies"
],
"summary": "Delete currency rate",
"parameters": [
{
"type": "integer",
"description": "Currency ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/dashboard/analytics/backlog": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Open (unhandled) orders per order type aged under 1 day / 1-3 days / over 3 days, the oldest open order, and the average processing time of orders finished in range; plus exact visa/master payout timing from the payment log. Order types are limited to the modules the caller can open.",
"produces": [
"application/json"
],
"tags": [
"dashboard-analytics"
],
"summary": "Dashboard analytics: backlog",
"parameters": [
{
"type": "string",
"default": "Jan 1 of current year",
"description": "Start date YYYY-MM-DD (inclusive)",
"name": "from",
"in": "query"
},
{
"type": "string",
"default": "today",
"description": "End date YYYY-MM-DD (inclusive)",
"name": "to",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/dashboard/analytics/branches": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Per-branch leaderboard (orders per type, open/approved/rejected, approval rate, average processing hours) and order counts per region, for orders created in range.",
"produces": [
"application/json"
],
"tags": [
"dashboard-analytics"
],
"summary": "Dashboard analytics: branches",
"parameters": [
{
"type": "string",
"default": "Jan 1 of current year",
"description": "Start date YYYY-MM-DD (inclusive)",
"name": "from",
"in": "query"
},
{
"type": "string",
"default": "today",
"description": "End date YYYY-MM-DD (inclusive)",
"name": "to",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/dashboard/analytics/customers": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Loan applicants in range by age group, education, marriage status and number of guarantors, each with its approval rate. Needs the loans permission.",
"produces": [
"application/json"
],
"tags": [
"dashboard-analytics"
],
"summary": "Dashboard analytics: customers",
"parameters": [
{
"type": "string",
"default": "Jan 1 of current year",
"description": "Start date YYYY-MM-DD (inclusive)",
"name": "from",
"in": "query"
},
{
"type": "string",
"default": "today",
"description": "End date YYYY-MM-DD (inclusive)",
"name": "to",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/dashboard/analytics/finance": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Successful visa/master payouts (amount, bank/GBÜS/TVEB fees), gateway status breakdown and success rate, monthly payout totals, and the total loan amount requested. Payouts need the cards permission, the loan total the loans permission.",
"produces": [
"application/json"
],
"tags": [
"dashboard-analytics"
],
"summary": "Dashboard analytics: finance",
"parameters": [
{
"type": "string",
"default": "Jan 1 of current year",
"description": "Start date YYYY-MM-DD (inclusive)",
"name": "from",
"in": "query"
},
{
"type": "string",
"default": "today",
"description": "End date YYYY-MM-DD (inclusive)",
"name": "to",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/dashboard/analytics/products": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Loan orders by source (web/mobile) and loan type, card orders by card type, and paid vs unpaid card orders, for orders created in range.",
"produces": [
"application/json"
],
"tags": [
"dashboard-analytics"
],
"summary": "Dashboard analytics: products",
"parameters": [
{
"type": "string",
"default": "Jan 1 of current year",
"description": "Start date YYYY-MM-DD (inclusive)",
"name": "from",
"in": "query"
},
{
"type": "string",
"default": "today",
"description": "End date YYYY-MM-DD (inclusive)",
"name": "to",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/dashboard/analytics/system": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Registration funnel (all-scope callers with the users permission), operator activity and error rate per module (activity-logs permission), order peak hours heatmap in Ashgabat time, and card balance check stats (cards permission). Widgets the caller cannot see are null or empty.",
"produces": [
"application/json"
],
"tags": [
"dashboard-analytics"
],
"summary": "Dashboard analytics: system",
"parameters": [
{
"type": "string",
"default": "Jan 1 of current year",
"description": "Start date YYYY-MM-DD (inclusive)",
"name": "from",
"in": "query"
},
{
"type": "string",
"default": "today",
"description": "End date YYYY-MM-DD (inclusive)",
"name": "to",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Number of operators to return",
"name": "operator_limit",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/dashboard/overview": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns the KPI cards, loan/card trend, loan status breakdown, weekly order counts, and recent activity feed for the admin dashboard",
"produces": [
"application/json"
],
"tags": [
"dashboard"
],
"summary": "Dashboard overview",
"parameters": [
{
"type": "integer",
"description": "Year for the monthly trend chart",
"name": "year",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Number of recent activity items to return",
"name": "recent_limit",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/dashboard/server-stats": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns host CPU, RAM and disk usage plus the API process's own memory and uptime. CPU usage is sampled over ~250ms; host fields are null when the OS cannot report them.",
"produces": [
"application/json"
],
"tags": [
"dashboard"
],
"summary": "Server statistics",
"parameters": [
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/appresult.AppSuccess"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/sysstats.Stats"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/file": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "file upload",
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json"
],
"tags": [
"file-upload"
],
"parameters": [
{
"type": "file",
"description": "this is a test file",
"name": "file",
"in": "formData",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/file/{file_name}": {
"get": {
"description": "download file by object name (public; not under /api/admin)",
"produces": [
"application/octet-stream"
],
"tags": [
"file-upload"
],
"parameters": [
{
"type": "string",
"description": "object name",
"name": "file_name",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "file"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/file/{id}": {
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "remove file",
"produces": [
"application/json"
],
"tags": [
"file-upload"
],
"parameters": [
{
"type": "string",
"description": "object name",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/forgot-password": {
"post": {
"description": "Finds the user by name and sends an SMS verification code",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Forgot password",
"parameters": [
{
"description": "Forgot password payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/auth.ForgotPasswordDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/forgot-password/verify": {
"post": {
"description": "Confirms the SMS code and sets a new password",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Reset password",
"parameters": [
{
"description": "Reset password payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/auth.ResetPasswordDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/loan-orders": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns paginated loan orders created from the web with optional filters",
"produces": [
"application/json"
],
"tags": [
"loan-orders"
],
"summary": "List loan orders",
"parameters": [
{
"type": "string",
"description": "Filter by status",
"name": "status",
"in": "query"
},
{
"type": "integer",
"description": "Filter by branch ID",
"name": "branch_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by user ID",
"name": "user_id",
"in": "query"
},
{
"type": "string",
"description": "Filter by region",
"name": "region",
"in": "query"
},
{
"type": "integer",
"default": 1,
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Items per page",
"name": "limit",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Creates a new loan order",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"loan-orders"
],
"summary": "Create loan order",
"parameters": [
{
"description": "Loan order payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/loanorders.CreateLoanOrderDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/loan-orders/mobile": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns paginated loan orders created from the mobile app",
"produces": [
"application/json"
],
"tags": [
"loan-orders"
],
"summary": "List mobile loan orders",
"parameters": [
{
"type": "string",
"description": "Filter by status",
"name": "status",
"in": "query"
},
{
"type": "integer",
"description": "Filter by branch ID",
"name": "branch_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by user ID",
"name": "user_id",
"in": "query"
},
{
"type": "string",
"description": "Filter by region",
"name": "region",
"in": "query"
},
{
"type": "integer",
"default": 1,
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Items per page",
"name": "limit",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/loan-orders/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a single loan order",
"produces": [
"application/json"
],
"tags": [
"loan-orders"
],
"summary": "Get loan order by ID",
"parameters": [
{
"type": "integer",
"description": "Loan order ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Updates an existing loan order",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"loan-orders"
],
"summary": "Update loan order",
"parameters": [
{
"type": "integer",
"description": "Loan order ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Loan order payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/loanorders.UpdateLoanOrderDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Deletes a loan order",
"produces": [
"application/json"
],
"tags": [
"loan-orders"
],
"summary": "Delete loan order",
"parameters": [
{
"type": "integer",
"description": "Loan order ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/loan-paid-off-letters": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns paginated loan paid off letters with optional filters",
"produces": [
"application/json"
],
"tags": [
"loan-paid-off-letters"
],
"summary": "List loan paid off letters",
"parameters": [
{
"type": "string",
"description": "Filter by passport ID",
"name": "passport_id",
"in": "query"
},
{
"type": "string",
"description": "Filter by customer name",
"name": "name",
"in": "query"
},
{
"type": "string",
"description": "Filter by status",
"name": "status",
"in": "query"
},
{
"type": "integer",
"description": "Filter by branch ID",
"name": "branch_id",
"in": "query"
},
{
"type": "string",
"description": "Filter by region",
"name": "region",
"in": "query"
},
{
"type": "integer",
"default": 1,
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Items per page",
"name": "limit",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Creates a new loan paid off letter",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"loan-paid-off-letters"
],
"summary": "Create loan paid off letter",
"parameters": [
{
"description": "Loan paid off letter payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/loanpaidletter.CreateLoanPaidLetterDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/loan-paid-off-letters/branches": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns branches for the selected province (etrap) id for loan paid-off letter forms",
"produces": [
"application/json"
],
"tags": [
"loan-paid-off-letters"
],
"summary": "List branches by province",
"parameters": [
{
"type": "integer",
"description": "Province ID",
"name": "province_id",
"in": "query",
"required": true
},
{
"type": "boolean",
"default": true,
"description": "Only active branches",
"name": "active",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/loan-paid-off-letters/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a single loan paid off letter",
"produces": [
"application/json"
],
"tags": [
"loan-paid-off-letters"
],
"summary": "Get loan paid off letter by ID",
"parameters": [
{
"type": "integer",
"description": "Loan paid off letter ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Updates an existing loan paid off letter",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"loan-paid-off-letters"
],
"summary": "Update loan paid off letter",
"parameters": [
{
"type": "integer",
"description": "Loan paid off letter ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Loan paid off letter payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/loanpaidletter.UpdateLoanPaidLetterDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Deletes a loan paid off letter",
"produces": [
"application/json"
],
"tags": [
"loan-paid-off-letters"
],
"summary": "Delete loan paid off letter",
"parameters": [
{
"type": "integer",
"description": "Loan paid off letter ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/loan-types": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns paginated loan types with optional filters",
"produces": [
"application/json"
],
"tags": [
"loan-type"
],
"summary": "List loan types",
"parameters": [
{
"type": "string",
"description": "Filter by title (en, ru, tm)",
"name": "loan_type_name",
"in": "query"
},
{
"type": "integer",
"default": 1,
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Items per page",
"name": "limit",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Creates a new loan type",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"loan-type"
],
"summary": "Create loan type",
"parameters": [
{
"description": "Loan type payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/loantype.CreateLoanTypeDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/loan-types/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a single loan type",
"produces": [
"application/json"
],
"tags": [
"loan-type"
],
"summary": "Get loan type by ID",
"parameters": [
{
"type": "integer",
"description": "Loan type ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Updates an existing loan type",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"loan-type"
],
"summary": "Update loan type",
"parameters": [
{
"type": "integer",
"description": "Loan type ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Loan type payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/loantype.UpdateLoanTypeDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Deletes a loan type",
"produces": [
"application/json"
],
"tags": [
"loan-type"
],
"summary": "Delete loan type",
"parameters": [
{
"type": "integer",
"description": "Loan type ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/loans-documents": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns paginated loan documents with optional filters",
"produces": [
"application/json"
],
"tags": [
"loan-document"
],
"summary": "List loan documents",
"parameters": [
{
"type": "string",
"description": "Filter by name",
"name": "document_name",
"in": "query"
},
{
"type": "boolean",
"description": "Filter by active",
"name": "active",
"in": "query"
},
{
"type": "integer",
"default": 1,
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Items per page",
"name": "limit",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Creates a new loan document",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"loan-document"
],
"summary": "Create loan document",
"parameters": [
{
"description": "Loan document payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/loansdocument.CreateLoanDocumentDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/loans-documents/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a single loan document",
"produces": [
"application/json"
],
"tags": [
"loan-document"
],
"summary": "Get loan document by ID",
"parameters": [
{
"type": "integer",
"description": "Loan document ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Updates an existing loan document",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"loan-document"
],
"summary": "Update loan document",
"parameters": [
{
"type": "integer",
"description": "Loan document ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Loan document payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/loansdocument.UpdateLoanDocumentDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Deletes a loan document",
"produces": [
"application/json"
],
"tags": [
"loan-document"
],
"summary": "Delete loan document",
"parameters": [
{
"type": "integer",
"description": "Loan document ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/loans-documents/{id}/active": {
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Enables or disables a loan document",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"loan-document"
],
"summary": "Update loan document active",
"parameters": [
{
"type": "integer",
"description": "Loan document ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Active payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/loansdocument.UpdateLoanDocumentActiveDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/loans-repayment": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns paginated loan repayments with optional filters",
"produces": [
"application/json"
],
"tags": [
"loans-repayment"
],
"summary": "List loan repayments",
"parameters": [
{
"type": "string",
"description": "Filter by passport ID",
"name": "passport_id",
"in": "query"
},
{
"type": "integer",
"default": 1,
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Items per page",
"name": "limit",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Creates a new loan repayment record",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"loans-repayment"
],
"summary": "Create loan repayment",
"parameters": [
{
"description": "Loan repayment payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/loansrepayment.CreateLoanRepaymentDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/loans-repayment/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a single loan repayment",
"produces": [
"application/json"
],
"tags": [
"loans-repayment"
],
"summary": "Get loan repayment by ID",
"parameters": [
{
"type": "integer",
"description": "Loan repayment ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Updates an existing loan repayment record",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"loans-repayment"
],
"summary": "Update loan repayment",
"parameters": [
{
"type": "integer",
"description": "Loan repayment ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Loan repayment payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/loansrepayment.UpdateLoanRepaymentDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Deletes a loan repayment record",
"produces": [
"application/json"
],
"tags": [
"loans-repayment"
],
"summary": "Delete loan repayment",
"parameters": [
{
"type": "integer",
"description": "Loan repayment ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/login": {
"post": {
"description": "Authenticates a user by name or phone, and password",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Login",
"parameters": [
{
"description": "Login payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/auth.LoginDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/payment-cards": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns paginated payment cards with optional filters",
"produces": [
"application/json"
],
"tags": [
"payment-card"
],
"summary": "List payment cards",
"parameters": [
{
"type": "string",
"description": "Filter by card title (en, ru, tm)",
"name": "card_name",
"in": "query"
},
{
"type": "boolean",
"description": "Filter by active",
"name": "active",
"in": "query"
},
{
"type": "integer",
"default": 1,
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Items per page",
"name": "limit",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Creates a new payment card",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"payment-card"
],
"summary": "Create payment card",
"parameters": [
{
"description": "Payment card payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/paymentcard.CreatePaymentCardDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/payment-cards/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a single payment card",
"produces": [
"application/json"
],
"tags": [
"payment-card"
],
"summary": "Get payment card by ID",
"parameters": [
{
"type": "integer",
"description": "Payment card ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Updates an existing payment card",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"payment-card"
],
"summary": "Update payment card",
"parameters": [
{
"type": "integer",
"description": "Payment card ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Payment card payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/paymentcard.UpdatePaymentCardDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Deletes a payment card",
"produces": [
"application/json"
],
"tags": [
"payment-card"
],
"summary": "Delete payment card",
"parameters": [
{
"type": "integer",
"description": "Payment card ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/payment-cards/{id}/active": {
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Enables or disables a payment card",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"payment-card"
],
"summary": "Update payment card active",
"parameters": [
{
"type": "integer",
"description": "Payment card ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Active payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/paymentcard.UpdatePaymentCardActiveDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/payment-history": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Ähli sargytlaryň Visa/Master we Sber töleg synanyşyklaryny (tölenen, şowsuz, garaşylýan) sahypalap gaýtarýar. Tertip: sort/order boýunça (adaty ýagdaýda iň täzesi birinji). Bellik: diňe ulanyjynyň öz şahamçasynyň tölegleri görünýär.",
"produces": [
"application/json"
],
"tags": [
"payment-history"
],
"summary": "Tölegleriň taryhy",
"parameters": [
{
"type": "integer",
"description": "Sargyt ID-si boýunça süzmek",
"name": "order_id",
"in": "query"
},
{
"type": "integer",
"description": "Şahamça ID-si boýunça süzmek",
"name": "branch_id",
"in": "query"
},
{
"type": "integer",
"description": "Sargyt eýesiniň (müşderiniň) ulanyjy ID-si boýunça süzmek",
"name": "user_id",
"in": "query"
},
{
"type": "string",
"description": "GBÜS statusy boýunça süzmek (pending, success, failed)",
"name": "status",
"in": "query"
},
{
"type": "string",
"description": "Pasport ady/familiýasy ýa-da sargydyň unique ID-si boýunça gözlemek",
"name": "search",
"in": "query"
},
{
"enum": [
"id",
"created_at",
"status",
"amount"
],
"type": "string",
"default": "id",
"description": "Tertiplenýän sütün",
"name": "sort",
"in": "query"
},
{
"enum": [
"asc",
"desc"
],
"type": "string",
"default": "desc",
"description": "Tertip ugry",
"name": "order",
"in": "query"
},
{
"type": "integer",
"default": 1,
"description": "Sahypa belgisi",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Bir sahypadaky ýazgy sany",
"name": "limit",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Lokallaşdyrylan meýdanlaryň dili; all - doly {en, ru, tm} obýektleri",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/paymenthistory.ListPaymentHistoryDTO"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/payment-history/payments/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Töleg ID-si boýunça bir Visa/Master ýa-da Sber töleg synanyşygyny GBÜS-iň soňky jogaby (gatewayResponse) bilen gaýtarýar. Tertip: ýeke ýazgy. Bellik: taryh sanawyndaky bir setiriň jikme-jik görnüşi.",
"produces": [
"application/json"
],
"tags": [
"payment-history"
],
"summary": "Bir tölegiň jikme-jikligi",
"parameters": [
{
"type": "integer",
"description": "Töleg ID-si",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Lokallaşdyrylan meýdanlaryň dili; all - doly {en, ru, tm} obýektleri",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/paymenthistory.PaymentHistoryDetailDTO"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/payment-history/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Bir sargydyň ähli Visa/Master we Sber töleg synanyşyklaryny gaýtarýar: her töleg üçin bir setir - tölendimi (paid/gatewayStatus), haýsy kartdan tölendi (cardholderName/maskedPan), wagty (createdAt) we döwri (paymentPeriod). Tertip: iň täzesi birinji. Bellik: bir tölegiň GBÜS jogaby /payment-history/payments/{id}, ähli tölegleriňki /payment-history/{id}/gateway, ädimme-ädim loglar /payment-history/{id}/logs salgysynda.",
"produces": [
"application/json"
],
"tags": [
"payment-history"
],
"summary": "Sargydyň tölegleri",
"parameters": [
{
"type": "integer",
"description": "Sargyt ID-si",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Lokallaşdyrylan meýdanlaryň dili; all - doly {en, ru, tm} obýektleri",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/paymenthistory.PaymentHistoryItemDTO"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/payment-history/{id}/gateway": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Bir sargydyň ähli tölegini her biriniň GBÜS (HALKBANK) soňky jogaby (gatewayResponse) bilen gaýtarýar: tölendimi, haýsy kartdan tölendi (cardholderName/maskedPan), wagty (createdAt), töleg ýyly/aýy, mukdarlary we belgisi (orderNumber). Tertip: iň täzesi birinji. Bellik: GBÜS kart maglumatyny habar berýänçä cardholderName/maskedPan null, GBÜS asla jogap bermedik bolsa gatewayResponse null; tablisadaky ammar nyşany şu endpoint-den işleýär.",
"produces": [
"application/json"
],
"tags": [
"payment-history"
],
"summary": "Sargydyň tölegleri GBÜS jogaplary bilen",
"parameters": [
{
"type": "integer",
"description": "Sargyt ID-si",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Lokallaşdyrylan meýdanlaryň dili; all - doly {en, ru, tm} obýektleri",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/paymenthistory.PaymentGatewayDTO"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/payment-history/{id}/logs": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Sargydyň tölegi işlenende ýazylan ähli ädimleri (visa_master_payment_logs) gaýtarýar. Tertip: iň täzesi birinji. Bellik: /payment-history/{id} setirlerinden garaşsyz, hakykatda näme bolandygynyň subutnamasy.",
"produces": [
"application/json"
],
"tags": [
"payment-history"
],
"summary": "Sargydyň töleg loglary",
"parameters": [
{
"type": "integer",
"description": "Sargyt ID-si",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Lokallaşdyrylan meýdanlaryň dili; all - doly {en, ru, tm} obýektleri",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/paymenthistory.PaymentLogDTO"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/payment-settings": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns the admin-configurable bank and GBÜS commission fees used on loan payments",
"produces": [
"application/json"
],
"tags": [
"payment-settings"
],
"summary": "Get payment settings",
"parameters": [
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/paymentsettings.PaymentSettingsDTO"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Updates the bank and GBÜS commission fees used on loan payments",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"payment-settings"
],
"summary": "Update payment settings",
"parameters": [
{
"description": "Payment settings payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/paymentsettings.UpdatePaymentSettingsDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/paymentsettings.PaymentSettingsDTO"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/payment-texts": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns the admin-editable, localized texts (warnings, hints) shown to clients on visa/master/sber payout screens. Clients only get active ones, with empty languages filled with a default text.",
"produces": [
"application/json"
],
"tags": [
"payment-texts"
],
"summary": "List payment texts",
"parameters": [
{
"type": "string",
"description": "Filter by code, name or text",
"name": "search",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/paymenttexts.ListPaymentTextDTO"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/payment-texts/{code}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns one payment text by its fixed code (e.g. payment_warning_text, sber_payment_warning). For clients, empty languages are filled with a default text, a deleted known code returns its default, and inactive texts are 404.",
"produces": [
"application/json"
],
"tags": [
"payment-texts"
],
"summary": "Get a payment text by code",
"parameters": [
{
"type": "string",
"description": "Text code",
"name": "code",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/paymenttexts.PaymentTextDTO"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Updates the name, localized text and active flag of an existing payment text. The code itself cannot be changed.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"payment-texts"
],
"summary": "Update a payment text",
"parameters": [
{
"type": "string",
"description": "Text code",
"name": "code",
"in": "path",
"required": true
},
{
"description": "Payment text payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/paymenttexts.UpdatePaymentTextDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/paymenttexts.PaymentTextDTO"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Super admin only. Deletes a payment text by code; clients then get the built-in default text for known codes.",
"produces": [
"application/json"
],
"tags": [
"payment-texts"
],
"summary": "Delete a payment text",
"parameters": [
{
"type": "string",
"description": "Text code",
"name": "code",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/permissions": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns the permission catalog: one code per module, in display order. Holding a code grants read and write in that module; the role's scope decides which records.",
"produces": [
"application/json"
],
"tags": [
"permission"
],
"summary": "List permissions",
"parameters": [
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
}
}
}
},
"/profile": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns the authenticated user's profile with role, branches, and permissions grouped by saha (module)",
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Get profile",
"parameters": [
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Updates the authenticated user's profile",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Update profile",
"parameters": [
{
"description": "Profile payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/auth.UpdateProfileDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/provinces": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns paginated provinces with optional filters",
"produces": [
"application/json"
],
"tags": [
"province"
],
"summary": "List provinces",
"parameters": [
{
"type": "string",
"description": "Filter by province name (en, ru, tm)",
"name": "name",
"in": "query"
},
{
"type": "string",
"description": "Filter by region (en, ru, tm)",
"name": "region",
"in": "query"
},
{
"type": "boolean",
"description": "Filter by active status",
"name": "active",
"in": "query"
},
{
"type": "integer",
"default": 1,
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Items per page",
"name": "limit",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Creates a new province",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"province"
],
"summary": "Create province",
"parameters": [
{
"description": "Province payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/province.CreateProvinceDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/provinces/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a single province",
"produces": [
"application/json"
],
"tags": [
"province"
],
"summary": "Get province by ID",
"parameters": [
{
"type": "integer",
"description": "Province ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Updates an existing province",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"province"
],
"summary": "Update province",
"parameters": [
{
"type": "integer",
"description": "Province ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Province payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/province.UpdateProvinceDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Deletes a province",
"produces": [
"application/json"
],
"tags": [
"province"
],
"summary": "Delete province",
"parameters": [
{
"type": "integer",
"description": "Province ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/reasons-cards": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns paginated reason cards with optional filters",
"produces": [
"application/json"
],
"tags": [
"reason-card"
],
"summary": "List reason cards",
"parameters": [
{
"type": "string",
"description": "Filter by title (en, ru, tm)",
"name": "reason_name",
"in": "query"
},
{
"type": "integer",
"default": 1,
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Items per page",
"name": "limit",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Creates a new reason card",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"reason-card"
],
"summary": "Create reason card",
"parameters": [
{
"description": "Reason card payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/reasonscard.CreateReasonCardDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/reasons-cards/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a single reason card",
"produces": [
"application/json"
],
"tags": [
"reason-card"
],
"summary": "Get reason card by ID",
"parameters": [
{
"type": "integer",
"description": "Reason card ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Updates an existing reason card",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"reason-card"
],
"summary": "Update reason card",
"parameters": [
{
"type": "integer",
"description": "Reason card ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Reason card payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/reasonscard.UpdateReasonCardDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Deletes a reason card",
"produces": [
"application/json"
],
"tags": [
"reason-card"
],
"summary": "Delete reason card",
"parameters": [
{
"type": "integer",
"description": "Reason card ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/register": {
"post": {
"description": "Starts registration and sends an SMS verification code. Replace sms.LogSender with your SMS client.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Register",
"parameters": [
{
"description": "Registration payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/auth.RegisterDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"409": {
"description": "Conflict",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/register/verify": {
"post": {
"description": "Confirms the SMS code and creates the user account",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Verify phone",
"parameters": [
{
"description": "Verification payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/auth.VerifyDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"409": {
"description": "Conflict",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/roles": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns paginated roles with optional filters",
"produces": [
"application/json"
],
"tags": [
"role"
],
"summary": "List roles",
"parameters": [
{
"type": "string",
"description": "Filter by name or code",
"name": "role_name",
"in": "query"
},
{
"type": "integer",
"default": 1,
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Items per page",
"name": "limit",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Creates a role with a scope (own, branch, all) and its permission codes. The caller cannot create a role wider than their own scope or holding permissions they lack.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"role"
],
"summary": "Create role",
"parameters": [
{
"description": "Role payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/role.CreateRoleDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"409": {
"description": "Conflict",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/roles/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a single role",
"produces": [
"application/json"
],
"tags": [
"role"
],
"summary": "Get role by ID",
"parameters": [
{
"type": "integer",
"description": "Role ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Replaces the role's name, scope and whole permission set. System roles keep their scope; the caller must be able to grant the role both before and after the change.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"role"
],
"summary": "Update role",
"parameters": [
{
"type": "integer",
"description": "Role ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Role payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/role.UpdateRoleDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Deletes a role. System roles and roles still assigned to users cannot be deleted.",
"produces": [
"application/json"
],
"tags": [
"role"
],
"summary": "Delete role",
"parameters": [
{
"type": "integer",
"description": "Role ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"409": {
"description": "Conflict",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/token": {
"post": {
"description": "Issues a new access and refresh token pair",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Refresh tokens",
"parameters": [
{
"description": "Refresh token payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/auth.RefreshTokenDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/users": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns paginated users, including roleId. All-scope callers see users of every role; branch-scope callers see role=user only, scoped to their branches.",
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "List users",
"parameters": [
{
"type": "string",
"description": "Search by username, first name, or last name",
"name": "search",
"in": "query"
},
{
"type": "string",
"description": "Alias for search",
"name": "username",
"in": "query"
},
{
"type": "integer",
"default": 1,
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Items per page",
"name": "limit",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Creates a new user. The role (roleId or role code, default \"user\") must be one the caller could grant: no wider scope, no permission the caller lacks, superadmin only from a superadmin.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Create user",
"parameters": [
{
"description": "User payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/user.CreateUserDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/users/clients": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns paginated client users (role user, not assigned to any branch), including roleId",
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "List client users",
"parameters": [
{
"type": "string",
"description": "Search by username, first name, or last name",
"name": "search",
"in": "query"
},
{
"type": "string",
"description": "Alias for search",
"name": "username",
"in": "query"
},
{
"type": "integer",
"default": 1,
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Items per page",
"name": "limit",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/users/staff": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns paginated users assigned to branches (from branch_user), including each user's branches and roleId.",
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "List staff users",
"parameters": [
{
"type": "string",
"description": "Search by username, first name, or last name",
"name": "search",
"in": "query"
},
{
"type": "string",
"description": "Alias for search",
"name": "username",
"in": "query"
},
{
"type": "integer",
"default": 1,
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Items per page",
"name": "limit",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/users/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a single user with assigned branches, roleId, and effective permissions",
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Get user by ID",
"parameters": [
{
"type": "integer",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Updates an existing user. Sending roleId or role changes the role (same rules as create); sending neither keeps it. Callers cannot manage a user whose role they could not grant, nor change their own role.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Update user",
"parameters": [
{
"type": "integer",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "User payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/user.UpdateUserDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"409": {
"description": "Conflict",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Deletes a user. Callers cannot delete themselves, a user whose role they could not grant, or the last superadmin.",
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Delete user",
"parameters": [
{
"type": "integer",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"409": {
"description": "Conflict",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/users/{id}/role": {
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Gives the user exactly one role. Same rules as create/update.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Set user role",
"parameters": [
{
"type": "integer",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Role",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/user.SetUserRoleDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"409": {
"description": "Conflict",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/visa-master-payment-orders": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns paginated visa/master payment orders; sber orders are excluded (see /visa-master-payment-orders/sber)",
"produces": [
"application/json"
],
"tags": [
"visa-master-orders"
],
"summary": "List visa/master payment orders",
"parameters": [
{
"type": "string",
"description": "Filter by passport name or surname",
"name": "name",
"in": "query"
},
{
"type": "string",
"description": "Filter by order type (e.g. student), case-insensitive",
"name": "type",
"in": "query"
},
{
"type": "string",
"description": "Filter by status",
"name": "status",
"in": "query"
},
{
"type": "integer",
"description": "Filter by branch ID",
"name": "branch_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by user ID",
"name": "user_id",
"in": "query"
},
{
"type": "string",
"description": "Filter by region",
"name": "region",
"in": "query"
},
{
"type": "integer",
"default": 1,
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Items per page",
"name": "limit",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Creates a new visa/master payment order",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"visa-master-orders"
],
"summary": "Create visa/master payment order",
"parameters": [
{
"description": "Visa/master payment order payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/visamaster.CreateVisaMasterPaymentOrderDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/visa-master-payment-orders/callback": {
"get": {
"description": "GBÜS redirects the browser here after payment; the real outcome is verified server-to-server before anything is finalized",
"produces": [
"application/json"
],
"tags": [
"visa-master-payment"
],
"summary": "GBÜS payment callback",
"parameters": [
{
"type": "integer",
"description": "Payment attempt ID",
"name": "paymentId",
"in": "query",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/visamasterpay.CallbackResultDTO"
}
}
}
}
},
"/visa-master-payment-orders/sber": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns paginated payment orders of type sber",
"produces": [
"application/json"
],
"tags": [
"visa-master-orders"
],
"summary": "List sber payment orders",
"parameters": [
{
"type": "string",
"description": "Filter by passport name or surname",
"name": "name",
"in": "query"
},
{
"type": "string",
"description": "Filter by status",
"name": "status",
"in": "query"
},
{
"type": "integer",
"description": "Filter by branch ID",
"name": "branch_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by user ID",
"name": "user_id",
"in": "query"
},
{
"type": "string",
"description": "Filter by region",
"name": "region",
"in": "query"
},
{
"type": "integer",
"default": 1,
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Items per page",
"name": "limit",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/visa-master-payment-orders/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a single visa/master payment order with branch and user details",
"produces": [
"application/json"
],
"tags": [
"visa-master-orders"
],
"summary": "Get visa/master payment order by ID",
"parameters": [
{
"type": "integer",
"description": "Visa/master payment order ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Updates an existing visa/master payment order",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"visa-master-orders"
],
"summary": "Update visa/master payment order",
"parameters": [
{
"type": "integer",
"description": "Visa/master payment order ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Visa/master payment order payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/visamaster.UpdateVisaMasterPaymentOrderDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Deletes a visa/master payment order",
"produces": [
"application/json"
],
"tags": [
"visa-master-orders"
],
"summary": "Delete visa/master payment order",
"parameters": [
{
"type": "integer",
"description": "Visa/master payment order ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/visa-master-payment-orders/{id}/actions": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Bir Visa/Master ýa-da Sber sargydynyň ähli amallaryny gaýtarýar: goşmak, üýtgetmek, pozmak (name/nameLabel), kim tarapyndan (createdByName), haýsy sargyt (target: uniqueId we label, mysal üçin \"Sber töleg (talyplar üçin)\"), statusy (finished ýa-da failed) we senesi. Tertip: iň täzesi birinji. Bellik: näme üýtgändigi (original/changes) we ýalňyşlyk (exception) /visa-master-payment-orders/{id}/actions/{actionId} salgysynda; töleg tamamlananda sargydyň status/paid üýtgemegi hem şu ýere ýazylýar, GBÜS callback-dan gelse createdById null.",
"produces": [
"application/json"
],
"tags": [
"visa-master-order-actions"
],
"summary": "Sargydyň amallary (Ammallar)",
"parameters": [
{
"type": "integer",
"description": "Sargyt ID-si",
"name": "id",
"in": "path",
"required": true
},
{
"type": "integer",
"default": 1,
"description": "Sahypa belgisi",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Bir sahypadaky ýazgy sany",
"name": "limit",
"in": "query"
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Lokallaşdyrylan meýdanlaryň dili; all - doly {en, ru, tm} obýektleri",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/visamasteractions.ListOrderActionDTO"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/visa-master-payment-orders/{id}/actions/{actionId}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Sargydyň bir amalyny näme üýtgändigi bilen gaýtarýar: original - üýtgän meýdanlaryň öňki bahalary (Asyl), changes - täze bahalary (Üýtgeşmeler), exception - şowsuz amalyň ýalňyşlygy. Tertip: ýeke ýazgy. Bellik: goşmakda original null we changes ähli meýdanlar, pozmakda original ähli meýdanlar we changes null; şowsuz amalda changes synanyşylan bahalar.",
"produces": [
"application/json"
],
"tags": [
"visa-master-order-actions"
],
"summary": "Sargydyň bir amaly",
"parameters": [
{
"type": "integer",
"description": "Sargyt ID-si",
"name": "id",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Amalyň ID-si",
"name": "actionId",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Lokallaşdyrylan meýdanlaryň dili; all - doly {en, ru, tm} obýektleri",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/visamasteractions.OrderActionDetailDTO"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/visa-master-payment-orders/{id}/pay": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Registers the payment with GBÜS and returns the hosted-payment-page URL to complete it on. The final outcome is only known once GBÜS redirects back to the callback, which verifies and finalizes it.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"visa-master-payment"
],
"summary": "Start a visa/master/sber payout",
"parameters": [
{
"type": "integer",
"description": "Visa/master payment order ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Payment payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/visamasterpay.PayOrderDTO"
}
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/visamasterpay.PaymentInitResultDTO"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/visa-master-payment-orders/{id}/quote": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns the current rate, configured fees, and max payable amount for an order's payout",
"produces": [
"application/json"
],
"tags": [
"visa-master-payment"
],
"summary": "Quote a visa/master/sber payment",
"parameters": [
{
"type": "integer",
"description": "Visa/master payment order ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/visamasterpay.PaymentQuoteDTO"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/visa-master-payment-orders/{id}/status": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "For when the frontend can't rely on GBÜS's redirect having reached the callback (e.g. the user closed the hosted payment page first) - re-verifies the latest attempt with GBÜS server-to-server, the same way the callback does, and finalizes it if needed. gatewayResponse is GBÜS's last stored response for the attempt (null if GBÜS never answered). Safe to call repeatedly.",
"produces": [
"application/json"
],
"tags": [
"visa-master-payment"
],
"summary": "Re-check a visa/master/sber order's latest payment attempt",
"parameters": [
{
"type": "integer",
"description": "Visa/master payment order ID",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/visamasterpay.PaymentResultDTO"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
}
},
"definitions": {
"appresult.AppError": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"status": {
"type": "boolean"
}
}
},
"appresult.AppSuccess": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"data": {},
"message": {
"type": "string"
},
"status": {
"type": "boolean"
}
}
},
"auth.ForgotPasswordDTO": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
}
}
},
"auth.LoginDTO": {
"type": "object",
"required": [
"password"
],
"properties": {
"name": {
"type": "string"
},
"password": {
"type": "string"
},
"phone": {
"type": "string"
}
}
},
"auth.RefreshTokenDTO": {
"type": "object",
"required": [
"refreshToken"
],
"properties": {
"refreshToken": {
"type": "string"
}
}
},
"auth.RegisterDTO": {
"type": "object",
"required": [
"name",
"password",
"passwordConfirm",
"phone",
"username"
],
"properties": {
"name": {
"type": "string"
},
"password": {
"type": "string",
"minLength": 6
},
"passwordConfirm": {
"type": "string"
},
"phone": {
"type": "string"
},
"username": {
"type": "string",
"minLength": 3
}
}
},
"auth.ResetPasswordDTO": {
"type": "object",
"required": [
"code",
"name",
"password",
"passwordConfirm"
],
"properties": {
"code": {
"type": "string"
},
"name": {
"type": "string"
},
"password": {
"type": "string",
"minLength": 6
},
"passwordConfirm": {
"type": "string"
}
}
},
"auth.UpdateProfileDTO": {
"type": "object",
"required": [
"name"
],
"properties": {
"avatar": {
"type": "string"
},
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"name": {
"type": "string"
},
"phone": {
"type": "string"
}
}
},
"auth.VerifyDTO": {
"type": "object",
"required": [
"code",
"phone"
],
"properties": {
"code": {
"type": "string"
},
"phone": {
"type": "string"
}
}
},
"branches.CreateBranchDTO": {
"type": "object",
"required": [
"address",
"name",
"region",
"uniqueCode"
],
"properties": {
"active": {
"type": "boolean"
},
"address": {
"$ref": "#/definitions/shared.LocalizedText"
},
"billingPassword": {
"type": "string"
},
"billingSberPassword": {
"type": "string"
},
"billingSberUsername": {
"type": "string"
},
"billingSwiftPassword": {
"type": "string"
},
"billingSwiftUsername": {
"type": "string"
},
"billingUsername": {
"type": "string"
},
"billingVisaMasterPassword": {
"type": "string"
},
"billingVisaMasterUsername": {
"type": "string"
},
"name": {
"$ref": "#/definitions/shared.LocalizedText"
},
"phoneNumbers": {
"type": "string"
},
"provinceId": {
"type": "integer"
},
"region": {
"type": "string"
},
"uniqueCode": {
"type": "string"
}
}
},
"branches.UpdateBranchDTO": {
"type": "object",
"required": [
"address",
"name",
"region"
],
"properties": {
"active": {
"type": "boolean"
},
"address": {
"$ref": "#/definitions/shared.LocalizedText"
},
"billingPassword": {
"type": "string"
},
"billingSberPassword": {
"type": "string"
},
"billingSberUsername": {
"type": "string"
},
"billingSwiftPassword": {
"type": "string"
},
"billingSwiftUsername": {
"type": "string"
},
"billingUsername": {
"type": "string"
},
"billingVisaMasterPassword": {
"type": "string"
},
"billingVisaMasterUsername": {
"type": "string"
},
"name": {
"$ref": "#/definitions/shared.LocalizedText"
},
"phoneNumbers": {
"type": "string"
},
"provinceId": {
"type": "integer"
},
"region": {
"type": "string"
}
}
},
"cardbalance.CreateCardBalanceDTO": {
"type": "object",
"required": [
"cardNumber",
"expiryMonth",
"expiryYear",
"passportNumber"
],
"properties": {
"balanceAmount": {
"type": "number"
},
"balanceCurrency": {
"type": "string"
},
"branchId": {
"type": "integer"
},
"cardNumber": {
"type": "string"
},
"checkedAt": {
"type": "string",
"format": "date-time"
},
"createdBy": {
"type": "integer"
},
"expiryMonth": {
"type": "integer"
},
"expiryYear": {
"type": "integer"
},
"passportNumber": {
"type": "string"
},
"status": {
"type": "string"
}
}
},
"cardbalance.UpdateCardBalanceDTO": {
"type": "object",
"required": [
"cardNumber",
"expiryMonth",
"expiryYear",
"passportNumber"
],
"properties": {
"balanceAmount": {
"type": "number"
},
"balanceCurrency": {
"type": "string"
},
"branchId": {
"type": "integer"
},
"cardNumber": {
"type": "string"
},
"checkedAt": {
"type": "string",
"format": "date-time"
},
"createdBy": {
"type": "integer"
},
"expiryMonth": {
"type": "integer"
},
"expiryYear": {
"type": "integer"
},
"passportNumber": {
"type": "string"
},
"status": {
"type": "string"
}
}
},
"cardorder.CreateCardOrderDTO": {
"type": "object",
"required": [
"bornPlace",
"branchId",
"cardStateId",
"cardTypeId",
"citizenship",
"customerName",
"customerSurname",
"passportFour",
"passportGivenBy",
"passportId",
"passportOne",
"passportSerie",
"passportThree",
"passportTwo",
"region"
],
"properties": {
"bornAt": {
"type": "string",
"format": "date"
},
"bornPlace": {
"type": "string"
},
"branchId": {
"type": "integer"
},
"cardStateId": {
"type": "integer"
},
"cardTypeId": {
"type": "integer"
},
"citizenship": {
"type": "string"
},
"customerName": {
"type": "string"
},
"customerPatronicName": {
"type": "string"
},
"customerSurname": {
"type": "string"
},
"jobLocation": {
"type": "string"
},
"notes": {
"type": "string"
},
"oldSurname": {
"type": "string"
},
"paid": {
"type": "boolean"
},
"passportAddress": {
"type": "string"
},
"passportFour": {
"type": "string"
},
"passportGivenAt": {
"type": "string",
"format": "date"
},
"passportGivenBy": {
"type": "string"
},
"passportId": {
"type": "string"
},
"passportOne": {
"type": "string"
},
"passportSerie": {
"type": "string"
},
"passportThree": {
"type": "string"
},
"passportTwo": {
"type": "string"
},
"phone": {
"type": "string"
},
"phoneAdditional": {
"type": "string"
},
"realAddress": {
"type": "string"
},
"region": {
"type": "string"
},
"status": {
"type": "string"
},
"uniqueId": {
"type": "string"
},
"userId": {
"type": "integer"
}
}
},
"cardorder.UpdateCardOrderDTO": {
"type": "object",
"required": [
"bornPlace",
"branchId",
"cardStateId",
"cardTypeId",
"citizenship",
"customerName",
"customerSurname",
"passportFour",
"passportGivenBy",
"passportId",
"passportOne",
"passportSerie",
"passportThree",
"passportTwo",
"region"
],
"properties": {
"bornAt": {
"type": "string",
"format": "date"
},
"bornPlace": {
"type": "string"
},
"branchId": {
"type": "integer"
},
"cardStateId": {
"type": "integer"
},
"cardTypeId": {
"type": "integer"
},
"citizenship": {
"type": "string"
},
"customerName": {
"type": "string"
},
"customerPatronicName": {
"type": "string"
},
"customerSurname": {
"type": "string"
},
"jobLocation": {
"type": "string"
},
"notes": {
"type": "string"
},
"oldSurname": {
"type": "string"
},
"paid": {
"type": "boolean"
},
"passportAddress": {
"type": "string"
},
"passportFour": {
"type": "string"
},
"passportGivenAt": {
"type": "string",
"format": "date"
},
"passportGivenBy": {
"type": "string"
},
"passportId": {
"type": "string"
},
"passportOne": {
"type": "string"
},
"passportSerie": {
"type": "string"
},
"passportThree": {
"type": "string"
},
"passportTwo": {
"type": "string"
},
"phone": {
"type": "string"
},
"phoneAdditional": {
"type": "string"
},
"realAddress": {
"type": "string"
},
"region": {
"type": "string"
},
"status": {
"type": "string"
},
"uniqueId": {
"type": "string"
},
"userId": {
"type": "integer"
}
}
},
"cardpinorders.CreateCardPinOrderDTO": {
"type": "object",
"required": [
"branchId",
"cardTypeId",
"customerName",
"customerSurname",
"passportFour",
"passportId",
"passportOne",
"passportSerie",
"passportThree",
"passportTwo",
"region"
],
"properties": {
"bornAt": {
"type": "string",
"format": "date"
},
"branchId": {
"type": "integer"
},
"cardNumber": {
"type": "string"
},
"cardTypeId": {
"type": "integer"
},
"customerName": {
"type": "string"
},
"customerPatronicName": {
"type": "string"
},
"customerSurname": {
"type": "string"
},
"notes": {
"type": "string"
},
"passportFour": {
"type": "string"
},
"passportId": {
"type": "string"
},
"passportOne": {
"type": "string"
},
"passportSerie": {
"type": "string"
},
"passportThree": {
"type": "string"
},
"passportTwo": {
"type": "string"
},
"phone": {
"type": "string"
},
"region": {
"type": "string"
},
"status": {
"type": "string"
},
"uniqueId": {
"type": "string"
},
"userId": {
"type": "integer"
}
}
},
"cardpinorders.UpdateCardPinOrderDTO": {
"type": "object",
"required": [
"branchId",
"cardTypeId",
"customerName",
"customerSurname",
"passportFour",
"passportId",
"passportOne",
"passportSerie",
"passportThree",
"passportTwo",
"region"
],
"properties": {
"bornAt": {
"type": "string",
"format": "date"
},
"branchId": {
"type": "integer"
},
"cardNumber": {
"type": "string"
},
"cardTypeId": {
"type": "integer"
},
"customerName": {
"type": "string"
},
"customerPatronicName": {
"type": "string"
},
"customerSurname": {
"type": "string"
},
"notes": {
"type": "string"
},
"passportFour": {
"type": "string"
},
"passportId": {
"type": "string"
},
"passportOne": {
"type": "string"
},
"passportSerie": {
"type": "string"
},
"passportThree": {
"type": "string"
},
"passportTwo": {
"type": "string"
},
"phone": {
"type": "string"
},
"region": {
"type": "string"
},
"status": {
"type": "string"
},
"uniqueId": {
"type": "string"
},
"userId": {
"type": "integer"
}
}
},
"cardrekwizit.CreateCardRekwizitOrderDTO": {
"type": "object",
"required": [
"bornAt",
"branchId",
"cardMonth",
"cardNumber",
"cardTypeId",
"cardYear",
"customerName",
"customerSurname",
"passportFour",
"passportId",
"passportOne",
"passportSerie",
"passportThree",
"passportTwo",
"phone",
"region"
],
"properties": {
"bornAt": {
"type": "string",
"format": "date"
},
"branchId": {
"type": "integer"
},
"cardMonth": {
"type": "string"
},
"cardNumber": {
"type": "string"
},
"cardTypeId": {
"type": "integer"
},
"cardYear": {
"type": "string"
},
"customerName": {
"type": "string"
},
"customerPatronicName": {
"type": "string"
},
"customerSurname": {
"type": "string"
},
"notes": {
"type": "string"
},
"passportFour": {
"type": "string"
},
"passportId": {
"type": "string"
},
"passportOne": {
"type": "string"
},
"passportSerie": {
"type": "string"
},
"passportThree": {
"type": "string"
},
"passportTwo": {
"type": "string"
},
"phone": {
"type": "string"
},
"region": {
"type": "string"
},
"status": {
"type": "string"
},
"uniqueId": {
"type": "string"
},
"userId": {
"type": "integer"
}
}
},
"cardrekwizit.UpdateCardRekwizitOrderDTO": {
"type": "object",
"required": [
"bornAt",
"branchId",
"cardMonth",
"cardNumber",
"cardTypeId",
"cardYear",
"customerName",
"customerSurname",
"passportFour",
"passportId",
"passportOne",
"passportSerie",
"passportThree",
"passportTwo",
"phone",
"region"
],
"properties": {
"bornAt": {
"type": "string",
"format": "date"
},
"branchId": {
"type": "integer"
},
"cardMonth": {
"type": "string"
},
"cardNumber": {
"type": "string"
},
"cardTypeId": {
"type": "integer"
},
"cardYear": {
"type": "string"
},
"customerName": {
"type": "string"
},
"customerPatronicName": {
"type": "string"
},
"customerSurname": {
"type": "string"
},
"notes": {
"type": "string"
},
"passportFour": {
"type": "string"
},
"passportId": {
"type": "string"
},
"passportOne": {
"type": "string"
},
"passportSerie": {
"type": "string"
},
"passportThree": {
"type": "string"
},
"passportTwo": {
"type": "string"
},
"phone": {
"type": "string"
},
"region": {
"type": "string"
},
"status": {
"type": "string"
},
"uniqueId": {
"type": "string"
},
"userId": {
"type": "integer"
}
}
},
"cards.CreateCardDTO": {
"type": "object",
"required": [
"month",
"name",
"number"
],
"properties": {
"month": {
"type": "string"
},
"name": {
"type": "string"
},
"number": {
"type": "string"
},
"type": {
"type": "string"
},
"userId": {
"type": "integer"
},
"year": {
"type": "string"
}
}
},
"cards.UpdateCardDTO": {
"type": "object",
"required": [
"month",
"name",
"number"
],
"properties": {
"month": {
"type": "string"
},
"name": {
"type": "string"
},
"number": {
"type": "string"
},
"type": {
"type": "string"
},
"userId": {
"type": "integer"
},
"year": {
"type": "string"
}
}
},
"currency.CreateCurrencyDTO": {
"type": "object",
"required": [
"currencyFrom",
"currencyTo",
"value"
],
"properties": {
"currencyFrom": {
"type": "string"
},
"currencyTo": {
"type": "string"
},
"value": {
"type": "number"
}
}
},
"currency.CurrencyDTO": {
"type": "object",
"properties": {
"createdAt": {
"type": "string"
},
"createdBy": {
"$ref": "#/definitions/currency.UserInfo"
},
"currencyFrom": {
"type": "string"
},
"currencyTo": {
"type": "string"
},
"id": {
"type": "integer"
},
"updatedAt": {
"type": "string"
},
"updatedBy": {
"$ref": "#/definitions/currency.UserInfo"
},
"value": {
"type": "number"
}
}
},
"currency.ListCurrencyDTO": {
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"currencies": {
"type": "array",
"items": {
"$ref": "#/definitions/currency.CurrencyDTO"
}
}
}
},
"currency.UpdateCurrencyDTO": {
"type": "object",
"required": [
"currencyFrom",
"currencyTo",
"value"
],
"properties": {
"currencyFrom": {
"type": "string"
},
"currencyTo": {
"type": "string"
},
"value": {
"type": "number"
}
}
},
"currency.UserInfo": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"phone": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"loanorders.CreateLoanOrderDTO": {
"type": "object",
"required": [
"bornAt",
"bornPlace",
"branchId",
"customerName",
"customerSurname",
"education",
"loanType",
"marriageStatus",
"passportAddress",
"passportFour",
"passportGivenAt",
"passportGivenBy",
"passportId",
"passportOne",
"passportSerie",
"passportThree",
"passportTwo",
"phone",
"realAddress",
"region"
],
"properties": {
"bornAt": {
"type": "string",
"format": "date"
},
"bornPlace": {
"type": "string"
},
"branchId": {
"type": "integer"
},
"cardMonth": {
"type": "string"
},
"cardName": {
"type": "string"
},
"cardNumber": {
"type": "string"
},
"cardYear": {
"type": "string"
},
"customerName": {
"type": "string"
},
"customerPatronicName": {
"type": "string"
},
"customerSurname": {
"type": "string"
},
"education": {
"type": "string"
},
"email": {
"type": "string"
},
"guarantor2CardMonth": {
"type": "string"
},
"guarantor2CardName": {
"type": "string"
},
"guarantor2CardNumber": {
"type": "string"
},
"guarantor2CardYear": {
"type": "string"
},
"guarantor2Name": {
"type": "string"
},
"guarantor2Note": {
"type": "string"
},
"guarantor2PassportId": {
"type": "string"
},
"guarantor2PassportSerie": {
"type": "string"
},
"guarantor2PatronicName": {
"type": "string"
},
"guarantor2Surname": {
"type": "string"
},
"guarantorCardMonth": {
"type": "string"
},
"guarantorCardName": {
"type": "string"
},
"guarantorCardNumber": {
"type": "string"
},
"guarantorCardYear": {
"type": "string"
},
"guarantorName": {
"type": "string"
},
"guarantorNote": {
"type": "string"
},
"guarantorPassportId": {
"type": "string"
},
"guarantorPassportSerie": {
"type": "string"
},
"guarantorPatronicName": {
"type": "string"
},
"guarantorSurname": {
"type": "string"
},
"loanAmount": {
"type": "string"
},
"loanCardMonth": {
"type": "string"
},
"loanCardName": {
"type": "string"
},
"loanCardNumber": {
"type": "string"
},
"loanCardYear": {
"type": "string"
},
"loanOrderRequiredDocId": {
"type": "integer"
},
"loanType": {
"type": "integer"
},
"marriageStatus": {
"type": "string"
},
"notes": {
"type": "string"
},
"passportAddress": {
"type": "string"
},
"passportFour": {
"type": "string"
},
"passportGivenAt": {
"type": "string",
"format": "date"
},
"passportGivenBy": {
"type": "string"
},
"passportId": {
"type": "string"
},
"passportOne": {
"type": "string"
},
"passportSerie": {
"type": "string"
},
"passportThree": {
"type": "string"
},
"passportTwo": {
"type": "string"
},
"phone": {
"type": "string"
},
"phoneAdditional": {
"type": "string"
},
"phoneHome": {
"type": "string"
},
"realAddress": {
"type": "string"
},
"region": {
"type": "string"
},
"satisfiable": {
"type": "string"
},
"source": {
"type": "string"
},
"status": {
"type": "string"
},
"userId": {
"type": "integer"
},
"workCompany": {
"type": "string"
},
"workCompanyAccountantNumber": {
"type": "string"
},
"workPosition": {
"type": "string"
},
"workProvinceId": {
"type": "integer"
},
"workRegion": {
"type": "string"
},
"workSalary": {
"type": "string"
},
"workStartedAt": {
"type": "string",
"format": "date"
}
}
},
"loanorders.UpdateLoanOrderDTO": {
"type": "object",
"required": [
"bornAt",
"bornPlace",
"branchId",
"customerName",
"customerSurname",
"education",
"loanType",
"marriageStatus",
"passportAddress",
"passportFour",
"passportGivenAt",
"passportGivenBy",
"passportId",
"passportOne",
"passportSerie",
"passportThree",
"passportTwo",
"phone",
"realAddress",
"region"
],
"properties": {
"bornAt": {
"type": "string",
"format": "date"
},
"bornPlace": {
"type": "string"
},
"branchId": {
"type": "integer"
},
"cardMonth": {
"type": "string"
},
"cardName": {
"type": "string"
},
"cardNumber": {
"type": "string"
},
"cardYear": {
"type": "string"
},
"customerName": {
"type": "string"
},
"customerPatronicName": {
"type": "string"
},
"customerSurname": {
"type": "string"
},
"education": {
"type": "string"
},
"email": {
"type": "string"
},
"guarantor2CardMonth": {
"type": "string"
},
"guarantor2CardName": {
"type": "string"
},
"guarantor2CardNumber": {
"type": "string"
},
"guarantor2CardYear": {
"type": "string"
},
"guarantor2Name": {
"type": "string"
},
"guarantor2Note": {
"type": "string"
},
"guarantor2PassportId": {
"type": "string"
},
"guarantor2PassportSerie": {
"type": "string"
},
"guarantor2PatronicName": {
"type": "string"
},
"guarantor2Surname": {
"type": "string"
},
"guarantorCardMonth": {
"type": "string"
},
"guarantorCardName": {
"type": "string"
},
"guarantorCardNumber": {
"type": "string"
},
"guarantorCardYear": {
"type": "string"
},
"guarantorName": {
"type": "string"
},
"guarantorNote": {
"type": "string"
},
"guarantorPassportId": {
"type": "string"
},
"guarantorPassportSerie": {
"type": "string"
},
"guarantorPatronicName": {
"type": "string"
},
"guarantorSurname": {
"type": "string"
},
"loanAmount": {
"type": "string"
},
"loanCardMonth": {
"type": "string"
},
"loanCardName": {
"type": "string"
},
"loanCardNumber": {
"type": "string"
},
"loanCardYear": {
"type": "string"
},
"loanOrderRequiredDocId": {
"type": "integer"
},
"loanType": {
"type": "integer"
},
"marriageStatus": {
"type": "string"
},
"notes": {
"type": "string"
},
"passportAddress": {
"type": "string"
},
"passportFour": {
"type": "string"
},
"passportGivenAt": {
"type": "string",
"format": "date"
},
"passportGivenBy": {
"type": "string"
},
"passportId": {
"type": "string"
},
"passportOne": {
"type": "string"
},
"passportSerie": {
"type": "string"
},
"passportThree": {
"type": "string"
},
"passportTwo": {
"type": "string"
},
"phone": {
"type": "string"
},
"phoneAdditional": {
"type": "string"
},
"phoneHome": {
"type": "string"
},
"realAddress": {
"type": "string"
},
"region": {
"type": "string"
},
"satisfiable": {
"type": "string"
},
"source": {
"type": "string"
},
"status": {
"type": "string"
},
"userId": {
"type": "integer"
},
"workCompany": {
"type": "string"
},
"workCompanyAccountantNumber": {
"type": "string"
},
"workPosition": {
"type": "string"
},
"workProvinceId": {
"type": "integer"
},
"workRegion": {
"type": "string"
},
"workSalary": {
"type": "string"
},
"workStartedAt": {
"type": "string",
"format": "date"
}
}
},
"loanpaidletter.CreateLoanPaidLetterDTO": {
"type": "object",
"required": [
"branchId",
"customerName",
"customerSurname",
"passportId",
"passportSerie",
"phone",
"region"
],
"properties": {
"bornAt": {
"type": "string"
},
"branchId": {
"type": "integer"
},
"customerName": {
"type": "string"
},
"customerPatronicName": {
"type": "string"
},
"customerSurname": {
"type": "string"
},
"loanAmount": {
"type": "string"
},
"loanContractDate": {
"type": "string"
},
"loanContractNumber": {
"type": "string"
},
"loanFile": {
"type": "string"
},
"loanReason": {
"type": "string"
},
"notes": {
"type": "string"
},
"passportId": {
"type": "string"
},
"passportSerie": {
"type": "string"
},
"phone": {
"type": "string"
},
"region": {
"type": "string"
},
"status": {
"type": "string"
},
"uniqueId": {
"type": "string"
},
"userId": {
"type": "integer"
}
}
},
"loanpaidletter.UpdateLoanPaidLetterDTO": {
"type": "object",
"required": [
"branchId",
"customerName",
"customerSurname",
"passportId",
"passportSerie",
"phone",
"region"
],
"properties": {
"bornAt": {
"type": "string"
},
"branchId": {
"type": "integer"
},
"customerName": {
"type": "string"
},
"customerPatronicName": {
"type": "string"
},
"customerSurname": {
"type": "string"
},
"loanAmount": {
"type": "string"
},
"loanContractDate": {
"type": "string"
},
"loanContractNumber": {
"type": "string"
},
"loanFile": {
"type": "string"
},
"loanReason": {
"type": "string"
},
"notes": {
"type": "string"
},
"passportId": {
"type": "string"
},
"passportSerie": {
"type": "string"
},
"phone": {
"type": "string"
},
"region": {
"type": "string"
},
"status": {
"type": "string"
},
"uniqueId": {
"type": "string"
},
"userId": {
"type": "integer"
}
}
},
"loansdocument.CreateLoanDocumentDTO": {
"type": "object",
"required": [
"name",
"value"
],
"properties": {
"active": {
"type": "boolean"
},
"name": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"loansdocument.UpdateLoanDocumentActiveDTO": {
"type": "object",
"properties": {
"active": {
"type": "boolean"
}
}
},
"loansdocument.UpdateLoanDocumentDTO": {
"type": "object",
"required": [
"name",
"value"
],
"properties": {
"active": {
"type": "boolean"
},
"name": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"loansrepayment.CreateLoanRepaymentDTO": {
"type": "object",
"required": [
"accountNumber",
"passportId",
"passportSerie",
"userId"
],
"properties": {
"accountNumber": {
"type": "string"
},
"passportId": {
"type": "string"
},
"passportSerie": {
"type": "string"
},
"userId": {
"type": "integer"
}
}
},
"loansrepayment.UpdateLoanRepaymentDTO": {
"type": "object",
"required": [
"accountNumber",
"passportId",
"passportSerie",
"userId"
],
"properties": {
"accountNumber": {
"type": "string"
},
"passportId": {
"type": "string"
},
"passportSerie": {
"type": "string"
},
"userId": {
"type": "integer"
}
}
},
"loantype.CreateLoanTypeDTO": {
"type": "object",
"required": [
"content",
"loanTerm",
"tax",
"title"
],
"properties": {
"active": {
"type": "boolean"
},
"content": {
"$ref": "#/definitions/loantype.LocalizedTitle"
},
"loanTerm": {
"type": "string"
},
"tax": {
"type": "number"
},
"title": {
"$ref": "#/definitions/loantype.LocalizedTitle"
}
}
},
"loantype.LocalizedTitle": {
"type": "object",
"properties": {
"en": {
"type": "string"
},
"ru": {
"type": "string"
},
"tm": {
"type": "string"
}
}
},
"loantype.UpdateLoanTypeDTO": {
"type": "object",
"required": [
"content",
"loanTerm",
"tax",
"title"
],
"properties": {
"active": {
"type": "boolean"
},
"content": {
"$ref": "#/definitions/loantype.LocalizedTitle"
},
"loanTerm": {
"type": "string"
},
"tax": {
"type": "number"
},
"title": {
"$ref": "#/definitions/loantype.LocalizedTitle"
}
}
},
"paymentcard.CreatePaymentCardDTO": {
"type": "object",
"required": [
"price",
"title"
],
"properties": {
"active": {
"type": "boolean"
},
"notes": {
"type": "string"
},
"price": {
"type": "string"
},
"title": {
"$ref": "#/definitions/shared.LocalizedText"
}
}
},
"paymentcard.UpdatePaymentCardActiveDTO": {
"type": "object",
"properties": {
"active": {
"type": "boolean"
}
}
},
"paymentcard.UpdatePaymentCardDTO": {
"type": "object",
"required": [
"price",
"title"
],
"properties": {
"active": {
"type": "boolean"
},
"notes": {
"type": "string"
},
"price": {
"type": "string"
},
"title": {
"$ref": "#/definitions/shared.LocalizedText"
}
}
},
"paymenthistory.ListPaymentHistoryDTO": {
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/paymenthistory.PaymentHistoryItemDTO"
}
}
}
},
"paymenthistory.PaymentGatewayDTO": {
"type": "object",
"properties": {
"amountTmt": {
"type": "number"
},
"amountUsd": {
"type": "number"
},
"cardholderName": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"gatewayResponse": {
"type": "object"
},
"gatewayStatus": {
"type": "string"
},
"id": {
"type": "integer"
},
"maskedPan": {
"type": "string"
},
"orderId": {
"type": "integer"
},
"orderNumber": {
"type": "string"
},
"paid": {
"type": "boolean"
},
"paymentMonth": {
"type": "integer"
},
"paymentYear": {
"type": "integer"
}
}
},
"paymenthistory.PaymentHistoryDetailDTO": {
"type": "object",
"properties": {
"amountMinor": {
"description": "AmountMinor is the amount registered with GBÜS, in tetri.",
"type": "integer"
},
"amountTmt": {
"type": "number"
},
"amountUsd": {
"description": "AmountUsd is amount_tmt converted back at the attempt's own\nexchange_rate_usd - the USD figure the payout was quoted in.",
"type": "number"
},
"apiClient": {
"description": "ApiClient is the branch's GBÜS merchant username for this order type\n(visa/master or sber), ApiClientName the branch setting it comes from\n(billing_visa_master_username or billing_sber_username), and\nDescription the text sent with register.do - all as visamasterpay's\nPay picks them.",
"type": "string"
},
"apiClientName": {
"type": "string"
},
"bankFeeTmt": {
"type": "number"
},
"branchId": {
"type": "integer"
},
"branchName": {
"$ref": "#/definitions/shared.LocalizedText"
},
"callbackAt": {
"type": "string"
},
"callbackStatus": {
"description": "CallbackStatus is CallbackReceived once GBÜS's redirect reached the\ncallback for this attempt, at CallbackAt (its first time); both are\nunset if it never did (e.g. finalized by a /status check instead).",
"type": "string"
},
"cardholderName": {
"description": "CardholderName/MaskedPan come from GBÜS's getOrderStatusExtended\ncardAuthInfo, so they're only known once an attempt has been\nfinalized by the callback/status check (unset while pending, and for\nattempts that never reached the card form).",
"type": "string"
},
"createdAt": {
"type": "string"
},
"createdById": {
"type": "integer"
},
"createdByName": {
"type": "string"
},
"description": {
"type": "string"
},
"exchangeRateRub": {
"type": "number"
},
"exchangeRateUsd": {
"type": "number"
},
"formUrl": {
"description": "FormUrl is GBÜS's hosted payment page and SuccessUrl the returnUrl it\nwas registered with - set for every attempt register.do accepted,\nfinalized ones included (unset if registration failed).",
"type": "string"
},
"gatewayReference": {
"type": "string"
},
"gatewayResponse": {
"type": "object"
},
"gatewayStatus": {
"type": "string"
},
"gbusFeeTmt": {
"type": "number"
},
"id": {
"type": "integer"
},
"maskedPan": {
"type": "string"
},
"orderId": {
"type": "integer"
},
"orderNumber": {
"type": "string"
},
"orderUniqueId": {
"type": "string"
},
"paid": {
"type": "boolean"
},
"passportName": {
"type": "string"
},
"passportSurname": {
"type": "string"
},
"paymentPeriod": {
"type": "string"
},
"successUrl": {
"type": "string"
},
"totalAmountTmt": {
"type": "number"
},
"tvebFeeTmt": {
"type": "number"
},
"tvebFeeUsd": {
"type": "number"
},
"type": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"userId": {
"type": "integer"
}
}
},
"paymenthistory.PaymentHistoryItemDTO": {
"type": "object",
"properties": {
"amountMinor": {
"description": "AmountMinor is the amount registered with GBÜS, in tetri.",
"type": "integer"
},
"amountTmt": {
"type": "number"
},
"amountUsd": {
"description": "AmountUsd is amount_tmt converted back at the attempt's own\nexchange_rate_usd - the USD figure the payout was quoted in.",
"type": "number"
},
"apiClient": {
"description": "ApiClient is the branch's GBÜS merchant username for this order type\n(visa/master or sber), ApiClientName the branch setting it comes from\n(billing_visa_master_username or billing_sber_username), and\nDescription the text sent with register.do - all as visamasterpay's\nPay picks them.",
"type": "string"
},
"apiClientName": {
"type": "string"
},
"bankFeeTmt": {
"type": "number"
},
"branchId": {
"type": "integer"
},
"branchName": {
"$ref": "#/definitions/shared.LocalizedText"
},
"callbackAt": {
"type": "string"
},
"callbackStatus": {
"description": "CallbackStatus is CallbackReceived once GBÜS's redirect reached the\ncallback for this attempt, at CallbackAt (its first time); both are\nunset if it never did (e.g. finalized by a /status check instead).",
"type": "string"
},
"cardholderName": {
"description": "CardholderName/MaskedPan come from GBÜS's getOrderStatusExtended\ncardAuthInfo, so they're only known once an attempt has been\nfinalized by the callback/status check (unset while pending, and for\nattempts that never reached the card form).",
"type": "string"
},
"createdAt": {
"type": "string"
},
"createdById": {
"type": "integer"
},
"createdByName": {
"type": "string"
},
"description": {
"type": "string"
},
"exchangeRateRub": {
"type": "number"
},
"exchangeRateUsd": {
"type": "number"
},
"formUrl": {
"description": "FormUrl is GBÜS's hosted payment page and SuccessUrl the returnUrl it\nwas registered with - set for every attempt register.do accepted,\nfinalized ones included (unset if registration failed).",
"type": "string"
},
"gatewayReference": {
"type": "string"
},
"gatewayStatus": {
"type": "string"
},
"gbusFeeTmt": {
"type": "number"
},
"id": {
"type": "integer"
},
"maskedPan": {
"type": "string"
},
"orderId": {
"type": "integer"
},
"orderNumber": {
"type": "string"
},
"orderUniqueId": {
"type": "string"
},
"paid": {
"type": "boolean"
},
"passportName": {
"type": "string"
},
"passportSurname": {
"type": "string"
},
"paymentPeriod": {
"type": "string"
},
"successUrl": {
"type": "string"
},
"totalAmountTmt": {
"type": "number"
},
"tvebFeeTmt": {
"type": "number"
},
"tvebFeeUsd": {
"type": "number"
},
"type": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"userId": {
"type": "integer"
}
}
},
"paymenthistory.PaymentLogDTO": {
"type": "object",
"properties": {
"createdAt": {
"type": "string"
},
"createdById": {
"type": "integer"
},
"createdByName": {
"type": "string"
},
"detail": {
"type": "object"
},
"id": {
"type": "integer"
},
"orderId": {
"type": "integer"
},
"step": {
"type": "string"
}
}
},
"paymentsettings.PaymentSettingsDTO": {
"type": "object",
"properties": {
"bankFeeTmt": {
"type": "number"
},
"gbusFeeTmt": {
"type": "number"
},
"maxAmountUsd": {
"type": "number"
},
"sberBankFeeTmt": {
"type": "number"
},
"tvebFeeUsd": {
"type": "number"
},
"updatedAt": {
"type": "string"
}
}
},
"paymentsettings.UpdatePaymentSettingsDTO": {
"type": "object",
"required": [
"bankFeeTmt",
"gbusFeeTmt",
"maxAmountUsd",
"sberBankFeeTmt",
"tvebFeeUsd"
],
"properties": {
"bankFeeTmt": {
"type": "number"
},
"gbusFeeTmt": {
"type": "number"
},
"maxAmountUsd": {
"type": "number"
},
"sberBankFeeTmt": {
"type": "number"
},
"tvebFeeUsd": {
"type": "number"
}
}
},
"paymenttexts.ListPaymentTextDTO": {
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/paymenttexts.PaymentTextDTO"
}
}
}
},
"paymenttexts.PaymentTextDTO": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"id": {
"type": "integer"
},
"isActive": {
"type": "boolean"
},
"name": {
"type": "string"
},
"text": {
"$ref": "#/definitions/shared.LocalizedText"
},
"updatedAt": {
"type": "string"
},
"updatedById": {
"type": "integer"
},
"updatedByName": {
"type": "string"
}
}
},
"paymenttexts.UpdatePaymentTextDTO": {
"type": "object",
"required": [
"isActive",
"name"
],
"properties": {
"isActive": {
"type": "boolean"
},
"name": {
"type": "string"
},
"text": {
"$ref": "#/definitions/shared.LocalizedText"
}
}
},
"perm.Code": {
"type": "string",
"enum": [
"dashboard",
"cards",
"loans",
"users",
"roles",
"branches",
"provinces",
"currencies",
"payment-settings",
"backups",
"activity-logs"
],
"x-enum-varnames": [
"Dashboard",
"Cards",
"Loans",
"Users",
"Roles",
"Branches",
"Provinces",
"Currencies",
"PaymentSettings",
"Backups",
"ActivityLogs"
]
},
"province.CreateProvinceDTO": {
"type": "object",
"required": [
"name",
"region"
],
"properties": {
"active": {
"type": "boolean"
},
"name": {
"$ref": "#/definitions/province.LocalizedName"
},
"region": {
"$ref": "#/definitions/province.LocalizedName"
}
}
},
"province.LocalizedName": {
"type": "object",
"properties": {
"en": {
"type": "string"
},
"ru": {
"type": "string"
},
"tm": {
"type": "string"
}
}
},
"province.UpdateProvinceDTO": {
"type": "object",
"required": [
"name",
"region"
],
"properties": {
"active": {
"type": "boolean"
},
"name": {
"$ref": "#/definitions/province.LocalizedName"
},
"region": {
"$ref": "#/definitions/province.LocalizedName"
}
}
},
"rbac.Scope": {
"type": "string",
"enum": [
"own",
"branch",
"all"
],
"x-enum-comments": {
"ScopeAll": "every branch",
"ScopeBranch": "records of the caller's branch_user branches",
"ScopeOwn": "only records the caller owns (clients)"
},
"x-enum-descriptions": [
"only records the caller owns (clients)",
"records of the caller's branch_user branches",
"every branch"
],
"x-enum-varnames": [
"ScopeOwn",
"ScopeBranch",
"ScopeAll"
]
},
"reasonscard.CreateReasonCardDTO": {
"type": "object",
"required": [
"price",
"title"
],
"properties": {
"active": {
"type": "boolean"
},
"notes": {
"type": "string"
},
"price": {
"type": "string"
},
"title": {
"$ref": "#/definitions/shared.LocalizedText"
}
}
},
"reasonscard.UpdateReasonCardDTO": {
"type": "object",
"required": [
"price",
"title"
],
"properties": {
"active": {
"type": "boolean"
},
"notes": {
"type": "string"
},
"price": {
"type": "string"
},
"title": {
"$ref": "#/definitions/shared.LocalizedText"
}
}
},
"role.CreateRoleDTO": {
"type": "object",
"required": [
"code",
"name",
"permissions",
"scope"
],
"properties": {
"code": {
"type": "string",
"maxLength": 64
},
"name": {
"type": "string"
},
"permissions": {
"type": "array",
"items": {
"$ref": "#/definitions/perm.Code"
}
},
"scope": {
"enum": [
"own",
"branch",
"all"
],
"allOf": [
{
"$ref": "#/definitions/rbac.Scope"
}
]
}
}
},
"role.UpdateRoleDTO": {
"type": "object",
"required": [
"name",
"permissions",
"scope"
],
"properties": {
"name": {
"type": "string"
},
"permissions": {
"type": "array",
"items": {
"$ref": "#/definitions/perm.Code"
}
},
"scope": {
"enum": [
"own",
"branch",
"all"
],
"allOf": [
{
"$ref": "#/definitions/rbac.Scope"
}
]
}
}
},
"shared.LocalizedText": {
"type": "object",
"properties": {
"en": {
"type": "string"
},
"ru": {
"type": "string"
},
"tm": {
"type": "string"
}
}
},
"sysstats.CPU": {
"type": "object",
"properties": {
"cores": {
"type": "integer"
},
"loadAvg": {
"type": "array",
"items": {
"type": "number"
}
},
"usagePercent": {
"type": "number"
}
}
},
"sysstats.Disk": {
"type": "object",
"properties": {
"freeBytes": {
"type": "integer"
},
"path": {
"type": "string"
},
"totalBytes": {
"type": "integer"
},
"usagePercent": {
"type": "number"
},
"usedBytes": {
"type": "integer"
}
}
},
"sysstats.Memory": {
"type": "object",
"properties": {
"availableBytes": {
"type": "integer"
},
"limitBytes": {
"description": "LimitBytes is the container (cgroup) memory limit, nil when unlimited.",
"type": "integer"
},
"swapTotalBytes": {
"type": "integer"
},
"swapUsedBytes": {
"type": "integer"
},
"totalBytes": {
"type": "integer"
},
"usagePercent": {
"type": "number"
},
"usedBytes": {
"type": "integer"
}
}
},
"sysstats.Process": {
"type": "object",
"properties": {
"goroutines": {
"type": "integer"
},
"heapAllocBytes": {
"type": "integer"
},
"numGc": {
"type": "integer"
},
"sysBytes": {
"type": "integer"
},
"uptimeSeconds": {
"type": "integer"
}
}
},
"sysstats.Stats": {
"type": "object",
"properties": {
"arch": {
"type": "string"
},
"collectedAt": {
"type": "string"
},
"cpu": {
"$ref": "#/definitions/sysstats.CPU"
},
"disks": {
"type": "array",
"items": {
"$ref": "#/definitions/sysstats.Disk"
}
},
"goVersion": {
"type": "string"
},
"hostUptimeSeconds": {
"type": "integer"
},
"hostname": {
"type": "string"
},
"memory": {
"$ref": "#/definitions/sysstats.Memory"
},
"os": {
"type": "string"
},
"process": {
"$ref": "#/definitions/sysstats.Process"
}
}
},
"user.CreateUserDTO": {
"type": "object",
"required": [
"email",
"name",
"password",
"username"
],
"properties": {
"active": {
"type": "boolean"
},
"avatar": {
"type": "string"
},
"email": {
"type": "string"
},
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"name": {
"type": "string"
},
"password": {
"type": "string"
},
"phone": {
"type": "string"
},
"role": {
"description": "Role is a role code; RoleId wins when both are sent. Neither → \"user\".",
"type": "string"
},
"roleId": {
"type": "integer"
},
"username": {
"type": "string"
}
}
},
"user.SetUserRoleDTO": {
"type": "object",
"required": [
"roleId"
],
"properties": {
"roleId": {
"type": "integer"
}
}
},
"user.UpdateUserDTO": {
"type": "object",
"required": [
"email",
"name",
"username"
],
"properties": {
"active": {
"type": "boolean"
},
"avatar": {
"type": "string"
},
"email": {
"type": "string"
},
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"name": {
"type": "string"
},
"phone": {
"type": "string"
},
"role": {
"description": "Role is a role code; RoleId wins when both are sent. Neither keeps\nthe user's current role.",
"type": "string"
},
"roleId": {
"type": "integer"
},
"username": {
"type": "string"
}
}
},
"userbranch.CreateUserBranchDTO": {
"type": "object",
"required": [
"branchId",
"userId"
],
"properties": {
"branchId": {
"type": "integer"
},
"userId": {
"type": "integer"
}
}
},
"visamaster.CreateVisaMasterPaymentOrderDTO": {
"type": "object",
"required": [
"address",
"branchId",
"passportName",
"passportSurname",
"phone",
"region",
"senderDepositAccount",
"senderFullName",
"senderPassportNumber",
"senderPassportSerie"
],
"properties": {
"address": {
"type": "string"
},
"amountUsd": {
"type": "number"
},
"branchId": {
"type": "integer"
},
"documents": {
"type": "object"
},
"email": {
"type": "string"
},
"notes": {
"type": "string"
},
"paid": {
"type": "boolean"
},
"passportName": {
"type": "string"
},
"passportSurname": {
"type": "string"
},
"paymentReciever": {
"type": "array",
"items": {
"type": "object"
}
},
"phone": {
"type": "string"
},
"recieverDepositAccount": {
"type": "string"
},
"recieverFullName": {
"type": "string"
},
"recieverPassportNumber": {
"type": "string"
},
"recieverPassportSerie": {
"type": "string"
},
"region": {
"type": "string"
},
"senderDatas": {
"type": "object"
},
"senderDepositAccount": {
"type": "string"
},
"senderFullName": {
"type": "string"
},
"senderPassportNumber": {
"type": "string"
},
"senderPassportSerie": {
"type": "string"
},
"status": {
"type": "string"
},
"type": {
"type": "string"
},
"uniqueId": {
"type": "string"
},
"userId": {
"type": "integer"
}
}
},
"visamaster.UpdateVisaMasterPaymentOrderDTO": {
"type": "object",
"required": [
"address",
"branchId",
"passportName",
"passportSurname",
"phone",
"region",
"senderDepositAccount",
"senderFullName",
"senderPassportNumber",
"senderPassportSerie"
],
"properties": {
"address": {
"type": "string"
},
"amountUsd": {
"type": "number"
},
"branchId": {
"type": "integer"
},
"documents": {
"type": "object"
},
"email": {
"type": "string"
},
"notes": {
"type": "string"
},
"paid": {
"type": "boolean"
},
"passportName": {
"type": "string"
},
"passportSurname": {
"type": "string"
},
"paymentReciever": {
"type": "array",
"items": {
"type": "object"
}
},
"phone": {
"type": "string"
},
"recieverDepositAccount": {
"type": "string"
},
"recieverFullName": {
"type": "string"
},
"recieverPassportNumber": {
"type": "string"
},
"recieverPassportSerie": {
"type": "string"
},
"region": {
"type": "string"
},
"senderDatas": {
"type": "object"
},
"senderDepositAccount": {
"type": "string"
},
"senderFullName": {
"type": "string"
},
"senderPassportNumber": {
"type": "string"
},
"senderPassportSerie": {
"type": "string"
},
"status": {
"type": "string"
},
"type": {
"type": "string"
},
"uniqueId": {
"type": "string"
},
"userId": {
"type": "integer"
}
}
},
"visamasteractions.ListOrderActionDTO": {
"type": "object",
"properties": {
"actions": {
"type": "array",
"items": {
"$ref": "#/definitions/visamasteractions.OrderActionDTO"
}
},
"count": {
"type": "integer"
}
}
},
"visamasteractions.OrderActionDTO": {
"type": "object",
"properties": {
"createdAt": {
"type": "string"
},
"createdById": {
"type": "integer"
},
"createdByName": {
"type": "string"
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"nameLabel": {
"$ref": "#/definitions/shared.LocalizedText"
},
"orderId": {
"type": "integer"
},
"status": {
"type": "string"
},
"target": {
"$ref": "#/definitions/visamasteractions.OrderActionTargetDTO"
}
}
},
"visamasteractions.OrderActionDetailDTO": {
"type": "object",
"properties": {
"changes": {
"type": "object"
},
"createdAt": {
"type": "string"
},
"createdById": {
"type": "integer"
},
"createdByName": {
"type": "string"
},
"exception": {
"type": "string"
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"nameLabel": {
"$ref": "#/definitions/shared.LocalizedText"
},
"orderId": {
"type": "integer"
},
"original": {
"type": "object"
},
"status": {
"type": "string"
},
"target": {
"$ref": "#/definitions/visamasteractions.OrderActionTargetDTO"
}
}
},
"visamasteractions.OrderActionTargetDTO": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"label": {
"$ref": "#/definitions/shared.LocalizedText"
},
"type": {
"type": "string"
},
"uniqueId": {
"type": "string"
}
}
},
"visamasterpay.CallbackResultDTO": {
"type": "object",
"properties": {
"data": {
"type": "string"
},
"paid": {
"type": "boolean"
}
}
},
"visamasterpay.PayOrderDTO": {
"type": "object",
"properties": {
"amountTmt": {
"type": "number"
},
"paymentPeriod": {
"type": "string",
"format": "date"
}
}
},
"visamasterpay.PaymentInitResultDTO": {
"type": "object",
"properties": {
"formUrl": {
"type": "string"
},
"orderId": {
"type": "integer"
},
"orderNumber": {
"type": "string"
},
"paymentId": {
"type": "integer"
},
"successUrl": {
"type": "string"
}
}
},
"visamasterpay.PaymentQuoteDTO": {
"type": "object",
"properties": {
"bankFeeTmt": {
"type": "number"
},
"exchangeRateRub": {
"type": "number"
},
"exchangeRateUsd": {
"type": "number"
},
"gbusFeeTmt": {
"type": "number"
},
"maxAmountTmt": {
"type": "number"
},
"payableToday": {
"type": "boolean"
},
"tvebFeeTmt": {
"type": "number"
},
"tvebFeeUsd": {
"type": "number"
},
"type": {
"type": "string"
}
}
},
"visamasterpay.PaymentResultDTO": {
"type": "object",
"properties": {
"amountTmt": {
"type": "number"
},
"amountUsd": {
"type": "number"
},
"bankFeeTmt": {
"type": "number"
},
"createdAt": {
"type": "string"
},
"exchangeRateRub": {
"type": "number"
},
"exchangeRateUsd": {
"type": "number"
},
"gatewayReference": {
"type": "string"
},
"gatewayResponse": {
"type": "object"
},
"gatewayStatus": {
"type": "string"
},
"gbusFeeTmt": {
"type": "number"
},
"id": {
"type": "integer"
},
"orderId": {
"type": "integer"
},
"orderNumber": {
"type": "string"
},
"paid": {
"type": "boolean"
},
"paymentPeriod": {
"type": "string"
},
"totalAmountTmt": {
"type": "number"
},
"tvebFeeTmt": {
"type": "number"
},
"tvebFeeUsd": {
"type": "number"
},
"type": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
}
}
},
"securityDefinitions": {
"BearerAuth": {
"type": "apiKey",
"name": "Authorization",
"in": "header"
}
},
"tags": [
{
"description": "Authentication",
"name": "auth"
},
{
"description": "Provinces",
"name": "province"
},
{
"description": "Branches",
"name": "branches"
},
{
"description": "Payment cards",
"name": "payment-card"
},
{
"description": "Reason cards",
"name": "reason-card"
},
{
"description": "Loan types",
"name": "loan-type"
},
{
"description": "Loan required documents",
"name": "loan-document"
},
{
"description": "Loan repayments",
"name": "loans-repayment"
},
{
"description": "Card orders",
"name": "card-orders"
},
{
"description": "Card rekwizit (card details) orders",
"name": "card-rekwizit-orders"
},
{
"description": "User activity audit trail",
"name": "activity-logs"
},
{
"description": "Visa/Master and Sber student-transfer orders: list, view, create, edit, delete",
"name": "visa-master-orders"
},
{
"description": "Visa/Master we Sber sargytlarynyň amallary (Ammallar): kim, haçan, näme goşdy, üýtgetdi ýa-da pozdy. Ulanylyş tertibi: 1) GET /visa-master-payment-orders/{id}/actions - sargydyň amallary; 2) GET /visa-master-payment-orders/{id}/actions/{actionId} - bir amalyň öňki we täze bahalary",
"name": "visa-master-order-actions"
},
{
"description": "Paying a Visa/Master or Sber order through GBÜS (HALKBANK): quote, pay, status re-check, bank callback",
"name": "visa-master-payment"
},
{
"description": "Visa/Master we Sber töleg synanyşyklarynyň taryhy. Ulanylyş tertibi: 1) GET /payment-history - ähli tölegler; 2) GET /payment-history/{id} - bir sargydyň tölegleri; 3) GET /payment-history/payments/{id} - bir tölegiň jikme-jikligi; 4) GET /payment-history/{id}/gateway - sargydyň tölegleri GBÜS jogaplary bilen; 5) GET /payment-history/{id}/logs - sargydyň ädimme-ädim töleg loglary",
"name": "payment-history"
},
{
"description": "Database SQL backups",
"name": "backups"
},
{
"description": "Currency exchange rates",
"name": "currencies"
}
]
}