---
openapi: 3.0.3
info:
  title: Muse Proxy API
  description: API documentation for Muse Proxy services
  termsOfService: Your terms here
  contact:
    name: API Support
    url: https://finhub.cloud/support
    email: support@finhub.cloud
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.0
tags:
- name: Admin - Consent Management
  description: Operations for managing consent templates and definitions
- name: Admin - Organizational Data Management
  description: Operations for managing organization users and employees
- name: Admin - Personal Data Management
  description: Operations for managing person address and contact information
- name: Admin - Users Data Management
  description: Operations for managing user credentials and access
- name: B2B - Consent Management
  description: Operations for managing B2B customer consents
- name: B2B Customer Management
  description: Operations for managing B2B customer lifecycle
- name: B2B - Document Management
  description: Operations for managing B2B customer documents
- name: Customer Registration
  description: Individual customer registration with categorization validation
- name: Organization - Directors Management
  description: Operations for managing organization directors
- name: Organization - Employee Management
  description: Operations for managing organization employees
- name: FinTrans Account Operations
  description: Financial transaction operations for accounts
- name: FinTrans Account Operations Enhanced
  description: Enhanced financial transaction operations with new Amount models
- name: FinTrans - Beneficiaries
  description: Beneficiary management operations
- name: Individual Customer - Consent Management
  description: Operations for managing individual customer consents
- name: B2C customer access and operations
- name: Individual Customer - Document Management
  description: Operations for managing individual customer documents
- name: Access organizations
- name: Payment Consent Management
  description: Operations for managing payment consents and validation
- name: Organization Shareholders
  description: Operations for managing organization shareholders
- name: Database Admin
  description: Admin operations for database management
- name: Transfer Consent Operations
  description: Transfer consent management operations
- name: Transfer Operations
  description: Financial transfer operations
- name: Transfer - Document Management
  description: Operations for managing transfer-related documents
- name: Verification Management
  description: Operations for managing verification processes
- name: Verification - Document Management
  description: Operations for managing verification-related documents
- name: Order Management
  description: Endpoints for managing financial transaction orders
