Files
online-backend/docs/swagger.json
GuwandykA e0d03730de
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
added soft deleted
2026-09-05 17:58:23 +05:00

9702 lines
321 KiB
JSON

{
"swagger": "2.0",
"info": {
"description": "Online payment system admin API.",
"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 from role_user.",
"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"
}
],
"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
}
],
"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"
}
],
"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",
"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
}
],
"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
}
],
"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
}
],
"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": "Creates a branch-user assignment, or updates the user's existing branch if one is already assigned",
"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"
}
}
],
"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
}
],
"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"
}
],
"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"
}
}
],
"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"
}
],
"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"
}
],
"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
}
],
"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"
}
}
],
"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
}
],
"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"
}
],
"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"
}
}
],
"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
}
],
"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"
}
}
],
"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
}
],
"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"
}
],
"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"
}
}
],
"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
}
],
"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"
}
}
],
"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
}
],
"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"
}
],
"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"
}
}
],
"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
}
],
"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"
}
}
],
"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
}
],
"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"
}
],
"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"
}
}
],
"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
}
],
"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"
}
}
],
"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
}
],
"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"
}
],
"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"
}
}
],
"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
}
],
"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"
}
}
],
"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
}
],
"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"
}
],
"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"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/currency.CurrencyDTO"
}
},
"400": {
"description": "Bad Request",
"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
}
],
"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"
}
}
],
"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"
}
}
}
},
"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
}
],
"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/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"
}
],
"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": {
"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
}
],
"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
}
],
"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
}
],
"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"
}
}
],
"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"
}
}
],
"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"
}
],
"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"
}
}
],
"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"
}
],
"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
}
],
"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"
}
}
],
"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
}
],
"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"
}
],
"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"
}
}
],
"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"
}
],
"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
}
],
"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"
}
}
],
"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
}
],
"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"
}
],
"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"
}
}
],
"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
}
],
"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"
}
}
],
"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
}
],
"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"
}
],
"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"
}
}
],
"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
}
],
"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"
}
}
],
"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
}
],
"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"
}
}
],
"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"
}
],
"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"
}
}
],
"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
}
],
"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"
}
}
],
"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
}
],
"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"
}
}
],
"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"
}
],
"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"
}
}
],
"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
}
],
"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"
}
}
],
"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
}
],
"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"
}
}
],
"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"
}
}
}
}
},
"/permission-roles": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Creates a permission-role assignment, or updates the existing pair if already assigned",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"permission-roles"
],
"summary": "Assign permission to role",
"parameters": [
{
"description": "Permission-role payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/permissionrole.CreatePermissionRoleDTO"
}
}
],
"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"
}
}
}
}
},
"/permission-roles/{id}": {
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Deletes a permission-role assignment",
"produces": [
"application/json"
],
"tags": [
"permission-roles"
],
"summary": "Remove permission from role",
"parameters": [
{
"type": "integer",
"description": "Permission-role ID",
"name": "id",
"in": "path",
"required": true
}
],
"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"
}
}
}
}
},
"/permission-users": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Grants (\"allow\") or revokes (\"deny\") a permission for a specific user on top of their role, or updates the effect if the pair is already assigned",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"permission-users"
],
"summary": "Assign a permission override to a user",
"parameters": [
{
"description": "Permission-user payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/permissionuser.CreatePermissionUserDTO"
}
}
],
"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"
}
}
}
}
},
"/permission-users/{id}": {
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Deletes a permission-user assignment, falling back to the user's role for that permission",
"produces": [
"application/json"
],
"tags": [
"permission-users"
],
"summary": "Remove a user's permission override",
"parameters": [
{
"type": "integer",
"description": "Permission-user ID",
"name": "id",
"in": "path",
"required": true
}
],
"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"
}
}
}
}
},
"/permissions": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns paginated permissions with optional filters",
"produces": [
"application/json"
],
"tags": [
"permission"
],
"summary": "List permissions",
"parameters": [
{
"type": "string",
"description": "Filter by name",
"name": "permission_name",
"in": "query"
},
{
"type": "string",
"description": "Filter by guard (web, operator, admin)",
"name": "guard_name",
"in": "query"
},
{
"type": "string",
"description": "Filter by saha (cards, loans, …)",
"name": "module",
"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"
}
],
"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 permission",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"permission"
],
"summary": "Create permission",
"parameters": [
{
"description": "Permission payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/permission.CreatePermissionDTO"
}
}
],
"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"
}
}
}
}
},
"/permissions/tree": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns permissions grouped as guard → module (saha) → permissions",
"produces": [
"application/json"
],
"tags": [
"permission"
],
"summary": "Permission tree",
"parameters": [
{
"type": "string",
"description": "Filter by guard (web, operator, admin)",
"name": "guard_name",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/appresult.AppSuccess"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/permissions/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a single permission",
"produces": [
"application/json"
],
"tags": [
"permission"
],
"summary": "Get permission by ID",
"parameters": [
{
"type": "integer",
"description": "Permission ID",
"name": "id",
"in": "path",
"required": true
}
],
"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 permission",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"permission"
],
"summary": "Update permission",
"parameters": [
{
"type": "integer",
"description": "Permission ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Permission payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/permission.UpdatePermissionDTO"
}
}
],
"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 permission",
"produces": [
"application/json"
],
"tags": [
"permission"
],
"summary": "Delete permission",
"parameters": [
{
"type": "integer",
"description": "Permission ID",
"name": "id",
"in": "path",
"required": true
}
],
"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"
}
}
}
}
},
"/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",
"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"
}
}
],
"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"
}
],
"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"
}
}
],
"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
}
],
"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"
}
}
],
"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
}
],
"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"
}
],
"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"
}
}
],
"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
}
],
"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"
}
}
],
"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
}
],
"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"
}
}
],
"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"
}
}
],
"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"
}
}
}
}
},
"/role-users": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Creates a role-user assignment, or updates the user's existing role if one is already assigned",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"role-users"
],
"summary": "Assign user to role",
"parameters": [
{
"description": "Role-user payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/roleusers.CreateRoleUserDTO"
}
}
],
"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"
}
}
}
}
},
"/role-users/{id}": {
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Deletes a role-user assignment",
"produces": [
"application/json"
],
"tags": [
"role-users"
],
"summary": "Remove user from role",
"parameters": [
{
"type": "integer",
"description": "Role-user ID",
"name": "id",
"in": "path",
"required": true
}
],
"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"
}
}
}
}
},
"/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",
"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"
}
],
"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 role",
"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"
}
}
],
"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"
}
}
}
}
},
"/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
}
],
"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 role",
"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"
}
}
],
"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 role",
"produces": [
"application/json"
],
"tags": [
"role"
],
"summary": "Delete role",
"parameters": [
{
"type": "integer",
"description": "Role ID",
"name": "id",
"in": "path",
"required": true
}
],
"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"
}
}
}
}
},
"/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"
}
}
],
"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 with role user, including roleId",
"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"
}
],
"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",
"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"
}
}
],
"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"
}
}
}
}
},
"/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"
}
],
"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"
}
],
"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
}
],
"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",
"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"
}
}
],
"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 user",
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Delete user",
"parameters": [
{
"type": "integer",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
}
],
"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": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns paginated visa/master payment orders with branch and user details",
"produces": [
"application/json"
],
"tags": [
"visa-master-payment-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 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"
}
],
"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-payment-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"
}
}
],
"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/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a single visa/master payment order with branch and user details",
"produces": [
"application/json"
],
"tags": [
"visa-master-payment-orders"
],
"summary": "Get visa/master payment order by ID",
"parameters": [
{
"type": "integer",
"description": "Visa/master payment order ID",
"name": "id",
"in": "path",
"required": true
}
],
"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-payment-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"
}
}
],
"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-payment-orders"
],
"summary": "Delete visa/master payment order",
"parameters": [
{
"type": "integer",
"description": "Visa/master payment order ID",
"name": "id",
"in": "path",
"required": true
}
],
"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"
}
}
}
}
}
},
"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"
],
"properties": {
"active": {
"type": "boolean"
},
"address": {
"$ref": "#/definitions/branches.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/branches.LocalizedText"
},
"phoneNumbers": {
"type": "string"
},
"provinceId": {
"type": "integer"
},
"region": {
"type": "string"
}
}
},
"branches.LocalizedText": {
"type": "object",
"properties": {
"en": {
"type": "string"
},
"ru": {
"type": "string"
},
"tm": {
"type": "string"
}
}
},
"branches.UpdateBranchDTO": {
"type": "object",
"required": [
"address",
"name",
"region"
],
"properties": {
"active": {
"type": "boolean"
},
"address": {
"$ref": "#/definitions/branches.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/branches.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"
},
"uniqueId": {
"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"
},
"uniqueId": {
"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"
}
}
},
"permission.CreatePermissionDTO": {
"type": "object",
"required": [
"code",
"guardName",
"module",
"name"
],
"properties": {
"code": {
"type": "string"
},
"guardName": {
"type": "string",
"enum": [
"web",
"operator",
"admin"
]
},
"module": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"permission.UpdatePermissionDTO": {
"type": "object",
"required": [
"code",
"guardName",
"module",
"name"
],
"properties": {
"code": {
"type": "string"
},
"guardName": {
"type": "string",
"enum": [
"web",
"operator",
"admin"
]
},
"module": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"permissionrole.CreatePermissionRoleDTO": {
"type": "object",
"required": [
"permissionId",
"roleId"
],
"properties": {
"permissionId": {
"type": "integer"
},
"roleId": {
"type": "integer"
}
}
},
"permissionuser.CreatePermissionUserDTO": {
"type": "object",
"required": [
"effect",
"permissionId",
"userId"
],
"properties": {
"effect": {
"type": "string",
"enum": [
"allow",
"deny"
]
},
"permissionId": {
"type": "integer"
},
"userId": {
"type": "integer"
}
}
},
"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"
}
}
},
"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",
"guardName",
"name"
],
"properties": {
"code": {
"type": "string"
},
"guardName": {
"type": "string",
"enum": [
"web",
"operator",
"admin"
]
},
"name": {
"type": "string"
}
}
},
"role.UpdateRoleDTO": {
"type": "object",
"required": [
"code",
"guardName",
"name"
],
"properties": {
"code": {
"type": "string"
},
"guardName": {
"type": "string",
"enum": [
"web",
"operator",
"admin"
]
},
"name": {
"type": "string"
}
}
},
"roleusers.CreateRoleUserDTO": {
"type": "object",
"required": [
"roleId",
"userId"
],
"properties": {
"roleId": {
"type": "integer"
},
"userId": {
"type": "integer"
}
}
},
"shared.LocalizedText": {
"type": "object",
"properties": {
"en": {
"type": "string"
},
"ru": {
"type": "string"
},
"tm": {
"type": "string"
}
}
},
"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": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"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": {
"type": "string"
},
"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"
},
"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"
},
"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"
}
}
}
},
"securityDefinitions": {
"BearerAuth": {
"type": "apiKey",
"name": "Authorization",
"in": "header"
}
}
}