openapi: 3.0.4
info:
  title: Mifundo Consumer API 1.0
  description: Mifundo Consumer API.
  version: '1.0'
servers:
  - url: https://api.mifundo.com/mca
    description: Production API
  - url: https://apitest.mifundo.com/mca
    description: Test API
paths:
  /v1/sessions/{sessionId}/account-statements:
    get:
      tags:
        - AccountStatements
      operationId: GetAccountStatements
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountStatementsListResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      security:
        - keycloakAuthTest: []
        - keycloakAuthLive: []
  /v1/sessions/{sessionId}/account-statements/{accountStatementId}/excel:
    get:
      tags:
        - AccountStatements
      operationId: GetAccountStatementExcelFile
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: accountStatementId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountStatementFileResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      security:
        - keycloakAuthTest: []
        - keycloakAuthLive: []
  /v1/sessions/{sessionId}/attachments:
    get:
      tags:
        - Attachments
      summary: Get all attachments
      description: Returns all attachments
      operationId: GetAttachments
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttachmentsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      security:
        - keycloakAuthTest: []
        - keycloakAuthLive: []
  /v1/sessions/{sessionId}/attachments/{attachmentId}/content:
    get:
      tags:
        - Attachments
      summary: Get attachment content by attachment ID
      description: Gets attachment content by ID as a binary stream
      operationId: GetAttachmentContent
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: attachmentId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      security:
        - keycloakAuthTest: []
        - keycloakAuthLive: []
  /v1/sessions/{sessionId}/categorizations:
    get:
      tags:
        - Categorizations
      operationId: GetCategorizations
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CategorizationsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      deprecated: true
      security:
        - keycloakAuthTest: []
        - keycloakAuthLive: []
  /v1/sessions/{sessionId}/categorizations-summary:
    get:
      tags:
        - Categorizations
      summary: Get categorizations summary for a session
      description: >-
        Returns aggregated categorization summary with insights by category and
        institution. Provides a high-level overview of categorized transaction
        data aggregated across all institutions and accounts linked in the
        session, including income sources, creditors, spending patterns, and
        detailed breakdowns by category, subcategory, and counterparty.
      operationId: GetCategorizationsSummary
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CategorizationsSummaryResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      security:
        - keycloakAuthTest: []
        - keycloakAuthLive: []
  /v1/consumer/packages:
    get:
      tags:
        - Consumer
      summary: Get authorized packages for the authenticated consumer
      description: >-
        Returns a list of countries and packages that can be used to create or
        upgrade sessions
      operationId: GetConsumerPackages
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsumerAuthorizedPackagesResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      security:
        - keycloakAuthTest: []
        - keycloakAuthLive: []
  /v1/sessions/{sessionId}/court-and-insolvencies:
    get:
      tags:
        - Court
      operationId: GetCourtAndInsolvencyCases
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CourtAndInsolvencyCasesResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      security:
        - keycloakAuthTest: []
        - keycloakAuthLive: []
  /v1/sessions/{sessionId}/identity-verifications:
    get:
      tags:
        - Identity verification
      summary: Get all identity verifications
      description: Returns all identity verifications performed by the subject
      operationId: GetIdentityVerifications
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdentityVerificationsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      security:
        - keycloakAuthTest: []
        - keycloakAuthLive: []
  /v1/sessions/{sessionId}/identity-verifications/{verificationId}/images:
    get:
      tags:
        - Identity verification
      summary: Get identity verification images by verification ID
      description: Gets identity verification images by verification ID
      operationId: GetIdentityVerificationImages
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: verificationId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/IdentityVerificationImageItem'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      security:
        - keycloakAuthTest: []
        - keycloakAuthLive: []
  /v1/sessions/{sessionId}/identity-verifications/{verificationId}/images/{imageId}/content:
    get:
      tags:
        - Identity verification
      summary: Get identity verification image content by image ID
      description: Gets identity verification image content by ID as a binary stream
      operationId: GetIdentityVerificationImageContent
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: verificationId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: imageId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      security:
        - keycloakAuthTest: []
        - keycloakAuthLive: []
  /v1/sessions/{sessionId}/immovables:
    get:
      tags:
        - Immovables
      operationId: GetImmovables
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImmovablesResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      security:
        - keycloakAuthTest: []
        - keycloakAuthLive: []
  /v1/sessions/{sessionId}/legal-entities:
    get:
      tags:
        - LegalEntities
      operationId: GetLegalEntities
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegalEntitiesResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      security:
        - keycloakAuthTest: []
        - keycloakAuthLive: []
  /v1/sessions/{sessionId}/metrics:
    get:
      tags:
        - Metrics
      operationId: GetMetrics
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      security:
        - keycloakAuthTest: []
        - keycloakAuthLive: []
  /v1/sessions/{sessionId}/negative-tradelines:
    get:
      tags:
        - NegativeTradelines
      operationId: GetNegativeTradelines
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NegativeTradelinesResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      security:
        - keycloakAuthTest: []
        - keycloakAuthLive: []
  /v1/sessions/{sessionId}/person-details:
    get:
      tags:
        - PersonDetails
      operationId: GetPersonDetails
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PersonDetailsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      security:
        - keycloakAuthTest: []
        - keycloakAuthLive: []
  /v1/sessions/{sessionId}/positive-tradelines:
    get:
      tags:
        - PositiveTradelines
      operationId: GetPositiveTradelines
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PositiveTradelinesResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      security:
        - keycloakAuthTest: []
        - keycloakAuthLive: []
  /v1/sessions/{sessionId}/registry-incomes:
    get:
      tags:
        - RegistryIncomes
      operationId: GetRegistryIncomes
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegistryIncomesResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      security:
        - keycloakAuthTest: []
        - keycloakAuthLive: []
  /v1/sessions/{sessionId}/scores:
    get:
      tags:
        - Scores
      operationId: GetScores
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScoresResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      security:
        - keycloakAuthTest: []
        - keycloakAuthLive: []
  /v1/sessions:
    post:
      tags:
        - Sessions
      summary: Creates a new session
      description: >-
        Defines search input for a person and returns a session ID based on
        which results can be requested
      operationId: CreateSession
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateSessionRequest'
              description: Request body used to initiate a new session for data retrieval.
            examples:
              Great Britain consumer:
                value:
                  subjectEmail: john.doe@example.com
                  queryParameters:
                    - countryCode: GBR
                      dataPackages:
                        - SCORE
                        - IDENTIFICATION
              Danish consumer:
                value:
                  subjectEmail: mary.jane@example.com
                  queryParameters:
                    - countryCode: DNK
                      dataPackages:
                        - SCORE
                        - IDENTIFICATION
                        - CREDIT_HISTORY
                        - BANK_ACCOUNT_CATEGORIZATION
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionItem'
              examples:
                Great Britain consumer:
                  value:
                    id: 889c9f82-99a8-4936-a26b-c731797a7d87
                    createdAtUtc: '2025-03-12T00:00:00+00:00'
                    createdByName: Wilford Lowery
                    organizationalUnitName: null
                    subjectEmail: john.doe@example.com
                    subjectFullName: John Doe
                    customerInputDeadlineUtc: '2025-03-26T00:00:00+00:00'
                    customerProgressStatus: WAITING_FOR_CUSTOMER
                    queryParameters:
                      - countryCode: GBR
                        dataPackages:
                          - SCORE
                          - IDENTIFICATION
                Danish consumer:
                  value:
                    id: 70126342-4e52-42c6-aa23-fbc73570d83e
                    createdAtUtc: '2025-03-15T00:00:00+00:00'
                    createdByName: Jennie Miles
                    organizationalUnitName: null
                    subjectEmail: mary.jane@example.com
                    subjectFullName: Mary Jane
                    customerInputDeadlineUtc: '2025-03-29T00:00:00+00:00'
                    customerProgressStatus: COMPLETED_BY_CUSTOMER
                    queryParameters:
                      - countryCode: DNK
                        dataPackages:
                          - SCORE
                          - IDENTIFICATION
                          - CREDIT_HISTORY
                          - BANK_ACCOUNT_CATEGORIZATION
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      security:
        - keycloakAuthTest: []
        - keycloakAuthLive: []
    get:
      tags:
        - Sessions
      summary: Search for existing sessions
      description: Gets all sessions optionally filtered by request parameters
      operationId: GetSessions
      parameters:
        - name: SubjectEmail
          in: query
          description: Email address of the data subject used to filter sessions.
          schema:
            type: string
            description: Email address of the data subject used to filter sessions.
        - name: SubjectFullName
          in: query
          description: Full name of the data subject used to filter sessions.
          schema:
            type: string
            description: Full name of the data subject used to filter sessions.
        - name: CountryCode
          in: query
          description: >-
            ISO 3166-1 alpha-3 code representing the country related to the
            sessions.
          schema:
            type: string
            description: >-
              ISO 3166-1 alpha-3 code representing the country related to the
              sessions.
        - name: CreatedFromUtc
          in: query
          description: Start date (UTC) for filtering sessions by creation date.
          schema:
            type: string
            description: Start date (UTC) for filtering sessions by creation date.
            format: date
        - name: CreatedToUtc
          in: query
          description: End date (UTC) for filtering sessions by creation date.
          schema:
            type: string
            description: End date (UTC) for filtering sessions by creation date.
            format: date
        - name: CustomerProgressStatus
          in: query
          schema:
            allOf:
              - $ref: '#/components/schemas/CustomerProgressStatusType'
        - name: CreatedByName
          in: query
          description: Name of the person who created the session.
          schema:
            type: string
            description: Name of the person who created the session.
        - name: OrganizationalUnitName
          in: query
          description: Name of the organizational unit responsible for the session.
          schema:
            type: string
            description: Name of the organizational unit responsible for the session.
        - name: Skip
          in: query
          description: Number of records to skip when retrieving paginated results.
          schema:
            type: integer
            description: Number of records to skip when retrieving paginated results.
            format: int32
        - name: Take
          in: query
          description: Number of records to retrieve in the paginated result.
          schema:
            type: integer
            description: Number of records to retrieve in the paginated result.
            format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSessionsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      security:
        - keycloakAuthTest: []
        - keycloakAuthLive: []
  /v1/sessions/{sessionId}:
    get:
      tags:
        - Sessions
      summary: Get session by ID
      description: Gets a session by ID
      operationId: GetSession
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionItem'
              examples:
                Great Britain consumer:
                  value:
                    id: 77eba4c4-ae2b-46d8-b2b7-37bb85c3c42a
                    createdAtUtc: '2025-03-12T00:00:00+00:00'
                    createdByName: Wilford Lowery
                    organizationalUnitName: null
                    subjectEmail: john.doe@example.com
                    subjectFullName: John Doe
                    customerInputDeadlineUtc: '2025-03-26T00:00:00+00:00'
                    customerProgressStatus: WAITING_FOR_CUSTOMER
                    queryParameters:
                      - countryCode: GBR
                        dataPackages:
                          - SCORE
                          - IDENTIFICATION
                Danish consumer:
                  value:
                    id: d1877cc4-7a6f-4c22-97eb-866c5010b472
                    createdAtUtc: '2025-03-15T00:00:00+00:00'
                    createdByName: Jennie Miles
                    organizationalUnitName: null
                    subjectEmail: mary.jane@example.com
                    subjectFullName: Mary Jane
                    customerInputDeadlineUtc: '2025-03-29T00:00:00+00:00'
                    customerProgressStatus: COMPLETED_BY_CUSTOMER
                    queryParameters:
                      - countryCode: DNK
                        dataPackages:
                          - SCORE
                          - IDENTIFICATION
                          - CREDIT_HISTORY
                          - BANK_ACCOUNT_CATEGORIZATION
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      security:
        - keycloakAuthTest: []
        - keycloakAuthLive: []
    patch:
      tags:
        - Sessions
      summary: Updates an existing session
      description: Appends query parameters to an existing session
      operationId: UpdateSession
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/UpdateSessionRequest'
              description: >-
                Request body used to update an existing session with new query
                parameters.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionItem'
              examples:
                Great Britain consumer:
                  value:
                    id: 4859290b-79c8-477f-919a-25cf1ae436c5
                    createdAtUtc: '2025-03-12T00:00:00+00:00'
                    createdByName: Wilford Lowery
                    organizationalUnitName: null
                    subjectEmail: john.doe@example.com
                    subjectFullName: John Doe
                    customerInputDeadlineUtc: '2025-03-26T00:00:00+00:00'
                    customerProgressStatus: WAITING_FOR_CUSTOMER
                    queryParameters:
                      - countryCode: GBR
                        dataPackages:
                          - SCORE
                          - IDENTIFICATION
                Danish consumer:
                  value:
                    id: fc4d3965-ab5a-45c3-ba28-db69d9d89fd9
                    createdAtUtc: '2025-03-15T00:00:00+00:00'
                    createdByName: Jennie Miles
                    organizationalUnitName: null
                    subjectEmail: mary.jane@example.com
                    subjectFullName: Mary Jane
                    customerInputDeadlineUtc: '2025-03-29T00:00:00+00:00'
                    customerProgressStatus: COMPLETED_BY_CUSTOMER
                    queryParameters:
                      - countryCode: DNK
                        dataPackages:
                          - SCORE
                          - IDENTIFICATION
                          - CREDIT_HISTORY
                          - BANK_ACCOUNT_CATEGORIZATION
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      security:
        - keycloakAuthTest: []
        - keycloakAuthLive: []
  /v1/sessions/{sessionId}/actions/extend-customer-input-deadline:
    post:
      tags:
        - Sessions
      summary: Extends customer input deadline for the session
      description: >-
        Extends customer input deadline from the current date by the number of
        days defined in the authenticated user configuration
      operationId: ExtendCustomerInputDeadline
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionItem'
              examples:
                Great Britain consumer:
                  value:
                    id: 8d979a63-1ba3-4859-bf8e-091955cf76c9
                    createdAtUtc: '2025-03-12T00:00:00+00:00'
                    createdByName: Wilford Lowery
                    organizationalUnitName: null
                    subjectEmail: john.doe@example.com
                    subjectFullName: John Doe
                    customerInputDeadlineUtc: '2025-03-26T00:00:00+00:00'
                    customerProgressStatus: WAITING_FOR_CUSTOMER
                    queryParameters:
                      - countryCode: GBR
                        dataPackages:
                          - SCORE
                          - IDENTIFICATION
                Danish consumer:
                  value:
                    id: fef47f0e-3735-4c21-b058-3ceb5ee98b90
                    createdAtUtc: '2025-03-15T00:00:00+00:00'
                    createdByName: Jennie Miles
                    organizationalUnitName: null
                    subjectEmail: mary.jane@example.com
                    subjectFullName: Mary Jane
                    customerInputDeadlineUtc: '2025-03-29T00:00:00+00:00'
                    customerProgressStatus: COMPLETED_BY_CUSTOMER
                    queryParameters:
                      - countryCode: DNK
                        dataPackages:
                          - SCORE
                          - IDENTIFICATION
                          - CREDIT_HISTORY
                          - BANK_ACCOUNT_CATEGORIZATION
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      security:
        - keycloakAuthTest: []
        - keycloakAuthLive: []
  /v1/sessions/{sessionId}/source-files:
    get:
      tags:
        - SourceFiles
      operationId: GetSourceFiles
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SourceFileResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      security:
        - keycloakAuthTest: []
        - keycloakAuthLive: []
  /v1/sessions/{sessionId}/source-files/{sourceFileId}:
    get:
      tags:
        - SourceFiles
      operationId: GetSourceFile
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: sourceFileId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SourceFileResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      security:
        - keycloakAuthTest: []
        - keycloakAuthLive: []
  /v1/sessions/{sessionId}/source-files/{sourceFileId}/content:
    get:
      tags:
        - SourceFiles
      operationId: GetSourceFileContent
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: sourceFileId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileContentResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      security:
        - keycloakAuthTest: []
        - keycloakAuthLive: []
