> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# Obter painel de carteira

> Retorna métricas de risco, inadimplência e atualidade em nível de carteira para a data de negócio solicitada.



## OpenAPI

````yaml pt/openapi/v3-current/lender.yaml get /api/v1/dashboard/portfolio
openapi: 3.1.0
info:
  contact:
    email: contact@lerian.studio
    name: Lerian Studio
    url: https://lerian.studio
  description: Superfície OpenAPI 3.1 code-first do serviço Lender.
  license:
    name: Lerian Studio General License
  title: Lender API
  version: 1.0.0
servers:
  - url: https://lender.sandbox.lerian.net
security:
  - BearerAuth: []
tags:
  - description: >-
      Operações de contabilidade do ledger: entradas de journal e lançamentos de
      accrual para contas de empréstimo.
    name: Accounting
  - description: >-
      Recepção e ciclo de vida da solicitação de empréstimo: submissão, decisão
      e status.
    name: LoanApplications
  - description: >-
      Catálogo de produtos de empréstimo: definição, versionamento e ativação de
      produtos de crédito.
    name: LoanProducts
  - description: >-
      Operações de servicing de contas de empréstimo: saldos, cronogramas e
      ações em nível de conta.
    name: Loan Accounts
  - description: >-
      Operações de leitura de servicing: cronogramas de pagamento e estado de
      servicing para contas de empréstimo.
    name: Servicings
  - description: >-
      Operações de leitura do painel de carteira: visões agregadas de carteira e
      de desempenho.
    name: Dashboard
  - description: >-
      Registro de jurisdições: perfis de jurisdição suportados e suas
      capacidades.
    name: Jurisdictions
  - description: >-
      Operações de solicitação de empréstimo específicas por jurisdição
      (superfície de originação do Brasil).
    name: Loan Applications
  - description: >-
      Operações de cálculo de impostos para crédito específico por jurisdição
      (por exemplo, IOF do Brasil).
    name: Tax
  - description: >-
      Operações de consignado privado do Brasil: originação de contrato
      (contratação ativa) e ciclo de vida.
    name: Consignado