paths:
  /api/v1/debug/config/dump:
    get:
      tags:
      - Mockup Configuration Service
      parameters:
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/TenantRegistrationResponse"
      security:
      - bearerAuth: []
  /api/v1/mockup/tenant/wallets/{tenantId}:
    get:
      tags:
      - Tenant Wallet Controller
      parameters:
      - name: tenantId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/v1/mockup/tenant/wallets/{tenantId}/transfer:
    post:
      tags:
      - Tenant Wallet Controller
      parameters:
      - name: tenantId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TransferRequest1"
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/v2.1/admin/consents:
    get:
      tags:
      - Admin - Consent Management
      summary: List consent templates
      description: Retrieves all consent templates (DEFINITION records) for the tenant
      parameters:
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Consent templates retrieved successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse1"
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
    post:
      tags:
      - Admin - Consent Management
      summary: Create consent template
      description: Creates a new consent template (DEFINITION record)
      parameters:
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateConsentTemplateRequest"
      responses:
        "201":
          description: Consent template created successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse1"
        "400":
          description: Invalid request data
        "409":
          description: Consent template already exists
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/admin/consents/{consentId}:
    get:
      tags:
      - Admin - Consent Management
      summary: Get consent template
      description: Retrieves a specific consent template by ID
      parameters:
      - name: consentId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Consent template retrieved successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse1"
        "404":
          description: Consent template not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
    put:
      tags:
      - Admin - Consent Management
      summary: Update consent template
      description: Updates an existing consent template
      parameters:
      - name: consentId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateConsentTemplateRequest"
      responses:
        "200":
          description: Consent template updated successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse1"
        "400":
          description: Invalid request data
        "404":
          description: Consent template not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
    delete:
      tags:
      - Admin - Consent Management
      summary: Delete consent template
      description: Deletes a consent template (soft delete)
      parameters:
      - name: consentId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Consent template deleted successfully
        "404":
          description: Consent template not found
        "409":
          description: Cannot delete template with active consents
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/admin/database/execute:
    post:
      tags:
      - Database Admin
      summary: Execute SQL command
      description: "Execute SQL operations to inspect database configuration, retrieve\
        \ table structure, get data with/without limits, or update table data. Used\
        \ for deployment verification."
      parameters:
      - name: x-api-key
        in: header
        description: Client platform information
        schema:
          type: string
      - name: x-api-secret
        in: header
        description: Client platform information
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        description: SQL command request parameters
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SqlCommandRequest"
        required: true
      responses:
        "200":
          description: SQL command executed successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SqlCommandResponse"
        "400":
          description: Invalid request parameters
        "401":
          description: Unauthorized access
        "403":
          description: Access forbidden - Admin role required
        "500":
          description: Internal server error during command execution
      security:
      - bearerAuth: []
  /api/v2.1/admin/fees/revenue:
    get:
      tags:
      - Fee Management Controller
      parameters:
      - name: endDate
        in: query
        schema:
          type: string
      - name: startDate
        in: query
        schema:
          type: string
      - name: tenantId
        in: query
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/v2.1/admin/organization/{organizationId}/employees/{employeeId}/verification/initiate:
    post:
      tags:
      - Admin - Organizational Data Management
      summary: Initiate employee verification
      description: Initiates verification process for an organization employee
      parameters:
      - name: employeeId
        in: path
        required: true
        schema:
          type: string
      - name: organizationId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema: {}
      responses:
        "200":
          description: Verification initiated successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request data
        "404":
          description: Employee not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/admin/organization/{organizationId}/employees/{employeeId}/verification/status/{verificationId}:
    get:
      tags:
      - Admin - Organizational Data Management
      summary: Check employee verification status
      description: Checks the status of an employee verification process
      parameters:
      - name: employeeId
        in: path
        required: true
        schema:
          type: string
      - name: organizationId
        in: path
        required: true
        schema:
          type: string
      - name: verificationId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Verification status retrieved successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "404":
          description: Verification not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/admin/organization/{organizationId}/users/{userId}/sessions:
    post:
      tags:
      - Access organizations
      summary: Create a new session for an organization user
      description: Creates a new session for an organization user with the provided
        credentials
      parameters:
      - name: organizationId
        in: path
        required: true
        schema:
          type: string
      - name: userId
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: X-Forwarded-For
        in: header
        description: Ip Address of the end-user
        schema:
          type: string
      - name: sec-ch-ua-platform
        in: header
        description: Client platform information
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateSessionRequest"
      responses:
        "200":
          description: Session created successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/admin/organization/{organizationId}/users/{userId}/sessions/{sessionId}:
    put:
      tags:
      - Access organizations
      summary: Update an existing session for an organization user
      description: Updates an existing session for an organization user
      parameters:
      - name: organizationId
        in: path
        required: true
        schema:
          type: string
      - name: sessionId
        in: path
        required: true
        schema:
          type: string
      - name: userId
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: X-Forwarded-For
        in: header
        description: Ip Address of the end-user
        schema:
          type: string
      - name: sec-ch-ua-platform
        in: header
        description: Client platform information
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateSessionRequest"
      responses:
        "200":
          description: Session updated successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "404":
          description: Session not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
      security:
      - bearerAuth: []
    delete:
      tags:
      - Access organizations
      summary: Delete an existing session for an organization user
      description: Deletes an existing session for an organization user
      parameters:
      - name: organizationId
        in: path
        required: true
        schema:
          type: string
      - name: sessionId
        in: path
        required: true
        schema:
          type: string
      - name: userId
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: X-Forwarded-For
        in: header
        description: Ip Address of the end-user
        schema:
          type: string
      - name: sec-ch-ua-platform
        in: header
        description: Client platform information
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Session deleted successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "404":
          description: Session not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "401":
          description: Unauthorized - Missing or invalid authorization token
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
      security:
      - bearerAuth: []
  /api/v2.1/admin/person/{personId}/address:
    put:
      tags:
      - Admin - Personal Data Management
      summary: Update person address
      description: Updates address information for a specific person
      parameters:
      - name: personId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema: {}
      responses:
        "200":
          description: Address updated successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request data
        "404":
          description: Person not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/admin/person/{personId}/addresses:
    get:
      tags:
      - Admin - Personal Data Management
      summary: Get person addresses
      description: Retrieves all addresses for a specific person
      parameters:
      - name: personId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Addresses retrieved successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "404":
          description: Person not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/admin/person/{personId}/contact:
    put:
      tags:
      - Admin - Personal Data Management
      summary: Update person contact
      description: Updates contact information for a specific person
      parameters:
      - name: personId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema: {}
      responses:
        "200":
          description: Contact updated successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request data
        "404":
          description: Person not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/admin/person/{personId}/contacts:
    get:
      tags:
      - Admin - Personal Data Management
      summary: Get person contacts
      description: Retrieves all contacts for a specific person
      parameters:
      - name: personId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Contacts retrieved successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "404":
          description: Person not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/admin/roles/raci-matrix:
    get:
      tags:
      - Role Management Controller
      parameters:
      - name: process
        in: query
        schema:
          type: string
      - name: X-User-Roles
        in: header
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/admin/roles/role-configurations:
    get:
      tags:
      - Role Management Controller
      parameters:
      - name: X-Tenant-ID
        in: header
        schema:
          type: string
      - name: X-User-Roles
        in: header
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/admin/roles/validate-raci:
    post:
      tags:
      - Role Management Controller
      parameters:
      - name: X-User-Roles
        in: header
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RaciValidationRequest"
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/admin/tenant/{tenantId}/fees/summary:
    get:
      tags:
      - Fee Management Controller
      parameters:
      - name: tenantId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/v2.1/admin/users/login/reset:
    post:
      tags:
      - Admin - Users Data Management
      summary: Reset user credentials
      description: Resets credentials for a specific user
      parameters:
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema: {}
      responses:
        "200":
          description: Credentials reset successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request data
        "404":
          description: User not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/admin/users/{userId}/credentials:
    put:
      tags:
      - Admin - Users Data Management
      summary: Update user credentials
      description: Updates credentials for a specific user
      parameters:
      - name: userId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema: {}
      responses:
        "200":
          description: Credentials updated successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request data
        "404":
          description: User not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/channels/available:
    get:
      tags:
      - Channel Controller
      parameters:
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/v2.1/channels/customers/{customerId}/preferences:
    get:
      tags:
      - Channel Controller
      parameters:
      - name: customerId
        in: path
        required: true
        schema:
          type: string
      - name: tenantId
        in: query
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
    put:
      tags:
      - Channel Controller
      parameters:
      - name: customerId
        in: path
        required: true
        schema:
          type: string
      - name: tenantId
        in: query
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties:
                $ref: "#/components/schemas/ChannelPreference"
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/v2.1/channels/features/{featureName}:
    get:
      tags:
      - Channel Controller
      parameters:
      - name: featureName
        in: path
        required: true
        schema:
          type: string
      - name: customerId
        in: query
        schema:
          type: string
      - name: tenantId
        in: query
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/v2.1/channels/features/{featureName}/channels/{channelCode}:
    get:
      tags:
      - Channel Controller
      parameters:
      - name: channelCode
        in: path
        required: true
        schema:
          type: string
      - name: featureName
        in: path
        required: true
        schema:
          type: string
      - name: tenantId
        in: query
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/v2.1/consent/verification/resend:
    post:
      tags:
      - Consent Verification Controller
      parameters:
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ResendMagicLinkRequest"
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/consent/verification/send-magic-link:
    post:
      tags:
      - Consent Verification Controller
      parameters:
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SendMagicLinkRequest"
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/consent/verification/verify/{token}:
    get:
      tags:
      - Consent Verification Controller
      parameters:
      - name: token
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/customer/individual/categorization/hierarchy/{tenantId}:
    get:
      tags:
      - B2C customer access and operations
      summary: Get full categorization hierarchy for tenant
      description: "Returns tenant metadata, all categories, and resolved feature\
        \ specifications allowed for the tenant"
      parameters:
      - name: tenantId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/v2.1/customer/individual/categorization/refresh:
    post:
      tags:
      - B2C customer access and operations
      summary: Refresh categorization cache
      description: Refreshes the categorization validation cache from database
      parameters:
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/v2.1/customer/individual/registration:
    post:
      tags:
      - B2C customer access and operations
      summary: Create a new individual customer account with categorization validation
      description: Creates a new individual customer account with comprehensive categorization
        validation and processing
      parameters:
      - name: X-Forwarded-For
        in: header
        description: Ip Address of the end-user
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier
        schema:
          type: string
      - name: sec-ch-ua-platform
        in: header
        description: Client platform information
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateAccountRequest"
      responses:
        "201":
          description: Account created successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Validation failed - categorization or request data invalid
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiResponse"
        "403":
          description: Tenant access denied or categorization not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiResponse"
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "401":
          description: Not Authorized
      security:
      - SecurityScheme: []
  /api/v2.1/customer/individual/{customerId}/activation:
    post:
      tags:
      - B2C customer access and operations
      summary: Activate individual customer
      description: Activates an individual customer account with the provided status
      parameters:
      - name: customerId
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: X-Forwarded-For
        in: header
        description: Ip Address of the end-user
        schema:
          type: string
      - name: sec-ch-ua-platform
        in: header
        description: Client platform information
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ActivateAccountRequest"
      responses:
        "200":
          description: Customer activated successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request data
        "404":
          description: Individual customer not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/customer/individual/{customerId}/consents/data-processing:
    post:
      tags:
      - Individual Customer - Consent Management
      summary: Accept data processing consent
      description: Records acceptance of data processing consent for an individual
        customer
      parameters:
      - name: customerId
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: x-tenant-id
        in: header
        description: Tenant ID
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AcceptConsentRequest"
      responses:
        "200":
          description: Data processing consent accepted successfully
        "400":
          description: Invalid request data
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/customer/individual/{customerId}/consents/privacy:
    post:
      tags:
      - Individual Customer - Consent Management
      summary: Accept privacy policy
      description: Records acceptance of privacy policy for an individual customer
      parameters:
      - name: customerId
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: x-tenant-id
        in: header
        description: Tenant ID
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AcceptConsentRequest"
      responses:
        "200":
          description: Privacy policy accepted successfully
        "400":
          description: Invalid request data
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/customer/individual/{customerId}/consents/terms:
    post:
      tags:
      - Individual Customer - Consent Management
      summary: Accept terms and conditions
      description: Records acceptance of terms and conditions for an individual customer
      parameters:
      - name: customerId
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: x-tenant-id
        in: header
        description: Tenant ID
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AcceptConsentRequest"
      responses:
        "200":
          description: Terms accepted successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request data
        "404":
          description: Customer not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/customer/individual/{customerId}/consents/{consentId}/accept:
    post:
      tags:
      - Individual Customer - Consent Management
      summary: Accept consent
      description: Records acceptance of a specific consent for an individual customer
      parameters:
      - name: consentId
        in: path
        required: true
        schema:
          type: string
      - name: customerId
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: x-tenant-id
        in: header
        description: Tenant ID
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AcceptConsentRequest"
      responses:
        "200":
          description: Consent accepted successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request data
        "404":
          description: Consent or customer not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/customer/individual/{customerId}/consents/{consentId}/status:
    get:
      tags:
      - Individual Customer - Consent Management
      summary: Get consent status
      description: Retrieves the status of a specific consent for an individual customer
      parameters:
      - name: consentId
        in: path
        required: true
        schema:
          type: string
      - name: customerId
        in: path
        required: true
        schema:
          type: string
      - name: x-tenant-id
        in: header
        description: Tenant ID
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Consent status retrieved successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "404":
          description: Consent not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/customer/individual/{customerId}/documents:
    get:
      tags:
      - Individual Customer - Document Management
      summary: Get individual documents
      description: Retrieves all documents for an individual customer
      parameters:
      - name: customerId
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: X-Forwarded-For
        in: header
        description: Ip Address of the end-user
        schema:
          type: string
      - name: sec-ch-ua-platform
        in: header
        description: Client platform information
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Documents retrieved successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "404":
          description: Customer not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
    post:
      tags:
      - Individual Customer - Document Management
      summary: Upload individual document
      description: Uploads a new document for an individual customer
      parameters:
      - name: customerId
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: X-Forwarded-For
        in: header
        description: Ip Address of the end-user
        schema:
          type: string
      - name: sec-ch-ua-platform
        in: header
        description: Client platform information
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: "#/components/schemas/DocumentUploadForm"
      responses:
        "201":
          description: Document uploaded successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request data
        "404":
          description: Customer not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/customer/individual/{customerId}/owner/{ownerTenantId}/activation/approve:
    post:
      tags:
      - Activation Controller
      parameters:
      - name: customerId
        in: path
        required: true
        schema:
          type: string
      - name: ownerTenantId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/customer/individual/{customerId}/owner/{ownerTenantId}/activation/check:
    get:
      tags:
      - Activation Controller
      parameters:
      - name: customerId
        in: path
        required: true
        schema:
          type: string
      - name: ownerTenantId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/customer/individual/{customerId}/owner/{ownerTenantId}/activation/upload:
    post:
      tags:
      - Activation Controller
      parameters:
      - name: customerId
        in: path
        required: true
        schema:
          type: string
      - name: ownerTenantId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DocumentUploadForm"
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/customer/individual/{customerId}/users/{userId}/sessions:
    post:
      tags:
      - B2C customer access and operations
      summary: Create a new session for an individual customer user
      description: Creates a new session for an individual customer user with the
        provided credentials
      parameters:
      - name: customerId
        in: path
        required: true
        schema:
          type: string
      - name: userId
        in: path
        required: true
        schema:
          type: string
      - name: sec-ch-ua-platform
        in: header
        description: Client platform information
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateSessionRequest"
      responses:
        "200":
          description: Session created successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
      security:
      - bearerAuth: []
  /api/v2.1/customer/individual/{customerId}/users/{userId}/sessions/{sessionId}:
    put:
      tags:
      - B2C customer access and operations
      summary: Update an existing session for an individual customer user
      description: Updates an existing session for an individual customer user
      parameters:
      - name: customerId
        in: path
        required: true
        schema:
          type: string
      - name: sessionId
        in: path
        required: true
        schema:
          type: string
      - name: userId
        in: path
        required: true
        schema:
          type: string
      - name: sec-ch-ua-platform
        in: header
        description: Client platform information
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateSessionRequest"
      responses:
        "200":
          description: Session updated successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "404":
          description: Session not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
      security:
      - bearerAuth: []
    delete:
      tags:
      - B2C customer access and operations
      summary: Delete an existing session for an individual customer user
      description: Deletes an existing session for an individual customer user
      parameters:
      - name: customerId
        in: path
        required: true
        schema:
          type: string
      - name: sessionId
        in: path
        required: true
        schema:
          type: string
      - name: userId
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: X-Forwarded-For
        in: header
        description: Ip Address of the end-user
        schema:
          type: string
      - name: sec-ch-ua-platform
        in: header
        description: Client platform information
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Session deleted successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "401":
          description: Unauthorized - Missing or invalid authorization token
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "404":
          description: Session not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
      security:
      - bearerAuth: []
  /api/v2.1/customer/individual/{customerId}/verification:
    post:
      tags:
      - B2C customer access and operations
      summary: Verify individual customer
      description: Verifies an individual customer account with provided verification
        details. Requires authentication.
      parameters:
      - name: customerId
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: X-Forwarded-For
        in: header
        description: Ip Address of the end-user
        schema:
          type: string
      - name: sec-ch-ua-platform
        in: header
        description: Client platform information
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/VerificationRequest1"
      responses:
        "200":
          description: Verification processed successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "404":
          description: Individual customer not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
      security:
      - bearerAuth: []
  /api/v2.1/customer/individual/{customerId}/verification/initiate:
    post:
      tags:
      - B2C customer access and operations
      summary: Initiate individual customer verification
      description: Initiates a verification process for an individual customer. Requires
        authentication.
      parameters:
      - name: customerId
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: X-Forwarded-For
        in: header
        description: Ip Address of the end-user
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        description: Tenant identifier
        schema:
          type: string
      - name: sec-ch-ua-platform
        in: header
        description: Client platform information
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Verification initiated successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "404":
          description: Individual customer not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
      security:
      - bearerAuth: []
  /api/v2.1/customer/organization/definitions:
    get:
      tags:
      - B2B Customer Management
      summary: Get organization field definitions
      description: Returns ORG_REQUIRED_FIELDS and SHAREHOLDER_RULES definitions
      parameters:
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Definitions returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/customer/organization/login:
    post:
      tags:
      - B2B Customer Management
      summary: Create organization
      description: Creates an organization using existing facade logic
      parameters:
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/OrganizationCustomer"
      responses:
        "200":
          description: Organization created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request data
        "409":
          description: "Conflict: organization already exists"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/customer/organization/registration:
    post:
      tags:
      - B2B Customer Management
      summary: Register a new B2B organization
      description: Creates a new organization with automatic default admin creation
        (requires ADMIN role)
      parameters:
      - name: X-Forwarded-For
        in: header
        description: Ip Address of the end-user
        schema:
          type: string
      - name: sec-ch-ua-platform
        in: header
        description: Client platform information
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/OrganizationCustomer"
      responses:
        "201":
          description: Organization registered successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request data
        "409":
          description: "Conflict: organization already exists"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/customer/organization/{organizationId}:
    get:
      tags:
      - B2B Customer Management
      summary: Get B2B customer details
      description: Retrieves details for a specific business customer
      parameters:
      - name: organizationId
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: X-Forwarded-For
        in: header
        description: Ip Address of the end-user
        schema:
          type: string
      - name: sec-ch-ua-platform
        in: header
        description: Client platform information
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Organization details retrieved successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "404":
          description: Organization not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/customer/organization/{organizationId}/activation:
    post:
      tags:
      - B2B Customer Management
      summary: Activate organization
      description: Activates a business organization with prerequisite validations
      parameters:
      - name: organizationId
        in: path
        required: true
        schema:
          type: string
      - name: X-User-ID
        in: header
        description: User ID
        schema:
          type: string
      - name: X-User-Roles
        in: header
        description: User roles
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ActivationRequest"
      responses:
        "200":
          description: Organization activated successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Prerequisites not met
        "403":
          description: Insufficient permissions
        "404":
          description: Organization not found
        "422":
          description: Organization not verified
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
      security:
      - SecurityScheme: []
  /api/v2.1/customer/organization/{organizationId}/consents/commercial:
    post:
      tags:
      - B2B - Consent Management
      summary: Accept commercial services agreement
      description: Records acceptance of commercial services agreement for an organization
      parameters:
      - name: organizationId
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AcceptConsentRequest"
      responses:
        "200":
          description: Commercial services agreement accepted successfully
        "400":
          description: Invalid request data
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/customer/organization/{organizationId}/consents/data-processing:
    post:
      tags:
      - B2B - Consent Management
      summary: Accept data processing consent
      description: Records acceptance of data processing consent for an organization
      parameters:
      - name: organizationId
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AcceptConsentRequest"
      responses:
        "200":
          description: Data processing consent accepted successfully
        "400":
          description: Invalid request data
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/customer/organization/{organizationId}/consents/privacy:
    post:
      tags:
      - B2B - Consent Management
      summary: Accept privacy policy
      description: Records acceptance of privacy policy for an organization
      parameters:
      - name: organizationId
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AcceptConsentRequest"
      responses:
        "200":
          description: Privacy policy accepted successfully
        "400":
          description: Invalid request data
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/customer/organization/{organizationId}/consents/terms:
    post:
      tags:
      - B2B - Consent Management
      summary: Accept organization terms
      description: Records acceptance of terms and conditions for an organization
      parameters:
      - name: organizationId
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AcceptConsentRequest"
      responses:
        "200":
          description: Terms accepted successfully
        "400":
          description: Invalid request data
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/customer/organization/{organizationId}/director:
    post:
      tags:
      - B2B Customer Management
      summary: Add director
      description: Adds a director to the specified organization
      parameters:
      - name: organizationId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Director"
      responses:
        "200":
          description: Director added
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request data
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/customer/organization/{organizationId}/directors:
    get:
      tags:
      - Organization - Directors Management
      summary: List directors
      description: Retrieves all directors for an organization
      parameters:
      - name: organizationId
        in: path
        required: true
        schema:
          type: string
      - name: X-Organization-ID
        in: header
        description: User organization ID
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Directors retrieved successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "403":
          description: Access denied
        "404":
          description: Organization not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
      security:
      - SecurityScheme: []
    post:
      tags:
      - Organization - Directors Management
      summary: Add director
      description: Adds a new director to the organization (requires ADMIN role)
      parameters:
      - name: organizationId
        in: path
        required: true
        schema:
          type: string
      - name: X-Organization-ID
        in: header
        description: User organization ID
        schema:
          type: string
      - name: X-User-Roles
        in: header
        description: User roles
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Director"
      responses:
        "201":
          description: Director added successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request data
        "403":
          description: Insufficient permissions
        "404":
          description: Organization not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
      security:
      - SecurityScheme: []
  /api/v2.1/customer/organization/{organizationId}/directors/{directorId}:
    delete:
      tags:
      - Organization - Directors Management
      summary: Remove director
      description: Removes a director from the organization (requires ADMIN role)
      parameters:
      - name: directorId
        in: path
        required: true
        schema:
          type: string
      - name: organizationId
        in: path
        required: true
        schema:
          type: string
      - name: X-Organization-ID
        in: header
        description: User organization ID
        schema:
          type: string
      - name: X-User-Roles
        in: header
        description: User roles
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "204":
          description: Director removed successfully
        "403":
          description: Insufficient permissions
        "404":
          description: Organization or director not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
      security:
      - SecurityScheme: []
  /api/v2.1/customer/organization/{organizationId}/documents:
    get:
      tags:
      - B2B - Document Management
      summary: Get organization documents
      description: Retrieves all documents for an organization with optional filtering
      parameters:
      - name: organizationId
        in: path
        required: true
        schema:
          type: string
      - name: category
        in: query
        description: "Document category filter (INCORPORATION, CONTRACT, FINANCIAL,\
          \ COMPLIANCE, OTHER)"
        schema:
          type: string
      - name: page
        in: query
        description: Page number (0-based)
        schema:
          format: int32
          default: 0
          type: integer
      - name: size
        in: query
        description: Page size
        schema:
          format: int32
          default: 20
          type: integer
      - name: X-Organization-ID
        in: header
        description: User organization ID
        schema:
          type: string
      - name: X-User-Roles
        in: header
        description: User roles
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Documents retrieved successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "403":
          description: Access denied
        "404":
          description: Organization not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
      security:
      - SecurityScheme: []
    post:
      tags:
      - B2B - Document Management
      summary: Upload organization document
      description: Uploads a new document for an organization (requires ADMIN role)
      parameters:
      - name: organizationId
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: X-Forwarded-For
        in: header
        description: Ip Address of the end-user
        schema:
          type: string
      - name: sec-ch-ua-platform
        in: header
        description: Client platform information
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: "#/components/schemas/DocumentUploadForm"
      responses:
        "201":
          description: Document uploaded successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request data
        "404":
          description: Organization not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/customer/organization/{organizationId}/documents/{documentId}:
    get:
      tags:
      - B2B - Document Management
      summary: Get organization document
      description: Retrieves a specific document by ID
      parameters:
      - name: documentId
        in: path
        required: true
        schema:
          type: string
      - name: organizationId
        in: path
        required: true
        schema:
          type: string
      - name: X-Organization-ID
        in: header
        description: User organization ID
        schema:
          type: string
      - name: X-User-Roles
        in: header
        description: User roles
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Document retrieved successfully
        "403":
          description: Access denied
        "404":
          description: Document or organization not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
      security:
      - SecurityScheme: []
  /api/v2.1/customer/organization/{organizationId}/employee:
    post:
      tags:
      - B2B Customer Management
      summary: Add employee with role validation
      description: Adds an employee to the organization and validates role requirements
      parameters:
      - name: organizationId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Employee"
      responses:
        "200":
          description: Employee added successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request data or role validation failed
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/customer/organization/{organizationId}/employees:
    get:
      tags:
      - Organization - Employee Management
      summary: List employees
      description: Retrieves all employees for an organization with their assigned
        roles
      parameters:
      - name: organizationId
        in: path
        required: true
        schema:
          type: string
      - name: department
        in: query
        description: Filter by department
        schema:
          type: string
      - name: role
        in: query
        description: Filter by role
        schema:
          type: string
      - name: X-Organization-ID
        in: header
        description: User organization ID
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Employees retrieved successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "403":
          description: Access denied
        "404":
          description: Organization not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
      security:
      - SecurityScheme: []
    post:
      tags:
      - Organization - Employee Management
      summary: Add employee
      description: Adds a new employee with automatic role assignment based on metadata
        (requires ADMIN role)
      parameters:
      - name: organizationId
        in: path
        required: true
        schema:
          type: string
      - name: X-Organization-ID
        in: header
        description: User organization ID
        schema:
          type: string
      - name: X-User-Roles
        in: header
        description: User roles
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Employee"
      responses:
        "201":
          description: Employee added successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request data or role validation failed
        "403":
          description: Insufficient permissions
        "404":
          description: Organization not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
      security:
      - SecurityScheme: []
  /api/v2.1/customer/organization/{organizationId}/employees/{employeeId}/roles:
    put:
      tags:
      - Organization - Employee Management
      summary: Update employee roles
      description: Updates the roles assigned to an employee (requires ADMIN_USER
        role)
      parameters:
      - name: employeeId
        in: path
        required: true
        schema:
          type: string
      - name: organizationId
        in: path
        required: true
        schema:
          type: string
      - name: X-Organization-ID
        in: header
        description: User organization ID
        schema:
          type: string
      - name: X-User-Roles
        in: header
        description: User roles
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateRolesRequest"
      responses:
        "200":
          description: Roles updated successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request data or role validation failed
        "403":
          description: Insufficient permissions
        "404":
          description: Organization or employee not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
      security:
      - SecurityScheme: []
  /api/v2.1/customer/organization/{organizationId}/shareholders:
    post:
      tags:
      - B2B Customer Management
      summary: Add shareholders
      description: Adds one or more shareholders to the specified organization
      parameters:
      - name: organizationId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: "#/components/schemas/Shareholder"
      responses:
        "200":
          description: Shareholders added
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request data
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/customer/organization/{organizationId}/verification:
    get:
      tags:
      - B2B Customer Management
      summary: Get organization verification status
      description: Retrieve the current verification status for the organization
      parameters:
      - name: organizationId
        in: path
        required: true
        schema:
          type: string
      - name: X-Organization-ID
        in: header
        description: User organization ID
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Verification status retrieved successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "404":
          description: Organization or verification not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/customer/organization/{organizationId}/verification/{verificationId}/documents:
    post:
      tags:
      - B2B Customer Management
      summary: Upload verification document
      description: Upload a document for organization verification process
      parameters:
      - name: organizationId
        in: path
        required: true
        schema:
          type: string
      - name: verificationId
        in: path
        required: true
        schema:
          type: string
      - name: X-Organization-ID
        in: header
        description: User organization ID
        schema:
          type: string
      - name: X-User-ID
        in: header
        description: User ID uploading document
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                documentType:
                  type: string
                file:
                  $ref: "#/components/schemas/FileUpload"
                title:
                  type: string
                metadata:
                  type: string
                purpose:
                  type: string
                comment:
                  type: string
      responses:
        "201":
          description: Document uploaded successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request data
        "403":
          description: Access denied
        "404":
          description: Organization or verification not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
      security:
      - SecurityScheme: []
  /api/v2.1/customer/organization/{organizationId}/verify:
    post:
      tags:
      - B2B Customer Management
      summary: Initiate organization verification
      description: Start a new verification process for the organization (requires
        COMPLIANCE_OFFICER or ADMIN_USER role)
      parameters:
      - name: organizationId
        in: path
        required: true
        schema:
          type: string
      - name: X-User-ID
        in: header
        description: User ID initiating verification
        schema:
          type: string
      - name: X-User-Roles
        in: header
        description: User roles
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/VerificationRequest1"
      responses:
        "200":
          description: Verification initiated successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request data
        "403":
          description: Insufficient permissions
        "404":
          description: Organization not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
      security:
      - SecurityScheme: []
  /api/v2.1/customers/individual/categorization/hierarchy/{tenantId}:
    get:
      tags:
      - Customer Registration
      summary: Get full categorization hierarchy for tenant
      description: "Returns tenant metadata, all categories, and resolved feature\
        \ specifications allowed for the tenant"
      parameters:
      - name: tenantId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/v2.1/customers/individual/categorization/refresh:
    post:
      tags:
      - Customer Registration
      summary: Refresh categorization cache
      description: Refreshes the categorization validation cache from database
      parameters:
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/v2.1/customers/individual/categorization/validate/{tenantId}:
    get:
      tags:
      - Customer Registration
      summary: Validate categorization data
      description: Validates categorization data against tenant specifications without
        creating customer
      parameters:
      - name: tenantId
        in: path
        required: true
        schema:
          type: string
      - name: categoryId
        in: query
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/v2.1/customers/individual/register:
    post:
      tags:
      - Customer Registration
      summary: Register individual customer with categorization validation
      description: Registers a new individual customer with comprehensive categorization
        validation against tenant-specific specifications
      parameters:
      - name: X-Tenant-ID
        in: header
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateAccountRequest"
      responses:
        "201":
          description: Customer registered successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IndividualCustomer"
        "400":
          description: Validation failed - categorization or request data invalid
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiResponse"
        "403":
          description: Tenant access denied or categorization not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiResponse"
      security:
      - bearerAuth: []
  /api/v2.1/documents:
    post:
      parameters:
      - name: X-Tenant-ID
        in: header
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DocumentUploadRequest"
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/v2.1/documents/{docId}:
    get:
      parameters:
      - name: docId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
    put:
      parameters:
      - name: docId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DocumentUploadRequest"
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
    delete:
      parameters:
      - name: docId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/v2.1/fintrans/{accountId}/allowed-operations:
    get:
      tags:
      - FinTrans Account Operations
      summary: Get allowed operations for account with enhanced information
      parameters:
      - name: accountId
        in: path
        description: Account ID
        required: true
        schema:
          type: string
      - name: includeBeneficiaries
        in: query
        schema:
          default: true
          type: boolean
      - name: includeConsents
        in: query
        schema:
          default: true
          type: boolean
      - name: X-Session-Id
        in: header
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/fintrans/{accountId}/beneficiaries:
    get:
      tags:
      - FinTrans - Beneficiaries
      summary: Get beneficiaries
      description: Retrieve all beneficiaries for an account
      parameters:
      - name: accountId
        in: path
        description: Account ID
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: List of beneficiaries
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BeneficiaryResponse"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
    post:
      tags:
      - FinTrans - Beneficiaries
      summary: Create beneficiary
      description: Create a new beneficiary for financial transactions
      parameters:
      - name: accountId
        in: path
        description: Account ID
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateBeneficiaryRequest"
      responses:
        "201":
          description: Beneficiary created successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BeneficiaryResponse"
        "400":
          description: Invalid request data
        "409":
          description: Beneficiary already exists
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/fintrans/{accountId}/enhanced-allowed-operations:
    get:
      tags:
      - FinTrans Account Operations Enhanced
      summary: Get enhanced allowed operations with string amounts and balance explanation
      parameters:
      - name: accountId
        in: path
        description: Account ID
        required: true
        schema:
          type: string
      - name: currency
        in: query
        schema:
          default: PLN
          type: string
      - name: includeBeneficiaries
        in: query
        schema:
          default: true
          type: boolean
      - name: includeExplanation
        in: query
        schema:
          default: true
          type: boolean
      - name: includePlaisDetails
        in: query
        schema:
          default: true
          type: boolean
      - name: X-Customer-Id
        in: header
        schema:
          type: string
      - name: X-Session-Id
        in: header
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/fintrans/{accountId}/orders:
    get:
      tags:
      - Order Management
      summary: List orders for an account
      description: Retrieves a list of orders for the specified account with optional
        filtering
      parameters:
      - name: accountId
        in: path
        description: The account ID
        required: true
        schema:
          type: string
      - name: fromDate
        in: query
        description: Filter orders created after this date (ISO 8601 format)
        schema:
          type: string
      - name: limit
        in: query
        description: Maximum number of results to return
        schema:
          format: int32
          default: 20
          type: integer
        example: 20
      - name: offset
        in: query
        description: Number of results to skip
        schema:
          format: int32
          default: 0
          type: integer
        example: 0
      - name: status
        in: query
        description: Filter by order status
        schema:
          $ref: "#/components/schemas/OrderStatus"
      - name: toDate
        in: query
        description: Filter orders created before this date (ISO 8601 format)
        schema:
          type: string
      - name: X-Session-Id
        in: header
        description: Session ID
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        description: Tenant ID
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/v2.1/fintrans/{accountId}/orders/{orderId}:
    get:
      tags:
      - Order Management
      summary: Get order details
      description: Retrieves detailed information about a specific order
      parameters:
      - name: accountId
        in: path
        description: The account ID
        required: true
        schema:
          type: string
      - name: orderId
        in: path
        description: The order ID
        required: true
        schema:
          type: string
      - name: X-Session-Id
        in: header
        description: Session ID
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        description: Tenant ID
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
    delete:
      tags:
      - Order Management
      summary: Cancel an order
      description: Cancels a pending order if it hasn't been executed yet
      parameters:
      - name: accountId
        in: path
        description: The account ID
        required: true
        schema:
          type: string
      - name: orderId
        in: path
        description: The order ID to cancel
        required: true
        schema:
          type: string
      - name: X-Session-Id
        in: header
        description: Session ID
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        description: Tenant ID
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/v2.1/fintrans/{accountId}/orders/{orderId}/fees:
    get:
      tags:
      - Fee Management Controller
      parameters:
      - name: accountId
        in: path
        required: true
        schema:
          type: string
      - name: orderId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/v2.1/fintrans/{accountId}/transfers/types.purchase:
    post:
      tags:
      - Transfer Operations
      summary: Create purchase transfer
      description: Creates a new purchase transfer for the specified account
      parameters:
      - name: accountId
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: X-Forwarded-For
        in: header
        description: Ip Address of the end-user
        schema:
          type: string
      - name: sec-ch-ua-platform
        in: header
        description: Client platform information
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PaymentRequest"
      responses:
        "201":
          description: Purchase transfer created successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request data
        "404":
          description: Account not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/fintrans/{accountId}/transfers/types.sale:
    post:
      tags:
      - Transfer Operations
      summary: Create sale transfer
      description: Creates a new sale transfer for the specified account
      parameters:
      - name: accountId
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: X-Forwarded-For
        in: header
        description: Ip Address of the end-user
        schema:
          type: string
      - name: sec-ch-ua-platform
        in: header
        description: Client platform information
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PaymentRequest"
      responses:
        "201":
          description: Sale transfer created successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request data
        "404":
          description: Account not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/fintrans/{accountId}/transfers/types.topup:
    post:
      tags:
      - Transfer Operations
      summary: Create topup transfer
      description: Creates a new topup transfer for the specified account
      parameters:
      - name: accountId
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: X-Forwarded-For
        in: header
        description: Ip Address of the end-user
        schema:
          type: string
      - name: sec-ch-ua-platform
        in: header
        description: Client platform information
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PaymentRequest"
      responses:
        "201":
          description: Topup transfer created successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request data
        "404":
          description: Account not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/fintrans/{accountId}/transfers/types.transfer:
    post:
      tags:
      - Transfer Operations
      summary: Create standard transfer
      description: Creates a new standard transfer for the specified account
      parameters:
      - name: accountId
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: X-Forwarded-For
        in: header
        description: Ip Address of the end-user
        schema:
          type: string
      - name: sec-ch-ua-platform
        in: header
        description: Client platform information
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PaymentRequest"
      responses:
        "201":
          description: Transfer created successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request data
        "404":
          description: Account not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/fintrans/{accountId}/transfers/types.withdraw:
    post:
      tags:
      - Transfer Operations
      summary: Create withdraw transfer
      description: Creates a new withdrawal transfer for the specified account
      parameters:
      - name: accountId
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: X-Forwarded-For
        in: header
        description: Ip Address of the end-user
        schema:
          type: string
      - name: sec-ch-ua-platform
        in: header
        description: Client platform information
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PaymentRequest"
      responses:
        "201":
          description: Withdraw transfer created successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request data
        "404":
          description: Account not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/fintrans/{accountId}/transfers/types.{type}/consents:
    get:
      tags:
      - Transfer Consent Operations
      summary: Get type consents
      description: Retrieves all consents for a specific transfer type
      parameters:
      - name: accountId
        in: path
        required: true
        schema:
          type: string
      - name: type
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: X-Forwarded-For
        in: header
        description: Ip Address of the end-user
        schema:
          type: string
      - name: sec-ch-ua-platform
        in: header
        description: Client platform information
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Consents retrieved successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "404":
          description: Account not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
    post:
      tags:
      - Transfer Consent Operations
      summary: Create type consent
      description: Creates a new consent for a specific transfer type
      parameters:
      - name: accountId
        in: path
        required: true
        schema:
          type: string
      - name: type
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: X-Forwarded-For
        in: header
        description: Ip Address of the end-user
        schema:
          type: string
      - name: sec-ch-ua-platform
        in: header
        description: Client platform information
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema: {}
      responses:
        "201":
          description: Consent created successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request data
        "404":
          description: Account not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/fintrans/{accountId}/transfers/types.{type}/{operationId}/consents:
    get:
      tags:
      - Transfer Consent Operations
      summary: Get operation consents
      description: Retrieves all consents for a specific operation
      parameters:
      - name: accountId
        in: path
        required: true
        schema:
          type: string
      - name: operationId
        in: path
        required: true
        schema:
          type: string
      - name: type
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: X-Forwarded-For
        in: header
        description: Ip Address of the end-user
        schema:
          type: string
      - name: sec-ch-ua-platform
        in: header
        description: Client platform information
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Consents retrieved successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "404":
          description: Operation not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
    post:
      tags:
      - Transfer Consent Operations
      summary: Create operation consent
      description: Creates a new consent for a specific operation
      parameters:
      - name: accountId
        in: path
        required: true
        schema:
          type: string
      - name: operationId
        in: path
        required: true
        schema:
          type: string
      - name: type
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: X-Forwarded-For
        in: header
        description: Ip Address of the end-user
        schema:
          type: string
      - name: sec-ch-ua-platform
        in: header
        description: Client platform information
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema: {}
      responses:
        "201":
          description: Consent created successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request data
        "404":
          description: Operation not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/fintrans/{accountId}/types/{operationType}/consents:
    post:
      tags:
      - Approval Controller
      parameters:
      - name: accountId
        in: path
        required: true
        schema:
          type: string
      - name: operationType
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TransactionApprovalRequest"
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/v2.1/fintrans/{accountId}/types/{operationType}/consents/pending:
    get:
      tags:
      - Approval Controller
      parameters:
      - name: accountId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/v2.1/fintrans/{accountId}/types/{operationType}/consents/{consentId}/sign:
    post:
      tags:
      - Approval Controller
      parameters:
      - name: accountId
        in: path
        required: true
        schema:
          type: string
      - name: consentId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SignatureRequest"
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/v2.1/fintrans/{accountId}/types/{operationType}/consents/{consentId}/signatures:
    get:
      tags:
      - Approval Controller
      parameters:
      - name: accountId
        in: path
        required: true
        schema:
          type: string
      - name: consentId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/v2.1/fintrans/{accountId}/types/{operationType}/execute:
    post:
      tags:
      - FinTrans Account Operations
      summary: Execute prepared operation
      parameters:
      - name: accountId
        in: path
        description: Account ID
        required: true
        schema:
          type: string
      - name: operationType
        in: path
        description: "Operation type (topup, withdraw, transfer, purchase, sale)"
        required: true
        schema:
          type: string
      - name: X-Session-Id
        in: header
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ExecuteOrderRequestDto"
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/fintrans/{accountId}/types/{operationType}/fees:
    get:
      tags:
      - Fee Management Controller
      parameters:
      - name: accountId
        in: path
        required: true
        schema:
          type: string
      - name: operationType
        in: path
        required: true
        schema:
          type: string
      - name: amount
        in: query
        schema:
          type: number
      - name: X-Tenant-ID
        in: header
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/v2.1/fintrans/{accountId}/types/{operationType}/prepare:
    post:
      tags:
      - FinTrans Account Operations
      summary: Prepare financial operation
      parameters:
      - name: accountId
        in: path
        description: Account ID
        required: true
        schema:
          type: string
      - name: operationType
        in: path
        description: "Operation type (topup, withdraw, transfer, purchase, sale)"
        required: true
        schema:
          type: string
      - name: X-Session-Id
        in: header
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PrepareOrderRequestDto"
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/payment/consent:
    post:
      tags:
      - Payment Consent Management
      summary: Create payment consent
      description: Creates a new payment consent with specified parameters and limits
      parameters:
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PaymentConsentRequest"
      responses:
        "201":
          description: Payment consent created successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse1"
        "400":
          description: Invalid request data
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/payment/consent/validate:
    post:
      tags:
      - Payment Consent Management
      summary: Validate payment
      description: Validates a payment request against active consent parameters
      parameters:
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PaymentValidationRequest"
      responses:
        "200":
          description: Payment is valid
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse1"
        "400":
          description: Payment validation failed
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/transfer/documents/types.{type}/{operationId}/documents:
    get:
      tags:
      - Transfer - Document Management
      summary: Get operation documents
      description: Retrieves all documents for a specific transfer operation
      parameters:
      - name: operationId
        in: path
        required: true
        schema:
          type: string
      - name: type
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: X-Forwarded-For
        in: header
        description: Ip Address of the end-user
        schema:
          type: string
      - name: sec-ch-ua-platform
        in: header
        description: Client platform information
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Documents retrieved successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "404":
          description: Operation not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
    post:
      tags:
      - Transfer - Document Management
      summary: Upload operation document
      description: Uploads a new document for a specific transfer operation
      parameters:
      - name: operationId
        in: path
        required: true
        schema:
          type: string
      - name: type
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: X-Forwarded-For
        in: header
        description: Ip Address of the end-user
        schema:
          type: string
      - name: sec-ch-ua-platform
        in: header
        description: Client platform information
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: "#/components/schemas/DocumentUploadForm"
      responses:
        "201":
          description: Document uploaded successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request data
        "404":
          description: Operation not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/verifications:
    post:
      tags:
      - Verification Resource
      parameters:
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/VerificationRequest"
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/v2.1/verifications/customer/{customerId}:
    get:
      tags:
      - Verification Resource
      parameters:
      - name: customerId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/v2.1/verifications/types:
    get:
      tags:
      - Verification Resource
      parameters:
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/v2.1/verifications/{id}:
    get:
      tags:
      - Verification Resource
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/v2.1/verifications/{id}/approve:
    post:
      tags:
      - Verification Resource
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        schema:
          type: string
      - name: X-User-Id
        in: header
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/v2.1/verifications/{id}/documents:
    post:
      tags:
      - Verification Resource
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: documentId
        in: query
        schema:
          type: string
      - name: documentType
        in: query
        schema:
          type: string
      - name: X-User-Id
        in: header
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/v2.1/verifications/{id}/reject:
    post:
      tags:
      - Verification Resource
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: reason
        in: query
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        schema:
          type: string
      - name: X-User-Id
        in: header
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/v2.1/verifications/{verificationId}:
    get:
      tags:
      - Verification Management
      summary: Get verification status
      description: Retrieves the current status of a verification process
      parameters:
      - name: verificationId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Verification status retrieved successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "404":
          description: Verification not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2.1/verifications/{verificationId}/approve:
    post:
      tags:
      - Verification Management
      summary: Approve verification
      description: Approves a verification process (requires ADMIN or COMPLIANCE_OFFICER
        role)
      parameters:
      - name: verificationId
        in: path
        required: true
        schema:
          type: string
      - name: X-User-ID
        in: header
        description: User ID approving verification
        schema:
          type: string
      - name: X-User-Roles
        in: header
        description: User roles
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Verification approved successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request data
        "403":
          description: Insufficient permissions
        "404":
          description: Verification not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
      security:
      - SecurityScheme: []
  /api/v2.1/verifications/{verificationId}/documents:
    get:
      tags:
      - Verification - Document Management
      summary: Get verification documents
      description: Retrieves all documents for a specific verification process
      parameters:
      - name: verificationId
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: X-Forwarded-For
        in: header
        description: Ip Address of the end-user
        schema:
          type: string
      - name: sec-ch-ua-platform
        in: header
        description: Client platform information
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Documents retrieved successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "404":
          description: Verification not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
    post:
      tags:
      - Verification - Document Management
      summary: Upload verification document
      description: Uploads a document for a specific verification process
      parameters:
      - name: verificationId
        in: path
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: User-Agent
        schema:
          type: string
      - name: X-Forwarded-For
        in: header
        description: Ip Address of the end-user
        schema:
          type: string
      - name: sec-ch-ua-platform
        in: header
        description: Client platform information
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DocumentUploadForm"
          multipart/form-data:
            schema:
              $ref: "#/components/schemas/DocumentUploadForm"
      responses:
        "201":
          description: Document uploaded successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request data
        "404":
          description: Verification not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme: []
  /api/v2/organizations/{organizationId}/shareholders:
    get:
      tags:
      - Organization Shareholders
      summary: List shareholders
      description: Retrieves all shareholders for an organization with ownership percentages
      parameters:
      - name: organizationId
        in: path
        required: true
        schema:
          type: string
      - name: X-Organization-ID
        in: header
        description: User organization ID
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Shareholders retrieved successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "403":
          description: Access denied
        "404":
          description: Organization not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
      security:
      - SecurityScheme: []
    post:
      tags:
      - Organization Shareholders
      summary: Add shareholder
      description: Adds a new shareholder to the organization with ownership percentage
        (requires ADMIN_USER role)
      parameters:
      - name: organizationId
        in: path
        required: true
        schema:
          type: string
      - name: X-Organization-ID
        in: header
        description: User organization ID
        schema:
          type: string
      - name: X-User-Roles
        in: header
        description: User roles
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Shareholder"
      responses:
        "201":
          description: Shareholder added successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "400":
          description: Invalid request data
        "403":
          description: Insufficient permissions
        "404":
          description: Organization not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
      security:
      - SecurityScheme: []
  /api/v2/organizations/{organizationId}/shareholders/{shareholderId}:
    delete:
      tags:
      - Organization Shareholders
      summary: Remove shareholder
      description: Removes a shareholder from the organization (requires ADMIN_USER
        role)
      parameters:
      - name: organizationId
        in: path
        required: true
        schema:
          type: string
      - name: shareholderId
        in: path
        required: true
        schema:
          type: string
      - name: X-Organization-ID
        in: header
        description: User organization ID
        schema:
          type: string
      - name: X-User-Roles
        in: header
        description: User roles
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "204":
          description: Shareholder removed successfully
        "403":
          description: Insufficient permissions
        "404":
          description: Organization or shareholder not found
        "500":
          description: Internal server error
        "401":
          description: Not Authorized
      security:
      - SecurityScheme: []
  /api/wallet/accounts/{accountId}/transactions:
    get:
      tags:
      - Wallet Resource
      parameters:
      - name: accountId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/wallet/orders:
    post:
      tags:
      - Wallet Resource
      parameters:
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: {}
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
  /api/wallet/wallets:
    get:
      tags:
      - Wallet Resource
      parameters:
      - name: X-Tenant-ID
        in: header
        description: Tenant identifier for multi-tenant operations
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
      security:
      - bearerAuth: []
