basePath: /api/admin definitions: appresult.AppError: properties: code: type: string message: type: string status: type: boolean type: object appresult.AppSuccess: properties: code: type: string data: {} message: type: string status: type: boolean type: object auth.ForgotPasswordDTO: properties: name: type: string required: - name type: object auth.LoginDTO: properties: name: type: string password: type: string phone: type: string required: - password type: object auth.RefreshTokenDTO: properties: refreshToken: type: string required: - refreshToken type: object auth.RegisterDTO: properties: name: type: string password: minLength: 6 type: string passwordConfirm: type: string phone: type: string username: minLength: 3 type: string required: - name - password - passwordConfirm - phone - username type: object auth.ResetPasswordDTO: properties: code: type: string name: type: string password: minLength: 6 type: string passwordConfirm: type: string required: - code - name - password - passwordConfirm type: object auth.UpdateProfileDTO: properties: avatar: type: string firstName: type: string lastName: type: string name: type: string phone: type: string required: - name type: object auth.VerifyDTO: properties: code: type: string phone: type: string required: - code - phone type: object branches.CreateBranchDTO: 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 uniqueCode: type: string required: - address - name - region type: object branches.LocalizedText: properties: en: type: string ru: type: string tm: type: string type: object branches.UpdateBranchDTO: 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 uniqueCode: type: string required: - address - name - region type: object cardorder.CreateCardOrderDTO: properties: bornAt: type: string 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 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 required: - bornPlace - branchId - cardStateId - cardTypeId - citizenship - customerName - customerSurname - passportFour - passportGivenAt - passportGivenBy - passportId - passportOne - passportSerie - passportThree - passportTwo - region type: object cardorder.UpdateCardOrderDTO: properties: bornAt: type: string 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 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 required: - bornPlace - branchId - cardStateId - cardTypeId - citizenship - customerName - customerSurname - passportFour - passportGivenAt - passportGivenBy - passportId - passportOne - passportSerie - passportThree - passportTwo - region type: object cardpinorders.CreateCardPinOrderDTO: properties: bornAt: type: string 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 required: - branchId - cardTypeId - customerName - customerSurname - passportFour - passportId - passportOne - passportSerie - passportThree - passportTwo - region type: object cardpinorders.UpdateCardPinOrderDTO: properties: bornAt: type: string 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 required: - branchId - cardTypeId - customerName - customerSurname - passportFour - passportId - passportOne - passportSerie - passportThree - passportTwo - region type: object cards.CreateCardDTO: properties: month: type: string name: type: string number: type: string type: type: string userId: type: integer year: type: string required: - month - name - number type: object cards.UpdateCardDTO: properties: month: type: string name: type: string number: type: string type: type: string userId: type: integer year: type: string required: - month - name - number type: object loanorders.CreateLoanOrderDTO: properties: bornAt: type: string 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 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 required: - bornAt - bornPlace - branchId - customerName - customerSurname - education - loanType - marriageStatus - passportAddress - passportFour - passportGivenAt - passportGivenBy - passportId - passportOne - passportSerie - passportThree - passportTwo - phone - realAddress - region type: object loanorders.UpdateLoanOrderDTO: properties: bornAt: type: string 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 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 required: - bornAt - bornPlace - branchId - customerName - customerSurname - education - loanType - marriageStatus - passportAddress - passportFour - passportGivenAt - passportGivenBy - passportId - passportOne - passportSerie - passportThree - passportTwo - phone - realAddress - region type: object loanpaidletter.CreateLoanPaidLetterDTO: 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 required: - branchId - customerName - customerSurname - passportId - passportSerie - phone - region type: object loanpaidletter.UpdateLoanPaidLetterDTO: 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 required: - branchId - customerName - customerSurname - passportId - passportSerie - phone - region type: object loansdocument.CreateLoanDocumentDTO: properties: active: type: boolean name: type: string value: type: string required: - name - value type: object loansdocument.UpdateLoanDocumentActiveDTO: properties: active: type: boolean type: object loansdocument.UpdateLoanDocumentDTO: properties: active: type: boolean name: type: string value: type: string required: - name - value type: object loansrepayment.CreateLoanRepaymentDTO: properties: accountNumber: type: string passportId: type: string passportSerie: type: string userId: type: integer required: - accountNumber - passportId - passportSerie - userId type: object loansrepayment.UpdateLoanRepaymentDTO: properties: accountNumber: type: string passportId: type: string passportSerie: type: string userId: type: integer required: - accountNumber - passportId - passportSerie - userId type: object loantype.CreateLoanTypeDTO: properties: active: type: boolean content: $ref: '#/definitions/loantype.LocalizedTitle' loanTerm: type: string tax: type: number title: $ref: '#/definitions/loantype.LocalizedTitle' required: - content - loanTerm - tax - title type: object loantype.LocalizedTitle: properties: en: type: string ru: type: string tm: type: string type: object loantype.UpdateLoanTypeDTO: properties: active: type: boolean content: $ref: '#/definitions/loantype.LocalizedTitle' loanTerm: type: string tax: type: number title: $ref: '#/definitions/loantype.LocalizedTitle' required: - content - loanTerm - tax - title type: object paymentcard.CreatePaymentCardDTO: properties: active: type: boolean notes: type: string price: type: string title: $ref: '#/definitions/paymentcard.LocalizedText' required: - price - title type: object paymentcard.LocalizedText: properties: en: type: string ru: type: string tm: type: string type: object paymentcard.UpdatePaymentCardActiveDTO: properties: active: type: boolean type: object paymentcard.UpdatePaymentCardDTO: properties: active: type: boolean notes: type: string price: type: string title: $ref: '#/definitions/paymentcard.LocalizedText' required: - price - title type: object permission.CreatePermissionDTO: properties: code: type: string guardName: type: string name: type: string required: - code - guardName - name type: object permission.UpdatePermissionDTO: properties: code: type: string guardName: type: string name: type: string required: - code - guardName - name type: object permissionuser.CreatePermissionUserDTO: properties: permissionId: type: integer userId: type: integer required: - permissionId - userId type: object province.CreateProvinceDTO: properties: active: type: boolean name: $ref: '#/definitions/province.LocalizedName' region: $ref: '#/definitions/province.LocalizedName' required: - name - region type: object province.LocalizedName: properties: en: type: string ru: type: string tm: type: string type: object province.UpdateProvinceDTO: properties: active: type: boolean name: $ref: '#/definitions/province.LocalizedName' region: $ref: '#/definitions/province.LocalizedName' required: - name - region type: object reasonscard.CreateReasonCardDTO: properties: active: type: boolean notes: type: string price: type: string title: $ref: '#/definitions/reasonscard.LocalizedText' required: - price - title type: object reasonscard.LocalizedText: properties: en: type: string ru: type: string tm: type: string type: object reasonscard.UpdateReasonCardDTO: properties: active: type: boolean notes: type: string price: type: string title: $ref: '#/definitions/reasonscard.LocalizedText' required: - price - title type: object role.CreateRoleDTO: properties: code: type: string guardName: type: string name: type: string required: - code - guardName - name type: object role.UpdateRoleDTO: properties: code: type: string guardName: type: string name: type: string required: - code - guardName - name type: object roleusers.CreateRoleUserDTO: properties: roleId: type: integer userId: type: integer required: - roleId - userId type: object user.CreateUserDTO: properties: active: type: boolean avatar: type: string email: type: string firstName: type: string lastName: type: string lightMode: type: integer name: type: string password: type: string phone: type: string role: type: string socialMedia: $ref: '#/definitions/user.SocialMedia' username: type: string required: - email - name - password - username type: object user.SocialMedia: properties: facebook: type: string instagram: type: string telegram: type: string type: object user.UpdateUserDTO: properties: active: type: boolean avatar: type: string email: type: string firstName: type: string lastName: type: string lightMode: type: integer name: type: string phone: type: string role: type: string socialMedia: $ref: '#/definitions/user.SocialMedia' username: type: string required: - email - name - username type: object userbranch.CreateUserBranchDTO: properties: branchId: type: integer userId: type: integer required: - branchId - userId type: object host: localhost:5005 info: contact: {} description: Online payment system admin API. title: Service APIs version: "1.0" paths: /activity-logs: get: description: Returns a paginated audit trail of user actions (create/update/delete) parameters: - description: Filter by user ID in: query name: user_id type: integer - description: Filter by module (e.g. cards, branch-users) in: query name: module type: string - description: Filter by action (create, update, delete) in: query name: action type: string - default: 1 description: Page number in: query name: page type: integer - default: 10 description: Items per page in: query name: limit type: integer produces: - application/json 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' security: - BearerAuth: [] summary: List activity logs tags: - activity-logs /activity-logs/{id}: get: description: Returns a single activity log entry parameters: - description: Activity log ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Get activity log by ID tags: - activity-logs /branch-users: get: description: Returns the authenticated user's branch-user assignments with the related user and branch parameters: - description: Filter by branch name (en, ru, tm) in: query name: branch_name type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/appresult.AppSuccess' "401": description: Unauthorized schema: $ref: '#/definitions/appresult.AppError' "500": description: Internal Server Error schema: $ref: '#/definitions/appresult.AppError' security: - BearerAuth: [] summary: List branch users tags: - branch-users post: consumes: - application/json description: Creates a branch-user assignment parameters: - description: Branch-user payload in: body name: body required: true schema: $ref: '#/definitions/userbranch.CreateUserBranchDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Assign user to branch tags: - branch-users /branch-users/{id}: delete: description: Deletes a branch-user assignment parameters: - description: Branch-user ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Remove user from branch tags: - branch-users /branches: get: description: Returns paginated branches with optional filters parameters: - description: Filter by province ID in: query name: province_id type: integer - description: Filter by province name (en, ru, tm) in: query name: province_name type: string - description: Filter by branch name (en, ru, tm) in: query name: branch_name type: string - description: Filter by unique code in: query name: unique_code type: string - default: 1 description: Page number in: query name: page type: integer - default: 10 description: Items per page in: query name: limit type: integer produces: - application/json 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' security: - BearerAuth: [] summary: List branches tags: - branches post: consumes: - application/json description: Creates a new branch parameters: - description: Branch payload in: body name: body required: true schema: $ref: '#/definitions/branches.CreateBranchDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Create branch tags: - branches /branches/{id}: delete: description: Deletes a branch parameters: - description: Branch ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Delete branch tags: - branches get: description: Returns a single branch parameters: - description: Branch ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Get branch by ID tags: - branches put: consumes: - application/json description: Updates an existing branch parameters: - description: Branch ID in: path name: id required: true type: integer - description: Branch payload in: body name: body required: true schema: $ref: '#/definitions/branches.UpdateBranchDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Update branch tags: - branches /branches/etraps: get: description: Returns provinces (etraps) for the selected region; pick id as provinceId parameters: - description: Region name (en, ru or tm) in: query name: region required: true type: string - default: true description: Only active etraps in: query name: active type: boolean produces: - application/json 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' security: - BearerAuth: [] summary: List etraps by region for branch create tags: - branches /branches/regions: get: description: Returns distinct regions from provinces (use before selecting etrap/provinceId) parameters: - default: true description: Only active provinces in: query name: active type: boolean produces: - application/json 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' security: - BearerAuth: [] summary: List regions for branch create tags: - branches /card-orders: get: description: Returns paginated card orders with optional filters parameters: - description: Filter by status in: query name: status type: string - description: Filter by branch ID in: query name: branch_id type: integer - description: Filter by user ID in: query name: user_id type: integer - description: Filter by card state ID in: query name: card_state_id type: integer - description: Filter by card type ID in: query name: card_type_id type: integer - description: Filter by region in: query name: region type: string - default: 1 description: Page number in: query name: page type: integer - default: 10 description: Items per page in: query name: limit type: integer produces: - application/json 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' security: - BearerAuth: [] summary: List card orders tags: - card-orders post: consumes: - application/json description: Creates a new card order parameters: - description: Card order payload in: body name: body required: true schema: $ref: '#/definitions/cardorder.CreateCardOrderDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Create card order tags: - card-orders /card-orders/{id}: delete: description: Deletes a card order parameters: - description: Card order ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Delete card order tags: - card-orders get: description: Returns a single card order parameters: - description: Card order ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Get card order by ID tags: - card-orders put: consumes: - application/json description: Updates an existing card order parameters: - description: Card order ID in: path name: id required: true type: integer - description: Card order payload in: body name: body required: true schema: $ref: '#/definitions/cardorder.UpdateCardOrderDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Update card order tags: - card-orders /card-pin-orders: get: description: Returns paginated card pin orders with optional filters parameters: - description: Filter by status in: query name: status type: string - description: Filter by branch ID in: query name: branch_id type: integer - description: Filter by user ID in: query name: user_id type: integer - description: Filter by card type ID in: query name: card_type_id type: integer - description: Filter by region in: query name: region type: string - default: 1 description: Page number in: query name: page type: integer - default: 10 description: Items per page in: query name: limit type: integer produces: - application/json 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' security: - BearerAuth: [] summary: List card pin orders tags: - card-pin-orders post: consumes: - application/json description: Creates a new card pin order parameters: - description: Card pin order payload in: body name: body required: true schema: $ref: '#/definitions/cardpinorders.CreateCardPinOrderDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Create card pin order tags: - card-pin-orders /card-pin-orders/{id}: delete: description: Deletes a card pin order parameters: - description: Card pin order ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Delete card pin order tags: - card-pin-orders get: description: Returns a single card pin order parameters: - description: Card pin order ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Get card pin order by ID tags: - card-pin-orders put: consumes: - application/json description: Updates an existing card pin order parameters: - description: Card pin order ID in: path name: id required: true type: integer - description: Card pin order payload in: body name: body required: true schema: $ref: '#/definitions/cardpinorders.UpdateCardPinOrderDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Update card pin order tags: - card-pin-orders /cards: get: description: Returns paginated cards with optional filters parameters: - description: Filter by user ID in: query name: user_id type: integer - description: Filter by card type in: query name: type type: string - default: 1 description: Page number in: query name: page type: integer - default: 10 description: Items per page in: query name: limit type: integer produces: - application/json 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' security: - BearerAuth: [] summary: List cards tags: - cards post: consumes: - application/json description: Creates a new card parameters: - description: Card payload in: body name: body required: true schema: $ref: '#/definitions/cards.CreateCardDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Create card tags: - cards /cards/{id}: delete: description: Deletes a card parameters: - description: Card ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Delete card tags: - cards get: description: Returns a single card parameters: - description: Card ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Get card by ID tags: - cards put: consumes: - application/json description: Updates an existing card parameters: - description: Card ID in: path name: id required: true type: integer - description: Card payload in: body name: body required: true schema: $ref: '#/definitions/cards.UpdateCardDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Update card tags: - cards /file: post: consumes: - multipart/form-data description: file upload parameters: - description: this is a test file in: formData name: file required: true type: file produces: - application/json 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' security: - BearerAuth: [] tags: - file-upload /file/{id}: delete: description: remove file parameters: - description: object name in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/appresult.AppSuccess' "500": description: Internal Server Error schema: $ref: '#/definitions/appresult.AppError' security: - BearerAuth: [] tags: - file-upload get: description: download file parameters: - description: object name in: path name: id required: true type: string produces: - application/octet-stream responses: "200": description: OK schema: type: file "500": description: Internal Server Error schema: $ref: '#/definitions/appresult.AppError' security: - BearerAuth: [] tags: - file-upload /forgot-password: post: consumes: - application/json description: Finds the user by name and sends an SMS verification code parameters: - description: Forgot password payload in: body name: body required: true schema: $ref: '#/definitions/auth.ForgotPasswordDTO' produces: - application/json 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' summary: Forgot password tags: - auth /forgot-password/verify: post: consumes: - application/json description: Confirms the SMS code and sets a new password parameters: - description: Reset password payload in: body name: body required: true schema: $ref: '#/definitions/auth.ResetPasswordDTO' produces: - application/json 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' summary: Reset password tags: - auth /loan-orders: get: description: Returns paginated loan orders with optional filters parameters: - description: Filter by status in: query name: status type: string - description: Filter by branch ID in: query name: branch_id type: integer - description: Filter by user ID in: query name: user_id type: integer - description: Filter by region in: query name: region type: string - default: 1 description: Page number in: query name: page type: integer - default: 10 description: Items per page in: query name: limit type: integer produces: - application/json 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' security: - BearerAuth: [] summary: List loan orders tags: - loan-orders post: consumes: - application/json description: Creates a new loan order parameters: - description: Loan order payload in: body name: body required: true schema: $ref: '#/definitions/loanorders.CreateLoanOrderDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Create loan order tags: - loan-orders /loan-orders/{id}: delete: description: Deletes a loan order parameters: - description: Loan order ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Delete loan order tags: - loan-orders get: description: Returns a single loan order parameters: - description: Loan order ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Get loan order by ID tags: - loan-orders put: consumes: - application/json description: Updates an existing loan order parameters: - description: Loan order ID in: path name: id required: true type: integer - description: Loan order payload in: body name: body required: true schema: $ref: '#/definitions/loanorders.UpdateLoanOrderDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Update loan order tags: - loan-orders /loan-paid-off-letters: get: description: Returns paginated loan paid off letters with optional filters parameters: - description: Filter by passport ID in: query name: passport_id type: string - description: Filter by customer name in: query name: name type: string - description: Filter by status in: query name: status type: string - description: Filter by branch ID in: query name: branch_id type: integer - description: Filter by region in: query name: region type: string - default: 1 description: Page number in: query name: page type: integer - default: 10 description: Items per page in: query name: limit type: integer produces: - application/json 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' security: - BearerAuth: [] summary: List loan paid off letters tags: - loan-paid-off-letters post: consumes: - application/json description: Creates a new loan paid off letter parameters: - description: Loan paid off letter payload in: body name: body required: true schema: $ref: '#/definitions/loanpaidletter.CreateLoanPaidLetterDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Create loan paid off letter tags: - loan-paid-off-letters /loan-paid-off-letters/{id}: delete: description: Deletes a loan paid off letter parameters: - description: Loan paid off letter ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Delete loan paid off letter tags: - loan-paid-off-letters get: description: Returns a single loan paid off letter parameters: - description: Loan paid off letter ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Get loan paid off letter by ID tags: - loan-paid-off-letters put: consumes: - application/json description: Updates an existing loan paid off letter parameters: - description: Loan paid off letter ID in: path name: id required: true type: integer - description: Loan paid off letter payload in: body name: body required: true schema: $ref: '#/definitions/loanpaidletter.UpdateLoanPaidLetterDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Update loan paid off letter tags: - loan-paid-off-letters /loan-paid-off-letters/branches: get: description: Returns branches for the selected province (etrap) id for loan paid-off letter forms parameters: - description: Province ID in: query name: province_id required: true type: integer - default: true description: Only active branches in: query name: active type: boolean produces: - application/json 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' security: - BearerAuth: [] summary: List branches by province tags: - loan-paid-off-letters /loan-types: get: description: Returns paginated loan types with optional filters parameters: - description: Filter by title (en, ru, tm) in: query name: loan_type_name type: string - default: 1 description: Page number in: query name: page type: integer - default: 10 description: Items per page in: query name: limit type: integer produces: - application/json 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' security: - BearerAuth: [] summary: List loan types tags: - loan-type post: consumes: - application/json description: Creates a new loan type parameters: - description: Loan type payload in: body name: body required: true schema: $ref: '#/definitions/loantype.CreateLoanTypeDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Create loan type tags: - loan-type /loan-types/{id}: delete: description: Deletes a loan type parameters: - description: Loan type ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Delete loan type tags: - loan-type get: description: Returns a single loan type parameters: - description: Loan type ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Get loan type by ID tags: - loan-type put: consumes: - application/json description: Updates an existing loan type parameters: - description: Loan type ID in: path name: id required: true type: integer - description: Loan type payload in: body name: body required: true schema: $ref: '#/definitions/loantype.UpdateLoanTypeDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Update loan type tags: - loan-type /loans-documents: get: description: Returns paginated loan documents with optional filters parameters: - description: Filter by name in: query name: document_name type: string - description: Filter by active in: query name: active type: boolean - default: 1 description: Page number in: query name: page type: integer - default: 10 description: Items per page in: query name: limit type: integer produces: - application/json 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' security: - BearerAuth: [] summary: List loan documents tags: - loan-document post: consumes: - application/json description: Creates a new loan document parameters: - description: Loan document payload in: body name: body required: true schema: $ref: '#/definitions/loansdocument.CreateLoanDocumentDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Create loan document tags: - loan-document /loans-documents/{id}: delete: description: Deletes a loan document parameters: - description: Loan document ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Delete loan document tags: - loan-document get: description: Returns a single loan document parameters: - description: Loan document ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Get loan document by ID tags: - loan-document put: consumes: - application/json description: Updates an existing loan document parameters: - description: Loan document ID in: path name: id required: true type: integer - description: Loan document payload in: body name: body required: true schema: $ref: '#/definitions/loansdocument.UpdateLoanDocumentDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Update loan document tags: - loan-document /loans-documents/{id}/active: put: consumes: - application/json description: Enables or disables a loan document parameters: - description: Loan document ID in: path name: id required: true type: integer - description: Active payload in: body name: body required: true schema: $ref: '#/definitions/loansdocument.UpdateLoanDocumentActiveDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Update loan document active tags: - loan-document /loans-repayment: get: description: Returns paginated loan repayments with optional filters parameters: - description: Filter by passport ID in: query name: passport_id type: string - default: 1 description: Page number in: query name: page type: integer - default: 10 description: Items per page in: query name: limit type: integer produces: - application/json 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' security: - BearerAuth: [] summary: List loan repayments tags: - loans-repayment post: consumes: - application/json description: Creates a new loan repayment record parameters: - description: Loan repayment payload in: body name: body required: true schema: $ref: '#/definitions/loansrepayment.CreateLoanRepaymentDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Create loan repayment tags: - loans-repayment /loans-repayment/{id}: delete: description: Deletes a loan repayment record parameters: - description: Loan repayment ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Delete loan repayment tags: - loans-repayment get: description: Returns a single loan repayment parameters: - description: Loan repayment ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Get loan repayment by ID tags: - loans-repayment put: consumes: - application/json description: Updates an existing loan repayment record parameters: - description: Loan repayment ID in: path name: id required: true type: integer - description: Loan repayment payload in: body name: body required: true schema: $ref: '#/definitions/loansrepayment.UpdateLoanRepaymentDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Update loan repayment tags: - loans-repayment /login: post: consumes: - application/json description: Authenticates a user by name or phone, and password parameters: - description: Login payload in: body name: body required: true schema: $ref: '#/definitions/auth.LoginDTO' produces: - application/json 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' summary: Login tags: - auth /payment-cards: get: description: Returns paginated payment cards with optional filters parameters: - description: Filter by card title (en, ru, tm) in: query name: card_name type: string - description: Filter by active in: query name: active type: boolean - default: 1 description: Page number in: query name: page type: integer - default: 10 description: Items per page in: query name: limit type: integer produces: - application/json 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' security: - BearerAuth: [] summary: List payment cards tags: - payment-card post: consumes: - application/json description: Creates a new payment card parameters: - description: Payment card payload in: body name: body required: true schema: $ref: '#/definitions/paymentcard.CreatePaymentCardDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Create payment card tags: - payment-card /payment-cards/{id}: delete: description: Deletes a payment card parameters: - description: Payment card ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Delete payment card tags: - payment-card get: description: Returns a single payment card parameters: - description: Payment card ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Get payment card by ID tags: - payment-card put: consumes: - application/json description: Updates an existing payment card parameters: - description: Payment card ID in: path name: id required: true type: integer - description: Payment card payload in: body name: body required: true schema: $ref: '#/definitions/paymentcard.UpdatePaymentCardDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Update payment card tags: - payment-card /payment-cards/{id}/active: put: consumes: - application/json description: Enables or disables a payment card parameters: - description: Payment card ID in: path name: id required: true type: integer - description: Active payload in: body name: body required: true schema: $ref: '#/definitions/paymentcard.UpdatePaymentCardActiveDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Update payment card active tags: - payment-card /permission-users: get: description: Returns the authenticated user's permission-user assignments with the related user and permission parameters: - description: Filter by permission name in: query name: permission_name type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/appresult.AppSuccess' "401": description: Unauthorized schema: $ref: '#/definitions/appresult.AppError' "500": description: Internal Server Error schema: $ref: '#/definitions/appresult.AppError' security: - BearerAuth: [] summary: List permission users tags: - permission-users post: consumes: - application/json description: Creates a permission-user assignment parameters: - description: Permission-user payload in: body name: body required: true schema: $ref: '#/definitions/permissionuser.CreatePermissionUserDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Assign user to permission tags: - permission-users /permission-users/{id}: delete: description: Deletes a permission-user assignment parameters: - description: Permission-user ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Remove user from permission tags: - permission-users /permissions: get: description: Returns paginated permissions with optional filters parameters: - description: Filter by name in: query name: permission_name type: string - default: 1 description: Page number in: query name: page type: integer - default: 10 description: Items per page in: query name: limit type: integer produces: - application/json 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' security: - BearerAuth: [] summary: List permissions tags: - permission post: consumes: - application/json description: Creates a new permission parameters: - description: Permission payload in: body name: body required: true schema: $ref: '#/definitions/permission.CreatePermissionDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Create permission tags: - permission /permissions/{id}: delete: description: Deletes a permission parameters: - description: Permission ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Delete permission tags: - permission get: description: Returns a single permission parameters: - description: Permission ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Get permission by ID tags: - permission put: consumes: - application/json description: Updates an existing permission parameters: - description: Permission ID in: path name: id required: true type: integer - description: Permission payload in: body name: body required: true schema: $ref: '#/definitions/permission.UpdatePermissionDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Update permission tags: - permission /profile: get: description: Returns the authenticated user's profile produces: - application/json 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' security: - BearerAuth: [] summary: Get profile tags: - auth put: consumes: - application/json description: Updates the authenticated user's profile parameters: - description: Profile payload in: body name: body required: true schema: $ref: '#/definitions/auth.UpdateProfileDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Update profile tags: - auth /provinces: get: description: Returns paginated provinces with optional filters parameters: - description: Filter by province name (en, ru, tm) in: query name: name type: string - description: Filter by region (en, ru, tm) in: query name: region type: string - description: Filter by active status in: query name: active type: boolean - default: 1 description: Page number in: query name: page type: integer - default: 10 description: Items per page in: query name: limit type: integer produces: - application/json 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' security: - BearerAuth: [] summary: List provinces tags: - province post: consumes: - application/json description: Creates a new province parameters: - description: Province payload in: body name: body required: true schema: $ref: '#/definitions/province.CreateProvinceDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Create province tags: - province /provinces/{id}: delete: description: Deletes a province parameters: - description: Province ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Delete province tags: - province get: description: Returns a single province parameters: - description: Province ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Get province by ID tags: - province put: consumes: - application/json description: Updates an existing province parameters: - description: Province ID in: path name: id required: true type: integer - description: Province payload in: body name: body required: true schema: $ref: '#/definitions/province.UpdateProvinceDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Update province tags: - province /reasons-cards: get: description: Returns paginated reason cards with optional filters parameters: - description: Filter by title (en, ru, tm) in: query name: reason_name type: string - default: 1 description: Page number in: query name: page type: integer - default: 10 description: Items per page in: query name: limit type: integer produces: - application/json 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' security: - BearerAuth: [] summary: List reason cards tags: - reason-card post: consumes: - application/json description: Creates a new reason card parameters: - description: Reason card payload in: body name: body required: true schema: $ref: '#/definitions/reasonscard.CreateReasonCardDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Create reason card tags: - reason-card /reasons-cards/{id}: delete: description: Deletes a reason card parameters: - description: Reason card ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Delete reason card tags: - reason-card get: description: Returns a single reason card parameters: - description: Reason card ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Get reason card by ID tags: - reason-card put: consumes: - application/json description: Updates an existing reason card parameters: - description: Reason card ID in: path name: id required: true type: integer - description: Reason card payload in: body name: body required: true schema: $ref: '#/definitions/reasonscard.UpdateReasonCardDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Update reason card tags: - reason-card /register: post: consumes: - application/json description: Starts registration and sends an SMS verification code. Replace sms.LogSender with your SMS client. parameters: - description: Registration payload in: body name: body required: true schema: $ref: '#/definitions/auth.RegisterDTO' produces: - application/json 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' summary: Register tags: - auth /register/verify: post: consumes: - application/json description: Confirms the SMS code and creates the user account parameters: - description: Verification payload in: body name: body required: true schema: $ref: '#/definitions/auth.VerifyDTO' produces: - application/json 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' summary: Verify phone tags: - auth /role-users: get: description: Returns the authenticated user's role-user assignments with the related user and role parameters: - description: Filter by role name in: query name: role_name type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/appresult.AppSuccess' "401": description: Unauthorized schema: $ref: '#/definitions/appresult.AppError' "500": description: Internal Server Error schema: $ref: '#/definitions/appresult.AppError' security: - BearerAuth: [] summary: List role users tags: - role-users post: consumes: - application/json description: Creates a role-user assignment parameters: - description: Role-user payload in: body name: body required: true schema: $ref: '#/definitions/roleusers.CreateRoleUserDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Assign user to role tags: - role-users /role-users/{id}: delete: description: Deletes a role-user assignment parameters: - description: Role-user ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Remove user from role tags: - role-users /roles: get: description: Returns paginated roles with optional filters parameters: - description: Filter by name in: query name: role_name type: string - default: 1 description: Page number in: query name: page type: integer - default: 10 description: Items per page in: query name: limit type: integer produces: - application/json 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' security: - BearerAuth: [] summary: List roles tags: - role post: consumes: - application/json description: Creates a new role parameters: - description: Role payload in: body name: body required: true schema: $ref: '#/definitions/role.CreateRoleDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Create role tags: - role /roles/{id}: delete: description: Deletes a role parameters: - description: Role ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Delete role tags: - role get: description: Returns a single role parameters: - description: Role ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Get role by ID tags: - role put: consumes: - application/json description: Updates an existing role parameters: - description: Role ID in: path name: id required: true type: integer - description: Role payload in: body name: body required: true schema: $ref: '#/definitions/role.UpdateRoleDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Update role tags: - role /token: post: consumes: - application/json description: Issues a new access and refresh token pair parameters: - description: Refresh token payload in: body name: body required: true schema: $ref: '#/definitions/auth.RefreshTokenDTO' produces: - application/json 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' summary: Refresh tokens tags: - auth /users: get: description: Returns paginated users with role user, with optional filters parameters: - description: Filter by username in: query name: username type: string - default: 1 description: Page number in: query name: page type: integer - default: 10 description: Items per page in: query name: limit type: integer produces: - application/json 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' security: - BearerAuth: [] summary: List users tags: - user post: consumes: - application/json description: Creates a new user parameters: - description: User payload in: body name: body required: true schema: $ref: '#/definitions/user.CreateUserDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Create user tags: - user /users/{id}: delete: description: Deletes a user parameters: - description: User ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Delete user tags: - user get: description: Returns a single user parameters: - description: User ID in: path name: id required: true type: integer produces: - application/json 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' security: - BearerAuth: [] summary: Get user by ID tags: - user put: consumes: - application/json description: Updates an existing user parameters: - description: User ID in: path name: id required: true type: integer - description: User payload in: body name: body required: true schema: $ref: '#/definitions/user.UpdateUserDTO' produces: - application/json 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' security: - BearerAuth: [] summary: Update user tags: - user /users/clients: get: description: Returns paginated users from the users table with role user parameters: - description: Filter by username in: query name: username type: string - default: 1 description: Page number in: query name: page type: integer - default: 10 description: Items per page in: query name: limit type: integer produces: - application/json 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' security: - BearerAuth: [] summary: List client users tags: - user /users/staff: get: description: Returns paginated users assigned to branches (from branch_user), including each user's branches. parameters: - description: Filter by username in: query name: username type: string - default: 1 description: Page number in: query name: page type: integer - default: 10 description: Items per page in: query name: limit type: integer produces: - application/json 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' security: - BearerAuth: [] summary: List staff users tags: - user securityDefinitions: BearerAuth: in: header name: Authorization type: apiKey swagger: "2.0"