paths:
  /api/v1/dashboard/portfolio:
    get:
      tags:
        - Dashboard
      summary: Obter painel de carteira
      description: >-
        Retorna métricas de risco, inadimplência e atualidade em nível de
        carteira para a data de negócio solicitada.
      operationId: getPortfolioDashboard
      parameters:
        - description: Portfolio identifier.
          explode: false
          in: query
          name: portfolioId
          required: true
          schema:
            description: Portfolio identifier.
            examples:
              - 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
        - description: Business date (YYYY-MM-DD); defaults to today (UTC).
          explode: false
          in: query
          name: asOf
          schema:
            description: Business date (YYYY-MM-DD); defaults to today (UTC).
            examples:
              - '2026-06-14'
            format: date
            type: string
        - description: Filter by loan product identifiers (repeat to pass multiple).
          explode: true
          in: query
          name: productIds
          schema:
            description: Filter by loan product identifiers (repeat to pass multiple).
            examples:
              - - 550e8400-e29b-41d4-a716-446655440001
            items:
              format: uuid
              type: string
            maxItems: 100
            type:
              - array
              - 'null'
        - description: >-
            Filter by loan product version identifiers (repeat to pass
            multiple).
          explode: true
          in: query
          name: productVersionIds
          schema:
            description: >-
              Filter by loan product version identifiers (repeat to pass
              multiple).
            examples:
              - - 550e8400-e29b-41d4-a716-446655440002
            items:
              format: uuid
              type: string
            maxItems: 100
            type:
              - array
              - 'null'
        - description: Delinquency bucket code.
          explode: false
          in: query
          name: bucketCode
          schema:
            description: Delinquency bucket code.
            enum:
              - current
              - '1_30'
              - '31_60'
              - '61_90'
              - 91_plus
              - par30
              - par60
              - par90
            examples:
              - par30
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PortfolioDashboardHumaBody'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Error
components:
  schemas:
    PortfolioDashboardHumaBody:
      additionalProperties: false
      properties:
        asOfDate:
          description: Business date the metrics were computed for (RFC3339, UTC midnight).
          examples:
            - '2026-06-14T12:00:00Z'
          format: date-time
          type: string
        delinquencyDistribution:
          description: Loan count and exposure broken down by delinquency bucket.
          items:
            $ref: '#/components/schemas/DashboardBucketHumaBody'
          type:
            - array
            - 'null'
        drillDown:
          description: >-
            Per-loan delinquency rows for the requested bucket (empty when
            none).
          items:
            $ref: '#/components/schemas/DashboardDrillDownRow'
          type:
            - array
            - 'null'
        freshness:
          $ref: '#/components/schemas/DashboardFreshnessHuma'
          description: >-
            Provenance of the metrics: snapshot identity, staleness, and
            freshness policy.
        portfolioId:
          description: Portfolio identifier (UUID) the metrics belong to.
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        summary:
          $ref: '#/components/schemas/DashboardSummaryHumaBody'
          description: >-
            Portfolio-level exposure, volume, and PAR roll-up for the business
            date.
        trend:
          description: Month-by-month historical series leading up to the business date.
          items:
            $ref: '#/components/schemas/DashboardTrendPointHuma'
          type:
            - array
            - 'null'
      required:
        - portfolioId
        - asOfDate
        - summary
        - delinquencyDistribution
        - drillDown
        - freshness
        - trend
      type: object
    Detail:
      additionalProperties: false
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          examples:
            - ERR-0001
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
      type: object
    DashboardBucketHumaBody:
      additionalProperties: false
      properties:
        bucketCode:
          description: >-
            Delinquency bucket code (one of current, 1_30, 31_60, 61_90,
            91_plus, par30, par60, par90).
          examples:
            - '1_30'
          type: string
        bucketLabel:
          description: Human-readable label for the bucket (e.g. "1-30 days").
          type: string
        exposureAmount:
          description: >-
            Outstanding exposure aggregated for this bucket (decimal string,
            two-decimal scale).
          examples:
            - '75000.00'
          type: string
        loanCount:
          description: Number of active loans falling into this bucket.
          examples:
            - 42
          format: int64
          type: integer
      required:
        - bucketCode
        - bucketLabel
        - loanCount
        - exposureAmount
      type: object
    DashboardDrillDownRow:
      additionalProperties: false
      properties:
        assignedOfficerId:
          description: Identifier (UUID) of the loan officer assigned to the loan.
          examples:
            - 550e8400-e29b-41d4-a716-446655440012
          type: string
        assignedOfficerName:
          description: Display name of the assigned loan officer.
          type: string
        borrowerId:
          description: Borrower identifier (UUID) who holds the loan.
          examples:
            - 550e8400-e29b-41d4-a716-446655440011
          type: string
        bucketCode:
          description: >-
            Delinquency bucket the loan falls into (one of current, 1_30, 31_60,
            61_90, 91_plus, par30, par60, par90).
          examples:
            - '31_60'
          type: string
        daysOverdue:
          description: >-
            Number of days past the earliest unpaid due date as of the business
            date.
          examples:
            - 45
          format: int64
          type: integer
        earliestUnpaidDueDate:
          description: >-
            Due date of the oldest unpaid installment driving the delinquency
            (RFC3339, UTC).
          examples:
            - '2026-06-14T12:00:00Z'
          format: date-time
          type: string
        exposureAmount:
          description: >-
            Outstanding exposure on this loan (decimal string, two-decimal
            scale).
          examples:
            - '12500.00'
          type: string
        loanId:
          description: Loan account identifier (UUID) for this delinquent row.
          examples:
            - 550e8400-e29b-41d4-a716-446655440010
          type: string
        productId:
          description: Loan product identifier (UUID) the loan was originated under.
          examples:
            - 550e8400-e29b-41d4-a716-446655440013
          type: string
        productVersionId:
          description: Loan product version identifier (UUID) governing this loan's terms.
          examples:
            - 550e8400-e29b-41d4-a716-446655440014
          type: string
      required:
        - loanId
        - borrowerId
        - assignedOfficerId
        - assignedOfficerName
        - productId
        - productVersionId
        - bucketCode
        - daysOverdue
        - earliestUnpaidDueDate
        - exposureAmount
      type: object
    DashboardFreshnessHuma:
      additionalProperties: false
      properties:
        generatedAt:
          description: Timestamp when the snapshot was generated (RFC3339, UTC).
          examples:
            - '2026-06-14T12:00:00Z'
          format: date-time
          type: string
        isStale:
          description: True when the snapshot is older than the freshness policy allows.
          type: boolean
        liveFallbackUsed:
          description: >-
            True when no usable snapshot existed and metrics were computed live
            as a fallback.
          type: boolean
        policyCode:
          description: Code of the freshness policy applied to evaluate staleness.
          type: string
        policyPersistedAt:
          description: >-
            Timestamp when the active freshness policy was last persisted
            (RFC3339, UTC).
          examples:
            - '2026-06-14T12:00:00Z'
          format: date-time
          type: string
        snapshotAsOfDate:
          description: Business date the source snapshot was computed for (RFC3339, UTC).
          examples:
            - '2026-06-14T12:00:00Z'
          format: date-time
          type: string
        snapshotId:
          description: >-
            Identifier (UUID) of the snapshot the metrics were read from; empty
            when served live.
          examples:
            - 550e8400-e29b-41d4-a716-446655440020
          type: string
        source:
          description: Origin of the metrics (e.g. snapshot vs. live computation).
          type: string
        stalenessReason:
          description: Explanation of why the data is considered stale; omitted when fresh.
          type: string
      required:
        - snapshotId
        - snapshotAsOfDate
        - generatedAt
        - source
        - liveFallbackUsed
        - isStale
        - policyCode
        - policyPersistedAt
      type: object
    DashboardSummaryHumaBody:
      additionalProperties: false
      properties:
        activeLoanCount:
          description: Number of active (non-closed) loans in the portfolio.
          examples:
            - 1240
          format: int64
          type: integer
        currentExposure:
          description: >-
            Outstanding exposure on non-delinquent (current) loans (decimal
            string, two-decimal scale).
          examples:
            - '1100000.00'
          type: string
        delinquentExposure:
          description: >-
            Outstanding exposure on delinquent loans (decimal string,
            two-decimal scale).
          examples:
            - '134567.89'
          type: string
        delinquentLoanCount:
          description: Number of active loans currently in a delinquent bucket.
          examples:
            - 86
          format: int64
          type: integer
        disbursementVolume:
          description: >-
            Principal disbursed over the period (decimal string, two-decimal
            scale).
          examples:
            - '250000.00'
          type: string
        outstandingExposure:
          description: >-
            Total outstanding principal balance across active loans (decimal
            string, two-decimal scale).
          examples:
            - '1234567.89'
          type: string
        par30:
          description: >-
            Portfolio-at-risk ratio for 30+ days overdue, as a decimal fraction
            string (e.g. 0.05 = 5%, two-decimal scale).
          examples:
            - '0.05'
          type: string
        par60:
          description: >-
            Portfolio-at-risk ratio for 60+ days overdue, as a decimal fraction
            string (e.g. 0.05 = 5%, two-decimal scale).
          examples:
            - '0.03'
          type: string
        par90:
          description: >-
            Portfolio-at-risk ratio for 90+ days overdue, as a decimal fraction
            string (e.g. 0.05 = 5%, two-decimal scale).
          examples:
            - '0.02'
          type: string
        repaymentVolume:
          description: >-
            Principal repaid over the period (decimal string, two-decimal
            scale).
          examples:
            - '180000.00'
          type: string
      required:
        - outstandingExposure
        - currentExposure
        - delinquentExposure
        - disbursementVolume
        - repaymentVolume
        - par30
        - par60
        - par90
        - activeLoanCount
        - delinquentLoanCount
      type: object
    DashboardTrendPointHuma:
      additionalProperties: false
      properties:
        asOfDate:
          description: >-
            Business date the trend point was computed for (RFC3339, UTC
            midnight).
          examples:
            - '2026-06-14T12:00:00Z'
          format: date-time
          type: string
        delinquentExposure:
          description: >-
            Outstanding exposure on delinquent loans for the month (decimal
            string, two-decimal scale).
          examples:
            - '134567.89'
          type: string
        delinquentLoanCount:
          description: Number of active loans in a delinquent bucket during the month.
          examples:
            - 86
          format: int64
          type: integer
        disbursementVolume:
          description: >-
            Principal disbursed during the month (decimal string, two-decimal
            scale).
          examples:
            - '250000.00'
          type: string
        month:
          description: Calendar month of the trend point in YYYY-MM format.
          examples:
            - 2026-06
          type: string
        outstandingExposure:
          description: >-
            Total outstanding principal balance for the month (decimal string,
            two-decimal scale).
          examples:
            - '1234567.89'
          type: string
        par30:
          description: >-
            Portfolio-at-risk ratio for 30+ days overdue, as a decimal fraction
            string (e.g. 0.05 = 5%, two-decimal scale).
          examples:
            - '0.05'
          type: string
        par60:
          description: >-
            Portfolio-at-risk ratio for 60+ days overdue, as a decimal fraction
            string (e.g. 0.05 = 5%, two-decimal scale).
          examples:
            - '0.03'
          type: string
        par90:
          description: >-
            Portfolio-at-risk ratio for 90+ days overdue, as a decimal fraction
            string (e.g. 0.05 = 5%, two-decimal scale).
          examples:
            - '0.02'
          type: string
        repaymentVolume:
          description: >-
            Principal repaid during the month (decimal string, two-decimal
            scale).
          examples:
            - '180000.00'
          type: string
      required:
        - month
        - asOfDate
        - outstandingExposure
        - delinquentExposure
        - disbursementVolume
        - repaymentVolume
        - par30
        - par60
        - par90
        - delinquentLoanCount
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````