> ## 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.

# Desembolsar solicitação de empréstimo

> Valida a elegibilidade para desembolso, dispara o pipeline de desembolso jurisdicional resolvido dentro da transação pai e move uma solicitação aprovada para desembolsada. Idempotente: o middleware da lib-commons impõe a detecção de replay por meio de X-Idempotency.



## OpenAPI

````yaml pt/openapi/v3-current/lender.yaml post /api/v1/loan-applications/{id}/disburse
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/loan-applications/{id}/disburse:
    post:
      tags:
        - LoanApplications
      summary: Desembolsar solicitação de empréstimo
      description: >-
        Valida a elegibilidade para desembolso, dispara o pipeline de desembolso
        jurisdicional resolvido dentro da transação pai e move uma solicitação
        aprovada para desembolsada. Idempotente: o middleware da lib-commons
        impõe a detecção de replay por meio de X-Idempotency.
      operationId: disburseLoanApplication
      parameters:
        - description: Loan application identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan application identifier.
            examples:
              - 3fa85f64-5717-4562-b3fc-2c963f66afa6
            format: uuid
            type: string
        - description: Canonical idempotency request ID (lib-commons enforcer reads this).
          in: header
          name: X-Idempotency
          required: true
          schema:
            description: >-
              Canonical idempotency request ID (lib-commons enforcer reads
              this).
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DisburseLoanApplicationHumaRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoanApplicationHumaBody'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Error
components:
  schemas:
    DisburseLoanApplicationHumaRequest:
      additionalProperties: false
      properties:
        currency:
          description: >-
            Optional ISO-4217 currency assertion (3 uppercase letters). When
            present it MUST equal the loan application's currency (a
            double-entry guard); a divergence is rejected with 422. When
            omitted, the loan's own currency is used.
          examples:
            - BRL
          maxLength: 3
          minLength: 3
          pattern: ^[A-Z]{3}$
          type: string
        disbursedAt:
          description: Disbursement timestamp (RFC3339).
          examples:
            - '2026-06-14T12:00:00Z'
          type: string
        grossRequestedAmount:
          description: >-
            Gross requested disbursement amount as a decimal string (e.g.
            "50000.00").
          examples:
            - '50000.00'
          type: string
        jurisdictionExtensions:
          additionalProperties: true
          description: >-
            Opaque per-jurisdiction disbursement payload, validated at the
            use-case layer.
          type: object
        loanAccountId:
          description: Loan account identifier (UUID).
          examples:
            - 7c9e6679-7425-40de-944b-e07fc1f90ae7
          type: string
        netDeliveredAmount:
          description: >-
            Net delivered disbursement amount as a decimal string (e.g.
            "49500.00").
          examples:
            - '49500.00'
          type: string
        originationFeeAmount:
          description: >-
            Optional per-disbursement IF origination fee as a decimal string,
            net-of-IOF (e.g. "250.00"). Cost metadata persisted for accrual (AC0
            = principal - fee); NOT a withholding and does not affect the Net =
            Gross - withholdings balance. Omitted or empty defaults to "0".
          examples:
            - '250.00'
          type: string
      required:
        - loanAccountId
        - grossRequestedAmount
        - netDeliveredAmount
        - disbursedAt
      type: object
    LoanApplicationHumaBody:
      additionalProperties: false
      properties:
        approvalDecision:
          $ref: '#/components/schemas/ApprovalDecisionHumaBody'
          description: >-
            Approval facts; present only when the application is approved or
            disbursed.
        assignedOfficerId:
          description: Authenticated officer who created the application (request subject).
          type: string
        borrowerId:
          description: Borrower identifier.
          type: string
        disbursementEvent:
          $ref: '#/components/schemas/DisbursementEventHumaBody'
          description: Disbursement facts; present only when the application is disbursed.
        expectedDisbursementDate:
          description: Expected disbursement date (RFC3339, UTC).
          examples:
            - '2026-06-14T12:00:00Z'
          type: string
        id:
          description: Loan application identifier (UUID).
          examples:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
          type: string
        loanProductVersionId:
          description: Loan product version this application was created against (UUID).
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        previewJurisdictionCode:
          description: ISO-2 jurisdiction code resolved at preview time.
          examples:
            - BR
          type: string
        previewProfileVersion:
          description: Jurisdiction profile version resolved at preview time.
          examples:
            - 1.0.0
          type: string
        previewScheduleSnapshotId:
          description: Preview schedule snapshot this application was created from (UUID).
          examples:
            - 6ba7b810-9dad-11d1-80b4-00c04fd430c8
          type: string
        rejectionDecision:
          $ref: '#/components/schemas/ReasonedDecisionHumaBody'
          description: Rejection facts; present only when the application is rejected.
        requestedInstallments:
          description: Number of installments requested.
          examples:
            - 24
          format: int64
          type: integer
        requestedInterestRate:
          description: >-
            Requested monthly interest rate as a decimal string, scale 8 (e.g.
            "0.00000100").
          examples:
            - '0.00000100'
          type: string
        requestedPrincipalAmount:
          description: >-
            Requested principal amount as a decimal string, minor-unit precision
            scale 2 (e.g. "50000.00").
          examples:
            - '50000.00'
          type: string
        status:
          description: >-
            Lifecycle status: one of pending_approval, approved, rejected,
            withdrawn, disbursed.
          examples:
            - pending_approval
          type: string
        withdrawalDecision:
          $ref: '#/components/schemas/ReasonedDecisionHumaBody'
          description: Withdrawal facts; present only when the application is withdrawn.
      required:
        - id
        - loanProductVersionId
        - borrowerId
        - assignedOfficerId
        - status
        - requestedPrincipalAmount
        - requestedInterestRate
        - requestedInstallments
        - expectedDisbursementDate
        - previewProfileVersion
        - previewJurisdictionCode
        - previewScheduleSnapshotId
      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
    ApprovalDecisionHumaBody:
      additionalProperties: false
      properties:
        approvedAmount:
          description: >-
            Approved amount as a decimal string, minor-unit precision scale 2
            (e.g. "48000.00").
          examples:
            - '48000.00'
          type: string
        decidedBy:
          description: Authenticated subject who approved the application.
          type: string
        decisionAt:
          description: Approval decision timestamp (RFC3339, UTC).
          examples:
            - '2026-06-14T12:00:00Z'
          type: string
        id:
          description: Approval decision identifier (UUID).
          examples:
            - 9f1c2d3e-4b5a-6789-abcd-ef0123456789
          type: string
        note:
          description: Optional approval note supplied by the deciding officer.
          type: string
      required:
        - id
        - approvedAmount
        - decisionAt
        - decidedBy
      type: object
    DisbursementEventHumaBody:
      additionalProperties: false
      properties:
        disbursedAt:
          description: Disbursement timestamp (RFC3339, UTC).
          examples:
            - '2026-06-14T12:00:00Z'
          type: string
        grossRequestedAmount:
          description: >-
            Gross requested disbursement amount as a decimal string, minor-unit
            precision scale 2 (e.g. "50000.00").
          examples:
            - '50000.00'
          type: string
        id:
          description: Disbursement event identifier (UUID).
          examples:
            - c3d4e5f6-a7b8-4901-acde-f01234567890
          type: string
        loanAccountId:
          description: Loan account credited by this disbursement (UUID).
          examples:
            - 7c9e6679-7425-40de-944b-e07fc1f90ae7
          type: string
        netDeliveredAmount:
          description: >-
            Net delivered disbursement amount as a decimal string, minor-unit
            precision scale 2 (e.g. "49500.00").
          examples:
            - '49500.00'
          type: string
        profileVersion:
          description: Jurisdiction profile version applied by the disbursement pipeline.
          examples:
            - 1.0.0
          type: string
      required:
        - id
        - loanAccountId
        - grossRequestedAmount
        - netDeliveredAmount
        - disbursedAt
        - profileVersion
      type: object
    ReasonedDecisionHumaBody:
      additionalProperties: false
      properties:
        decidedBy:
          description: Authenticated subject who recorded the decision.
          type: string
        decisionAt:
          description: Decision timestamp (RFC3339, UTC).
          examples:
            - '2026-06-14T12:00:00Z'
          type: string
        id:
          description: Decision identifier (UUID) for the rejection or withdrawal.
          examples:
            - b2c3d4e5-f6a7-4890-9bcd-ef0123456789
          type: string
        reason:
          description: Free-text reason for the rejection or withdrawal.
          type: string
      required:
        - id
        - decisionAt
        - decidedBy
        - reason
      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

````