components:
  schemas:
    AccountStatementFileResponse:
      required:
        - bytes
        - filename
        - mimeType
      type: object
      properties:
        bytes:
          type: string
          description: Binary content of the account statement file.
          format: byte
          nullable: true
        filename:
          type: string
          description: Name of the account statement file.
          nullable: true
        mimeType:
          type: string
          description: MIME type of the account statement file (e.g., application/pdf).
          nullable: true
      additionalProperties: false
    AccountStatementItem:
      type: object
      properties:
        statementId:
          type: string
          description: Unique identifier of the requested account statement.
          format: uuid
        daysRequested:
          type: integer
          description: Number of days of transaction history requested in the request.
          format: int32
      additionalProperties: false
    AccountStatementsListResponse:
      type: object
      properties:
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/AccountStatementItem'
          description: List of account statement items included in the response.
          nullable: true
      additionalProperties: false
      description: Response containing a list of account statements returned to the client.
    Address:
      required:
        - type
      type: object
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/AddressType'
          description: Type of address (e.g., residential, business)
          x-enumDescriptions:
            UNKNOWN: Unknown address type.
            REGISTERED: Officially registered residence address.
            POSTAL: Address used for receiving mail or packages.
        countryCode:
          type: string
          description: ISO 3166-1 alpha-3 country code of this addres
          nullable: true
        city:
          type: string
          description: City or locality name
          nullable: true
        street:
          type: string
          description: Street name
          nullable: true
        houseApartmentNumber:
          type: string
          description: House or apartment number
          nullable: true
        postalCode:
          type: string
          description: Postal or ZIP code
          nullable: true
        concatenatedAddress:
          type: string
          description: Full address as a single concatenated string
          nullable: true
      additionalProperties: false
    AddressSourcedValue:
      type: object
      properties:
        value:
          allOf:
            - $ref: '#/components/schemas/Address'
          description: The actual value of the field.
          nullable: true
        sourceIds:
          type: array
          items:
            type: string
          description: >-
            List of identifiers for the sources from which the value was
            derived.
          nullable: true
      additionalProperties: false
    AddressType:
      enum:
        - UNKNOWN
        - REGISTERED
        - POSTAL
      type: string
      description: Specifies the type of address.
      x-enumDescriptions:
        UNKNOWN: Unknown address type.
        REGISTERED: Officially registered residence address.
        POSTAL: Address used for receiving mail or packages.
    AttachmentItem:
      required:
        - addedOnUtc
        - attachmentType
        - fileName
        - fileSizeBytes
        - id
        - mimeType
        - sourceId
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the attachment.
          format: uuid
        sourceId:
          type: string
          description: Identifier of the source record this attachment belongs to.
          nullable: true
        attachmentType:
          allOf:
            - $ref: '#/components/schemas/AttachmentType'
          description: Specifies the type of attachment.
          x-enumDescriptions:
            UNKNOWN: Unspecified document type.
            MANDATE: Document granting authority, e.g., power of attorney.
            ADDRESS_PROOF: Document verifying the customer's address, such as a utility bill.
            IDENTIFICATION_NUMBER_PROOF: Document proving the customer's national ID or tax number.
            ORIGINAL_CREDIT_REPORT: Original non-stadardized report from the local data source.
        mimeType:
          type: string
          description: MIME type of the attachment file (e.g., application/pdf).
          nullable: true
        fileName:
          type: string
          description: Name of the attachment file.
          nullable: true
        fileSizeBytes:
          type: integer
          description: Size of the attachment file in bytes.
          format: int32
        addedOnUtc:
          type: string
          description: UTC timestamp when the attachment was added.
          format: date-time
        countryCode:
          type: string
          description: ISO 3166-1 alpha-3 country code
          nullable: true
      additionalProperties: false
    AttachmentType:
      enum:
        - UNKNOWN
        - MANDATE
        - ADDRESS_PROOF
        - IDENTIFICATION_NUMBER_PROOF
        - ORIGINAL_CREDIT_REPORT
      type: string
      description: Specifies the type of attachment documents submitted by the customer.
      x-enumDescriptions:
        UNKNOWN: Unspecified document type.
        MANDATE: Document granting authority, e.g., power of attorney.
        ADDRESS_PROOF: Document verifying the customer's address, such as a utility bill.
        IDENTIFICATION_NUMBER_PROOF: Document proving the customer's national ID or tax number.
        ORIGINAL_CREDIT_REPORT: Original non-stadardized report from the local data source.
    AttachmentsResponse:
      type: object
      properties:
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/AttachmentItem'
          description: List of attachment items included in the response.
          nullable: true
      additionalProperties: false
      description: >-
        Response containing a list of customer-provided or system-generated
        attachments.
    CategorizationAccountItem:
      type: object
      properties:
        countryCode:
          type: string
          description: ISO 3166-1 alpha-3 country codeISO 3166-1 alpha-3 country code
          nullable: true
        bankName:
          type: string
          description: Name of the bank where the account is held.
          nullable: true
        accountNumber:
          type: string
          description: Number identifying the customer's bank account.
          nullable: true
        accountHolderNames:
          type: array
          items:
            type: string
          description: Account holder full name. Account can have multiple holders
          nullable: true
      additionalProperties: false
    CategorizationItem:
      type: object
      properties:
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/CategorizationAccountItem'
          description: List of accounts included in the categorization.
          nullable: true
        totalPeriodMonths:
          type: integer
          description: Total number of months covered in the categorization period.
          format: int32
          nullable: true
        totalPeriodReceivedMonths:
          type: integer
          description: Total number of months for which data was successfully received.
          format: int32
          nullable: true
        periodWithIncomeMonths:
          type: integer
          description: Number of months within the period that had income transactions.
          format: int32
          nullable: true
        periodWithLiabilitiesMonths:
          type: integer
          description: Number of months within the period that had liability transactions.
          format: int32
          nullable: true
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/CategorizedTransactionItem'
          description: List of categorized transactions within the period.
          nullable: true
        overdraftLimits:
          type: array
          items:
            $ref: '#/components/schemas/CategorizationOverdraftLimitItem'
          description: Overdraft limit information for the categorized accounts.
          nullable: true
      additionalProperties: false
    CategorizationOverdraftLimitItem:
      required:
        - limit
      type: object
      properties:
        limit:
          allOf:
            - $ref: '#/components/schemas/Money'
          description: The overdraft limit assigned to the account.
          nullable: true
        accountNumber:
          type: string
          description: The bank account number associated with the overdraft limit.
          nullable: true
      additionalProperties: false
    CategorizationsAccountItem:
      required:
        - displayName
        - status
      type: object
      properties:
        status:
          allOf:
            - $ref: '#/components/schemas/SourceStatusType'
          description: Current status of the categorization data for this account.
          x-enumDescriptions:
            UNKNOWN: Status is not specified.
            SUCCESS: >-
              The Data Provider has successfully returned a response. This
              means:
                - All required customer data was submitted and verified.
                - The Data Provider returned a valid response (including cases where the response is empty).

                Note: an empty response can be a valid result. For example:
                - No active liabilities or defaults are found.
                - The customer (Data Subject) is not listed in the credit bureau's database, indicating no negative or reportable credit history.
            ERROR: >-
              An error occurred when attempting to collect or process the data.
              Typical causes include:
                - Invalid or incomplete input from the customer (Data Subject).
                - Failed identity verification.
                - Legal restrictions (e.g. protected identity).
                - Check the `error_code` and `error_message` fields for detailed diagnostics.
            FORBIDDEN: >-
              The client is **not authorized** to access the requested data.
              Common reasons include:
                - Missing agreements between the Client and the Data Provider.
                - Restricted access to certain data sources based on jurisdiction or product configuration.
            UNSUPPORTED_COUNTRY: >-
              The requested data is **not available** for the selected country.
              This may occur when:
                - The specific data type (e.g. positive tradelines) is not available in that market.
                - Mifundo has not yet integrated with relevant local Data Providers.
            WAITING_FOR_CUSTOMER: >-
              The customer (Data Subject) still needs to provide one or more
              required data elements. This may include:
                - Consent(s)
                - Identification
                - Residential address (if required)
                - National identification number (if required)
            WAITING_FOR_PROVIDER: >-
              All required data has been submitted by the customer (Data
              Subject). Mifundo has forwarded the request to the respective Data
              Provider, but a response has not yet been received.
            PACKAGE_UPGRADE_REQUIRED: >-
              You haven't requested the information in original query, Please
              upgrade the Session to get this info.
            ID_TAX_ONLY: Customer identity code granted only for tax purposes.
        displayName:
          type: string
          description: Display name of the account as provided by the institution.
          nullable: true
        ownerNames:
          type: array
          items:
            type: string
          description: List of account owner full names. Account can have multiple owners.
          nullable: true
        overdraftLimit:
          allOf:
            - $ref: '#/components/schemas/Money'
          description: Overdraft limit available on this account, if applicable.
          nullable: true
        summary:
          allOf:
            - $ref: '#/components/schemas/CategorizationsInstitutionSummary'
          description: >-
            Summary statistics for transactions in this account. Null if status
            is not SUCCESS.
          nullable: true
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/CategorizedTransactionItem'
          description: List of categorized transactions from this account.
          nullable: true
      additionalProperties: false
      description: Bank account with categorized transaction data.
    CategorizationsInstitutionItem:
      required:
        - countryCode
        - name
        - status
      type: object
      properties:
        status:
          allOf:
            - $ref: '#/components/schemas/SourceStatusType'
          description: >-
            Current status of the categorization data for this institution.
            Similar to overall status logic.
          x-enumDescriptions:
            UNKNOWN: Status is not specified.
            SUCCESS: >-
              The Data Provider has successfully returned a response. This
              means:
                - All required customer data was submitted and verified.
                - The Data Provider returned a valid response (including cases where the response is empty).

                Note: an empty response can be a valid result. For example:
                - No active liabilities or defaults are found.
                - The customer (Data Subject) is not listed in the credit bureau's database, indicating no negative or reportable credit history.
            ERROR: >-
              An error occurred when attempting to collect or process the data.
              Typical causes include:
                - Invalid or incomplete input from the customer (Data Subject).
                - Failed identity verification.
                - Legal restrictions (e.g. protected identity).
                - Check the `error_code` and `error_message` fields for detailed diagnostics.
            FORBIDDEN: >-
              The client is **not authorized** to access the requested data.
              Common reasons include:
                - Missing agreements between the Client and the Data Provider.
                - Restricted access to certain data sources based on jurisdiction or product configuration.
            UNSUPPORTED_COUNTRY: >-
              The requested data is **not available** for the selected country.
              This may occur when:
                - The specific data type (e.g. positive tradelines) is not available in that market.
                - Mifundo has not yet integrated with relevant local Data Providers.
            WAITING_FOR_CUSTOMER: >-
              The customer (Data Subject) still needs to provide one or more
              required data elements. This may include:
                - Consent(s)
                - Identification
                - Residential address (if required)
                - National identification number (if required)
            WAITING_FOR_PROVIDER: >-
              All required data has been submitted by the customer (Data
              Subject). Mifundo has forwarded the request to the respective Data
              Provider, but a response has not yet been received.
            PACKAGE_UPGRADE_REQUIRED: >-
              You haven't requested the information in original query, Please
              upgrade the Session to get this info.
            ID_TAX_ONLY: Customer identity code granted only for tax purposes.
        countryCode:
          type: string
          description: >-
            ISO 3166-1 alpha-3 country code of the specific institution. Based
            on the country the user selected when adding the account.
          nullable: true
        name:
          type: string
          description: Name of the financial institution.
          nullable: true
        summary:
          allOf:
            - $ref: '#/components/schemas/CategorizationsInstitutionSummary'
          description: >-
            Summary statistics aggregated across all accounts at this
            institution. Null if status is not SUCCESS.
          nullable: true
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/CategorizationsAccountItem'
          description: >-
            List of accounts at this institution with their categorized
            transactions.
          nullable: true
      additionalProperties: false
      description: >-
        Financial institution (bank) with categorized transaction data for its
        accounts.
    CategorizationsInstitutionSummary:
      type: object
      properties:
        requestedPeriodMonths:
          type: integer
          description: >-
            Number of months of transaction data that were requested from the
            data provider. Minimum of 6 months is always requested.
          format: int32
        receivedPeriodMonths:
          type: integer
          description: >-
            Number of full months covered by the transaction data actually
            received from the specific bank or account. Calculated based on the
            time span between the first and last transaction.
          format: int32
        countOfMonthsWithIncome:
          type: integer
          description: >-
            Number of months in which the user received income from the specific
            bank or account. Multiple payments in the same month count only
            once. Includes regular income like salary, pension, government
            support, and gig earnings.
          format: int32
        countOfMonthsWithLiabilities:
          type: integer
          description: >-
            Number of months in which the user made debt or loan payments from
            the specific bank or account. Multiple payments in the same month
            count only once.
          format: int32
        averageMonthlyIncome:
          type: array
          items:
            $ref: '#/components/schemas/Money'
          description: >-
            Average monthly income from the specific bank or account, calculated
            separately for each currency. Divides the total income received by
            the number of months requested (typically 6). Includes regular
            income like salary, pension, government support, and gig earnings.
            Based on total income divided by requested months (default: 6).
            Example: €3600 income over 6 months -> average = €600/month
          nullable: true
        averageMonthlyLiabilities:
          type: array
          items:
            $ref: '#/components/schemas/Money'
          description: >-
            Average monthly loan and debt payments from the specific bank or
            account, per currency. Based on total liability transactions divided
            by requested months (default: 6). Calculated over requested period
            (default: 6 months). Example: If the user paid €300 (Feb), €200
            (Apr), and €400 (May) -> Total = €900 -> Average = €900 / 6 =
            €150/month
          nullable: true
        totalIncome:
          type: array
          items:
            $ref: '#/components/schemas/Money'
          description: >-
            Total income from the specific bank or account during the period
            received, calculated separately for each currency. Includes regular
            income like salary, pension, government support, and gig earnings.
          nullable: true
        totalLiabilities:
          type: array
          items:
            $ref: '#/components/schemas/Money'
          description: >-
            Total amount of liabilities from the specific bank or account during
            the period received, calculated separately for each currency.
            Includes credit cards, mortgages, personal loans, BNPL, and other
            liabilities.
          nullable: true
      additionalProperties: false
      description: >-
        Summary statistics for categorized transactions within an institution or
        account. Used at both institution level (aggregated across accounts) and
        account level (specific to one account).
    CategorizationsOverallSummary:
      required:
        - status
      type: object
      properties:
        status:
          allOf:
            - $ref: '#/components/schemas/SourceStatusType'
          description: >-
            Shows the overall status of bank account categorization across all
            connected countries and providers. If some data sources are pending
            or errored, status shows "Some data missing". Possible values:
            SUCCESS (All relevant data successfully retrieved and processed),
            SOME_DATA_MISSING (Partial success — some providers still pending,
            errored, or missing customer input), WAITING_FOR_CUSTOMER (Waiting
            for user to provide necessary input - only when one source
            involved), WAITING_FOR_PROVIDER (Waiting for data provider's
            response - only when one source involved), FORBIDDEN (Access not
            permitted for this provider), UNSUPPORTED_COUNTRY (Data not
            available in the given country), PACKAGE_UPGRADE_REQUIRED (Access
            requires a higher data package), ERROR (Technical or validation
            error encountered), UNKNOWN (Unexpected or undefined status).
          x-enumDescriptions:
            UNKNOWN: Status is not specified.
            SUCCESS: >-
              The Data Provider has successfully returned a response. This
              means:
                - All required customer data was submitted and verified.
                - The Data Provider returned a valid response (including cases where the response is empty).

                Note: an empty response can be a valid result. For example:
                - No active liabilities or defaults are found.
                - The customer (Data Subject) is not listed in the credit bureau's database, indicating no negative or reportable credit history.
            ERROR: >-
              An error occurred when attempting to collect or process the data.
              Typical causes include:
                - Invalid or incomplete input from the customer (Data Subject).
                - Failed identity verification.
                - Legal restrictions (e.g. protected identity).
                - Check the `error_code` and `error_message` fields for detailed diagnostics.
            FORBIDDEN: >-
              The client is **not authorized** to access the requested data.
              Common reasons include:
                - Missing agreements between the Client and the Data Provider.
                - Restricted access to certain data sources based on jurisdiction or product configuration.
            UNSUPPORTED_COUNTRY: >-
              The requested data is **not available** for the selected country.
              This may occur when:
                - The specific data type (e.g. positive tradelines) is not available in that market.
                - Mifundo has not yet integrated with relevant local Data Providers.
            WAITING_FOR_CUSTOMER: >-
              The customer (Data Subject) still needs to provide one or more
              required data elements. This may include:
                - Consent(s)
                - Identification
                - Residential address (if required)
                - National identification number (if required)
            WAITING_FOR_PROVIDER: >-
              All required data has been submitted by the customer (Data
              Subject). Mifundo has forwarded the request to the respective Data
              Provider, but a response has not yet been received.
            PACKAGE_UPGRADE_REQUIRED: >-
              You haven't requested the information in original query, Please
              upgrade the Session to get this info.
            ID_TAX_ONLY: Customer identity code granted only for tax purposes.
        countOfInstitutions:
          type: integer
          description: >-
            Number of financial institutions (e.g. banks) the user has connected
            in this session. Example: If the user adds accounts from Bank A,
            Bank B, and Bank C -> value = 3
          format: int32
          nullable: true
        countOfAccounts:
          type: integer
          description: >-
            Number of bank accounts the user has connected during this session.
            Includes all types of accounts, from all providers. Example: 2
            current accounts from Bank A + 1 savings account from Bank B ->
            value = 3
          format: int32
          nullable: true
        countOfIncomeSources:
          type: integer
          description: >-
            Number of different income sources detected across all connected
            accounts. Includes employers, government agencies, or platforms that
            paid the user over the past 6 months. Only regular income types are
            counted: salary, pension, government support, disability benefits,
            or gig income. Example: If income comes from 1 employer + 1 pension
            fund -> value = 2
          format: int32
          nullable: true
        countOfCreditors:
          type: integer
          description: >-
            Number of different creditors the user is currently making payments
            to, based on their connected accounts. Includes payments for loans,
            credit cards, BNPL services, mortgages, and other recurring debts.
            Example: If the user pays a car loan, mortgage, and credit card from
            different banks -> value = 3
          format: int32
          nullable: true
        averageMonthlyIncome:
          type: array
          items:
            $ref: '#/components/schemas/Money'
          description: >-
            The user's average monthly income over the last 6 months, calculated
            separately for each currency. All connected banks and accounts are
            included. Regular income includes salary, pension, government
            support, and similar. Example: If the user receives €1000 in Jan,
            €1200 in Mar, €1400 in Apr -> Average = €600/month (over 6 months)
          nullable: true
        averageMonthlyLiabilities:
          type: array
          items:
            $ref: '#/components/schemas/Money'
          description: >-
            Shows the user's average monthly loan or debt payments over the past
            6 months, calculated separately for each currency. Includes payments
            for mortgages, personal loans, credit cards, and similar liabilities
            across all connected accounts. Example: If the user paid €300 (Jan),
            €200 (Apr), €400 (May) -> Average = €150/month
          nullable: true
      additionalProperties: false
      description: >-
        Overall summary of categorized transactions aggregated across all
        institutions and accounts. Provides high-level metrics for the user's
        financial situation over the past 6 months.
    CategorizationsResponse:
      type: object
      properties:
        sources:
          type: array
          items:
            $ref: '#/components/schemas/Source'
          description: >-
            List of Data Provider sources indicating where the response data was
            obtained from.
          nullable: true
        summary:
          allOf:
            - $ref: '#/components/schemas/CategorizationsSummary'
          description: Summary of the categorized financial data.
          nullable: true
        categorizations:
          type: array
          items:
            $ref: '#/components/schemas/CategorizationItem'
          description: Detailed list of categorized financial transactions.
          nullable: true
      additionalProperties: false
      description: >-
        Response containing categorized financial transaction information and a
        summary.
    CategorizationsSummary:
      type: object
      properties:
        periodWithIncomeMonths:
          type: integer
          description: >-
            Number of months within the analyzed period that include income
            transactions.
          format: int32
          nullable: true
        periodWithLiabilitiesMonths:
          type: integer
          description: >-
            Number of months within the analyzed period that include liability
            transactions.
          format: int32
          nullable: true
      additionalProperties: false
    CategorizationsSummaryResponse:
      required:
        - summary
      type: object
      properties:
        summary:
          allOf:
            - $ref: '#/components/schemas/CategorizationsOverallSummary'
          description: >-
            Overall summary statistics aggregated across all institutions and
            accounts. Includes key metrics like income sources, creditors,
            average monthly income and liabilities.
          nullable: true
        categoryInsights:
          type: array
          items:
            $ref: '#/components/schemas/CategoryInsightItem'
          description: >-
            Aggregated insights grouped by transaction category (INCOMES,
            LIABILITIES, EXPENSES, OTHER_INCOMING_PAYMENTS). Each category
            includes subcategory breakdowns and counterparty details where
            applicable.
          nullable: true
        institutions:
          type: array
          items:
            $ref: '#/components/schemas/CategorizationsInstitutionItem'
          description: >-
            List of financial institutions (banks) with their accounts and
            categorized transactions. Each institution includes summary
            statistics and detailed account-level data.
          nullable: true
      additionalProperties: false
      description: >-
        Response containing aggregated categorization summary with insights by
        category and institution. Provides comprehensive analysis of transaction
        categorizations across all connected accounts.
    CategorizedTransactionItem:
      required:
        - category
        - subCategory
      type: object
      properties:
        date:
          type: string
          description: Date of the transaction.
          format: date
          nullable: true
        category:
          allOf:
            - $ref: '#/components/schemas/TransactionCategory'
          description: Main category assigned to the transaction.
          x-enumDescriptions:
            INCOMES: Earnings such as salary, dividends, or rental income.
            OTHER_INCOMING_PAYMENTS: Incoming funds that do not qualify as regular income.
            LIABILITIES: Transactions representing financial obligations or debts.
            EXPENSES: Outgoing payments for goods, services, or other costs.
        subCategory:
          allOf:
            - $ref: '#/components/schemas/TransactionSubCategory'
          description: >-
            Subcategory providing more detailed classification of the
            transaction.
          x-enumDescriptions:
            BANK_FEES: Charges applied by financial institutions.
            BNPL: Buy Now, Pay Later services.
            CAR_LOAN: Payments related to car financing.
            CHILD_SUPPORT: Legally mandated child support payments.
            CONSUMER_LOAN: Personal loans for general consumer use.
            CREDIT_CARD: Credit card related transactions.
            DISABILITY: Income from disability support.
            ENTERTAINMENT: Spending on entertainment activities.
            FOOD_AND_DRINK: Purchases for food and beverages.
            GAMBLING: Bets and wagers.
            GENERAL_MERCHANDISE: Retail or general store purchases.
            GENERAL_SERVICE: Fees for generic services.
            GIG_ECONOMY: Earnings from freelance or gig work.
            GOVERNMENT: Payments from or to the government.
            GOVERNMENT_AND_NON_PROFIT: Activity involving government or non-profit organizations.
            HOME_IMPROVEMENT: Expenses related to home repair or renovation.
            INTEREST_AND_DIVIDENDS: Income from interest or dividends.
            INTEREST_PAYMENT: Interest paid on loans or credit.
            INVESTMENT_AND_SAVINGS: Deposits into savings or investments.
            LOAN_DISBURSEMENT: Funds received from a loan.
            MEDICAL: Payments for medical care or services.
            MORTGAGE_LOAN: Mortgage-related payments.
            OTHER: Miscellaneous transactions.
            PERSONAL_CARE: Expenses for personal grooming and care.
            RENTAL: Income or expenses from property rental.
            RENT_AND_UTILITIES: Rent and utility bill payments.
            RETIREMENT: Contributions or withdrawals from retirement accounts.
            SALARY: Regular employment income.
            STUDENT_LOAN: Education loan payments.
            TRANSFER_IN: Incoming transfers.
            TRANSFER_OUT: Outgoing transfers.
            TRAVEL_AND_TRANSPORT: Travel or transportation costs.
            UNEMPLOYMENT: Unemployment benefits.
            UNKNOWN: Unclassified transaction.
        amount:
          allOf:
            - $ref: '#/components/schemas/Money'
          description: Monetary amount of the transaction.
          nullable: true
        counterpartyName:
          type: string
          description: Name of the counterparty involved in the transaction.
          nullable: true
        originalDescription:
          type: string
          description: Description text as inserted by the remitter.
          nullable: true
      additionalProperties: false
      description: Individual categorized transaction from a bank account.
    CategoryInsightItem:
      required:
        - category
        - summary
      type: object
      properties:
        category:
          allOf:
            - $ref: '#/components/schemas/TransactionCategory'
          description: >-
            Name of the specific category (e.g. INCOMES,
            OTHER_INCOMING_PAYMENTS, LIABILITIES, EXPENSES)
          x-enumDescriptions:
            INCOMES: Earnings such as salary, dividends, or rental income.
            OTHER_INCOMING_PAYMENTS: Incoming funds that do not qualify as regular income.
            LIABILITIES: Transactions representing financial obligations or debts.
            EXPENSES: Outgoing payments for goods, services, or other costs.
        summary:
          allOf:
            - $ref: '#/components/schemas/CategoryInsightSummary'
          description: >-
            Summary statistics for this category including count of months,
            total amounts, average monthly amounts, and country codes.
          nullable: true
        subCategories:
          type: array
          items:
            $ref: '#/components/schemas/SubCategoryInsightItem'
          description: >-
            List of subcategory insights providing more detailed breakdowns
            within this category.
          nullable: true
      additionalProperties: false
      description: >-
        Gives information about all transactions within the specific category
        (e.g. INCOMES, OTHER_INCOMING_PAYMENTS, LIABILITIES, EXPENSES)
    CategoryInsightSummary:
      type: object
      properties:
        countOfMonths:
          type: integer
          description: >-
            Number of different months (within the last 6) where the user made
            or received at least one transaction in the selected category,
            subcategory, or from/to a specific company.
          format: int32
        totalAmounts:
          type: array
          items:
            $ref: '#/components/schemas/Money'
          description: >-
            Total amount of transactions in the selected category, subcategory,
            or from a specific company over the last 6 months. Shown separately
            for each currency. Per currency.
          nullable: true
        averageMonthlyAmounts:
          type: array
          items:
            $ref: '#/components/schemas/Money'
          description: >-
            The user's average monthly amount in the selected category,
            subcategory, or from/to a specific company, based on the last 6
            months. Reported per currency. Per currency.
          nullable: true
        countryCodes:
          type: array
          items:
            type: string
          description: >-
            Shows the country or countries where relevant transactions occurred,
            based on the bank accounts involved. Reported as ISO 3-letter
            country codes (e.g., "ESP", "DEU", "EST").
          nullable: true
      additionalProperties: false
      description: >-
        Summary statistics for a category, subcategory, or counterparty within
        categorized transactions. Used in multiple contexts with slightly
        different calculation logic based on the level of aggregation.
    ConsumerAuthorizedPackagesResponse:
      type: object
      properties:
        authorizedPackages:
          type: array
          items:
            $ref: '#/components/schemas/QueryParameter'
          nullable: true
      additionalProperties: false
    ContractType:
      enum:
        - UNKNOWN
        - UNSECURED_LOAN
        - SECURED_LOAN
        - CO_BORROWER_LOAN
        - CREDIT_CARD
        - LEASING
        - MORTGAGE_LOAN
        - OVERDRAFT
        - OTHER
      type: string
      description: Specifies the type of credit contract the customer has entered.
      x-enumDescriptions:
        UNKNOWN: Type is not specified.
        UNSECURED_LOAN: Loan not backed by collateral.
        SECURED_LOAN: Loan backed by collateral (e.g., property, car).
        CO_BORROWER_LOAN: Loan shared with another borrower.
        CREDIT_CARD: Credit line issued through a card.
        LEASING: Lease contract (e.g., for vehicles or equipment).
        MORTGAGE_LOAN: Loan secured by real estate.
        OVERDRAFT: Credit provided when account balance goes below zero.
        OTHER: Other types of contracts not listed above.
    CounterpartyInsightItem:
      required:
        - counterpartyName
        - summary
      type: object
      properties:
        counterpartyName:
          type: string
          description: >-
            Name of the counterparty (e.g., employer, creditor, merchant). If
            counterpartyName is not provided by the bank, transaction
            description is used to group transactions (fuzzy logic applied).
          nullable: true
        summary:
          allOf:
            - $ref: '#/components/schemas/CategoryInsightSummary'
          description: >-
            Summary statistics for all transactions with this counterparty
            including count of months, total amounts, average monthly amounts,
            and country codes.
          nullable: true
      additionalProperties: false
      description: >-
        Insights for transactions with a specific counterparty (income source or
        creditor) within a subcategory.
    CourtAndInsolvencyCaseType:
      enum:
        - UNKNOWN
        - BANKRUPTCY_AND_INSOLVENCY
        - DEBT_RELIEF_AND_RESTRUCTURING
        - BILL_OF_SALE
        - PARTNERSHIPS_AND_CORPORATE_ACTIONS
        - COURT_ORDERS_AND_DECREES
        - MISCELLANEOUS_LEGAL_ORDERS_AND_ACTIONS
      type: string
      description: Specifies the type of court or insolvency case recorded for a customer.
      x-enumDescriptions:
        UNKNOWN: The case type is not specified.
        BANKRUPTCY_AND_INSOLVENCY: Cases involving bankruptcy or insolvency proceedings.
        DEBT_RELIEF_AND_RESTRUCTURING: Legal actions related to debt restructuring or relief.
        BILL_OF_SALE: Legal documentation related to bill of sale.
        PARTNERSHIPS_AND_CORPORATE_ACTIONS: Legal cases related to business partnerships or corporate actions.
        COURT_ORDERS_AND_DECREES: Formal court decisions or mandates.
        MISCELLANEOUS_LEGAL_ORDERS_AND_ACTIONS: Other legal cases not falling into the above categories.
    CourtAndInsolvencyCasesResponse:
      type: object
      properties:
        sources:
          type: array
          items:
            $ref: '#/components/schemas/Source'
          description: >-
            List of Data Provider sources indicating where the response data was
            obtained from.
          nullable: true
        courtAndInsolvencies:
          type: array
          items:
            $ref: '#/components/schemas/CourtAndInsolvencyItem'
          description: List of court and insolvency case records.
          nullable: true
      additionalProperties: false
      description: >-
        Response containing a list of court and insolvency cases related to the
        data subject.
    CourtAndInsolvencyItem:
      required:
        - caseType
        - sourceId
      type: object
      properties:
        sourceId:
          type: string
          description: >-
            Identifier of the source system that provided the court or
            insolvency record.
          nullable: true
        caseType:
          allOf:
            - $ref: '#/components/schemas/CourtAndInsolvencyCaseType'
          description: Type of the court or insolvency case.
          x-enumDescriptions:
            UNKNOWN: The case type is not specified.
            BANKRUPTCY_AND_INSOLVENCY: Cases involving bankruptcy or insolvency proceedings.
            DEBT_RELIEF_AND_RESTRUCTURING: Legal actions related to debt restructuring or relief.
            BILL_OF_SALE: Legal documentation related to bill of sale.
            PARTNERSHIPS_AND_CORPORATE_ACTIONS: Legal cases related to business partnerships or corporate actions.
            COURT_ORDERS_AND_DECREES: Formal court decisions or mandates.
            MISCELLANEOUS_LEGAL_ORDERS_AND_ACTIONS: Other legal cases not falling into the above categories.
        courtName:
          type: string
          description: Name of the court handling the case.
          nullable: true
        caseNumber:
          type: string
          description: Official number of the court or insolvency case.
          nullable: true
        courtDate:
          type: string
          description: Date when the court session took place.
          format: date
          nullable: true
        satisfiedDate:
          type: string
          description: Date when the case was marked as satisfied or resolved.
          format: date
          nullable: true
        amount:
          allOf:
            - $ref: '#/components/schemas/Money'
          description: Amount of money associated with the case.
          nullable: true
      additionalProperties: false
    CreateSessionRequest:
      required:
        - subjectEmail
      type: object
      properties:
        subjectEmail:
          type: string
          description: >-
            Data Subject email. This is used to contact the Data Subject for
            getting Consents.
          nullable: true
        queryParameters:
          type: array
          items:
            $ref: '#/components/schemas/QueryParameter'
          description: >-
            A collection of query parameters. At least one query parameter is
            required.
          nullable: true
      additionalProperties: false
      description: Request body used to initiate a new session for data retrieval.
    Creditor:
      required:
        - sector
      type: object
      properties:
        sector:
          allOf:
            - $ref: '#/components/schemas/CreditorSectorType'
          description: Sector classification of the creditor (e.g., finance, telecom).
          x-enumDescriptions:
            UNKNOWN: Sector is not specified.
            FINANCE: Financial institutions and banks.
            TELECOM: Telecommunication service providers.
            COURT_AUTHORITY: Legal and judicial authorities.
            OTHER: Other or miscellaneous sectors.
            PUBLIC: Public or government entities.
            PRIVATE: Private sector companies or individuals.
        name:
          type: string
          description: Name of the creditor organization or individual.
          nullable: true
      additionalProperties: false
    CreditorSectorType:
      enum:
        - UNKNOWN
        - FINANCE
        - TELECOM
        - COURT_AUTHORITY
        - OTHER
        - PUBLIC
        - PRIVATE
      type: string
      description: Specifies the sector to which the creditor belongs.
      x-enumDescriptions:
        UNKNOWN: Sector is not specified.
        FINANCE: Financial institutions and banks.
        TELECOM: Telecommunication service providers.
        COURT_AUTHORITY: Legal and judicial authorities.
        OTHER: Other or miscellaneous sectors.
        PUBLIC: Public or government entities.
        PRIVATE: Private sector companies or individuals.
    CustomerProgressStatusType:
      enum:
        - DELIVERY_FAILED
        - WAITING_FOR_CUSTOMER
        - COMPLETED_BY_CUSTOMER
        - EXPIRED
      type: string
      description: Specifies the progress status of a customer in a process.
      x-enumDescriptions:
        DELIVERY_FAILED: Delivery to the customer failed.
        WAITING_FOR_CUSTOMER: Awaiting action or input from the customer.
        COMPLETED_BY_CUSTOMER: Customer has completed the required steps.
        EXPIRED: The customer's opportunity or session expired.
    CustomerStatusType:
      enum:
        - UNKNOWN
        - DEAD
        - ALIVE
      type: string
      description: Specifies the current status of the customer.
      x-enumDescriptions:
        UNKNOWN: Status is not determined.
        DEAD: The customer is deceased.
        ALIVE: The customer is living.
    CustomerStatusTypeSourcedValue:
      type: object
      properties:
        value:
          allOf:
            - $ref: '#/components/schemas/CustomerStatusType'
          description: The actual value of the field.
          x-enumNames:
            - UNKNOWN
            - DEAD
            - ALIVE
          x-enumDescriptions:
            UNKNOWN: Status is not determined.
            DEAD: The customer is deceased.
            ALIVE: The customer is living.
        sourceIds:
          type: array
          items:
            type: string
          description: >-
            List of identifiers for the sources from which the value was
            derived.
          nullable: true
      additionalProperties: false
    DataPackage:
      enum:
        - CREDIT_HISTORY
        - SCORE
        - BANK_ACCOUNT_CATEGORIZATION
        - IDENTIFICATION
      type: string
      description: Specifies the type of data package that can be requested.
      x-enumDescriptions:
        CREDIT_HISTORY: Historical credit data about the customer.
        SCORE: Credit score calculated based on customer data.
        BANK_ACCOUNT_CATEGORIZATION: Categorization of transactions in the customer's bank account.
        IDENTIFICATION: Identification documents or data of the customer.
    DateOnlySourcedValue:
      type: object
      properties:
        value:
          type: string
          description: The actual value of the field.
          format: date
        sourceIds:
          type: array
          items:
            type: string
          description: >-
            List of identifiers for the sources from which the value was
            derived.
          nullable: true
      additionalProperties: false
    Document:
      required:
        - type
      type: object
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/DocumentType'
          description: >-
            Type of government-issued document, such as passport or identity
            card.
          x-enumDescriptions:
            UNKNOWN: Unknown type.
            PASSPORT: International passport document.
            IDENTITY_CARD: Government-issued identity card.
            DRIVING_LICENSE: Driver’s license.
            RESIDENCE_PERMIT: Official residence permit document.
            OTHER: Other or unspecified document type.
        issuerCountryCode:
          type: string
          description: >-
            Country that issued the document, represented as ISO 3166-1 alpha-3
            code.
          nullable: true
        number:
          type: string
          description: The document number or identifier.
          nullable: true
        issueDate:
          type: string
          description: The date when the document was issued.
          format: date
          nullable: true
        expirationDate:
          type: string
          description: The date when the document expires.
          format: date
          nullable: true
      additionalProperties: false
    DocumentSourcedValue:
      type: object
      properties:
        value:
          allOf:
            - $ref: '#/components/schemas/Document'
          description: The actual value of the field.
          nullable: true
        sourceIds:
          type: array
          items:
            type: string
          description: >-
            List of identifiers for the sources from which the value was
            derived.
          nullable: true
      additionalProperties: false
    DocumentType:
      enum:
        - UNKNOWN
        - PASSPORT
        - IDENTITY_CARD
        - DRIVING_LICENSE
        - RESIDENCE_PERMIT
        - OTHER
      type: string
      description: Types of documents used for verifying a customer's identity.
      x-enumDescriptions:
        UNKNOWN: Unknown type.
        PASSPORT: International passport document.
        IDENTITY_CARD: Government-issued identity card.
        DRIVING_LICENSE: Driver’s license.
        RESIDENCE_PERMIT: Official residence permit document.
        OTHER: Other or unspecified document type.
    EducationType:
      enum:
        - UNKNOWN
        - NO_EDUCATION
        - PRIMARY
        - HIGH_SCHOOL
        - BACHELOR_DEGREE_OR_EQUIVALENT
        - MASTERS_DEGREE_OR_EQUIVALENT
        - PHD_OR_EQUIVALENT
        - OTHER
      type: string
      description: Specifies the level of education attained by the customer.
      x-enumDescriptions:
        UNKNOWN: Education level is not specified.
        NO_EDUCATION: Customer has no formal education.
        PRIMARY: Primary school education completed.
        HIGH_SCHOOL: Secondary or high school education completed.
        BACHELOR_DEGREE_OR_EQUIVALENT: Bachelor’s degree or equivalent level.
        MASTERS_DEGREE_OR_EQUIVALENT: Master’s degree or equivalent level.
        PHD_OR_EQUIVALENT: Doctoral degree or equivalent level.
        OTHER: Other forms of education not listed above.
    EducationTypeSourcedValue:
      type: object
      properties:
        value:
          allOf:
            - $ref: '#/components/schemas/EducationType'
          description: The actual value of the field.
          x-enumNames:
            - UNKNOWN
            - NO_EDUCATION
            - PRIMARY
            - HIGH_SCHOOL
            - BACHELOR_DEGREE_OR_EQUIVALENT
            - MASTERS_DEGREE_OR_EQUIVALENT
            - PHD_OR_EQUIVALENT
            - OTHER
          x-enumDescriptions:
            UNKNOWN: Education level is not specified.
            NO_EDUCATION: Customer has no formal education.
            PRIMARY: Primary school education completed.
            HIGH_SCHOOL: Secondary or high school education completed.
            BACHELOR_DEGREE_OR_EQUIVALENT: Bachelor’s degree or equivalent level.
            MASTERS_DEGREE_OR_EQUIVALENT: Master’s degree or equivalent level.
            PHD_OR_EQUIVALENT: Doctoral degree or equivalent level.
            OTHER: Other forms of education not listed above.
        sourceIds:
          type: array
          items:
            type: string
          description: >-
            List of identifiers for the sources from which the value was
            derived.
          nullable: true
      additionalProperties: false
    FileContentResponse:
      required:
        - contentBase64
      type: object
      properties:
        sourceId:
          type: string
          description: >-
            Identifier of the source system or provider from which the file was
            obtained.
          nullable: true
        type:
          type: string
          description: Type or category of the file (e.g., PDF, XML, CSV).
          nullable: true
        name:
          type: string
          description: Name of the file, typically used for display or download purposes.
          nullable: true
        sizeInBytes:
          type: integer
          description: Size of the file in bytes.
          format: int64
          nullable: true
        contentBase64:
          type: string
          description: Base64-encoded binary content of the file.
          format: byte
          nullable: true
      additionalProperties: false
      description: >-
        Represents metadata of a downloadable file, including its source, type,
        name, and size.
    Gender:
      enum:
        - UNKNOWN
        - MALE
        - FEMALE
        - OTHER
      type: string
      description: Specifies the gender identity of the customer.
      x-enumDescriptions:
        UNKNOWN: Gender is not specified.
        MALE: Identifies as male.
        FEMALE: Identifies as female.
        OTHER: Identifies as another gender.
    GenderSourcedValue:
      type: object
      properties:
        value:
          allOf:
            - $ref: '#/components/schemas/Gender'
          description: The actual value of the field.
          x-enumNames:
            - UNKNOWN
            - MALE
            - FEMALE
            - OTHER
          x-enumDescriptions:
            UNKNOWN: Gender is not specified.
            MALE: Identifies as male.
            FEMALE: Identifies as female.
            OTHER: Identifies as another gender.
        sourceIds:
          type: array
          items:
            type: string
          description: >-
            List of identifiers for the sources from which the value was
            derived.
          nullable: true
      additionalProperties: false
    GetSessionsResponse:
      type: object
      properties:
        sessions:
          type: array
          items:
            $ref: '#/components/schemas/SessionItem'
          description: List of sessions matching the query parameters.
          nullable: true
        paging:
          allOf:
            - $ref: '#/components/schemas/Paging'
          description: Paging details for the sessions response.
          nullable: true
      additionalProperties: false
      description: >-
        Response containing a list of sessions and associated paging
        information.
    IdentityVerificationImageItem:
      required:
        - fileName
        - id
        - imageType
        - mimeType
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the identity verification image.
          format: uuid
        imageType:
          allOf:
            - $ref: '#/components/schemas/IdentityVerificationImageType'
          description: >-
            Type of image used for identity verification (e.g., selfie, document
            scan).
          x-enumDescriptions:
            UNKNOWN: Unknown type.
            PASSPORT: Passport document.
            ID_CARD: Government-issued identity card.
            SELFIE: >-
              Selfie image taken during identification for liveliness
              verification.
            RESIDENCE_PERMIT: Official residence permit document.
        mimeType:
          type: string
          description: MIME type of the image (e.g., image/jpeg).
          nullable: true
        fileName:
          type: string
          description: Name of the image file.
          nullable: true
      additionalProperties: false
    IdentityVerificationImageType:
      enum:
        - UNKNOWN
        - PASSPORT
        - ID_CARD
        - SELFIE
        - RESIDENCE_PERMIT
      type: string
      description: Types of documents used for verifying a customer's identity.
      x-enumDescriptions:
        UNKNOWN: Unknown type.
        PASSPORT: Passport document.
        ID_CARD: Government-issued identity card.
        SELFIE: Selfie image taken during identification for liveliness verification.
        RESIDENCE_PERMIT: Official residence permit document.
    IdentityVerificationItem:
      required:
        - capturedImagesCount
        - id
        - method
        - sourceId
        - verificationTimeUtc
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the identity verification record.
          format: uuid
        verificationTimeUtc:
          type: string
          description: UTC timestamp when the identity verification took place.
          format: date-time
        sourceId:
          type: string
          description: Identifier of the source system that performed the verification.
          nullable: true
        method:
          allOf:
            - $ref: '#/components/schemas/IdentityVerificationMethod'
          description: Method used to verify the customer's identity.
          x-enumDescriptions:
            UNKNOWN: Method is not specified.
            IDENTIFICATION: >-
              Verification through official identification documents or
              processes.
            VALIDATION: >-
              Validation through checks such as phone, email, or bank account
              linkage.
        capturedImagesCount:
          type: integer
          description: Number of images captured during the identity verification process.
          format: int32
      additionalProperties: false
    IdentityVerificationMethod:
      enum:
        - UNKNOWN
        - IDENTIFICATION
        - VALIDATION
      type: string
      description: Specifies the method used for identity verification.
      x-enumDescriptions:
        UNKNOWN: Method is not specified.
        IDENTIFICATION: Verification through official identification documents or processes.
        VALIDATION: >-
          Validation through checks such as phone, email, or bank account
          linkage.
    IdentityVerificationsResponse:
      type: object
      properties:
        sources:
          type: array
          items:
            $ref: '#/components/schemas/Source'
          description: >-
            List of Data Provider sources indicating where the response data was
            obtained from.
          nullable: true
        identityVerifications:
          type: array
          items:
            $ref: '#/components/schemas/IdentityVerificationItem'
          description: List of identity verification items retrieved for the Data Subject.
          nullable: true
      additionalProperties: false
      description: >-
        Response containing a list of identity verifications collected from
        various sources.
    ImmovableItem:
      required:
        - sourceId
      type: object
      properties:
        sourceId:
          type: string
          description: >-
            Identifier of the source system that provided the immovable property
            data.
          nullable: true
        purposes:
          type: array
          items:
            $ref: '#/components/schemas/ImmovablePurposeType'
          nullable: true
      additionalProperties: false
    ImmovablePurposeType:
      enum:
        - UNKNOWN
        - AGRICULTURE
        - HOUSE
        - APARTMENT
        - INDUSTRIAL
        - CONDOMINIUM
        - OTHER
      type: string
      description: Specifies the purpose or usage type of an immovable property.
      x-enumDescriptions:
        UNKNOWN: Purpose is not specified.
        AGRICULTURE: Used for agricultural purposes such as farming.
        HOUSE: Used as a standalone residential house.
        APARTMENT: Used as a residential apartment or flat.
        INDUSTRIAL: Used for industrial or manufacturing activities.
        CONDOMINIUM: A privately owned unit within a shared building or community.
        OTHER: Other purposes not listed above.
    ImmovablesResponse:
      type: object
      properties:
        sources:
          type: array
          items:
            $ref: '#/components/schemas/Source'
          description: >-
            List of Data Provider sources indicating where the response data was
            obtained from.
          nullable: true
        immovables:
          type: array
          items:
            $ref: '#/components/schemas/ImmovableItem'
          description: List of immovable property records retrieved from various sources.
          nullable: true
      additionalProperties: false
      description: >-
        Response containing a list of immovable properties associated with the
        data subject.
    Int32SourcedValue:
      type: object
      properties:
        value:
          type: integer
          description: The actual value of the field.
          format: int32
        sourceIds:
          type: array
          items:
            type: string
          description: >-
            List of identifiers for the sources from which the value was
            derived.
          nullable: true
      additionalProperties: false
    LegalEntitiesResponse:
      type: object
      properties:
        sources:
          type: array
          items:
            $ref: '#/components/schemas/Source'
          description: >-
            List of Data Provider sources indicating where the response data was
            obtained from.
          nullable: true
        legalEntities:
          type: array
          items:
            $ref: '#/components/schemas/LegalEntityItem'
          description: List of legal entities retrieved from the source.
          nullable: true
      additionalProperties: false
      description: >-
        Response containing a list of legal entities related to the data
        subject.
    LegalEntityItem:
      required:
        - sourceId
      type: object
      properties:
        sourceId:
          type: string
          description: Identifier of the source system that provided the legal entity data.
          nullable: true
        name:
          type: string
          description: Name of the legal entity.
          nullable: true
        relations:
          type: array
          items:
            $ref: '#/components/schemas/LegalEntityRelationItem'
          description: List of relations associated with the legal entity.
          nullable: true
      additionalProperties: false
    LegalEntityRelationItem:
      required:
        - type
      type: object
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/LegalEntityRelationType'
          description: >-
            Type of relation the customer has with the legal entity (e.g.,
            owner, shareholder).
          x-enumDescriptions:
            UNKNOWN: The relationship type is not specified.
        startDate:
          type: string
          description: Date when the relationship with the legal entity began.
          format: date
          nullable: true
        endDate:
          type: string
          description: >-
            Date when the relationship with the legal entity ended, if
            applicable.
          format: date
          nullable: true
      additionalProperties: false
    LegalEntityRelationType:
      enum:
        - UNKNOWN
      type: string
      description: Specifies the type of relationship a customer has with a legal entity.
      x-enumDescriptions:
        UNKNOWN: The relationship type is not specified.
    MaritalStatusType:
      enum:
        - UNKNOWN
        - SINGLE
        - MARRIED
        - WIDOW
        - DIVORCED
        - OTHER
      type: string
      description: Specifies the marital status of the individual.
      x-enumDescriptions:
        UNKNOWN: Marital status is not specified.
        SINGLE: The individual is not currently married.
        MARRIED: The individual is currently married.
        WIDOW: The individual's spouse has died and they have not remarried.
        DIVORCED: The individual is legally divorced.
        OTHER: Other marital status not covered by predefined values.
    MaritalStatusTypeSourcedValue:
      type: object
      properties:
        value:
          allOf:
            - $ref: '#/components/schemas/MaritalStatusType'
          description: The actual value of the field.
          x-enumNames:
            - UNKNOWN
            - SINGLE
            - MARRIED
            - WIDOW
            - DIVORCED
            - OTHER
          x-enumDescriptions:
            UNKNOWN: Marital status is not specified.
            SINGLE: The individual is not currently married.
            MARRIED: The individual is currently married.
            WIDOW: The individual's spouse has died and they have not remarried.
            DIVORCED: The individual is legally divorced.
            OTHER: Other marital status not covered by predefined values.
        sourceIds:
          type: array
          items:
            type: string
          description: >-
            List of identifiers for the sources from which the value was
            derived.
          nullable: true
      additionalProperties: false
    MetricItem:
      required:
        - name
        - sourceId
        - value
      type: object
      properties:
        name:
          allOf:
            - $ref: '#/components/schemas/MetricName'
          description: Name of the metric being reported.
          x-enumDescriptions:
            COUNT_INQUIRIES_LAST_30_DAYS: Total number of inquiries made during last 30 days
            COUNT_INQUIRIES_LAST_QUARTER: Total number of inquiries made during last quarter
            COUNT_IMMOVABLES: Total number of immovable properties associated
            COUNT_COURT_CASES: Total number of court cases associated
        value:
          type: string
          description: Value associated with the reported metric.
          nullable: true
        sourceId:
          type: string
          description: Identifier of the source system that provided the metric.
          nullable: true
      additionalProperties: false
    MetricName:
      enum:
        - COUNT_INQUIRIES_LAST_30_DAYS
        - COUNT_INQUIRIES_LAST_QUARTER
        - COUNT_IMMOVABLES
        - COUNT_COURT_CASES
      type: string
      description: Specifies types of metrics that can be reported.
      x-enumDescriptions:
        COUNT_INQUIRIES_LAST_30_DAYS: Total number of inquiries made during last 30 days
        COUNT_INQUIRIES_LAST_QUARTER: Total number of inquiries made during last quarter
        COUNT_IMMOVABLES: Total number of immovable properties associated
        COUNT_COURT_CASES: Total number of court cases associated
    MetricsResponse:
      type: object
      properties:
        sources:
          type: array
          items:
            $ref: '#/components/schemas/Source'
          description: >-
            List of Data Provider sources indicating where the response data was
            obtained from.
          nullable: true
        metrics:
          type: array
          items:
            $ref: '#/components/schemas/MetricItem'
          description: List of reported metrics collected from various sources.
          nullable: true
      additionalProperties: false
      description: Response containing a list of metric items related to the data subject.
    Money:
      required:
        - amount
        - currencyCode
      type: object
      properties:
        amount:
          type: number
          description: Monetary value represented as a decimal number.
          format: double
        currencyCode:
          type: string
          description: Currency code in ISO 4217 format (e.g., EUR, GBP).
          nullable: true
      additionalProperties: false
    NegativeTradelineItem:
      required:
        - contractType
        - sourceId
      type: object
      properties:
        sourceId:
          type: string
          description: >-
            Identifier of the source system that provided the credit product
            (tradeline).
          nullable: true
        amount:
          allOf:
            - $ref: '#/components/schemas/Money'
          description: Amount of the credit product when it was issued.
          nullable: true
        contractType:
          allOf:
            - $ref: '#/components/schemas/ContractType'
          description: Type of the credit product, such as loan, mortgage, or credit card.
          x-enumDescriptions:
            UNKNOWN: Type is not specified.
            UNSECURED_LOAN: Loan not backed by collateral.
            SECURED_LOAN: Loan backed by collateral (e.g., property, car).
            CO_BORROWER_LOAN: Loan shared with another borrower.
            CREDIT_CARD: Credit line issued through a card.
            LEASING: Lease contract (e.g., for vehicles or equipment).
            MORTGAGE_LOAN: Loan secured by real estate.
            OVERDRAFT: Credit provided when account balance goes below zero.
            OTHER: Other types of contracts not listed above.
        creditor:
          allOf:
            - $ref: '#/components/schemas/Creditor'
          description: Information about the creditor who issued the credit product.
          nullable: true
        agreementOriginationDate:
          type: string
          description: Date when the credit agreement was originally signed.
          format: date
          nullable: true
        expectedRepaymentDate:
          type: string
          description: Date by which the credit product is expected to be fully repaid.
          format: date
          nullable: true
        responsibility:
          allOf:
            - $ref: '#/components/schemas/ResponsibilityType'
          description: >-
            Specifies whether the customer is individually or jointly
            responsible for the credit product.
          nullable: true
        defaultStartDate:
          type: string
          description: The date when the negative status (e.g., default) started.
          format: date
          nullable: true
        defaultEndDate:
          type: string
          description: >-
            The date when the negative status (e.g., default) ended, if
            applicable.
          format: date
          nullable: true
        objectionStatus:
          allOf:
            - $ref: '#/components/schemas/ObjectionStatusType'
          description: >-
            Status indicating whether the customer has filed an objection
            against this record.
          nullable: true
      additionalProperties: false
    NegativeTradelinesResponse:
      type: object
      properties:
        sources:
          type: array
          items:
            $ref: '#/components/schemas/Source'
          description: >-
            List of Data Provider sources indicating where the response data was
            obtained from.
          nullable: true
        negativeTradelines:
          type: array
          items:
            $ref: '#/components/schemas/NegativeTradelineItem'
          description: >-
            List of negative tradelines such as defaults, late payments, or
            collections.
          nullable: true
      additionalProperties: false
      description: >-
        Response containing a list of negative tradeline items related to the
        data subject.
    ObjectionStatusType:
      enum:
        - UNKNOWN
        - NOT_DISPUTED
        - DISPUTED
        - PARTLY_DISPUTED
        - PARTLY_SETTLED
      type: string
      description: Specifies the objection status related to a credit record.
      x-enumDescriptions:
        UNKNOWN: Objection status is not specified.
        NOT_DISPUTED: No dispute has been raised.
        DISPUTED: The record is fully disputed by the customer.
        PARTLY_DISPUTED: Part of the record is under dispute.
        PARTLY_SETTLED: A partial settlement has been reached regarding the dispute.
    Paging:
      type: object
      properties:
        totalCount:
          type: integer
          description: Total number of items available.
          format: int32
        skip:
          type: integer
          description: Number of items to skip before starting to return results.
          format: int32
          nullable: true
        take:
          type: integer
          description: >-
            Number of items to return in the current page from the skipped
            result.
          format: int32
          nullable: true
      additionalProperties: false
    PersonDetailsResponse:
      type: object
      properties:
        sources:
          type: array
          items:
            $ref: '#/components/schemas/Source'
          description: >-
            List of Data Provider sources indicating where the response data was
            obtained from.
          nullable: true
        givenNames:
          type: array
          items:
            $ref: '#/components/schemas/StringSourcedValue'
          description: >-
            Given names of the person, such as first and middle names, from
            various sources.
          nullable: true
        familyNames:
          type: array
          items:
            $ref: '#/components/schemas/StringSourcedValue'
          description: Family or last names of the person from various sources.
          nullable: true
        birthDates:
          type: array
          items:
            $ref: '#/components/schemas/DateOnlySourcedValue'
          description: Birth dates of the person collected from different sources.
          nullable: true
        personalIdentityCodes:
          type: array
          items:
            $ref: '#/components/schemas/PersonalIdentityCodeSourcedValue'
          description: >-
            Country-specific PIN, NIN, or other identity codes used for uniquely
            identifying a person.
          nullable: true
        telephones:
          type: array
          items:
            $ref: '#/components/schemas/StringSourcedValue'
          description: Telephone numbers associated with the person.
          nullable: true
        emails:
          type: array
          items:
            $ref: '#/components/schemas/StringSourcedValue'
          description: Email addresses associated with the person.
          nullable: true
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/AddressSourcedValue'
          description: Residential or registered addresses of the person.
          nullable: true
        documents:
          type: array
          items:
            $ref: '#/components/schemas/DocumentSourcedValue'
          description: >-
            Government-issued identification documents such as passports or ID
            cards.
          nullable: true
        citizenships:
          type: array
          items:
            $ref: '#/components/schemas/StringSourcedValue'
          description: >-
            ISO 3166-1 alpha-3 country codes indicating the citizenship(s) held
            by the data subject.
          nullable: true
        maritalStatuses:
          type: array
          items:
            $ref: '#/components/schemas/MaritalStatusTypeSourcedValue'
          description: Marital statuses of the person (e.g., single, married).
          nullable: true
        underageChildrenCounts:
          type: array
          items:
            $ref: '#/components/schemas/Int32SourcedValue'
          description: Number of underage children associated with the person.
          nullable: true
        educations:
          type: array
          items:
            $ref: '#/components/schemas/EducationTypeSourcedValue'
          description: Highest levels of education attained by the person.
          nullable: true
        genders:
          type: array
          items:
            $ref: '#/components/schemas/GenderSourcedValue'
          description: Gender information of the person.
          nullable: true
        customerStatuses:
          type: array
          items:
            $ref: '#/components/schemas/CustomerStatusTypeSourcedValue'
          description: Status of the person as a customer, such as active or inactive.
          nullable: true
      additionalProperties: false
      description: >-
        Base class for responses that include source metadata describing the
        origin of each data point.
    PersonalIdentityCode:
      required:
        - countryCode
        - identityCode
      type: object
      properties:
        identityCode:
          type: string
          description: >-
            Country-specific personal identifier such as PIN, NIN, or a tax
            authority code.
          nullable: true
        countryCode:
          type: string
          description: >-
            Three-letter ISO 3166-1 alpha-3 code representing the country that
            issued the identity code.
          nullable: true
      additionalProperties: false
    PersonalIdentityCodeSourcedValue:
      type: object
      properties:
        value:
          allOf:
            - $ref: '#/components/schemas/PersonalIdentityCode'
          description: The actual value of the field.
          nullable: true
        sourceIds:
          type: array
          items:
            type: string
          description: >-
            List of identifiers for the sources from which the value was
            derived.
          nullable: true
      additionalProperties: false
    PositiveTradelineItem:
      required:
        - contractType
        - sourceId
      type: object
      properties:
        sourceId:
          type: string
          description: >-
            Identifier of the source system that provided the credit product
            (tradeline).
          nullable: true
        amount:
          allOf:
            - $ref: '#/components/schemas/Money'
          description: Amount of the credit product when it was issued.
          nullable: true
        contractType:
          allOf:
            - $ref: '#/components/schemas/ContractType'
          description: Type of the credit product, such as loan, mortgage, or credit card.
          x-enumDescriptions:
            UNKNOWN: Type is not specified.
            UNSECURED_LOAN: Loan not backed by collateral.
            SECURED_LOAN: Loan backed by collateral (e.g., property, car).
            CO_BORROWER_LOAN: Loan shared with another borrower.
            CREDIT_CARD: Credit line issued through a card.
            LEASING: Lease contract (e.g., for vehicles or equipment).
            MORTGAGE_LOAN: Loan secured by real estate.
            OVERDRAFT: Credit provided when account balance goes below zero.
            OTHER: Other types of contracts not listed above.
        creditor:
          allOf:
            - $ref: '#/components/schemas/Creditor'
          description: Information about the creditor who issued the credit product.
          nullable: true
        agreementOriginationDate:
          type: string
          description: Date when the credit agreement was originally signed.
          format: date
          nullable: true
        expectedRepaymentDate:
          type: string
          description: Date by which the credit product is expected to be fully repaid.
          format: date
          nullable: true
        responsibility:
          allOf:
            - $ref: '#/components/schemas/ResponsibilityType'
          description: >-
            Specifies whether the customer is individually or jointly
            responsible for the credit product.
          nullable: true
        repaidAmount:
          allOf:
            - $ref: '#/components/schemas/Money'
          description: Total amount repaid by the customer for this credit product.
          nullable: true
        currentMonthlyPayment:
          allOf:
            - $ref: '#/components/schemas/Money'
          description: Current monthly payment amount for the credit product.
          nullable: true
        currentBalance:
          allOf:
            - $ref: '#/components/schemas/Money'
          description: Outstanding balance on the credit product.
          nullable: true
        agreementEndDate:
          type: string
          description: The date when the credit agreement is scheduled or expected to end.
          format: date
          nullable: true
      additionalProperties: false
    PositiveTradelinesResponse:
      type: object
      properties:
        sources:
          type: array
          items:
            $ref: '#/components/schemas/Source'
          description: >-
            List of Data Provider sources indicating where the response data was
            obtained from.
          nullable: true
        positiveTradelines:
          type: array
          items:
            $ref: '#/components/schemas/PositiveTradelineItem'
          description: >-
            List of positive tradelines such as active credit products with good
            repayment history.
          nullable: true
      additionalProperties: false
      description: >-
        Response containing a list of positive tradeline items related to the
        data subject.
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
    QueryParameter:
      required:
        - countryCode
      type: object
      properties:
        countryCode:
          type: string
          description: >-
            ISO 3166-1 alpha-3 code representing the country for which the
            customer is requesting information about the Data Subject.
          nullable: true
        dataPackages:
          type: array
          items:
            $ref: '#/components/schemas/DataPackage'
          description: List of data packages requested for the specified country.
          nullable: true
      additionalProperties: false
    RegistryIncomeItem:
      required:
        - sourceId
      type: object
      properties:
        sourceId:
          type: string
          description: Identifier of the source system that provided the income data.
          nullable: true
        assessmentYear:
          type: integer
          description: Year for which the income assessment is reported.
          format: int32
          nullable: true
        netIncome:
          allOf:
            - $ref: '#/components/schemas/Money'
          description: Net income reported by the source system.
          nullable: true
        grossIncome:
          allOf:
            - $ref: '#/components/schemas/Money'
          description: Gross income reported by the source system.
          nullable: true
        totalTaxAmount:
          allOf:
            - $ref: '#/components/schemas/Money'
          description: Total amount of taxes paid as reported by the source system.
          nullable: true
      additionalProperties: false
    RegistryIncomesResponse:
      type: object
      properties:
        sources:
          type: array
          items:
            $ref: '#/components/schemas/Source'
          description: >-
            List of Data Provider sources indicating where the response data was
            obtained from.
          nullable: true
        incomes:
          type: array
          items:
            $ref: '#/components/schemas/RegistryIncomeItem'
          description: >-
            List of income items retrieved from official registries or data
            providers.
          nullable: true
      additionalProperties: false
      description: >-
        Response containing a list of registry-reported income items for the
        data subject.
    ResponsibilityType:
      enum:
        - UNKNOWN
        - BORROWER
        - CO_BORROWER
        - GUARANTOR
        - HEIR
        - OTHER
      type: string
      description: Specifies the customer's responsibility type in a credit product.
      x-enumDescriptions:
        UNKNOWN: Responsibility is not specified.
        BORROWER: Primary borrower responsible for repaying the credit.
        CO_BORROWER: Secondary borrower jointly responsible for repayment.
        GUARANTOR: Party guaranteeing repayment if the borrower defaults.
        HEIR: Individual inheriting the repayment responsibility.
        OTHER: Other types of responsibility.
    ScoreItem:
      required:
        - sourceId
        - type
      type: object
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/ScoreType'
          description: >-
            Type of credit score being reported (e.g., internal,
            bureau-provided).
          x-enumDescriptions:
            UNKNOWN: Score type is not specified.
            RISK_SCORE_V1: Internal or external risk scoring version 1.
            FICO_SCORE: FICO® Credit Score
            PROBABILITY_OF_DEFAULT: Score representing the likelihood of default.
        sourceId:
          type: string
          description: Identifier of the source system that provided the score.
          nullable: true
        countryCode:
          type: string
          description: >-
            ISO 3166-1 alpha-3 country code. Can be null if score type is not
            directly related to any specific country.
          nullable: true
        originalValue:
          type: string
          description: The raw score value as received from the source system.
          nullable: true
        normalizedValue:
          type: string
          description: Normalized version of the score value, if applicable.
          nullable: true
        unavailableReason:
          allOf:
            - $ref: '#/components/schemas/ScoreUnavailableReasonType'
          description: Reason why the score is unavailable, if applicable.
          nullable: true
      additionalProperties: false
    ScoreType:
      enum:
        - UNKNOWN
        - RISK_SCORE_V1
        - FICO_SCORE
        - PROBABILITY_OF_DEFAULT
      type: string
      description: Specifies the type of credit score provided.
      x-enumDescriptions:
        UNKNOWN: Score type is not specified.
        RISK_SCORE_V1: Internal or external risk scoring version 1.
        FICO_SCORE: FICO® Credit Score
        PROBABILITY_OF_DEFAULT: Score representing the likelihood of default.
    ScoreUnavailableReasonType:
      enum:
        - UNKNOWN
        - DECEASED
        - UNSETTLED_OBLIGATIONS
        - BANKRUPTCY
        - DEBTS_SETTLED_WITH_AGREEMENT
        - INFO_MISSING
        - UNDERAGE
        - PERSON_NOT_FOUND
        - OTHER_RESTRICTIONS_OR_LIMITATIONS
        - ERROR
      type: string
      description: Specifies the reason why a credit score is unavailable.
      x-enumDescriptions:
        UNKNOWN: Reason is not specified.
        DECEASED: The individual is reported as deceased.
        UNSETTLED_OBLIGATIONS: Unresolved obligations are present.
        BANKRUPTCY: The individual is undergoing bankruptcy proceedings.
        DEBTS_SETTLED_WITH_AGREEMENT: Debts were settled with a formal agreement.
        INFO_MISSING: Required information is missing.
        UNDERAGE: The individual is below the eligible age.
        PERSON_NOT_FOUND: No records found for the individual.
        OTHER_RESTRICTIONS_OR_LIMITATIONS: Other limitations apply.
        ERROR: A technical or processing error occurred.
    ScoresResponse:
      type: object
      properties:
        sources:
          type: array
          items:
            $ref: '#/components/schemas/Source'
          description: >-
            List of Data Provider sources indicating where the response data was
            obtained from.
          nullable: true
        scores:
          type: array
          items:
            $ref: '#/components/schemas/ScoreItem'
          description: List of credit score items related to the Data Subject.
          nullable: true
      additionalProperties: false
      description: >-
        Response containing a list of credit scores obtained from various
        sources.
    SessionItem:
      required:
        - createdAtUtc
        - customerProgressStatus
        - id
        - queryParameters
        - subjectEmail
      type: object
      properties:
        id:
          type: string
          description: >-
            Unique Session identifier. Used in subsequent requests to fetch
            Session related data.
          format: uuid
        createdAtUtc:
          type: string
          description: Session creation time in UTC.
          format: date-time
        createdByName:
          type: string
          description: Agent name who created the Session.
          nullable: true
        organizationalUnitName:
          type: string
          description: Organizational unit name of the agent who created the Session.
          nullable: true
        subjectEmail:
          type: string
          description: >-
            Data Subject email. This is used to contact the Data Subject for
            getting Consents
          nullable: true
        subjectFullName:
          type: string
          description: >-
            Data Subject full name. Field will stay empty until subject has
            completed the identification step.
          nullable: true
        customerInputDeadlineUtc:
          type: string
          description: >-
            Deadline by which the customer is expected to provide input. If Data
            Subject hasn't provided the input by that time, new Session should
            be created.
          format: date-time
          nullable: true
        customerProgressStatus:
          allOf:
            - $ref: '#/components/schemas/CustomerProgressStatusType'
          description: Current Session status.
          x-enumDescriptions:
            DELIVERY_FAILED: Delivery to the customer failed.
            WAITING_FOR_CUSTOMER: Awaiting action or input from the customer.
            COMPLETED_BY_CUSTOMER: Customer has completed the required steps.
            EXPIRED: The customer's opportunity or session expired.
        queryParameters:
          type: array
          items:
            $ref: '#/components/schemas/QueryParameter'
          description: Session input elements
          nullable: true
      additionalProperties: false
    Source:
      required:
        - sourceId
        - status
      type: object
      properties:
        sourceId:
          type: string
          description: Identifier of the Data Provider that provided the information.
          nullable: true
        status:
          allOf:
            - $ref: '#/components/schemas/SourceStatusType'
          description: >-
            Current status of the source Data Provider, such as successful or
            failed.
          x-enumDescriptions:
            UNKNOWN: Status is not specified.
            SUCCESS: >-
              The Data Provider has successfully returned a response. This
              means:
                - All required customer data was submitted and verified.
                - The Data Provider returned a valid response (including cases where the response is empty).

                Note: an empty response can be a valid result. For example:
                - No active liabilities or defaults are found.
                - The customer (Data Subject) is not listed in the credit bureau's database, indicating no negative or reportable credit history.
            ERROR: >-
              An error occurred when attempting to collect or process the data.
              Typical causes include:
                - Invalid or incomplete input from the customer (Data Subject).
                - Failed identity verification.
                - Legal restrictions (e.g. protected identity).
                - Check the `error_code` and `error_message` fields for detailed diagnostics.
            FORBIDDEN: >-
              The client is **not authorized** to access the requested data.
              Common reasons include:
                - Missing agreements between the Client and the Data Provider.
                - Restricted access to certain data sources based on jurisdiction or product configuration.
            UNSUPPORTED_COUNTRY: >-
              The requested data is **not available** for the selected country.
              This may occur when:
                - The specific data type (e.g. positive tradelines) is not available in that market.
                - Mifundo has not yet integrated with relevant local Data Providers.
            WAITING_FOR_CUSTOMER: >-
              The customer (Data Subject) still needs to provide one or more
              required data elements. This may include:
                - Consent(s)
                - Identification
                - Residential address (if required)
                - National identification number (if required)
            WAITING_FOR_PROVIDER: >-
              All required data has been submitted by the customer (Data
              Subject). Mifundo has forwarded the request to the respective Data
              Provider, but a response has not yet been received.
            PACKAGE_UPGRADE_REQUIRED: >-
              You haven't requested the information in original query, Please
              upgrade the Session to get this info.
            ID_TAX_ONLY: Customer identity code granted only for tax purposes.
        countryCode:
          type: string
          description: >-
            Three-letter ISO 3166-1 alpha-3 code representing the country of the
            source Data Provide.
          nullable: true
      additionalProperties: false
    SourceFileResponse:
      type: object
      properties:
        sourceId:
          type: string
          description: >-
            Identifier of the source system or provider from which the file was
            obtained.
          nullable: true
        type:
          type: string
          description: Type or category of the file (e.g., PDF, XML, CSV).
          nullable: true
        name:
          type: string
          description: Name of the file, typically used for display or download purposes.
          nullable: true
        sizeInBytes:
          type: integer
          description: Size of the file in bytes.
          format: int64
          nullable: true
        id:
          type: string
          description: Unique identifier of the source file.
          format: uuid
      additionalProperties: false
      description: >-
        Represents metadata of a downloadable file, including its source, type,
        name, and size.
    SourceStatusType:
      enum:
        - UNKNOWN
        - SUCCESS
        - ERROR
        - FORBIDDEN
        - UNSUPPORTED_COUNTRY
        - WAITING_FOR_CUSTOMER
        - WAITING_FOR_PROVIDER
        - PACKAGE_UPGRADE_REQUIRED
        - ID_TAX_ONLY
      type: string
      description: Specifies the status of the data source in response to a request.
      x-enumDescriptions:
        UNKNOWN: Status is not specified.
        SUCCESS: |-
          The Data Provider has successfully returned a response. This means:
            - All required customer data was submitted and verified.
            - The Data Provider returned a valid response (including cases where the response is empty).

            Note: an empty response can be a valid result. For example:
            - No active liabilities or defaults are found.
            - The customer (Data Subject) is not listed in the credit bureau's database, indicating no negative or reportable credit history.
        ERROR: >-
          An error occurred when attempting to collect or process the data.
          Typical causes include:
            - Invalid or incomplete input from the customer (Data Subject).
            - Failed identity verification.
            - Legal restrictions (e.g. protected identity).
            - Check the `error_code` and `error_message` fields for detailed diagnostics.
        FORBIDDEN: >-
          The client is **not authorized** to access the requested data. Common
          reasons include:
            - Missing agreements between the Client and the Data Provider.
            - Restricted access to certain data sources based on jurisdiction or product configuration.
        UNSUPPORTED_COUNTRY: >-
          The requested data is **not available** for the selected country. This
          may occur when:
            - The specific data type (e.g. positive tradelines) is not available in that market.
            - Mifundo has not yet integrated with relevant local Data Providers.
        WAITING_FOR_CUSTOMER: >-
          The customer (Data Subject) still needs to provide one or more
          required data elements. This may include:
            - Consent(s)
            - Identification
            - Residential address (if required)
            - National identification number (if required)
        WAITING_FOR_PROVIDER: >-
          All required data has been submitted by the customer (Data Subject).
          Mifundo has forwarded the request to the respective Data Provider, but
          a response has not yet been received.
        PACKAGE_UPGRADE_REQUIRED: >-
          You haven't requested the information in original query, Please
          upgrade the Session to get this info.
        ID_TAX_ONLY: Customer identity code granted only for tax purposes.
    StringSourcedValue:
      type: object
      properties:
        value:
          type: string
          description: The actual value of the field.
          nullable: true
        sourceIds:
          type: array
          items:
            type: string
          description: >-
            List of identifiers for the sources from which the value was
            derived.
          nullable: true
      additionalProperties: false
    SubCategoryInsightItem:
      required:
        - subCategory
        - summary
      type: object
      properties:
        subCategory:
          allOf:
            - $ref: '#/components/schemas/TransactionSubCategory'
          description: >-
            Name of the specific subcategory (e.g. SALARY, CONSUMER_LOAN,
            CREDIT_CARD, GAMBLING, ENTERTAINMENT)
          x-enumDescriptions:
            BANK_FEES: Charges applied by financial institutions.
            BNPL: Buy Now, Pay Later services.
            CAR_LOAN: Payments related to car financing.
            CHILD_SUPPORT: Legally mandated child support payments.
            CONSUMER_LOAN: Personal loans for general consumer use.
            CREDIT_CARD: Credit card related transactions.
            DISABILITY: Income from disability support.
            ENTERTAINMENT: Spending on entertainment activities.
            FOOD_AND_DRINK: Purchases for food and beverages.
            GAMBLING: Bets and wagers.
            GENERAL_MERCHANDISE: Retail or general store purchases.
            GENERAL_SERVICE: Fees for generic services.
            GIG_ECONOMY: Earnings from freelance or gig work.
            GOVERNMENT: Payments from or to the government.
            GOVERNMENT_AND_NON_PROFIT: Activity involving government or non-profit organizations.
            HOME_IMPROVEMENT: Expenses related to home repair or renovation.
            INTEREST_AND_DIVIDENDS: Income from interest or dividends.
            INTEREST_PAYMENT: Interest paid on loans or credit.
            INVESTMENT_AND_SAVINGS: Deposits into savings or investments.
            LOAN_DISBURSEMENT: Funds received from a loan.
            MEDICAL: Payments for medical care or services.
            MORTGAGE_LOAN: Mortgage-related payments.
            OTHER: Miscellaneous transactions.
            PERSONAL_CARE: Expenses for personal grooming and care.
            RENTAL: Income or expenses from property rental.
            RENT_AND_UTILITIES: Rent and utility bill payments.
            RETIREMENT: Contributions or withdrawals from retirement accounts.
            SALARY: Regular employment income.
            STUDENT_LOAN: Education loan payments.
            TRANSFER_IN: Incoming transfers.
            TRANSFER_OUT: Outgoing transfers.
            TRAVEL_AND_TRANSPORT: Travel or transportation costs.
            UNEMPLOYMENT: Unemployment benefits.
            UNKNOWN: Unclassified transaction.
        summary:
          allOf:
            - $ref: '#/components/schemas/CategoryInsightSummary'
          description: >-
            Summary statistics for this subcategory including count of months,
            total amounts, average monthly amounts, and country codes.
          nullable: true
        counterparties:
          type: array
          items:
            $ref: '#/components/schemas/CounterpartyInsightItem'
          description: >-
            List of counterparty insights within this subcategory. Only
            applicable for INCOMES and LIABILITIES categories - null for
            OTHER_INCOMING_PAYMENTS and EXPENSES.
          nullable: true
      additionalProperties: false
      description: >-
        Transactions within the specific subcategory (e.g. SALARY,
        CONSUMER_LOAN, CREDIT_CARD, GAMBLING, ENTERTAINMENT)
    TransactionCategory:
      enum:
        - INCOMES
        - OTHER_INCOMING_PAYMENTS
        - LIABILITIES
        - EXPENSES
      type: string
      description: Specifies the high-level category of a financial transaction.
      x-enumDescriptions:
        INCOMES: Earnings such as salary, dividends, or rental income.
        OTHER_INCOMING_PAYMENTS: Incoming funds that do not qualify as regular income.
        LIABILITIES: Transactions representing financial obligations or debts.
        EXPENSES: Outgoing payments for goods, services, or other costs.
    TransactionSubCategory:
      enum:
        - BANK_FEES
        - BNPL
        - CAR_LOAN
        - CHILD_SUPPORT
        - CONSUMER_LOAN
        - CREDIT_CARD
        - DISABILITY
        - ENTERTAINMENT
        - FOOD_AND_DRINK
        - GAMBLING
        - GENERAL_MERCHANDISE
        - GENERAL_SERVICE
        - GIG_ECONOMY
        - GOVERNMENT
        - GOVERNMENT_AND_NON_PROFIT
        - HOME_IMPROVEMENT
        - INTEREST_AND_DIVIDENDS
        - INTEREST_PAYMENT
        - INVESTMENT_AND_SAVINGS
        - LOAN_DISBURSEMENT
        - MEDICAL
        - MORTGAGE_LOAN
        - OTHER
        - PERSONAL_CARE
        - RENTAL
        - RENT_AND_UTILITIES
        - RETIREMENT
        - SALARY
        - STUDENT_LOAN
        - TRANSFER_IN
        - TRANSFER_OUT
        - TRAVEL_AND_TRANSPORT
        - UNEMPLOYMENT
        - UNKNOWN
      type: string
      description: Specifies the detailed classification of a financial transaction.
      x-enumDescriptions:
        BANK_FEES: Charges applied by financial institutions.
        BNPL: Buy Now, Pay Later services.
        CAR_LOAN: Payments related to car financing.
        CHILD_SUPPORT: Legally mandated child support payments.
        CONSUMER_LOAN: Personal loans for general consumer use.
        CREDIT_CARD: Credit card related transactions.
        DISABILITY: Income from disability support.
        ENTERTAINMENT: Spending on entertainment activities.
        FOOD_AND_DRINK: Purchases for food and beverages.
        GAMBLING: Bets and wagers.
        GENERAL_MERCHANDISE: Retail or general store purchases.
        GENERAL_SERVICE: Fees for generic services.
        GIG_ECONOMY: Earnings from freelance or gig work.
        GOVERNMENT: Payments from or to the government.
        GOVERNMENT_AND_NON_PROFIT: Activity involving government or non-profit organizations.
        HOME_IMPROVEMENT: Expenses related to home repair or renovation.
        INTEREST_AND_DIVIDENDS: Income from interest or dividends.
        INTEREST_PAYMENT: Interest paid on loans or credit.
        INVESTMENT_AND_SAVINGS: Deposits into savings or investments.
        LOAN_DISBURSEMENT: Funds received from a loan.
        MEDICAL: Payments for medical care or services.
        MORTGAGE_LOAN: Mortgage-related payments.
        OTHER: Miscellaneous transactions.
        PERSONAL_CARE: Expenses for personal grooming and care.
        RENTAL: Income or expenses from property rental.
        RENT_AND_UTILITIES: Rent and utility bill payments.
        RETIREMENT: Contributions or withdrawals from retirement accounts.
        SALARY: Regular employment income.
        STUDENT_LOAN: Education loan payments.
        TRANSFER_IN: Incoming transfers.
        TRANSFER_OUT: Outgoing transfers.
        TRAVEL_AND_TRANSPORT: Travel or transportation costs.
        UNEMPLOYMENT: Unemployment benefits.
        UNKNOWN: Unclassified transaction.
    UpdateSessionRequest:
      type: object
      properties:
        queryParameters:
          type: array
          items:
            $ref: '#/components/schemas/QueryParameter'
          description: >-
            A collection of query parameters. At least one query parameter is
            required.
          nullable: true
      additionalProperties: false
      description: >-
        Request body used to update an existing session with new query
        parameters.
    ValidationProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          nullable: true
      additionalProperties: {}
  securitySchemes:
    keycloakAuthTest:
      type: oauth2
      description: >-
        Keycloak (TEST). Supports both Authorization Code and Client Credentials
        flows.
      flows:
        clientCredentials:
          tokenUrl: >-
            https://authtest.mifundo.com/realms/b2b/protocol/openid-connect/token
          scopes: {}
        authorizationCode:
          authorizationUrl: https://authtest.mifundo.com/realms/b2b/protocol/openid-connect/auth
          tokenUrl: >-
            https://authtest.mifundo.com/realms/b2b/protocol/openid-connect/token
          scopes: {}
    keycloakAuthLive:
      type: oauth2
      description: >-
        Keycloak (LIVE). Supports both Authorization Code and Client Credentials
        flows.
      flows:
        clientCredentials:
          tokenUrl: https://auth.mifundo.com/realms/b2b/protocol/openid-connect/token
          scopes: {}
        authorizationCode:
          authorizationUrl: https://auth.mifundo.com/realms/b2b/protocol/openid-connect/auth
          tokenUrl: https://auth.mifundo.com/realms/b2b/protocol/openid-connect/token
          scopes: {}
tags:
  - name: Sessions
    description: >-
      Session is a collection of inputs for retrieving various sets of
      information
  - name: SourceFiles
    description: Original responses from credit bureaus and other sources of information