components:
  schemas:
    AcceptConsentRequest:
      required:
      - accepted
      type: object
      properties:
        accepted:
          type: boolean
    ActivateAccountRequest:
      required:
      - code
      - userId
      type: object
      properties:
        code:
          minLength: 1
          type: string
        userId:
          minLength: 1
          type: string
        type:
          $ref: "#/components/schemas/UserIdTypeEnum"
    ActivationRequest:
      required:
      - activationReason
      type: object
      properties:
        activationReason:
          pattern: \S
          type: string
        additionalInfo:
          type: object
          additionalProperties: {}
    Address:
      type: object
      properties:
        id:
          type: string
        addressLine1:
          type: string
        addressLine2:
          type: string
        city:
          type: string
        state:
          type: string
        country:
          type: string
        postalCode:
          type: string
        addressType:
          type: string
    AddressRequest:
      description: Address information
      type: object
      properties:
        addressLine1:
          description: Address line 1
          type: string
        addressLine2:
          description: Address line 2
          type: string
        city:
          description: City
          type: string
        state:
          description: State or province
          type: string
        country:
          description: Country
          type: string
        postalCode:
          description: Postal code
          type: string
    AmountDto:
      required:
      - value
      - scale
      type: object
      properties:
        value:
          pattern: ^-?\d+$
          type: string
        scale:
          format: int32
          minimum: 0
          exclusiveMinimum: true
          type: integer
        currency:
          pattern: "^[A-Z]{3}$"
          type: string
        formatted:
          type: string
        displayValue:
          type: string
    ApiResponse:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        data: {}
        error:
          type: string
    ApproveTransferRequest:
      description: Transfer approval request details
      required:
      - code
      - token
      - transferId
      type: object
      properties:
        code:
          description: Verification code for the transfer
          type: string
        token:
          description: Authentication token
          type: string
        transferId:
          description: Transfer reference ID
          type: string
    AssetAllowedOperation:
      type: object
      properties:
        id:
          type: string
        assetId:
          type: string
        operationType:
          type: string
        definitionType:
          type: string
        definitionName:
          type: string
        isSameWallet:
          type: boolean
        sourceRoleType:
          type: string
        sourceData:
          $ref: "#/components/schemas/OperationSourceData"
        sourceAddressType:
          type: string
        destRoleType:
          type: string
        destData:
          $ref: "#/components/schemas/OperationDestinationData"
        destAddressType:
          type: string
        isActive:
          type: boolean
        createdAt:
          type: string
        updatedAt:
          type: string
    AssetFee:
      type: object
      properties:
        id:
          type: string
        assetId:
          type: string
        operationType:
          type: string
        feeType:
          type: string
        feeAmount:
          type: string
        feePercentage:
          type: string
        currency:
          type: string
        minFeeAmount:
          type: string
        maxFeeAmount:
          type: string
        feeDescription:
          type: string
        isActive:
          type: boolean
        createdAt:
          type: string
        updatedAt:
          type: string
    AssetOperationLimit:
      type: object
      properties:
        id:
          type: string
        assetId:
          type: string
        operationType:
          type: string
        limitType:
          type: string
        limitAmount:
          type: string
        currency:
          type: string
        usedAmount:
          type: string
        remainingAmount:
          type: string
        resetPeriod:
          type: string
        lastResetAt:
          type: string
        nextResetAt:
          type: string
        isActive:
          type: boolean
        createdAt:
          type: string
        updatedAt:
          type: string
    B2BCustomerRegistrationRequest:
      description: B2B customer organization registration request
      required:
      - organization
      - address
      - contactPhone
      - primaryContact
      type: object
      properties:
        organization:
          description: Organization details
          type: object
          allOf:
          - $ref: "#/components/schemas/OrganizationCustomer"
        address:
          description: Organization address
          type: object
          allOf:
          - $ref: "#/components/schemas/PersonAddress"
        contactPhone:
          description: Primary contact phone number
          type: string
        primaryContact:
          description: Primary contact person details
          type: object
          allOf:
          - $ref: "#/components/schemas/Person"
        businessRelationships:
          description: Business relationships with other organizations
          type: array
          items:
            $ref: "#/components/schemas/BusinessRelationship1"
    BankAddress:
      required:
      - networkType
      - bankName
      - countryCode
      type: object
      properties:
        networkType:
          minLength: 1
          type: string
        bankName:
          minLength: 1
          type: string
        countryCode:
          minLength: 1
          type: string
    BaseResponse:
      description: Standard response wrapper for all API responses
      type: object
      properties:
        code:
          format: int32
          description: HTTP status code
          type: integer
          example: 200
        message:
          description: Response message
          type: string
          example: Success
        redirectUrl:
          description: Optional URL to redirect to after processing
          type: string
        sessionId:
          description: Optional session identifier
          type: string
        data:
          description: The actual response data payload
    BaseResponse1:
      type: object
      properties:
        success:
          type: boolean
        code:
          format: int32
          type: integer
        timestamp:
          $ref: "#/components/schemas/Instant"
        message:
          type: string
        error:
          type: string
        path:
          type: string
        data: {}
    BeneficiaryResponse:
      type: object
      properties:
        beneficiaryId:
          type: string
        accountId:
          type: string
        partyType:
          type: string
        beneficiaryName:
          type: string
        iban:
          type: string
        currency:
          type: string
        country:
          type: string
        email:
          type: string
        phoneNumber:
          type: string
        shortName:
          type: string
        bicSwiftCode:
          type: string
        bicType:
          type: string
        pepCheckResult:
          type: string
        status:
          type: string
        createdAt:
          $ref: "#/components/schemas/Instant"
        updatedAt:
          $ref: "#/components/schemas/Instant"
        additionalData:
          type: object
          additionalProperties:
            type: string
    BusinessRelationship:
      description: Business to business relationship
      type: object
      properties:
        targetBusinessId:
          description: ID of the target business organization
          type: string
        relationshipType:
          description: "Type of relationship between businesses (e.g., PARENT_SUBSIDIARY,\
            \ PARTNER, SUPPLIER)"
          type: string
        status:
          description: "Status of the relationship (e.g., ACTIVE, PENDING, INACTIVE)"
          type: string
    BusinessRelationship1:
      description: Business to business relationship
      type: object
      properties:
        targetBusinessId:
          description: ID of the target business organization
          type: string
        relationshipType:
          description: "Type of relationship between businesses (e.g., PARENT_SUBSIDIARY,\
            \ PARTNER, SUPPLIER)"
          type: string
        status:
          description: "Status of the relationship (e.g., ACTIVE, PENDING, INACTIVE)"
          type: string
    CategoryFeatureRelation:
      type: object
      properties:
        id:
          type: string
        category:
          $ref: "#/components/schemas/CustomerCategory"
        feature:
          $ref: "#/components/schemas/OfferingFeature"
        enabled:
          type: boolean
        priority:
          format: int32
          type: integer
        configuration:
          type: object
          additionalProperties: {}
        parametrization:
          type: array
          items:
            $ref: "#/components/schemas/Parametrization"
    ChannelPreference:
      type: object
      properties:
        enabled:
          type: boolean
        metadata:
          type: object
          additionalProperties:
            type: string
    ClearResponse:
      description: Response for logout and session clear operations
      type: object
      properties:
        cleared:
          type: boolean
        message:
          type: string
        success:
          type: boolean
    Consent:
      type: object
      properties:
        id:
          type: string
        consentType:
          type: string
        consentTitle:
          type: string
        consentDescription:
          type: string
        isRequired:
          type: boolean
        isGranted:
          type: boolean
        grantedAt:
          type: string
        revokedAt:
          type: string
        expiresAt:
          type: string
        version:
          type: string
        documentUrl:
          type: string
        ipAddress:
          type: string
        userAgent:
          type: string
        status:
          type: string
        consentToFeatureRelations:
          type: array
          items:
            $ref: "#/components/schemas/ConsentToFeatureRelation"
        customerId:
          type: string
        serviceProvider:
          type: string
        customerType:
          type: string
        consentedDate:
          type: string
        sharingStartDate:
          type: string
        sharingEndDate:
          type: string
        consentPeriod:
          type: string
        consentAccess:
          type: string
        permissions: {}
        tenantId:
          type: string
        registeredByRole:
          type: string
        registrationDate:
          type: string
        endDate:
          type: string
        allowedOperationTypes:
          type: array
          items:
            type: string
        consentTemplateId:
          type: string
        parametrizations:
          type: array
          items:
            $ref: "#/components/schemas/Parametrization"
        validFrom:
          type: string
        validTo:
          type: string
        transferType:
          type: string
        sourceAssetId:
          type: string
        destinationAssetId:
          type: string
        approvalDate:
          type: string
        rejectionDate:
          type: string
        networkOperation: {}
        organizationId:
          type: string
        legalBasis:
          type: string
        dataCategories:
          type: array
          items:
            type: string
        processingPurposes:
          type: array
          items:
            type: string
        emailVerificationRequired:
          type: boolean
        smsVerificationRequired:
          type: boolean
        authenticatorVerificationRequired:
          type: boolean
        pushNotificationEnabled:
          type: boolean
        createdAt:
          $ref: "#/components/schemas/LocalDateTime"
        type:
          type: string
        isMultiSignatureRequired:
          type: boolean
        requiredSignatures:
          format: int32
          type: integer
        collectedSignatures:
          format: int32
          type: integer
        signatures:
          type: array
          items:
            $ref: "#/components/schemas/ConsentSignature"
        requiredSigners:
          type: array
          items:
            type: string
        signatureDeadline:
          type: string
        escalationLevel:
          type: string
        acceptedAt:
          $ref: "#/components/schemas/LocalDateTime"
        active:
          type: boolean
        expired:
          type: boolean
    ConsentConfirmationDto:
      type: object
      properties:
        consentId:
          type: string
        confirmed:
          type: boolean
        timestamp:
          type: string
        channel:
          type: string
        signature:
          type: string
    ConsentDto:
      type: object
      properties:
        consentReference:
          type: string
        consentType:
          type: string
        consentMode:
          type: string
        signatures:
          type: array
          items:
            $ref: "#/components/schemas/SignatureDto"
        documentReference:
          type: string
        validUntil:
          type: string
    ConsentSignature:
      type: object
      properties:
        signatureId:
          type: string
        consentId:
          type: string
        signerId:
          type: string
        signerName:
          type: string
        signerRole:
          type: string
        signatureStatus:
          type: string
        signedAt:
          type: string
        magicLinkToken:
          type: string
        magicLinkExpiresAt:
          type: string
        ipAddress:
          type: string
        userAgent:
          type: string
        comment:
          type: string
        approved:
          type: boolean
        requiredByEscalation:
          type: boolean
        delegatedFrom:
          type: string
        delegatedTo:
          type: string
        delegatedAt:
          type: string
        notificationsSent:
          format: int32
          type: integer
        lastNotificationAt:
          type: string
        pending:
          type: boolean
        signed:
          type: boolean
        rejected:
          type: boolean
        expired:
          type: boolean
    ConsentToFeatureRelation:
      type: object
      properties:
        id:
          type: string
        consent:
          $ref: "#/components/schemas/Consent"
        offeringFeature:
          $ref: "#/components/schemas/OfferingFeature"
        parametrization:
          type: array
          items:
            $ref: "#/components/schemas/Parametrization"
        isRequired:
          type: boolean
        isEnabled:
          type: boolean
        priority:
          format: int32
          type: integer
        effectiveFrom:
          type: string
        effectiveTo:
          type: string
        status:
          type: string
        active:
          type: boolean
        effective:
          type: boolean
    CreateAccountRequest:
      description: Request to create an individual customer account
      type: object
      properties:
        individualCustomer:
          description: Complete individual customer data using presentation API model
          type: object
          allOf:
          - $ref: "#/components/schemas/IndividualCustomer"
        firstName:
          description: Customer first name
          type: string
        lastName:
          description: Customer last name
          type: string
        email:
          description: Customer email address
          type: string
        phone:
          description: Customer phone number
          type: string
        password:
          description: Customer login password
          type: string
        dateOfBirth:
          description: Date of birth in YYYY-MM-DD format
          type: string
        categoryId:
          description: Customer category ID for categorization
          type: string
        categoryName:
          description: Customer category name for categorization
          type: string
        countryOfOrigin:
          description: Customer country of origin
          type: string
        countryOfResidence:
          description: Customer country of residence
          type: string
        roleIds:
          description: List of role IDs to assign to the customer
          type: array
          items:
            type: string
          example:
          - ACCOUNT_OWNER
          - USER
        tenantId:
          type: string
        middleName:
          type: string
        matchingPassword:
          type: string
    CreateBeneficiaryRequest:
      required:
      - partyType
      - iban
      - currency
      - country
      - email
      - phoneNumber
      - shortName
      type: object
      properties:
        partyType:
          pattern: INDIVIDUAL_CUSTOMER|BUSINESS_CUSTOMER
          type: string
        firstName:
          type: string
        lastName:
          type: string
        companyName:
          type: string
        iban:
          maxLength: 34
          minLength: 15
          pattern: "^[A-Z]{2}[0-9]{2}[A-Z0-9]+$"
          type: string
        currency:
          maxLength: 3
          minLength: 3
          type: string
        country:
          maxLength: 2
          minLength: 2
          type: string
        email:
          type: string
        phoneNumber:
          pattern: "^\\+[0-9]{1,15}$"
          type: string
        shortName:
          maxLength: 50
          minLength: 1
          type: string
        bicSwiftCode:
          maxLength: 11
          minLength: 8
          pattern: "^[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?$"
          type: string
        additionalData:
          type: object
          additionalProperties:
            type: string
    CreateBusinessAccountRequest:
      description: Request to create a business account
      required:
      - businessName
      - registrationNumber
      - email
      - password
      - matchingPassword
      - countryName
      - tenantId
      type: object
      properties:
        businessName:
          minLength: 1
          type: string
        registrationNumber:
          minLength: 1
          type: string
        taxId:
          type: string
        email:
          minLength: 1
          type: string
        password:
          minLength: 1
          type: string
        matchingPassword:
          minLength: 1
          type: string
        countryName:
          minLength: 1
          type: string
        phone:
          type: string
        website:
          type: string
        businessType:
          type: string
        industryType:
          type: string
        dateOfIncorporation:
          type: string
        address:
          $ref: "#/components/schemas/Address"
        tenantId:
          minLength: 1
          type: string
    CreateConsentTemplateRequest:
      required:
      - consentType
      - title
      - content
      - version
      - isMandatory
      type: object
      properties:
        consentType:
          pattern: \S
          type: string
        title:
          pattern: \S
          type: string
        content:
          pattern: \S
          type: string
        version:
          pattern: \S
          type: string
        isMandatory:
          type: boolean
        expiryDays:
          format: int32
          type: integer
        legalBasis:
          type: string
        dataCategories:
          type: string
        processingPurposes:
          type: string
    CreateSessionRequest:
      type: object
      properties:
        username:
          type: string
        password:
          type: string
        tenantKey:
          type: string
        tenantSecret:
          type: string
    CredentialVerification:
      type: object
      properties:
        credentialType:
          type: string
        credentialValue:
          type: string
        mustBeVerified:
          type: boolean
        verificationStatus:
          type: string
        verifiedAt:
          type: string
        verificationMethod:
          type: string
        verificationAttempts:
          format: int32
          type: integer
        lastAttemptAt:
          type: string
        expiresAt:
          type: string
        verified:
          type: boolean
        pending:
          type: boolean
        failed:
          type: boolean
        expired:
          type: boolean
    CustomerCategorization:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        order:
          format: int64
          type: integer
        description:
          type: string
        defineByOrganization:
          type: string
        contractId:
          type: string
        idParent:
          type: string
        isActive:
          type: boolean
        createdAt:
          type: string
        updatedAt:
          type: string
        categoryFeatureRelations:
          type: array
          items:
            $ref: "#/components/schemas/CategoryFeatureRelation"
        parametrization:
          type: array
          items:
            $ref: "#/components/schemas/Parametrization"
        active:
          type: boolean
    CustomerCategory:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        code:
          type: string
        description:
          type: string
        active:
          type: boolean
    CustomerNotification:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        message:
          type: string
        isRead:
          type: boolean
        createdAt:
          type: string
    CustomerRegistrationResponse:
      description: Customer registration response
      type: object
      properties:
        customerId:
          description: Customer ID (individual or organization)
          type: string
          example: 12345678-1234-1234-1234-123456789012
        organizationId:
          description: Organization ID (only for B2B customers)
          type: string
          example: 98765432-9876-9876-9876-987654321098
        registrationStatus:
          description: Registration status
          type: string
          example: PENDING_VERIFICATION
        nextSteps:
          description: Next steps for the customer
          type: string
          example: Please verify your email address
    CustomerRegistrationResponse1:
      description: Customer registration response
      type: object
      properties:
        customerId:
          description: Customer ID (individual or organization)
          type: string
          example: 12345678-1234-1234-1234-123456789012
        organizationId:
          description: Organization ID (only for B2B customers)
          type: string
          example: 98765432-9876-9876-9876-987654321098
        registrationStatus:
          description: Registration status
          type: string
          example: PENDING_VERIFICATION
        nextSteps:
          description: Next steps for the customer
          type: string
          example: Please verify your email address
    CustomerStatus:
      enum:
      - CS_REACTIVATED
      - CS_SUSPENDED
      - CS_NOT_STARTED
      - CS_SENT_FOR_REVISION
      - CS_CLOSE_ACCOUNT
      - CS_PENDING_KYC
      - CS_BANKRUPTED
      - CS_ON_HOLD
      - CS_DISPUTE
      - CS_UNDER_INVESTIGATION
      - CS_BLACKLISTED
      - CS_REGISTRATION_COMPLETED
      - CS_WAITING_VERIFICATION
      - CS_UNDER_VERIFICATION
      - CS_VERIFIED
      - CS_NEW
      type: string
    CustomerType:
      enum:
      - CT_ADMINISTRATOR
      - CT_EXTERNAL
      - CT_ADMIN
      - CT_DIRECTOR
      - CT_PERSON
      - CT_CUSTOMER
      - CT_SHAREHOLDER
      - CT_EMPLOYEE
      type: string
    CustomerWallet:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        customerId:
          type: string
        ownerId:
          type: string
        lineOfBusiness:
          type: string
        service:
          type: string
        isRoot:
          type: boolean
        parentWalletId:
          type: string
        assets:
          type: array
          items:
            $ref: "#/components/schemas/WalletAsset"
        balance:
          type: string
        reservedBalance:
          type: string
        tenantId:
          type: string
        walletTypeId:
          type: string
        walletType:
          $ref: "#/components/schemas/WalletType1"
        product:
          type: string
        businessArea:
          type: string
        walletPurposes:
          type: array
          items:
            $ref: "#/components/schemas/WalletPurpose"
        walletRelations:
          type: array
          items:
            $ref: "#/components/schemas/WalletRelation"
        isActive:
          type: boolean
        createdBy:
          type: string
        updatedBy:
          type: string
        createdAt:
          type: string
        updatedAt:
          type: string
        availableBalance:
          type: string
    Date:
      format: date
      type: string
      example: 2022-03-10
    Director:
      type: object
      properties:
        id:
          type: string
        tenantId:
          type: string
        organizationId:
          type: string
        person:
          $ref: "#/components/schemas/Person"
        responsibility:
          type: string
        position:
          type: string
        organizationRole:
          type: string
        status:
          type: string
        sharePercentage:
          format: float
          type: number
        ultimatePercentage:
          format: float
          type: number
        groupId:
          type: string
        documentId:
          type: string
        escalationContact:
          $ref: "#/components/schemas/Person"
        peerContacts:
          $ref: "#/components/schemas/Person"
        firstName:
          type: string
        lastName:
          type: string
        email:
          type: string
        phoneNumber:
          type: string
        nationality:
          type: string
    DocumentDto:
      type: object
      properties:
        documentType:
          type: string
        documentId:
          type: string
        documentReference:
          type: string
        uploadedAt:
          type: string
    DocumentUploadForm:
      type: object
      properties:
        docId:
          type: string
        documentType:
          type: string
        fileName:
          type: string
        fileContent:
          type: string
        customerId:
          type: string
        description:
          type: string
        organizationId:
          type: string
        title:
          type: string
        purpose:
          type: string
        comment:
          type: string
        metadata:
          type: string
        file:
          format: binary
          type: string
    DocumentUploadRequest:
      required:
      - fileName
      - fileType
      - purpose
      - contentType
      - content
      type: object
      properties:
        customerId:
          type: string
        organizationId:
          type: string
        fileName:
          pattern: \S
          type: string
        fileType:
          pattern: \S
          type: string
        purpose:
          pattern: \S
          type: string
        contentType:
          pattern: \S
          type: string
        content:
          pattern: \S
          type: string
        expiryDate:
          $ref: "#/components/schemas/Date"
        description:
          type: string
        category:
          type: string
    Employee:
      type: object
      properties:
        id:
          type: string
        tenantId:
          type: string
        organizationId:
          type: string
        person:
          $ref: "#/components/schemas/Person"
        responsibility:
          type: string
        position:
          type: string
        roles:
          type: array
          items:
            type: string
        organizationRole:
          type: string
        status:
          type: string
        username:
          type: string
        password:
          type: string
        sharePercentage:
          format: float
          type: number
        ultimatePercentage:
          format: float
          type: number
        groupId:
          type: string
        documentId:
          type: string
        escalationContact:
          $ref: "#/components/schemas/Person"
        peerContacts:
          $ref: "#/components/schemas/Person"
        department:
          type: string
        certifications:
          type: array
          items:
            type: string
        employeeId:
          type: string
        hireDate:
          $ref: "#/components/schemas/LocalDate"
        firstName:
          type: string
        lastName:
          type: string
        email:
          type: string
        phoneNumber:
          type: string
        title:
          type: string
        name:
          type: string
    ExecuteOrderRequestDto:
      type: object
      properties:
        preparedOrderId:
          type: string
        consentConfirmation:
          $ref: "#/components/schemas/ConsentConfirmationDto"
        executionMode:
          $ref: "#/components/schemas/ExecutionMode"
    ExecutionMode:
      enum:
      - IMMEDIATE
      - SCHEDULED
      - BATCH
      type: string
    ExternalAccountAddress:
      required:
      - addressType
      - accountAddress
      type: object
      properties:
        addressType:
          minLength: 1
          type: string
        accountAddress:
          minLength: 1
          type: string
        bankCodeType:
          type: string
        bankCodeValue:
          type: string
        bankName:
          type: string
        branchName:
          type: string
        countryCode:
          type: string
        bankAddress:
          type: string
        city:
          type: string
        postalCode:
          type: string
        intermediaryBankDetails:
          type: string
        additionalInformation:
          type: string
    FileUpload:
      type: object
    IndividualCustomer:
      type: object
      properties:
        id:
          type: string
        tenantId:
          type: string
        customerType:
          $ref: "#/components/schemas/CustomerType"
        customerName:
          type: string
        customerStatus:
          $ref: "#/components/schemas/CustomerStatus"
        categorization:
          $ref: "#/components/schemas/CustomerCategorization"
        organizationId:
          type: string
        verificationProgress:
          format: int64
          type: integer
        person:
          $ref: "#/components/schemas/Person"
        user:
          $ref: "#/components/schemas/User"
        sourceData:
          $ref: "#/components/schemas/SourceData"
        sharePercentage:
          format: float
          type: number
        ultimatePercentage:
          format: float
          type: number
        notifications:
          type: array
          items:
            $ref: "#/components/schemas/CustomerNotification"
        isB2B:
          type: boolean
        isDirector:
          type: boolean
        pepCheckResult:
          $ref: "#/components/schemas/PepCheckResult"
        nextKycPepCheckDate:
          type: string
        idProofExpiryDate:
          type: string
        sepaId:
          type: string
        remark:
          type: string
        externalCustomerId:
          type: string
        createdAt:
          type: string
        updatedAt:
          type: string
        consents:
          type: array
          items:
            $ref: "#/components/schemas/Consent"
        organizationAssociations:
          type: array
          items: {}
        credentialVerification: {}
        ownerId:
          type: string
        individual:
          type: boolean
        organization:
          type: boolean
    IndividualCustomerRegistrationRequest:
      description: Individual customer registration request
      required:
      - firstName
      - lastName
      - email
      - address
      type: object
      properties:
        firstName:
          description: First name of the customer
          type: string
        lastName:
          description: Last name of the customer
          type: string
        email:
          description: Email address of the customer
          type: string
        phoneNumber:
          description: Phone number of the customer
          type: string
        address:
          description: Address information of the customer
          type: object
          allOf:
          - $ref: "#/components/schemas/Address"
    Instant:
      format: date-time
      type: string
      example: 2022-03-10T16:15:50Z
    LocalDate:
      format: date
      type: string
      example: 2022-03-10
    LocalDateTime:
      format: date-time
      type: string
      example: 2022-03-10T12:15:50
    OfferingFeature:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        code:
          type: string
        description:
          type: string
        capabilityId:
          type: string
        capabilityName:
          type: string
        active:
          type: boolean
        type:
          type: string
    OperationAddress:
      type: object
      properties:
        id:
          type: string
        addressLine1:
          type: string
        addressLine2:
          type: string
        city:
          type: string
        state:
          type: string
        country:
          type: string
        postalCode:
          type: string
        addressType:
          type: string
    OperationDestinationData:
      type: object
      properties:
        destData:
          $ref: "#/components/schemas/SourceDataType"
        destinationAddress:
          $ref: "#/components/schemas/OperationAddress"
        destinationId:
          type: string
        destinationAccountNumber:
          type: string
        destinationIban:
          type: string
        destinationBic:
          type: string
        destinationBankName:
          type: string
        destinationCountryCode:
          type: string
        destinationCurrency:
          type: string
        destinationMetadata:
          type: object
          additionalProperties: {}
        destinationSchema:
          type: object
          additionalProperties: {}
        isActive:
          type: boolean
    OperationSourceData:
      type: object
      properties:
        sourceData:
          $ref: "#/components/schemas/SourceDataType"
        sourceAddress:
          $ref: "#/components/schemas/OperationAddress"
        sourceId:
          type: string
        sourceAccountNumber:
          type: string
        sourceIban:
          type: string
        sourceBic:
          type: string
        sourceBankName:
          type: string
        sourceCountryCode:
          type: string
        sourceCurrency:
          type: string
        sourceMetadata:
          type: object
          additionalProperties: {}
        sourceSchema:
          type: object
          additionalProperties: {}
        isActive:
          type: boolean
    OrderOperationType:
      enum:
      - DEPOSIT
      - DEPOSIT_VIA_BANK_TRANSFER
      - WITHDRAWAL
      - SINGLE_TRANSFER_REQUEST
      - SINGLE_TRANSFER_SENT
      - TRADING
      - SEPA_TRANSFER
      - BLOCK
      - CANCEL
      - ACCOUNT_MANAGEMENT_FEE
      - ACCOUNT_ACTIVITY_FEE
      - ADD_MONEY_VIA_CARD
      - CHANGE
      - DECLINED_TRANSFER_REQUEST
      - CONFIRMED_TRANSFER_REQUEST
      type: string
    OrderStatus:
      enum:
      - PREPARED
      - PENDING_CONSENT
      - READY
      - EXECUTING
      - EXECUTED
      - COMPLETED
      - FAILED
      - CANCELLED
      - EXPIRED
      type: string
    OrganizationCustomer:
      type: object
      properties:
        id:
          type: string
        organizationId:
          type: string
        tenantId:
          type: string
        legalName:
          type: string
        tradingName:
          type: string
        registrationNumber:
          type: string
        taxIdentificationNumber:
          type: string
        taxRegistrationNumber:
          type: string
        dateOfIncorporation:
          type: string
        businessType:
          type: string
        industryType:
          type: string
        website:
          type: string
        businessSector:
          type: string
        rangeOfServicesOrGoods:
          type: string
        status:
          type: string
        countryOfCorporation:
          type: string
        isTradingNameExist:
          type: boolean
        createdAt:
          type: string
        updatedAt:
          type: string
        organizationRole:
          type: string
        sourceOfIncomingFund:
          type: string
        countryCode:
          type: string
        purposeOfAccount:
          type: string
        email:
          type: string
        expectedAnnualActivityOfPlatform:
          type: string
        shareholders:
          type: array
          items:
            $ref: "#/components/schemas/Shareholder"
        employees:
          type: array
          items:
            $ref: "#/components/schemas/Employee"
        directors:
          type: array
          items:
            $ref: "#/components/schemas/Director"
        ultimatePercentage:
          format: float
          type: number
        categorization:
          $ref: "#/components/schemas/CustomerCategorization"
        organizationStatus:
          type: string
        contacts:
          type: array
          items:
            $ref: "#/components/schemas/PersonContact"
        addresses:
          type: array
          items:
            $ref: "#/components/schemas/PersonAddress"
        documents:
          type: array
          items:
            $ref: "#/components/schemas/PersonDocument"
        organizationRelations:
          type: array
          items:
            $ref: "#/components/schemas/OrganizationRelation"
        users:
          type: array
          items:
            $ref: "#/components/schemas/User"
        credentialVerification:
          $ref: "#/components/schemas/CredentialVerification"
        consents:
          type: array
          items:
            $ref: "#/components/schemas/Consent"
        isB2B:
          type: boolean
        isDirector:
          type: boolean
        kybStatus:
          type: string
        sanctionStatus:
          type: string
        pepStatus:
          type: string
        businessOwnerDetailStatus:
          type: string
        supportingDocumentationStatus:
          type: string
        companyDetailStatus:
          type: string
        companyAddressStatus:
          type: string
        nextCheckDate:
          type: string
        sepaId:
          type: string
        adminEmployees:
          type: array
          items:
            $ref: "#/components/schemas/Employee"
        individual:
          type: boolean
        organization:
          type: boolean
    OrganizationRelation:
      type: object
      properties:
        id:
          type: string
        sourceBusinessId:
          type: string
        targetBusinessId:
          type: string
        targetBusinessName:
          type: string
        targetBusinessRegistrationNumber:
          type: string
        relationshipType:
          type: string
        status:
          type: string
        isActive:
          type: boolean
        createdAt:
          type: string
        updatedAt:
          type: string
    Parametrization:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        value:
          type: string
        categoryToCustomerId:
          type: string
        categoryToFeatureId:
          type: string
    PaymentConsentRequest:
      required:
      - title
      - paymentType
      - parameters
      type: object
      properties:
        title:
          pattern: \S
          type: string
        paymentType:
          pattern: \S
          type: string
        description:
          type: string
        parameters:
          type: object
          additionalProperties: {}
        validityPeriod:
          type: string
        validFrom:
          type: string
        validUntil:
          type: string
    PaymentMethod:
      enum:
      - INTERNAL
      - EXTERNAL
      - CROSS_NETWORK
      - CROSS_POWER_TENANT
      type: string
    PaymentRequest:
      required:
      - sourceAssetAddress
      - destinationAssetAddress
      - amount
      - currency
      - paymentMethod
      type: object
      properties:
        sourceAssetAddress:
          pattern: \S
          type: string
        destinationAssetAddress:
          pattern: \S
          type: string
        amount:
          minimum: 0
          exclusiveMinimum: true
          type: number
        currency:
          pattern: \S
          type: string
        paymentMethod:
          $ref: "#/components/schemas/PaymentMethod"
        metadata:
          type: object
          additionalProperties: {}
    PaymentValidationRequest:
      required:
      - paymentType
      - amount
      - currency
      type: object
      properties:
        paymentType:
          pattern: \S
          type: string
        amount:
          minimum: 0
          exclusiveMinimum: true
          type: number
        currency:
          pattern: \S
          type: string
        beneficiaryId:
          type: string
        beneficiaryType:
          type: string
        beneficiaryName:
          type: string
        scheduledDate:
          type: string
        recurringSchedule:
          type: string
    PepCheckResult:
      enum:
      - PCR_EXPIRED
      - PCR_SUSPENDED
      - PCR_VERIFIED
      - PCR_SEND_FOR_REVISION
      - PCR_WAITING_VERIFICATION
      - PCR_NOT_START
      type: string
    Person:
      type: object
      properties:
        id:
          type: string
        names:
          type: array
          items:
            $ref: "#/components/schemas/PersonNamePart"
        fullName:
          type: string
        gender:
          type: string
        dateOfBirth:
          type: string
        placeOfBirth:
          type: string
        nationality:
          type: string
        email:
          type: string
        contacts:
          type: array
          items:
            $ref: "#/components/schemas/PersonContact"
        documents:
          type: array
          items:
            $ref: "#/components/schemas/PersonDocument"
        addresses:
          type: array
          items:
            $ref: "#/components/schemas/PersonAddress"
        firstName:
          type: string
        lastName:
          type: string
        phoneNumber:
          type: string
    PersonAddress:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        street:
          type: string
        city:
          type: string
        state:
          type: string
        postalCode:
          type: string
        country:
          type: string
        isPrimary:
          type: boolean
    PersonContact:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        value:
          type: string
        isPrimary:
          type: boolean
        verified:
          type: boolean
        credentialVerifications:
          type: array
          items:
            $ref: "#/components/schemas/CredentialVerification"
        primary:
          type: boolean
    PersonDocument:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        number:
          type: string
        issuingCountry:
          type: string
        issuingAuthority:
          type: string
        issueDate:
          type: string
        expiryDate:
          type: string
        verified:
          type: boolean
    PersonNamePart:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        value:
          type: string
        order:
          format: int32
          type: integer
    PrepareOrderRequestDto:
      type: object
      properties:
        sourceAccount:
          $ref: "#/components/schemas/SourceAccountDto"
        target:
          $ref: "#/components/schemas/TargetDto"
        amount:
          $ref: "#/components/schemas/AmountDto"
        currency:
          type: string
        type:
          $ref: "#/components/schemas/TransferType"
        description:
          type: string
        consent:
          $ref: "#/components/schemas/ConsentDto"
        purpose:
          $ref: "#/components/schemas/PurposeDto"
        documents:
          type: array
          items:
            $ref: "#/components/schemas/DocumentDto"
        schedule:
          $ref: "#/components/schemas/ScheduleDto"
    PurposeDto:
      type: object
      properties:
        templateId:
          type: string
        templateVersion:
          type: string
        fields:
          type: object
          additionalProperties: {}
        freeText:
          type: string
    RaciValidationRequest:
      required:
      - processType
      - organizationId
      - initiatorId
      type: object
      properties:
        processType:
          pattern: \S
          type: string
        organizationId:
          pattern: \S
          type: string
        initiatorId:
          pattern: \S
          type: string
        processData:
          type: object
          additionalProperties: {}
    RecurrenceDto:
      type: object
      properties:
        frequency:
          type: string
        interval:
          format: int32
          type: integer
        endDate:
          type: string
        occurrences:
          format: int32
          type: integer
    ResendMagicLinkRequest:
      type: object
      properties:
        email:
          type: string
        purpose:
          type: string
        metadata:
          type: string
    ScheduleDto:
      type: object
      properties:
        executionType:
          type: string
        executionDate:
          type: string
        recurrence:
          $ref: "#/components/schemas/RecurrenceDto"
    SendMagicLinkRequest:
      type: object
      properties:
        email:
          type: string
        purpose:
          type: string
        metadata:
          type: string
    Shareholder:
      type: object
      properties:
        id:
          type: string
        tenantId:
          type: string
        organizationId:
          type: string
        person:
          $ref: "#/components/schemas/Person"
        responsibility:
          type: string
        position:
          type: string
        status:
          type: string
        sharePercentage:
          format: float
          type: number
        ultimatePercentage:
          format: float
          type: number
        groupId:
          type: string
        documentId:
          type: string
        escalationContact:
          $ref: "#/components/schemas/Person"
        peerContacts:
          $ref: "#/components/schemas/Person"
        shareholderType:
          type: string
        numberOfShares:
          format: int32
          type: integer
        registrationNumber:
          type: string
        taxIdentificationNumber:
          type: string
        name:
          type: string
        ownershipPercentage:
          type: string
    SignatureDto:
      type: object
      properties:
        signerId:
          type: string
        signerRole:
          type: string
        signatureData:
          type: string
        signedAt:
          type: string
    SignatureRequest:
      type: object
      properties:
        approved:
          type: boolean
        comment:
          type: string
    SourceAccountDto:
      type: object
      properties:
        iban:
          type: string
        walletId:
          type: string
    SourceData:
      enum:
      - SD_BO_PLATFORM
      - SD_B2B_PLATFORM
      - SD_B2C_PLATFORM
      type: string
    SourceDataType:
      enum:
      - SD_BO_PLATFORM
      - SD_B2B_PLATFORM
      - SD_B2C_PLATFORM
      type: string
    SqlCommandRequest:
      required:
      - command
      - tableName
      - parameters
      type: object
      properties:
        command:
          pattern: \S
          type: string
        tableName:
          pattern: \S
          type: string
        limit:
          format: int32
          type: integer
        fields:
          type: array
          items:
            type: string
        parameters:
          type: object
          additionalProperties: {}
    SqlCommandResponse:
      type: object
      properties:
        success:
          type: boolean
        errorMessage:
          type: string
        tableStructure:
          type: array
          items:
            type: object
            additionalProperties: {}
        data:
          type: array
          items:
            type: object
            additionalProperties: {}
        rowsAffected:
          format: int32
          type: integer
    TargetDto:
      type: object
      properties:
        beneficiaryRef:
          type: string
        tenantRef:
          type: string
        iban:
          type: string
        name:
          type: string
    TenantRegistrationResponse:
      type: object
      properties:
        tenantId:
          type: string
        customerKey:
          type: string
        customerSecret:
          type: string
        mockupEnabled:
          type: boolean
        integrationEnabled:
          type: boolean
    TokenRefreshRequest:
      description: Request object for token refresh operations
      required:
      - userSessionToken
      - internalTokenKey
      type: object
      properties:
        userSessionToken:
          description: JWT token for user session validation
          pattern: \S
          type: string
        internalTokenKey:
          description: Internal token key extracted from JWT claims
          pattern: \S
          type: string
    TransactionApprovalRequest:
      type: object
      properties:
        processType:
          type: string
        transactionId:
          type: string
        amount:
          type: number
        currency:
          type: string
        organizationId:
          type: string
        description:
          type: string
        metadata:
          type: object
          additionalProperties: {}
    TransferDirection:
      enum:
      - OPERATIONAL_TO_MASTER
      - MASTER_TO_OPERATIONAL
      type: string
    TransferRequest:
      description: Transfer request details
      required:
      - fromIban
      - toIban
      - amount
      - currency
      - description
      - isExternal
      - direction
      - transferPurpose
      - orderOperationType
      type: object
      properties:
        fromIban:
          description: Source account IBAN
          type: string
        toIban:
          description: Destination account IBAN
          type: string
        amount:
          description: Transfer amount
          type: number
        currency:
          description: "Currency code (e.g., EUR)"
          type: string
        description:
          description: Transfer description
          type: string
        isExternal:
          description: Whether the transfer is external (true) or internal (false)
          type: boolean
        direction:
          description: "Transfer direction (INCOMING, OUTGOING, or INTERNAL)"
          type: string
        transferPurpose:
          description: "Transfer purpose (PAYMENT, SALARY, LOAN, INVESTMENT, REFUND,\
            \ DONATION, FAMILY_SUPPORT, RENT, UTILITY, INSURANCE, TAX, OTHER)"
          type: string
        orderOperationType:
          description: Operation type for the transfer
          type: string
          allOf:
          - $ref: "#/components/schemas/OrderOperationType"
        beneficiaryName:
          description: Beneficiary name for external transfers
          type: string
        beneficiaryAddress:
          description: Beneficiary address for external transfers
          type: string
        beneficiaryCountry:
          description: Beneficiary country for external transfers
          type: string
        beneficiaryEmail:
          description: Beneficiary email for external transfers
          type: string
        beneficiaryPhone:
          description: Beneficiary phone for external transfers
          type: string
        reference:
          description: Reference ID for the transfer
          type: string
        note:
          description: Note or additional information for the transfer
          type: string
        notifyRecipient:
          description: Whether to notify the recipient
          type: boolean
        customerId:
          description: Customer ID of the sender
          type: string
        consentId:
          description: Consent ID for the transfer
          type: string
    TransferRequest1:
      type: object
      properties:
        amount:
          type: number
        direction:
          $ref: "#/components/schemas/TransferDirection"
        reference:
          type: string
    TransferType:
      enum:
      - INTERNAL
      - EXTERNAL
      - PURCHASE
      - TOPUP
      - WITHDRAW
      type: string
    UpdateConsentTemplateRequest:
      type: object
      properties:
        title:
          maxLength: 255
          type: string
        content:
          maxLength: 5000
          type: string
        version:
          maxLength: 20
          type: string
        isMandatory:
          type: boolean
        expiryDays:
          format: int32
          type: integer
        legalBasis:
          maxLength: 100
          type: string
        dataCategories:
          type: array
          items:
            type: string
        processingPurposes:
          type: array
          items:
            type: string
    UpdateRolesRequest:
      type: object
      properties:
        roles:
          type: array
          items:
            type: string
    UpdateSessionRequest:
      type: object
      properties:
        expirationSeconds:
          format: int32
          description: Number of seconds from now when the session should expire
          maximum: 2592000
          minimum: 60
          type: integer
          example: 3600
    User:
      type: object
      properties:
        id:
          type: string
        customerId:
          type: string
        tenantId:
          type: string
        username:
          type: string
        password:
          type: string
        email:
          type: string
        status:
          type: string
        roles:
          type: array
          items:
            type: string
        permissions:
          type: array
          items:
            type: string
        lastLoginDate:
          type: string
        createdDate:
          type: string
        isActive:
          type: boolean
        requiresPasswordChange:
          type: boolean
        twoFactorEnabled:
          type: boolean
    UserIdTypeEnum:
      enum:
      - EMAIL
      - PHONE_NUMBER
      - INVALID
      - ANY
      type: string
    VerificationLevel:
      enum:
      - SELF_VERIFIED
      - TENANT_VERIFIED
      - FINHUB_VERIFIED
      - POWER_TENANT_VERIFIED
      type: string
    VerificationRequest:
      type: object
      properties:
        customerId:
          type: string
        organizationId:
          type: string
        type:
          $ref: "#/components/schemas/VerificationType"
        requestedLevel:
          $ref: "#/components/schemas/VerificationLevel"
        requestedByTenantId:
          type: string
        requestedByUserId:
          type: string
        additionalData:
          type: object
          additionalProperties: {}
        applyToSubtenants:
          type: boolean
    VerificationRequest1:
      required:
      - verificationType
      - verificationMethod
      type: object
      properties:
        verificationType:
          pattern: \S
          type: string
        verificationMethod:
          type: string
        verificationData:
          type: object
          additionalProperties: {}
        tenantKey:
          type: string
        tenantSecret:
          type: string
        documents:
          type: array
          items:
            type: object
            additionalProperties: {}
        externalVerificationId:
          type: string
    VerificationType:
      enum:
      - IDENTITY_VERIFICATION
      - ADDRESS_VERIFICATION
      - INCOME_VERIFICATION
      - EMPLOYMENT_VERIFICATION
      - TAX_VERIFICATION
      - SANCTIONS_CHECK
      - CUSTOMER_DUE_DILIGENCE
      - ENHANCED_DUE_DILIGENCE
      - DOCUMENT_VERIFICATION
      type: string
    Wallet:
      description: Customer wallet with balance and transaction capabilities
      type: object
      properties:
        walletId:
          description: Unique identifier for the wallet
          type: string
        walletName:
          description: Display name of the wallet
          type: string
        walletType:
          description: "Type of wallet (e.g., PRIMARY, SECONDARY, SAVINGS)"
          type: string
        walletStatus:
          description: "Status of the wallet (e.g., ACTIVE, INACTIVE, BLOCKED)"
          type: string
        currency:
          description: "Currency code (e.g., USD, EUR, GBP)"
          type: string
        balance:
          description: Current balance
          type: string
        availableBalance:
          description: Available balance for transactions
          type: string
        reservedBalance:
          description: Reserved balance
          type: string
        allowedOperations:
          description: Allowed operations for this wallet
          type: array
          items:
            type: string
    WalletAggregation:
      type: object
      properties:
        id:
          type: string
        aggregationType:
          type: string
        aggregationValue:
          type: string
        isActive:
          type: boolean
    WalletAsset:
      type: object
      properties:
        id:
          type: string
        walletId:
          type: string
        assetId:
          type: string
        assetType:
          type: string
        currency:
          type: string
        balance:
          type: string
        availableBalance:
          type: string
        reservedBalance:
          type: string
        onHoldBalance:
          type: string
        blockedBalance:
          type: string
        owner:
          type: string
        isRoot:
          type: boolean
        isInstance:
          type: boolean
        isDefault:
          type: boolean
        isEncrypted:
          type: boolean
        allowedOperations:
          type: array
          items:
            $ref: "#/components/schemas/AssetAllowedOperation"
        operationLimits:
          type: array
          items:
            $ref: "#/components/schemas/AssetOperationLimit"
        fees:
          type: array
          items:
            $ref: "#/components/schemas/AssetFee"
        isActive:
          type: boolean
        createdBy:
          type: string
        updatedBy:
          type: string
        createdAt:
          type: string
        updatedAt:
          type: string
    WalletPurpose:
      type: object
      properties:
        id:
          type: string
        purposeType:
          type: string
        description:
          type: string
        isDefault:
          type: boolean
        isLive:
          type: boolean
        supportAggregation:
          type: boolean
        walletId:
          type: string
        aggregations:
          type: array
          items:
            $ref: "#/components/schemas/WalletAggregation"
        createdBy:
          type: string
        updatedBy:
          type: string
        createdAt:
          type: string
        updatedAt:
          type: string
        isActive:
          type: boolean
    WalletRelation:
      type: object
      properties:
        id:
          type: string
        sourceWalletId:
          type: string
        targetWalletId:
          type: string
        relationType:
          type: string
        isActive:
          type: boolean
        createdAt:
          type: string
        updatedAt:
          type: string
    WalletTransferRequest:
      description: Request for transferring funds between wallets
      required:
      - sourceWalletId
      - sourceAssetId
      - sourceOrganizationId
      - sourceCustomerId
      - destinationWalletId
      - destinationAssetId
      - amount
      - scale
      - currency
      type: object
      properties:
        sourceWalletId:
          description: ID of the source wallet
          pattern: \S
          type: string
        sourceAssetId:
          description: Asset ID for the source wallet
          pattern: \S
          type: string
        sourceOrganizationId:
          description: Organization ID for the source wallet
          pattern: \S
          type: string
        sourceCustomerId:
          description: Customer ID for the source wallet
          pattern: \S
          type: string
        destinationWalletId:
          description: ID of the destination wallet
          pattern: \S
          type: string
        destinationAssetId:
          description: Asset ID for the destination wallet
          pattern: \S
          type: string
        destinationOrganizationId:
          description: Organization ID for the destination wallet
          type: string
        destinationCustomerId:
          description: Customer ID for the destination wallet
          type: string
        amount:
          description: Amount to transfer (integer representation)
          minimum: 0
          exclusiveMinimum: true
          type: number
        scale:
          format: int32
          description: Scale for the amount (number of decimal places)
          type: integer
        currency:
          description: Currency code (ISO 4217)
          pattern: \S
          type: string
        description:
          description: Description of the transfer
          type: string
        isExternal:
          description: Whether this is an external transfer
          default: false
          type: boolean
        direction:
          description: "Direction of the transfer (INTERNAL, INCOMING, OUTGOING)"
          default: INTERNAL
          type: string
        orderOperationType:
          description: Order operation type
          default: TRANSFER
          type: string
        bankAddress:
          description: Bank address details for external transfers
          type: object
          allOf:
          - $ref: "#/components/schemas/BankAddress"
        sourceExternalAccountAddress:
          description: Source external account address for international/external
            transfers
          type: object
          allOf:
          - $ref: "#/components/schemas/ExternalAccountAddress"
        destinationExternalAccountAddress:
          description: Destination external account address for international/external
            transfers
          type: object
          allOf:
          - $ref: "#/components/schemas/ExternalAccountAddress"
        external:
          type: boolean
    WalletType:
      enum:
      - OPERATIONAL
      - SETTLEMENT
      - RESERVE
      - TAX
      - PAYROLL
      - MARKETING
      type: string
    WalletType1:
      type: object
      properties:
        id:
          type: string
        tenantId:
          type: string
        name:
          type: string
        description:
          type: string
        isActive:
          type: boolean
        isMaster:
          type: boolean
        walletTypeCategory:
          type: string
        createdBy:
          type: string
        updatedBy:
          type: string
        createdAt:
          type: string
        updatedAt:
          type: string
    WalletTypeTransferRequest:
      description: Request for transferring funds between wallets by wallet type
      required:
      - sourceWalletType
      - sourceAssetId
      - sourceOrganizationId
      - sourceCustomerId
      - destinationWalletType
      - destinationAssetId
      - amount
      - scale
      - currency
      type: object
      properties:
        sourceWalletType:
          description: Type of the source wallet
          type: string
          allOf:
          - $ref: "#/components/schemas/WalletType"
        sourceAssetId:
          description: Asset ID for the source wallet
          pattern: \S
          type: string
        sourceOrganizationId:
          description: Organization ID for the source wallet
          pattern: \S
          type: string
        sourceCustomerId:
          description: Customer ID for the source wallet
          pattern: \S
          type: string
        destinationWalletType:
          description: Type of the destination wallet
          type: string
          allOf:
          - $ref: "#/components/schemas/WalletType"
        destinationAssetId:
          description: Asset ID for the destination wallet
          pattern: \S
          type: string
        destinationOrganizationId:
          description: Organization ID for the destination wallet
          type: string
        destinationCustomerId:
          description: Customer ID for the destination wallet
          type: string
        amount:
          description: Amount to transfer (integer representation)
          minimum: 0
          exclusiveMinimum: true
          type: number
        scale:
          format: int32
          description: Scale for the amount (number of decimal places)
          type: integer
        currency:
          description: Currency code (ISO 4217)
          pattern: \S
          type: string
        description:
          description: Description of the transfer
          type: string
        isExternal:
          description: Whether this is an external transfer
          default: false
          type: boolean
        direction:
          description: "Direction of the transfer (INTERNAL, INCOMING, OUTGOING)"
          default: INTERNAL
          type: string
        orderOperationType:
          description: Order operation type
          default: TRANSFER
          type: string
        bankAddress:
          description: Bank address information for external transfers (legacy format)
          type: object
          allOf:
          - $ref: "#/components/schemas/BankAddress"
        sourceExternalAccountAddress:
          description: Source external account address information for external transfers
          type: object
          allOf:
          - $ref: "#/components/schemas/ExternalAccountAddress"
        destinationExternalAccountAddress:
          description: Destination external account address information for external
            transfers
          type: object
          allOf:
          - $ref: "#/components/schemas/ExternalAccountAddress"
        external:
          type: boolean
    WalletsResponse:
      description: Response containing customer wallets information
      type: object
      properties:
        customerId:
          description: Customer identifier
          type: string
        wallets:
          description: List of customer wallets with their details
          type: array
          items:
            $ref: "#/components/schemas/CustomerWallet"
  securitySchemes:
    SecurityScheme:
      type: http
      description: Authentication
      scheme: bearer
      bearerFormat: JWT
