components:
  schemas:
    AcceptAssignmentExceptionPaymentHumaInputBody:
      additionalProperties: false
      properties:
        disposition:
          description: Why the fund's short payment is taken as the lot's full payment, in the operator's own words.
          maxLength: 512
          minLength: 1
          type: string
      required:
        - disposition
      type: object
    AccountingPostingLegBody:
      additionalProperties: false
      properties:
        account:
          description: GL account for this leg.
          examples:
            - 1100-10-001
          type: string
        component:
          description: Open withholding component code (set XOR role).
          examples:
            - iof
          type: string
        nature:
          description: The account's own nature (debit or credit), as the chart declares it.
          enum:
            - debit
            - credit
          type: string
        optional:
          description: Whether the component amount may be absent or zero for a generated posting.
          type: boolean
        perOperation:
          description: Whether this leg books into a per-operation account (borrower position) rather than one aggregated per product.
          type: boolean
        role:
          description: Reserved economic role of this leg (set XOR component).
          enum:
            - principal
            - interest
            - iof
            - tax
            - cash
            - unapplied_cash
            - counterparty
            - suspense
          examples:
            - principal
          type: string
        side:
          description: Whether this leg debits or credits the account.
          enum:
            - debit
            - credit
          examples:
            - debit
          type: string
      required:
        - account
        - side
        - optional
        - perOperation
        - nature
      type: object
    AccountingPostingRuleHumaBody:
      additionalProperties: false
      properties:
        eventType:
          description: Accounting event type, one of the values the request body admits.
          examples:
            - disbursement
          type: string
        legs:
          description: Persisted ordered posting legs.
          items:
            $ref: "#/components/schemas/AccountingPostingLegBody"
          type: array
        metadata:
          additionalProperties:
            type: string
          description: Optional metadata carried with the rule.
          type: object
      required:
        - eventType
        - legs
        - metadata
      type: object
    AccountingProfileHumaBody:
      additionalProperties: false
      properties:
        accountingMode:
          description: Accounting recognition mode (accrual).
          examples:
            - accrual
          type: string
        createdAt:
          description: Creation timestamp (RFC3339, UTC).
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        effectiveFrom:
          description: "First civil day (YYYY-MM-DD) this chart of accounts governs, always a month start. A posting books on the chart that holds the contract's balance: the one in force on the day the contract opened, until a chart change's transfer moves the contract onto the new chart. A version configured before dated configuration reads 1900-01-01, because it was the only chart that version ever had."
          examples:
            - "1900-01-01"
          type: string
        id:
          description: Server-assigned accounting profile identifier (uuid).
          examples:
            - 550e8400-e29b-41d4-a716-446655440003
          type: string
        loanProductVersionId:
          description: Loan product version this profile is configured for (uuid).
          examples:
            - 550e8400-e29b-41d4-a716-446655440001
          type: string
        midazLedgerId:
          description: "Midaz ledger this chart's postings book into: the one the request named, or the one Lender chose when the request named only the organization. Absent when midazOrganizationId is absent."
          examples:
            - ledger-def
          type: string
        midazOrganizationId:
          description: Midaz organization this chart's postings book into. Absent on a single-tenant chart that falls back to the env default.
          examples:
            - org-abc
          type: string
        postingRules:
          description: Persisted GL account mappings, one per accounting event.
          items:
            $ref: "#/components/schemas/AccountingPostingRuleHumaBody"
          type:
            - array
            - "null"
      required:
        - id
        - loanProductVersionId
        - accountingMode
        - postingRules
        - effectiveFrom
        - createdAt
      type: object
    AccountingProfileListHumaBody:
      additionalProperties: false
      properties:
        data:
          description: Page of posting configurations, newest first; always present, empty slice when none match.
          items:
            $ref: "#/components/schemas/AccountingProfileReadHumaBody"
          type:
            - array
            - "null"
      required:
        - data
      type: object
    AccountingProfileReadHumaBody:
      additionalProperties: false
      properties:
        accountingMode:
          description: How the product recognizes accounting events; always accrual.
          examples:
            - accrual
          type: string
        createdAt:
          description: "Creation timestamp (RFC3339, UTC). NOT the day the chart takes force: a chart created in March to govern from July is created before, and governs after, one created in May that governs from June."
          examples:
            - "2026-06-14T03:00:00Z"
          type: string
        effectiveFrom:
          description: "First civil day (YYYY-MM-DD) this chart governs, always a month start. The chart in force on a day is the one with the greatest effectiveFrom at or below it. A posting books on the chart that holds the contract's balance: the one in force on the day the contract opened, until a chart change's transfer moves the contract onto the new chart. Charts predating dated configuration read 1900-01-01, because each was the only chart its version ever had."
          examples:
            - "2026-07-01"
          type: string
        eventTypes:
          description: The business events this profile has a posting rule for, in rule order; always present, empty when none. A product version missing the event you expect is configured but will not post it.
          items:
            type: string
          type:
            - array
            - "null"
        id:
          description: Accounting profile identifier (uuid).
          examples:
            - 550e8400-e29b-41d4-a716-446655440004
          type: string
        loanProductVersionId:
          description: Loan product version (uuid) this chart configures. A version owns a chain of charts ordered by effectiveFrom.
          examples:
            - 550e8400-e29b-41d4-a716-446655440005
          type: string
        missingEventTypes:
          description: "The REQUIRED business events this profile has no posting rule for; always present, empty when the profile is complete. Creation refuses an incomplete profile today, so a non-empty list means a profile predating that rule: it will silently skip the ledger postings for the events named here. Optional events (tax, assignment, refinance) are never listed."
          items:
            type: string
          type:
            - array
            - "null"
        postingRuleCount:
          description: How many posting rules the profile holds. Zero means the profile exists but posts nothing.
          examples:
            - 2
          format: int64
          type: integer
      required:
        - id
        - loanProductVersionId
        - accountingMode
        - postingRuleCount
        - eventTypes
        - missingEventTypes
        - effectiveFrom
        - createdAt
      type: object
    AccrualRetryUnpostableHumaBody:
      additionalProperties: false
      properties:
        itemId:
          description: UUID of the accrual run item that was not re-sent.
          examples:
            - 550e8400-e29b-41d4-a716-446655440006
          type: string
        reason:
          description: "Why it was not re-sent. \"already_delivered\": the posting reached the broker and the ledger's acknowledgement is what is missing, so chase the acknowledgement rather than the posting. \"quarantined\": the posting intent is terminal on the outbox and no retry re-drives it. \"contract_not_found\": the contract carries no loan application, so the currency and product version the posting needs cannot be read. \"product_misconfigured\": the product version has no accounting profile, no rule for this event, or an amount its leg template refuses."
          enum:
            - already_delivered
            - quarantined
            - contract_not_found
            - product_misconfigured
          examples:
            - quarantined
          type: string
      required:
        - itemId
        - reason
      type: object
    AccrualRunHumaBody:
      additionalProperties: false
      properties:
        businessDate:
          description: Business date (YYYY-MM-DD, UTC) the run was queued for.
          examples:
            - "2026-06-14"
          type: string
        correlationId:
          description: Correlation identifier linking the run to its journal/outbox lineage and downstream events.
          examples:
            - 550e8400-e29b-41d4-a716-446655440002
          type: string
        id:
          description: Server-assigned UUID of the queued accrual run.
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        journalReferenceId:
          description: UUID of the journal reference recording this run's posting lineage.
          examples:
            - 550e8400-e29b-41d4-a716-446655440001
          type: string
        outboxEventId:
          description: UUID of the emitted outbox event; omitted when no outbox event was recorded.
          examples:
            - 550e8400-e29b-41d4-a716-446655440003
          type: string
        status:
          description: Lifecycle status of the queued run (e.g. queued).
          examples:
            - queued
          type: string
      required:
        - id
        - businessDate
        - status
        - journalReferenceId
        - correlationId
      type: object
    AccrualRunItemListHumaBody:
      additionalProperties: false
      properties:
        data:
          description: Page of the run's recognitions, newest first; always present, empty slice when none match.
          items:
            $ref: "#/components/schemas/AccrualRunItemReadHumaBody"
          type:
            - array
            - "null"
      required:
        - data
      type: object
    AccrualRunItemReadHumaBody:
      additionalProperties: false
      properties:
        businessDate:
          description: Business date of the run that produced the recognition (YYYY-MM-DD, UTC). Absent on a withheld month.
          examples:
            - "2026-06-14"
          type: string
        competencia:
          description: Accounting month the decision belongs to (YYYY-MM).
          examples:
            - 2026-05
          type: string
        createdAt:
          description: When the decision was recorded (RFC3339, UTC).
          examples:
            - "2026-06-14T03:00:00Z"
          type: string
        id:
          description: Accrual run item identifier (uuid). Absent when the month was withheld, because no recognition exists.
          examples:
            - 550e8400-e29b-41d4-a716-446655440002
          type: string
        interestAmount:
          description: Amount the item books, never negative (the kind carries the sign), as a fixed two-decimal string. A string, never a number, so no consumer can round it through a float. ABSENT, not zero, on a withheld month.
          examples:
            - "102895.88"
          type: string
        kind:
          description: "What the item books, its sign carried by the kind: interest, repriced_interest, fee_amortization and adjustment_unwind_loss add to revenue; repriced_interest_reversal, fee_amortization_reversal and adjustment_unwind_gain take from it; pis_cofins is the revenue tax and pis_cofins_reversal gives it back. Absent on a withheld month."
          examples:
            - interest
          type: string
        loanAccountId:
          description: Loan account (uuid) the decision was taken on.
          examples:
            - 550e8400-e29b-41d4-a716-446655440003
          type: string
        loanProductId:
          description: Loan product (uuid); omitted when the run did not record one.
          type: string
        loanProductVersionId:
          description: Loan product version (uuid); omitted when the run did not record one.
          type: string
        outboxEventId:
          description: Outbox event (uuid) this recognition enqueued; omitted when none was recorded.
          type: string
        outcome:
          description: "Where this month's income went: recognized into P&L, or suspended and withheld (Res. CMN 4.966 art. 17)."
          enum:
            - recognized
            - suspended
          examples:
            - recognized
          type: string
        postingStatus:
          description: State of this item's downstream ledger posting. Absent on a withheld month.
          examples:
            - pending
          type: string
        runId:
          description: "Identifier (uuid) of the run that booked this row's recognition, or, for a withheld month, of the run that CLAIMED this competência. On a re-run it differs from the run in the path: the month was closed by an earlier run."
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        suspendedAccruedAmount:
          description: Income accrued but withheld for this contract, as a fixed two-decimal string. Present only when a suspended balance exists.
          examples:
            - "950.00"
          type: string
        suspendedRecognizedAmount:
          description: Previously withheld income since recognized, as a fixed two-decimal string. Present only when a suspended balance exists.
          examples:
            - "0.00"
          type: string
      required:
        - outcome
        - runId
        - loanAccountId
        - competencia
        - createdAt
      type: object
    AccrualRunListHumaBody:
      additionalProperties: false
      properties:
        data:
          description: Page of accrual runs, newest first; always present, empty slice when none match.
          items:
            $ref: "#/components/schemas/AccrualRunReadHumaBody"
          type:
            - array
            - "null"
      required:
        - data
      type: object
    AccrualRunReadHumaBody:
      additionalProperties: false
      properties:
        businessDate:
          description: Business date the run was executed for (YYYY-MM-DD, UTC).
          examples:
            - "2026-06-14"
          type: string
        correlationId:
          description: "Correlation identifier linking the run to its journal lineage and downstream events. Not unique: several runs can share one."
          examples:
            - accrual-run-2026-05-31
          type: string
        createdAt:
          description: Creation timestamp (RFC3339, UTC).
          examples:
            - "2026-06-14T03:00:00Z"
          type: string
        externalJournalReferenceId:
          description: "Always omitted on a run: a run emits one posting per contract per competência per kind, so no single ledger transaction identifies it. The ledger's identifier is per posting — resolve one through GET /api/v1/journal-references with that posting's correlation identifier."
          type: string
        id:
          description: Accrual run identifier (uuid).
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        journalReferenceId:
          description: Journal reference (uuid) recording this run's posting lineage.
          examples:
            - 550e8400-e29b-41d4-a716-446655440001
          type: string
        postingStatus:
          description: State of the downstream ledger posting. "pending" means the ledger has not confirmed it, "posted" means it accepted it, "no_items" means the run recognized nothing so nothing was sent.
          examples:
            - pending
          type: string
        status:
          description: Lifecycle status of the run.
          examples:
            - queued
          type: string
        updatedAt:
          description: Last update timestamp (RFC3339, UTC).
          examples:
            - "2026-06-14T03:05:00Z"
          type: string
      required:
        - id
        - businessDate
        - status
        - correlationId
        - journalReferenceId
        - postingStatus
        - createdAt
        - updatedAt
      type: object
    AccrualRunRetryHumaBody:
      additionalProperties: false
      properties:
        id:
          description: UUID of the accrual run this retry acted on. A retry is a new attempt on that run, not a new run, so it equals retriedRunId.
          examples:
            - 550e8400-e29b-41d4-a716-446655440005
          type: string
        itemIds:
          description: "UUIDs of the accrual run items actually re-sent. This is never an echo of the request: items already acknowledged by the ledger are excluded, and so is any item this retry could not send — those appear in unpostableItems."
          items:
            type: string
          type:
            - array
            - "null"
        retriedRunId:
          description: UUID of the accrual run whose recognitions were retried.
          examples:
            - 550e8400-e29b-41d4-a716-446655440005
          type: string
        status:
          description: "\"queued\" when at least one recognition was re-sent and is waiting for the ledger; \"nothing_to_retry\" when the ledger had already acknowledged every selected recognition, which is a success and not an error; \"blocked\" when recognitions the ledger has NOT acknowledged exist and none of them could be re-sent — money is still outside the ledger and unpostableItems says why."
          examples:
            - queued
          type: string
        unpostableItems:
          description: Accrual run items the ledger has not acknowledged and this retry could NOT send, with the reason for each. A non-empty list means money is still outside the ledger and pressing retry again will not change it on its own.
          items:
            $ref: "#/components/schemas/AccrualRetryUnpostableHumaBody"
          type:
            - array
            - "null"
      required:
        - id
        - retriedRunId
        - status
        - itemIds
      type: object
    ActOnAssignmentIntegrationCaseHumaInputBody:
      additionalProperties: false
      properties:
        disposition:
          description: Why the item is resent or how it was delivered, in the operator's own words.
          maxLength: 512
          minLength: 1
          type: string
      required:
        - disposition
      type: object
    ActivateLoanProductHumaInputBody:
      additionalProperties: false
      properties:
        versionId:
          description: Loan product version to pin on activation.
          examples:
            - 550e8400-e29b-41d4-a716-446655440001
          format: uuid
          type: string
      required:
        - versionId
      type: object
    ActiveLoanAccountHumaBody:
      additionalProperties: false
      properties:
        assignedOfficerId:
          description: "Identifier of the loan officer assigned to service this account, or empty on a system-originated contract, which has no human officer. Whatever the identity provider issues as the subject: not necessarily a UUID."
          examples:
            - officer-xyz
          type: string
        borrowerId:
          description: Identifier (UUID) of the borrower who holds this account.
          examples:
            - 550e8400-e29b-41d4-a716-446655440002
          format: uuid
          type: string
        disbursementDate:
          description: ISO-8601 date of fund disbursement; omitted until disbursed.
          examples:
            - "2026-06-14"
          type: string
        jurisdictionCode:
          description: ISO 3166-1 jurisdiction code the account operates under (e.g. BR).
          examples:
            - BR
          type: string
        lifecycleState:
          description: "Where the contract stands, as a durable recorded fact. active: no terminal fact closes the account — including one that was closed and later reopened by a repurchase or by undoing a refinance. settled: the borrower discharged the debt. ceded: the receivable was sold and left this balance sheet. ported: the contract moved to another institution. reversed: a refinance the rail undid inside its regret window. renegotiated: a substantial renegotiation replaced this contract and the debt is carried on the new account it opened. written_off: the institution wrote the contract off as a credit loss (Res. CMN 4.966 art. 49); irreversible. Only settled means the borrower discharged the debt — do not label any of the other five as one, and do not read any of them as a statement about whether payments were made on time, which is paymentHealth. Always present."
          enum:
            - active
            - settled
            - ceded
            - ported
            - reversed
            - renegotiated
            - written_off
          examples:
            - active
          type: string
        loanAccountId:
          description: Loan account UUID.
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        loanApplicationId:
          description: Originating loan application UUID.
          examples:
            - 550e8400-e29b-41d4-a716-446655440001
          type: string
        openBalance:
          description: "Total balance THIS institution carries on the contract, including fees and penalties (2 d.p. string). Governed by the same rule as principalBalance and paymentHealth: zero once the credit risk has left this book."
          examples:
            - "1450.00"
          type: string
        partialPrepaymentAmortizationSupported:
          description: Whether this server accepts the explicit BR partial-prepayment quote amortization field; not an eligibility or authorization decision.
          type: boolean
        paymentHealth:
          $ref: "#/components/schemas/LoanAccountPaymentHealthHumaBody"
          description: "How the borrower is paying, derived when this response is built and stored nowhere. Assessed ONLY while lifecycleState is active: a live contract can be months overdue, and on a closed one state is 'unknown' rather than 'current', because the schedule copy a closed contract leaves behind is not a debt this book still carries."
        principalBalance:
          description: "Outstanding principal THIS institution carries on the contract (2 d.p. string). Zero once the credit risk has left this book — see paymentHealth for the rule — and zero is the number there rather than a placeholder: what this book carries on a receivable it sold is nothing. The contract's own history is unaffected; the schedule, transactions and charges still answer it."
          examples:
            - "1234.56"
          type: string
        profileVersion:
          description: Product profile version applied to this account.
          examples:
            - 1.0.0
          type: string
        replacementLoanAccountId:
          description: "Present only when lifecycleState is renegotiated: the loan account a substantial renegotiation (Res. CMN 4.966 art. 22) opened in place of this one, which now carries the debt. Nothing was paid on this contract's last schedule; the debt moved to the replacement."
          examples:
            - 550e8400-e29b-41d4-a716-446655440040
          format: uuid
          type: string
        restructuring:
          $ref: "#/components/schemas/RestructuringClassHumaBody"
          description: The restructuring class recorded with this account's latest servicing renegotiation; omitted when none recorded one, which includes every renegotiation made before this capture existed. After a substantial renegotiation it sits on the account that was replaced. A consignado refinance records its class on the refinance lineage, not here.
        status:
          description: Account lifecycle status (e.g. active, closed, in_arrears).
          examples:
            - active
          type: string
      required:
        - loanAccountId
        - loanApplicationId
        - status
        - principalBalance
        - openBalance
        - profileVersion
        - jurisdictionCode
        - borrowerId
        - assignedOfficerId
        - lifecycleState
        - paymentHealth
      type: object
    ActiveLoanChargeHumaBody:
      additionalProperties: false
      properties:
        amount:
          description: Charge amount (2 d.p. string).
          examples:
            - "25.00"
          type: string
        assessedAt:
          description: RFC 3339 timestamp when the charge was assessed.
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        billedDueDate:
          description: ISO-8601 due date of the instalment the charge is billed on. Absent with billedInstallmentNumber.
          examples:
            - "2026-07-15"
          type: string
        billedInstallmentNumber:
          description: Instalment the charge is billed on. Absent on a charge recorded before charges were billed.
          examples:
            - 3
          format: int64
          type: integer
        chargeId:
          description: Unique identifier of this assessed charge.
          examples:
            - 550e8400-e29b-41d4-a716-446655440020
          type: string
        chargeType:
          description: Type of charge (e.g. late_fee, origination_fee).
          examples:
            - late_fee
          type: string
        status:
          description: "Charge status. Always assessed: every charge this read lists was levied on the contract."
          examples:
            - assessed
          type: string
      required:
        - chargeId
        - chargeType
        - amount
        - status
        - assessedAt
      type: object
    ActiveLoanChargesHumaBody:
      additionalProperties: false
      properties:
        data:
          description: Assessed loan charges.
          items:
            $ref: "#/components/schemas/ActiveLoanChargeHumaBody"
          type:
            - array
            - "null"
      required:
        - data
      type: object
    ActiveLoanScheduleEntryHumaBody:
      additionalProperties: false
      properties:
        dueDate:
          description: ISO-8601 installment due date.
          examples:
            - "2026-06-14"
          type: string
        feesAmount:
          description: Fees component (2 d.p. string).
          examples:
            - "1.50"
          type: string
        installmentNumber:
          description: 1-based installment sequence number.
          examples:
            - 3
          format: int64
          type: integer
        interestAmount:
          description: Interest component (2 d.p. string).
          examples:
            - "12.34"
          type: string
        penaltiesAmount:
          description: Penalties component (2 d.p. string).
          examples:
            - "0.00"
          type: string
        prepaidPresentValue:
          description: "Set when a standing payment covers this instalment ahead of the schedule: it closes on its due date at this present value, from the payment's held overpayment (2 d.p. string). Omitted otherwise."
          examples:
            - "507.27"
          type: string
        principalAmount:
          description: Principal component (2 d.p. string).
          examples:
            - "100.00"
          type: string
        status:
          description: "scheduled: something is still owed and the due date has not passed; a row due today is scheduled. paid: nothing is left to pay on it. overdue: the due date has passed with something still owed, a partial payment included, counted in the contract's own civil calendar. It is the rule paymentHealth applies, so the oldest overdue row's due date is the day paymentHealth.daysOverdue counts from. No row is overdue while paymentHealth.state is unknown (no minted schedule, or a contract no longer on this book): rows keep scheduled or paid."
          enum:
            - scheduled
            - paid
            - overdue
          examples:
            - scheduled
          type: string
        totalAmount:
          description: Total installment amount (2 d.p. string).
          examples:
            - "113.84"
          type: string
      required:
        - installmentNumber
        - dueDate
        - principalAmount
        - interestAmount
        - feesAmount
        - penaltiesAmount
        - totalAmount
        - status
      type: object
    ActiveLoanScheduleHumaBody:
      additionalProperties: false
      properties:
        data:
          description: Installment schedule entries ordered by installment number.
          items:
            $ref: "#/components/schemas/ActiveLoanScheduleEntryHumaBody"
          type:
            - array
            - "null"
        jurisdictionCode:
          description: ISO 3166-1 jurisdiction code the account operates under (e.g. BR).
          examples:
            - BR
          type: string
        prepayment:
          $ref: "#/components/schemas/PrepaymentOfferHumaBody"
          description: "The automatic prepayment offer of the day: a payment on asOf of at least presentValue closes the instalment at its present value on its due date. Omitted when the product version takes prepayments through the desk, the contract is consignado, nothing is left to fall due, an instalment due on or before asOf still owes something, the next instalment is already covered, or its discount rounds to less than a cent."
        profileVersion:
          description: Product profile version applied to this account.
          examples:
            - 1.0.0
          type: string
      required:
        - data
        - profileVersion
        - jurisdictionCode
      type: object
    ActiveLoanTransactionHumaBody:
      additionalProperties: false
      properties:
        allocationLines:
          description: Per-installment allocation breakdown.
          items:
            $ref: "#/components/schemas/RepaymentAllocationHumaEntry"
          type:
            - array
            - "null"
        createdAt:
          description: RFC 3339 creation timestamp.
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        effectiveDate:
          description: ISO-8601 effective date.
          examples:
            - "2026-06-14"
          type: string
        fromUnappliedCash:
          description: "True when this repayment was paid from cash the borrower paid earlier and the contract held as unapplied: a due instalment settled on its due day, or the debt the held cash paid when the contract was written off. No new cash entered with it."
          examples:
            - false
          type: boolean
        originalTransactionId:
          description: Identifier of the transaction being reversed; present only when transactionType is reversal.
          examples:
            - 550e8400-e29b-41d4-a716-446655440012
          type: string
        overpaymentAmount:
          description: "Part of the payment that no instalment due on or before the effective date absorbed (2 d.p. string). It is not an excess over the whole balance: instalments due later take none of the payment, so paying ahead of the schedule lands here."
          examples:
            - "0.00"
          type: string
        paidAmount:
          description: Amount applied to the loan (2 d.p. string).
          examples:
            - "113.84"
          type: string
        prepaymentDiscount:
          description: "True when this row is the discount an automatic prepayment took off the instalment on its due day: interest the borrower no longer owes, with no cash."
          examples:
            - false
          type: boolean
        requestId:
          description: Idempotency key of the API request that recorded this row, which its ledger postings carry as requestId. A row Lender records on its own, including the arrears a partial prepayment pays first, shows an internal reference that its postings never carry; omitted when the row has none.
          examples:
            - 550e8400-e29b-41d4-a716-446655440011
          type: string
        transactionId:
          description: Unique identifier of this repayment transaction.
          examples:
            - 550e8400-e29b-41d4-a716-446655440010
          type: string
        transactionType:
          description: Type of transaction (e.g. repayment, reversal).
          examples:
            - repayment
          type: string
      required:
        - transactionId
        - transactionType
        - paidAmount
        - overpaymentAmount
        - effectiveDate
        - createdAt
        - fromUnappliedCash
        - prepaymentDiscount
        - allocationLines
      type: object
    ActiveLoanTransactionsHumaBody:
      additionalProperties: false
      properties:
        data:
          description: Recorded repayment transactions.
          items:
            $ref: "#/components/schemas/ActiveLoanTransactionHumaBody"
          type:
            - array
            - "null"
      required:
        - data
      type: object
    AppendRateTablePeriodHumaInputBody:
      additionalProperties: false
      properties:
        annualRateBps:
          description: Reference annual rate for the period, basis points.
          examples:
            - 1075
          format: int64
          minimum: 0
          type: integer
        effectiveDate:
          description: "Date this rate takes effect, inclusive (RFC3339 or YYYY-MM-DD, UTC). Must be strictly after every period already on the curve: a curve is append-only in time and never restates a rate that was already in force."
          examples:
            - "2026-03-01"
          type: string
      required:
        - effectiveDate
        - annualRateBps
      type: object
    ApplyLoanChargeHumaInputBody:
      additionalProperties: false
      properties:
        accountCreatedAt:
          description: "Loan account creation instant (RFC 3339). A bare calendar date is refused with LENDER-0103: this value is compared for exact equality against the stored account fact."
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        chargeEffectiveAt:
          description: "RFC 3339 instant the charge was levied. A bare calendar date is refused with LENDER-0103: this value is the moment a fee was assessed and it also decides which charge template was in force. Omit it and Lender stamps the tenant's business now."
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        chargeTemplateId:
          description: Charge template identifier.
          type: string
        loanAccountId:
          description: Loan account identifier.
          examples:
            - 550e8400-e29b-41d4-a716-446655440005
          format: uuid
          type: string
        productVersionId:
          description: Product version identifier.
          examples:
            - 550e8400-e29b-41d4-a716-446655440001
          format: uuid
          type: string
      required:
        - loanAccountId
        - productVersionId
        - chargeTemplateId
      type: object
    ApplyPDDStageTransitionHumaBody:
      additionalProperties: false
      properties:
        businessDate:
          description: Business date (YYYY-MM-DD or RFC3339).
          examples:
            - "2026-06-14"
          type: string
        effectiveAt:
          description: Effective timestamp (RFC3339 or YYYY-MM-DD).
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        idempotencyKey:
          description: Client-supplied idempotency key; deduplicated at the persistence layer.
          maxLength: 128
          type: string
        jurisdictionCode:
          description: Jurisdiction code.
          examples:
            - BR
          maxLength: 8
          type: string
        profileVersion:
          description: Jurisdiction profile version.
          examples:
            - 1.0.0
          maxLength: 64
          type: string
        reason:
          description: Reason for the transition or cure.
          maxLength: 512
          type: string
        toStage:
          description: Target PDD stage.
          enum:
            - current
            - stage_1
            - stage_2
            - stage_3
          examples:
            - stage_1
          type: string
        triggeredBy:
          description: Actor recorded ONLY on a deployment with authentication disabled. When the request carries a validated identity, that subject is recorded and this field is ignored.
          maxLength: 128
          type: string
      required:
        - toStage
        - effectiveAt
        - businessDate
      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
    ApproveLoanApplicationHumaRequest:
      additionalProperties: false
      properties:
        approvedAmount:
          description: Approved amount as a decimal string (e.g. "48000.00"). For a direct (lender_direct) application, bounded, inclusive, by the loan product version's principal limits when it declares them (LENDER-0250).
          examples:
            - "48000.00"
          type: string
        decisionAt:
          description: Decision timestamp (RFC3339). Omit it and Lender stamps the tenant's business now.
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        note:
          description: Optional approval note.
          type: string
      required:
        - approvedAmount
      type: object
    ArchiveLoanProductHumaInputBody:
      additionalProperties: false
      properties:
        archived:
          description: true archives the product; false unarchives it.
          examples:
            - true
          type: boolean
      required:
        - archived
      type: object
    AssignContractDivergenceHumaRequest:
      additionalProperties: false
      properties:
        assignee:
          description: Operator now responsible for the item.
          maxLength: 255
          minLength: 1
          type: string
        expectedVersion:
          description: "Compare-and-swap guard: the version this request was read against."
          format: int64
          minimum: 1
          type: integer
      required:
        - assignee
        - expectedVersion
      type: object
    AssignmentAcceptanceHumaBody:
      additionalProperties: false
      properties:
        acceptedAt:
          description: "When the administrator says the acceptance happened (RFC3339). It is EVIDENCE, not the lifecycle clock: the fact's own instant stays the moment the confirmation reached us, so nothing a counterparty sends can backdate a write-off."
          format: date-time
          type: string
        acceptedBy:
          description: The ADMINISTRATOR's own identity for whoever accepted. It never substitutes for our validated actor, which is recorded beside it.
          maxLength: 256
          type: string
        assignmentSetId:
          description: The set the administrator accepted. Must match the set on the route.
          format: uuid
          type: string
        receivableRefs:
          description: "The receivables the administrator accepted. An acatamento always names them: 'the whole set' is a convenience our own operators may use, never a claim inferred on an administrator's behalf."
          items:
            type: string
          maxItems: 500
          minItems: 1
          type:
            - array
            - "null"
        transferReference:
          description: "The ADMINISTRATOR's own reference for this acatamento — its batch protocol, its file id, whatever it can be quoted back by. One reference for the whole document under both regimes: an administrator does not move titles at a registradora and has no per-title protocol to give. Where a registradora governs, each receivable's fact row also carries OUR confirmed per-title protocol beside this one."
          maxLength: 256
          type: string
      required:
        - assignmentSetId
        - receivableRefs
        - acceptedBy
        - acceptedAt
        - transferReference
      type: object
    AssignmentCandidateHumaBody:
      additionalProperties: false
      properties:
        borrowerRef:
          description: Opaque debtor key the fund's per-debtor limit aggregates by. Never a document number.
          type: string
        currency:
          description: ISO currency code of exposureAmount.
          type: string
        cutCount:
          description: How many times THIS fund has already cut this receivable in its remessa.
          format: int64
          type: integer
        eligible:
          description: Whether this receivable may enter an assignment set for this fund.
          type: boolean
        exposureAmount:
          description: Outstanding exposure (latest canonical debt-balance revision), decimal string, scale 2.
          type: string
        paymentSourceRef:
          description: Opaque key of the receivable's payment source — the party the instalment is collected through — that the fund's payment-source limit aggregates by. Which party that is belongs to the jurisdiction, and this contract never names it.
          type: string
        reason:
          description: Empty when eligible. Otherwise exactly one of the core reasons — borrower_concentration_cap, payment_source_limit, assignor_limit, overdue, custody_incomplete, registration_not_active, already_in_active_set, repeated_cut_brake.
          type: string
        receivableRef:
          description: Receivable reference (the rail contract number).
          type: string
        requiresExceptionReview:
          description: True when the repeated-cut brake diverted this receivable to the exception queue instead of returning it to the pool.
          type: boolean
      required:
        - receivableRef
        - borrowerRef
        - paymentSourceRef
        - exposureAmount
        - currency
        - eligible
        - reason
        - cutCount
        - requiresExceptionReview
      type: object
    AssignmentCandidatesHumaBody:
      additionalProperties: false
      properties:
        concentrationBase:
          description: "Denominator the surviving composition was measured against: the fund's accepted stock plus the admitted set."
          type: string
        currency:
          description: ISO currency code every amount in this response is denominated in.
          type: string
        data:
          description: One verdict per candidate, in receivable-reference order. Always present, empty slice when the pool is empty.
          items:
            $ref: "#/components/schemas/AssignmentCandidateHumaBody"
          type:
            - array
            - "null"
        dimensionsNotEvaluated:
          description: "Concentration dimensions this scoring did not measure: borrower, payment_source or assignor when the fund registered no limit for it (all three under eligibility mode none), assignor also when the composition carries no per-receivable assignor, and sector always (no data source)."
          items:
            type: string
          type:
            - array
            - "null"
        eligibilityMode:
          description: "full (our verification is authoritative), prefilter (the administrator verifies; this runs ahead of the offer file) or none (the client checks eligibility at the fund: only the ledger's integrity rules and a registered repeated-cut brake run here)."
          type: string
        eligibleCount:
          description: How many receivables survived every rule.
          format: int64
          type: integer
        eligibleExposure:
          description: Total exposure of the surviving composition, decimal string, scale 2.
          type: string
        fundId:
          description: Fund registration the pool was scored for.
          type: string
        observedAt:
          description: Instant the pool was read (RFC3339, UTC).
          type: string
        poolStateObserved:
          description: False when the fund's accepted stock, in-flight set membership and repeated-cut tally could not be read. In that state the caps were measured against the proposed set alone and the exclusivity and repeated-cut fences were NOT evaluated.
          type: boolean
        ruleVersion:
          description: Identifier of the eligibility/concentration rule that produced these verdicts.
          type: string
        truncated:
          description: True when more assignable receivables exist than the requested window. Verdicts are computed OVER the returned window as the proposed set.
          type: boolean
      required:
        - fundId
        - eligibilityMode
        - ruleVersion
        - observedAt
        - truncated
        - currency
        - eligibleCount
        - eligibleExposure
        - concentrationBase
        - poolStateObserved
        - dimensionsNotEvaluated
        - data
      type: object
    AssignmentExceptionHumaBody:
      additionalProperties: false
      properties:
        assignmentFundId:
          description: The fund it was offered to.
          type: string
        assignmentSetId:
          description: The set this case happened to.
          type: string
        caseType:
          description: "What happened: repeated_cut, remessa_conflict, remessa_divergence, offer_sent_without_remessa (the fund returned no file within its window after the offer was sent), derecognition_unpostable (the receivable's product carries no write-off posting rule), derecognition_unvaluable (the receivable's carried figure cannot be read or cannot be trusted), derecognition_already_sold (another assignment set has already sold this receivable), derecognition_unsellable (the receivable is not this tenant's to sell: suspended, excluded, ported or already discharged), derecognition_contract_closed (the receivable's debt closed after approval; the detail names the cause), transfer_absent (the administrator accepted a receivable whose title movement no registradora ever confirmed), registry_command_unconfirmed (a title transfer commanded at the registradora that never came back settled), assigned_contract_passthrough, fund_payment_divergence (what the fund paid for the lot differs from what its paid lines are due beyond the lot's tolerance; the acceptance is held, and detail.fundPayment names the numbers, amountPaid net of what the desk refunded for lines taken out), integration_item_stuck (an integration item the orchestrator could not deliver; one case per set, receivable, destination, purpose and step), or one of the lifecycle orphans."
          type: string
        detail:
          description: "A JSON object with what a desk needs to act: the cut tally that tripped the brake, the two conflicting digests, the references that failed to reconcile. A case whose line was taken out of its lot carries removedLine: the line's frozen faceValue, assignmentPrice, discountAmount and currency, factsRecorded (paid, transferred) for how far the fund got with it, and refundToFund, what the exception desk settles with the fund for it: what the fund paid for the line less its share of the lot's accepted or tolerated difference. An integration_item_stuck case carries destination, purpose, step, itemStatus and attempts, with httpStatus, externalCode and fields when known, and once resolved by resend or delivered-outside, resolutionAction: resend or delivered_outside."
          type: string
        disposition:
          description: What they decided; resolved cases only.
          type: string
        id:
          description: Case identifier (uuid).
          type: string
        openedAt:
          description: UTC instant the case was opened (RFC3339).
          type: string
        receivableRef:
          description: The one receivable this case is about; empty when the case is about a whole file.
          type: string
        resolvedAt:
          description: UTC instant it was disposed of (RFC3339); resolved cases only.
          type: string
        resolvedBy:
          description: Validated identity that disposed of it; resolved cases only.
          type: string
        state:
          description: open or resolved.
          type: string
      required:
        - id
        - caseType
        - assignmentSetId
        - assignmentFundId
        - receivableRef
        - state
        - detail
        - openedAt
      type: object
    AssignmentExceptionListOutputBody:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: "#/components/schemas/AssignmentExceptionHumaBody"
          type:
            - array
            - "null"
      required:
        - items
      type: object
    AssignmentFundHumaBody:
      additionalProperties: false
      properties:
        administratorName:
          description: Fund administrator name.
          type: string
        administratorTaxId:
          description: Fund administrator registration identifier.
          type: string
        assignmentRate:
          description: Monthly effective cession rate as a decimal fraction string, scale 8 (e.g. "0.01750000").
          type: string
        assignorConcentrationLimit:
          description: "Concentration limit per assignor, as a decimal fraction string, scale 8. Null when the fund registered none: no per-assignor limit applies."
          type:
            - string
            - "null"
        borrowerConcentrationLimit:
          description: "Concentration limit per debtor, as a decimal fraction string, scale 8. Null when the fund registered none: no per-debtor limit applies."
          type:
            - string
            - "null"
        createdAt:
          description: Creation timestamp (RFC3339, UTC).
          type: string
        eligibilityMode:
          description: full (our verification is authoritative), prefilter (the administrator verifies; the same engine runs ahead of the offer file) or none (the client checks eligibility at the fund; only the ledger's integrity rules and a registered repeatedCutLimit run here).
          type: string
        excludeOverdue:
          description: Whether a receivable carrying an open arrear is cut. False when the fund registered no arrear policy.
          type: boolean
        excludeSuspendedRegistration:
          description: Whether a receivable whose registration is suspended at the rail is cut, at scoring and at approval. False when the fund registered no such policy.
          type: boolean
        fundName:
          description: Fund name.
          type: string
        fundTaxId:
          description: Fund registration identifier; the natural key of the registration within a tenant.
          type: string
        id:
          description: Fund registration identifier (uuid). Stable across configuration changes.
          type: string
        offerFileLayoutRef:
          description: "The custodian export layout: lerian-offer-v0, or reporter:<templateId> naming a Reporter template UUID in its canonical lowercase form."
          type: string
        offerSentToRemessaReceivedWindowSeconds:
          description: Orphan-detector window for "offer sent without return file", in seconds.
          format: int64
          type: integer
        paidToTransferredWindowSeconds:
          description: Orphan-detector window for "paid without transferred", in seconds.
          format: int64
          type: integer
        paymentSourceConcentrationLimit:
          description: "Concentration limit per payment source, as a decimal fraction string, scale 8 (e.g. \"0.15000000\"). Null when the fund registered none: no per-payment-source limit applies."
          type:
            - string
            - "null"
        paymentTolerance:
          description: How far what the fund pays for a lot may sit from the frozen prices of its paid lines before the acceptance is held, decimal string, scale 2. Frozen on each lot at assembly.
          type: string
        proposedRetainedFraction:
          description: "The retained fraction (share of the expected loss kept after the sale, 0 to 1) this fund PROPOSES for the cessions assembled against it, decimal string, scale 8. Only a proposal: each cession freezes its own fraction at assembly, so re-declaring the fund never re-classifies a sale already composed."
          type: string
        proposedRiskRetention:
          description: "PROPOSED, not frozen: the regime a cession taking this fund's proposal would derive against the institution's CURRENT threshold. substantial when proposedRetainedFraction is at or above it (such a cession is refused today, LENDER-0504), none below it. A composed cession's regime is on the set and never read from here."
          type: string
        proposesSellerRetainsControl:
          description: Whether this fund PROPOSES that the seller keeps control of what it sells (Res. CMN 4.966 art. 26 III). Only a proposal; a cession that ends up with true is refused (LENDER-0505).
          type: boolean
        registryProvider:
          description: Which registry governs this fund's cession. none means no registry governs it; any other value is a registry declared by one of this deployment's jurisdictions.
          type: string
        repeatedCutLimit:
          description: "How many times this fund may cut the same receivable before it stops returning to the pool automatically. Null when the fund registered no brake: a cut receivable always returns to the pool."
          format: int64
          type:
            - integer
            - "null"
        termMode:
          description: "Who produces the endorsement term. administrator_generated (the usual case): the administrator and the fund sign it outside the Lender; payment opens at the fund's return file and never waits for the term, and a signed PDF the operator receives may be recorded as optional evidence. lender_emitted: the Lender emits it from the fund's published template, and payment waits for it."
          type: string
        transferredToAcceptedWindowSeconds:
          description: Orphan-detector window for "transferred without accepted", in seconds.
          format: int64
          type: integer
        updatedAt:
          description: Last-update timestamp (RFC3339, UTC).
          type: string
      required:
        - id
        - administratorName
        - administratorTaxId
        - fundName
        - fundTaxId
        - termMode
        - eligibilityMode
        - borrowerConcentrationLimit
        - paymentSourceConcentrationLimit
        - assignorConcentrationLimit
        - excludeOverdue
        - excludeSuspendedRegistration
        - assignmentRate
        - repeatedCutLimit
        - offerFileLayoutRef
        - registryProvider
        - proposedRetainedFraction
        - proposesSellerRetainsControl
        - proposedRiskRetention
        - paidToTransferredWindowSeconds
        - transferredToAcceptedWindowSeconds
        - offerSentToRemessaReceivedWindowSeconds
        - paymentTolerance
        - createdAt
        - updatedAt
      type: object
    AssignmentFundListHumaBody:
      additionalProperties: false
      properties:
        data:
          description: Registered funds ordered by name; always present, empty slice when none exist.
          items:
            $ref: "#/components/schemas/AssignmentFundHumaBody"
          type:
            - array
            - "null"
      required:
        - data
      type: object
    AssignmentFundingPayoffHumaBody:
      additionalProperties: false
      properties:
        assignmentSetId:
          description: The cession whose obligation was ended.
          type: string
        borrowerPayoff:
          description: What the borrower paid to get out, decimal string, scale 2, echoed as the third reference.
          type: string
        currency:
          description: ISO-4217 code the obligation is denominated in.
          type: string
        expense:
          description: The agreed amount ABOVE the obligation, decimal string, scale 2. Financing cost taken in the period the cession ends in.
          type: string
        face:
          description: Sum of the instalments still owed, decimal string, scale 2. The ceiling the agreed amount may not cross.
          type: string
        fromState:
          description: The cession's state before this payoff.
          type: string
        gain:
          description: The agreed amount BELOW the obligation, decimal string, scale 2. Desagio that stops being appropriable. Exactly one of expense and gain is ever positive.
          type: string
        obligation:
          description: What the liability stood at on this date (Res. CMN 4.966 art. 29 para 1), decimal string, scale 2. After the payoff it is exactly zero.
          type: string
        periodsEnded:
          description: How many open periods of this receivable's ladder the payoff closed at once.
          format: int64
          type: integer
        receivableRef:
          description: The receivable that ended.
          type: string
        settlement:
          description: What the fund is owed at once, decimal string, scale 2. Credited to what this institution owes the fund, never to cash.
          type: string
        toState:
          description: The cession's state after it. It reaches 'settled' only when this was its last open obligation, so a cession of many receivables usually stays where it was.
          type: string
      required:
        - assignmentSetId
        - receivableRef
        - currency
        - obligation
        - face
        - borrowerPayoff
        - settlement
        - expense
        - gain
        - periodsEnded
        - fromState
        - toState
      type: object
    AssignmentOfferFileGenerationFileHumaBody:
      additionalProperties: false
      properties:
        contentDigest:
          description: sha-256 of the authorized bytes.
          type: string
        format:
          description: The file's format. A built-in layout's file is txt.
          enum:
            - txt
            - csv
            - xml
            - html
          type: string
        generatedAt:
          description: When the file was authorized (RFC3339, UTC).
          format: date-time
          type: string
        layoutVersion:
          description: The built-in layout, or reporter:<templateId> for a file a Reporter template rendered.
          type: string
        sizeBytes:
          description: Length of the authorized bytes.
          format: int64
          type: integer
      required:
        - contentDigest
        - sizeBytes
        - format
        - layoutVersion
        - generatedAt
      type: object
    AssignmentOfferFileGenerationHumaBody:
      additionalProperties: false
      properties:
        assignmentSetId:
          description: The set the offer file is generated for.
          type: string
        attempt:
          description: The attempt number, from 1. Absent when the set's file was authorized with no Reporter generation.
          format: int64
          type: integer
        attemptStartedAt:
          description: When the attempt started (RFC3339, UTC). An attempt pending for 30 minutes fails as reporter_timeout.
          format: date-time
          type: string
        failureCode:
          description: "Why the attempt ended without a file. composition_changed: a line left the lot after this attempt started; POST starts the next attempt over the lines still in it."
          enum:
            - template_changed
            - template_missing
            - reporter_access_denied
            - reporter_refused
            - report_failed
            - report_partial
            - report_incomplete
            - report_too_large
            - reporter_timeout
            - set_not_approved
            - composition_changed
          type: string
        failureDetail:
          description: What Reporter or the verification reported, for the failure code.
          type: string
        file:
          $ref: "#/components/schemas/AssignmentOfferFileGenerationFileHumaBody"
          description: The authorized file. Present only when ready.
        reportId:
          description: The Reporter report rendering the attempt, once Reporter accepted the request.
          type: string
        requestedBy:
          description: Validated identity that started the attempt.
          type: string
        state:
          description: "pending: Reporter is rendering the file. failed: the attempt ended without a file; failureCode says why and POST starts the next attempt. ready: the file is authorized and served by GET .../offer-file."
          enum:
            - pending
            - failed
            - ready
          type: string
        templateId:
          description: The Reporter template the attempt froze.
          format: uuid
          type: string
        transientError:
          description: A transient Reporter failure seen on this read. The attempt stays pending.
          enum:
            - reporter_unavailable
          type: string
      required:
        - assignmentSetId
        - state
      type: object
    AssignmentRemessaHumaBody:
      additionalProperties: false
      properties:
        approvalDigest:
          description: The immutable approval this file answered.
          type: string
        approvedCount:
          description: Receivables the fund took.
          format: int64
          type: integer
        assignmentFundId:
          description: The fund whose administrator sent it.
          type: string
        assignmentSetId:
          description: The set this file answered.
          type: string
        brakedReceivables:
          description: References whose per-fund cut tally reached this fund's limit. They stopped returning to the pool automatically and each has an open exception case.
          items:
            type: string
          type:
            - array
            - "null"
        contentDigest:
          description: sha-256 of exactly the ingested bytes — the identity a re-upload is recognised by.
          type: string
        cutCount:
          description: Receivables the fund refused.
          format: int64
          type: integer
        cutReceivables:
          description: References the fund refused. Each left the composition and is assignable again.
          items:
            type: string
          type:
            - array
            - "null"
        fromState:
          description: The lifecycle state the set was in.
          type: string
        id:
          description: Acceptance record identifier (uuid).
          type: string
        itemCount:
          description: Receivables the set carried when the file arrived.
          format: int64
          type: integer
        layoutVersion:
          description: The layout the bytes were parsed under, recorded on the acceptance.
          type: string
        receivedAt:
          description: UTC ingestion instant (RFC3339).
          type: string
        receivedBy:
          description: Validated actor identity that ingested the file.
          type: string
        replayed:
          description: True when this exact file had already been accepted and nothing was written. A remessa reprocessed never cedes twice.
          type: boolean
        sizeBytes:
          description: Byte count of the ingested file.
          format: int64
          type: integer
        toState:
          description: The lifecycle state the acceptance moved it to.
          type: string
      required:
        - id
        - assignmentSetId
        - assignmentFundId
        - layoutVersion
        - contentDigest
        - approvalDigest
        - sizeBytes
        - itemCount
        - approvedCount
        - cutCount
        - cutReceivables
        - brakedReceivables
        - fromState
        - toState
        - receivedBy
        - receivedAt
        - replayed
      type: object
    AssignmentSetAcceptedStockHumaBody:
      additionalProperties: false
      properties:
        borrowers:
          description: One entry per borrower of this set, sorted by borrowerRef; 0.00 when the fund holds none of theirs outside the set.
          items:
            $ref: "#/components/schemas/AssignmentSetBorrowerStockHumaBody"
          type:
            - array
            - "null"
        currency:
          description: ISO code of the set and of the stock.
          type: string
        fundId:
          format: uuid
          type: string
        observedOn:
          description: São Paulo civil day the stock was read on.
          format: date
          type: string
        setId:
          format: uuid
          type: string
        stockTotal:
          description: The fund's accepted stock outside this set, decimal string, scale 2.
          type: string
      required:
        - setId
        - fundId
        - currency
        - observedOn
        - stockTotal
        - borrowers
      type: object
    AssignmentSetApprovalHumaBody:
      additionalProperties: false
      properties:
        approvedAt:
          description: Approval instant (RFC3339, UTC).
          type: string
        approvedBy:
          description: Validated actor identity that approved.
          type: string
        contentDigest:
          description: sha-256 over the canonical bytes of the approved composition. Re-derivable from those bytes, so a reader can prove the composition was not edited afterwards.
          type: string
        currency:
          description: ISO currency code of totalAssignmentPrice.
          type: string
        fundId:
          description: Fund registration the composition was approved for.
          type: string
        id:
          description: Approval identifier (uuid).
          type: string
        itemCount:
          description: How many receivables the approval covers.
          format: int64
          type: integer
        setId:
          description: Assignment set this approval covers.
          type: string
        totalAssignmentPrice:
          description: Total the fund pays for the approved composition, decimal string, scale 2.
          type: string
        trailObservedAt:
          description: Instant the rail state behind this composition was read (RFC3339, UTC). The approval covers exactly that reading.
          type: string
        valuationVersion:
          description: Pricing ruler the approved prices came out of.
          type: string
      required:
        - id
        - setId
        - fundId
        - approvedBy
        - approvedAt
        - contentDigest
        - trailObservedAt
        - valuationVersion
        - currency
        - itemCount
        - totalAssignmentPrice
      type: object
    AssignmentSetApprovalResultHumaBody:
      additionalProperties: false
      properties:
        approval:
          $ref: "#/components/schemas/AssignmentSetApprovalHumaBody"
          description: The approval fact now standing over this composition.
        replayed:
          description: True when the set was ALREADY approved over exactly this composition and the stored approval was returned unchanged. No second authority was created.
          type: boolean
      required:
        - approval
        - replayed
      type: object
    AssignmentSetBorrowerStockHumaBody:
      additionalProperties: false
      properties:
        amount:
          description: Decimal string, scale 2.
          type: string
        borrowerRef:
          type: string
      required:
        - borrowerRef
        - amount
      type: object
    AssignmentSetDetailHumaBody:
      additionalProperties: false
      properties:
        approval:
          $ref: "#/components/schemas/AssignmentSetApprovalHumaBody"
          description: The immutable approval fact. Absent while the composition has not been approved.
        items:
          description: Every receivable ever admitted to this set, survivors and departures alike, in the order the composition was read. Always present, empty slice when none.
          items:
            $ref: "#/components/schemas/AssignmentSetItemHumaBody"
          type:
            - array
            - "null"
        set:
          $ref: "#/components/schemas/AssignmentSetHumaBody"
          description: The set and the aggregates of its surviving composition.
      required:
        - set
        - items
      type: object
    AssignmentSetDiscardResultHumaBody:
      additionalProperties: false
      properties:
        fromState:
          description: Where the set stood when the decision landed, or the state it was already in on a replay.
          type: string
        replayed:
          description: True when this set was ALREADY discarded and nothing was written. No second audit row was appended and no second decision was recorded.
          type: boolean
        setId:
          description: The composition that was called off.
          type: string
        state:
          description: "Always cancelled: the terminal state a discarded composition rests in. Nothing is deleted — the items, the transitions, the approval and the custodied evidence all stand."
          type: string
      required:
        - setId
        - fromState
        - state
        - replayed
      type: object
    AssignmentSetEligibilityHumaBody:
      additionalProperties: false
      properties:
        concentrationBase:
          description: "Denominator the surviving composition was measured against: the fund's accepted stock plus the admitted set, decimal string, scale 2."
          type: string
        currency:
          description: ISO currency code every amount above is denominated in.
          type: string
        dimensionsNotEvaluated:
          description: "Concentration dimensions this scoring did not measure: borrower, payment_source or assignor when the fund registered no limit for it (all three under eligibility mode none), assignor also when the composition carries no per-receivable assignor, and sector always (no data source)."
          items:
            type: string
          type:
            - array
            - "null"
        eligibleCount:
          description: How many receivables survived every rule.
          format: int64
          type: integer
        items:
          description: Every receivable of the composition with its verdict.
          items:
            $ref: "#/components/schemas/AssignmentSetItemHumaBody"
          type:
            - array
            - "null"
        ruleVersion:
          description: Identifier of the eligibility/concentration rule that produced these verdicts.
          type: string
        set:
          $ref: "#/components/schemas/AssignmentSetHumaBody"
          description: The set after the scoring, in its new state.
      required:
        - set
        - items
        - ruleVersion
        - eligibleCount
        - concentrationBase
        - currency
        - dimensionsNotEvaluated
      type: object
    AssignmentSetFactHumaBody:
      additionalProperties: false
      properties:
        assignmentSetId:
          description: The set the fact was recorded against.
          type: string
        derecognizedRefs:
          description: "The receivables this call wrote off the balance sheet: contracts that left this portfolio with their write-off enqueued in the same transaction."
          items:
            type: string
          type:
            - array
            - "null"
        factType:
          description: The fact that was confirmed.
          type: string
        fromState:
          description: The lifecycle state the set was in.
          type: string
        provenance:
          description: Where the fact came from, echoed back for the audit trail.
          type: string
        recordedBy:
          description: Validated actor identity that confirmed the fact.
          type: string
        recordedRefs:
          description: The receivables this call actually recorded the fact for, excluding the ones that already carried it.
          items:
            type: string
          type:
            - array
            - "null"
        replayed:
          description: "True when nothing was written: the set was already in the resulting state, or every receivable named already carried the fact. A repeated confirmation never records a second send and never enqueues a second write-off."
          type: boolean
        toState:
          description: The lifecycle state the fact moved it to. It advances only once EVERY surviving receivable carries the fact.
          type: string
      required:
        - assignmentSetId
        - factType
        - fromState
        - toState
        - recordedBy
        - replayed
      type: object
    AssignmentSetHumaBody:
      additionalProperties: false
      properties:
        assignorConcentrationLimit:
          description: "Per-assignor concentration limit frozen from the fund at assembly, decimal fraction string, scale 8. Null: no per-assignor limit applies."
          type:
            - string
            - "null"
        borrowerConcentrationLimit:
          description: "Per-debtor concentration limit frozen from the fund at assembly, decimal fraction string, scale 8. Null: no per-debtor limit applies."
          type:
            - string
            - "null"
        createdAt:
          description: Creation timestamp (RFC3339, UTC).
          type: string
        createdBy:
          description: Validated actor identity that assembled the composition.
          type: string
        currency:
          description: ISO currency code every amount of this set is denominated in.
          type: string
        eligibilityCheckedAt:
          description: Instant the composition was scored (RFC3339, UTC). Empty on a draft.
          type: string
        eligibilityMode:
          description: Eligibility mode this composition is scored and approved under, frozen from the fund at assembly. Under none the limits below are not applied.
          enum:
            - full
            - prefilter
            - none
          type: string
        fundId:
          description: Fund registration this composition is offered to.
          type: string
        fundPaidAmount:
          description: What the fund sent for the lot, as the operator last stated it on a paid fact, decimal string; what the desk settles for each line taken out is on that line's case (refundToFund). Null until the first paid.
          type:
            - string
            - "null"
        id:
          description: Assignment set identifier (uuid).
          type: string
        inSetItemCount:
          description: How many receivables are still in the composition.
          format: int64
          type: integer
        paymentSourceConcentrationLimit:
          description: "Per-payment-source concentration limit frozen from the fund at assembly, decimal fraction string, scale 8. Null: no per-payment-source limit applies."
          type:
            - string
            - "null"
        paymentTolerance:
          description: How far, in the lot's currency, what the fund paid may sit from what its paid lines are due, frozen from the fund at assembly. 0.00 is exact to the centavo.
          type: string
        registryProvider:
          description: Registradora regime this cession runs under, frozen from the fund when the composition was assembled. The fund's registration governs the NEXT set, never this one.
          type: string
        retainedFraction:
          description: Share of the expected loss this institution keeps after the sale, frozen when the composition was assembled (the sale's own fraction, or the fund's proposal when the sale stated none), decimal string from 0 to 1, scale 8. Re-declaring the fund never changes it.
          type: string
        retentionThreshold:
          description: The institution's substantial-retention threshold in force when the composition was assembled, frozen next to the fraction, decimal string, scale 8. A later change of the threshold never re-classifies this cession.
          type: string
        riskRetention:
          description: "Res. CMN 4.966 art. 26 regime this cession is booked under, DERIVED from the two frozen numbers, never declared: substantial when retainedFraction is at or above retentionThreshold (the asset stays on this balance sheet against a liability, art. 29), none below it (the receivables leave on acceptance, art. 28)."
          type: string
        ruleVersion:
          description: Eligibility/concentration ruler that scored this composition. Empty on a draft nobody has measured yet.
          type: string
        sellerRetainsControl:
          description: "Whether the seller keeps control of what it sold (Res. CMN 4.966 art. 26 III), frozen at assembly. Always false on a composition that exists: true is refused (LENDER-0505)."
          type: boolean
        state:
          description: "Lifecycle state: draft, eligibility_checked, pending_approval, approved, offer_sent, remessa_received, term_signed, paid, transferred, accepted — plus cancelled, the terminal state a DISCARDED composition rests in. cancelled is a sideways exit, not a step of the forward walk: its receivables are released back to the assignable pool and nothing advances it."
          type: string
        termMode:
          description: "Who produces the endorsement term for this cession, frozen from the fund at assembly: administrator_generated opens payment at the fund's return file, lender_emitted waits for the term the Lender emits. The fund's registration governs the NEXT set, never this one."
          enum:
            - lender_emitted
            - administrator_generated
          type: string
        totalAssignmentPrice:
          description: Assignment price of the SURVIVING composition, decimal string, scale 2.
          type: string
        totalFaceValue:
          description: Face value of the SURVIVING composition, decimal string, scale 2.
          type: string
        updatedAt:
          description: Last-update timestamp (RFC3339, UTC).
          type: string
        valuationVersion:
          description: Deterministic pricing ruler every item price came out of.
          type: string
      required:
        - id
        - fundId
        - registryProvider
        - retainedFraction
        - retentionThreshold
        - sellerRetainsControl
        - termMode
        - eligibilityMode
        - borrowerConcentrationLimit
        - paymentSourceConcentrationLimit
        - assignorConcentrationLimit
        - paymentTolerance
        - fundPaidAmount
        - riskRetention
        - state
        - currency
        - valuationVersion
        - ruleVersion
        - eligibilityCheckedAt
        - createdBy
        - createdAt
        - updatedAt
        - inSetItemCount
        - totalFaceValue
        - totalAssignmentPrice
      type: object
    AssignmentSetItemHumaBody:
      additionalProperties: false
      properties:
        assignmentPrice:
          description: Present value at the fund's cession rate — what the fund pays, decimal string, scale 2.
          type: string
        assignmentRate:
          description: Monthly effective cession rate applied, decimal fraction string, scale 8.
          type: string
        assignorRef:
          description: Opaque assignor key the fund's assignor limit aggregates by.
          type: string
        borrowerRef:
          description: Opaque debtor key the fund's per-debtor limit aggregates by. Never a document number.
          type: string
        currency:
          description: ISO currency code of every amount on this item.
          type: string
        custodyComplete:
          description: Whether the signature evidence was complete when the receivable entered the set. A rail_proven member (a refinanced successor, which no one signed) is custody-complete on its rail proof.
          type: boolean
        discountAmount:
          description: faceValue minus assignmentPrice, decimal string, scale 2.
          type: string
        dossierDigest:
          description: Digest of the materialized evidence bundle. Empty when no dossier has been produced yet — the endorsement term is what refuses to be signed over that.
          type: string
        exitReason:
          description: Why it was removed, in the remover's own vocabulary. Empty while in_set.
          type: string
        exitSource:
          description: "Who removed it: eligibility (our engine), remessa (the fund's return file), trail (the rail re-read) or operator (a line taken out of its lot through its exception case; exitReason is the case type). Empty while in_set."
          type: string
        faceValue:
          description: Face value of the remaining flow, decimal string, scale 2.
          type: string
        hasOpenOverdue:
          description: Whether the receivable carried open arrears when it entered the set.
          type: boolean
        installmentCount:
          description: Installments remaining as frozen at entry.
          format: int64
          type: integer
        itemState:
          description: in_set, cut (a verdict removed it) or removed_trail (the pre-approval rail re-read no longer found it).
          type: string
        outstandingBalance:
          description: Outstanding balance as frozen at entry, decimal string, scale 2.
          type: string
        paymentSourceRef:
          description: Opaque key of the receivable's payment source — the party the instalment is collected through — that the fund's payment-source limit aggregates by. Which party that is belongs to the jurisdiction, and this contract never names it.
          type: string
        principalAmount:
          description: Booked principal as frozen at entry, decimal string, scale 2.
          type: string
        receivableRef:
          description: Receivable reference (the rail contract number).
          type: string
        registrationActive:
          description: Whether the rail registration was in force when the receivable entered the set.
          type: boolean
        repriced:
          description: True when the pre-approval rail re-read found this receivable altered and the same ruler repriced it (Q-P6-5).
          type: boolean
        snapshotObservedAt:
          description: Instant the frozen facts above were read (RFC3339, UTC).
          type: string
        trailInstallmentsRemaining:
          description: Remaining installments the RAIL reported at the last pre-approval re-read. Absent before the first one.
          format: int64
          type: integer
        valuationBaseDate:
          description: Base date the present value was discounted to (RFC3339, UTC). The cession cut is the São Paulo civil day of this instant.
          type: string
        valuationVersion:
          description: Pricing ruler this price came out of.
          type: string
      required:
        - receivableRef
        - itemState
        - exitSource
        - exitReason
        - repriced
        - borrowerRef
        - paymentSourceRef
        - assignorRef
        - outstandingBalance
        - principalAmount
        - installmentCount
        - currency
        - registrationActive
        - custodyComplete
        - hasOpenOverdue
        - dossierDigest
        - faceValue
        - assignmentPrice
        - discountAmount
        - valuationVersion
        - assignmentRate
        - valuationBaseDate
        - snapshotObservedAt
      type: object
    AssignmentSetListHumaBody:
      additionalProperties: false
      properties:
        data:
          description: One row per set, newest first; always present, empty slice when none match.
          items:
            $ref: "#/components/schemas/AssignmentSetHumaBody"
          type:
            - array
            - "null"
      required:
        - data
      type: object
    AssignmentSetReceivableAggregatesHumaBody:
      additionalProperties: false
      properties:
        asOf:
          description: The São Paulo civil day the read was made on (YYYY-MM-DD); the cut every figure below is measured at.
          type: string
        openAmount:
          description: Sum of what the open installments still owe, decimal string at scale 2.
          type: string
        openInstallments:
          description: Installments still owing whose due day is before asOf. A partly paid installment counts here, never as paid.
          format: int64
          type: integer
        paidInstallments:
          description: Installments with nothing left to pay.
          format: int64
          type: integer
        toFallDueAmount:
          description: Sum of what the installments yet to fall due still owe, decimal string at scale 2.
          type: string
        toFallDueInstallments:
          description: Installments still owing that fall due on or after asOf. The three counts add up to the schedule's length.
          format: int64
          type: integer
      required:
        - asOf
        - paidInstallments
        - openInstallments
        - toFallDueInstallments
        - openAmount
        - toFallDueAmount
      type: object
    AssignmentSetReceivableBalanceHumaBody:
      additionalProperties: false
      properties:
        amount:
          description: Outstanding balance, decimal string at scale 2.
          type: string
        currency:
          description: ISO currency of the balance.
          type: string
        effectiveAt:
          description: UTC instant the revision is effective from (RFC3339).
          type: string
        revision:
          description: Revision of the canonical balance this figure comes from. It versions the balance only; the schedule is read separately.
          format: int64
          type: integer
      required:
        - amount
        - currency
        - revision
        - effectiveAt
      type: object
    AssignmentSetReceivableBookedTermsHumaBody:
      additionalProperties: false
      properties:
        cetAnnualPct:
          description: Annual total effective cost, percent, decimal string at scale 8.
          type: string
        cetMonthlyPct:
          description: Monthly total effective cost, percent, decimal string at scale 8.
          type: string
        expectedDisbursementDate:
          description: Expected disbursement day (YYYY-MM-DD).
          type: string
        installmentAmount:
          description: Booked installment, decimal string at scale 2.
          type: string
        installmentCount:
          description: Booked number of installments.
          format: int64
          type: integer
        iofAmount:
          description: Booked IOF, decimal string at scale 2.
          type: string
        liberatedAmount:
          description: Amount released to the borrower, decimal string at scale 2.
          type: string
        loanProductVersion:
          description: The loan product version the contract was booked under.
          type: string
        monthlyInterestRatePct:
          description: Monthly interest rate declared at registration, percent, decimal string at scale 8.
          type: string
        principalAmount:
          description: Booked principal, decimal string at scale 2.
          type: string
      required:
        - principalAmount
        - liberatedAmount
        - installmentAmount
        - installmentCount
        - monthlyInterestRatePct
        - cetMonthlyPct
        - cetAnnualPct
        - iofAmount
        - expectedDisbursementDate
        - loanProductVersion
      type: object
    AssignmentSetReceivableHumaBody:
      additionalProperties: false
      properties:
        aggregates:
          $ref: "#/components/schemas/AssignmentSetReceivableAggregatesHumaBody"
          description: The schedule counted and totalled as of asOf.
        availableMarginAtBooking:
          description: The available payroll margin the registration reported for the borrower, before this contract's installment, decimal string at scale 2. Absent on a contract registered before the Lender stored it.
          type: string
        bookedTerms:
          $ref: "#/components/schemas/AssignmentSetReceivableBookedTermsHumaBody"
          description: The terms booked for the receivable.
        contractType:
          description: "How the contract came to be: refinance for the new contract of a refinance, portability for a contract that arrived by portability, new otherwise. The Lender keeps no lineage for any other origin."
          enum:
            - new
            - refinance
            - portability
          type: string
        factsStatus:
          description: incomplete when the Lender holds no persisted facts for the member now, for example after a payoff or a renegotiation; such a member carries nothing else.
          enum:
            - complete
            - incomplete
          type: string
        identityPackDigest:
          description: SHA-256 hex digest of the custodied identity pack. Absent for a rail_proven member, which carries no artifact digests.
          type: string
        observedAt:
          description: UTC instant the facts were read (RFC3339).
          type: string
        outstandingBalance:
          $ref: "#/components/schemas/AssignmentSetReceivableBalanceHumaBody"
          description: The latest canonical outstanding balance.
        receivableRef:
          description: The receivable, as an opaque identifier.
          type: string
        registrationStatus:
          description: Registration status at the rail, opaque to this surface.
          type: string
        schedule:
          description: The persisted current schedule.
          items:
            $ref: "#/components/schemas/AssignmentSetReceivableInstallmentHumaBody"
          type:
            - array
            - "null"
        scheduleAnnualRatePct:
          description: scheduleMonthlyRatePct compounded over twelve months, percent, decimal string at scale 8.
          type: string
        scheduleMonthlyRatePct:
          description: Monthly interest rate the schedule was priced at, percent, decimal string at scale 8. It differs from bookedTerms.monthlyInterestRatePct only when registration found the declared terms imply another rate.
          type: string
        signedInstrumentDigest:
          description: SHA-256 hex digest of the custodied signed instrument. Absent for a rail_proven member, which carries no artifact digests.
          type: string
        signedOn:
          description: Civil day in São Paulo the borrower consented to the credit instrument (YYYY-MM-DD); for a refinanced successor, which no one signed, the day the rail accepted the operation.
          type: string
      required:
        - receivableRef
        - factsStatus
      type: object
    AssignmentSetReceivableInstallmentHumaBody:
      additionalProperties: false
      properties:
        dueDate:
          description: Due day (YYYY-MM-DD).
          type: string
        installmentNumber:
          description: Installment number.
          format: int64
          type: integer
        paidAmount:
          description: What payments recorded since the current schedule version paid on the installment, net of reversals, decimal string at scale 2; 0.00 when none. Absent with scheduledAmount.
          type: string
        remainingAmount:
          description: What the installment still owes net of payments, decimal string at scale 2; 0.00 once paid.
          type: string
        scheduledAmount:
          description: The installment as the current schedule version records it, before late charges and payments, decimal string at scale 2. Absent, with paidAmount, when that version already netted earlier payments (after a prepayment or a reversal replay).
          type: string
        status:
          description: Installment status.
          type: string
      required:
        - installmentNumber
        - dueDate
        - remainingAmount
        - status
      type: object
    AssignmentSetReceivablesApprovalHumaBody:
      additionalProperties: false
      properties:
        approvedAt:
          description: UTC approval instant (RFC3339).
          type: string
        contentDigest:
          description: SHA-256 hex digest of the approved composition.
          type: string
        id:
          description: Approval fact identifier.
          type: string
      required:
        - id
        - contentDigest
        - approvedAt
      type: object
    AssignmentSetReceivablesHumaBody:
      additionalProperties: false
      properties:
        approval:
          $ref: "#/components/schemas/AssignmentSetReceivablesApprovalHumaBody"
        data:
          description: The members surviving the approval, in ascending receivableRef order.
          items:
            $ref: "#/components/schemas/AssignmentSetReceivableHumaBody"
          type: array
        set:
          $ref: "#/components/schemas/AssignmentSetReceivablesSetHumaBody"
      required:
        - set
        - approval
        - data
      type: object
    AssignmentSetReceivablesSetHumaBody:
      additionalProperties: false
      properties:
        currency:
          description: ISO currency of every amount in the set.
          type: string
        fundId:
          description: The fund the set is offered to.
          type: string
        id:
          description: Assignment set identifier.
          type: string
        state:
          description: The set's lifecycle state now. The read answers in every state after approval, cancelled included.
          type: string
      required:
        - id
        - fundId
        - state
        - currency
      type: object
    AssignmentTermHumaBody:
      additionalProperties: false
      properties:
        assignmentFundId:
          description: The fund this term names (uuid).
          type: string
        assignmentSetId:
          description: The approved set this term covers (uuid).
          type: string
        coObligation:
          description: "Whether this term binds the assignor to answer for the receivable it sold (coobrigação). Always false on a term this service recorded: the retained-risk treatment TRUE implies does not exist yet. NULL on a term recorded before the declaration existed — that is a gap in the record, not a statement that the instrument carries no recourse, and it must not be read as false."
          type:
            - boolean
            - "null"
        contentDigest:
          description: sha-256 of the term document.
          type: string
        digestMethod:
          description: "What contentDigest was computed over: the normalized form of our own render, or the raw bytes exactly as received."
          enum:
            - sha256_pdf_normalized
            - sha256_raw
          type: string
        documentTemplateVersionId:
          description: Template version rendered from; present only for a lender-emitted term.
          type: string
        externalReference:
          description: The administrator's own document identifier; administrator-generated only.
          type: string
        externalSource:
          description: The administrator on record for the fund; resolved server-side, administrator-generated only.
          type: string
        id:
          description: Term record identifier (uuid).
          type: string
        idempotencyKey:
          description: Caller's idempotency key.
          type: string
        inputFingerprint:
          description: sha-256 of the caller-controlled comparison payload.
          type: string
        origin:
          description: "Which path produced this term: the term mode the set froze from the fund at assembly."
          enum:
            - lender_emitted
            - administrator_generated
          type: string
        pageGeometryRef:
          description: Versioned page geometry; lender-emitted only.
          type: string
        recordedAt:
          description: UTC registration instant (RFC3339).
          type: string
        recordedBy:
          description: Validated actor identity that recorded the term.
          type: string
        rendererVersion:
          description: Render engine identity; lender-emitted only.
          type: string
        replayed:
          description: True when this call replayed an existing term under the same idempotency key rather than recording a new one.
          type: boolean
        setSnapshotDigest:
          description: sha-256 of the frozen approved composition this term covers.
          type: string
        sizeBytes:
          description: Byte count custody actually stored.
          format: int64
          type: integer
        specVersion:
          description: Field-assembly rules version; lender-emitted only.
          type: string
      required:
        - id
        - assignmentSetId
        - assignmentFundId
        - idempotencyKey
        - origin
        - setSnapshotDigest
        - inputFingerprint
        - contentDigest
        - digestMethod
        - sizeBytes
        - coObligation
        - recordedAt
        - recordedBy
        - replayed
      type: object
    B3RegistrationHumaBody:
      additionalProperties: false
      properties:
        ccbNumber:
          description: The client's number for the contract's CCB. Absent when not informed.
          type: string
        instrumentCode:
          description: The B3 instrument code (Código IF), as the client sent it.
          type: string
        loanApplicationId:
          description: Loan application identifier (uuid).
          type: string
        recordedAt:
          description: When the Lender recorded it (RFC3339, UTC).
          type: string
        registrationDate:
          description: The civil day B3 registered the contract (YYYY-MM-DD). Absent when not informed.
          type: string
      required:
        - loanApplicationId
        - instrumentCode
        - recordedAt
      type: object
    BusinessDateAdvanceBody:
      additionalProperties: false
      properties:
        businessDate:
          description: "The business date after this call: the target."
          examples:
            - "2027-02-01"
          format: date
          type: string
        days:
          description: The days this call closed, in order; empty when the target already was the business date.
          items:
            $ref: "#/components/schemas/BusinessDayClosedBody"
          type: array
        from:
          description: The business date before this call; the day before today in São Paulo for a tenant not yet pinned.
          examples:
            - "2027-01-31"
          format: date
          type: string
      required:
        - from
        - businessDate
        - days
      type: object
    BusinessDateAdvanceRequest:
      additionalProperties: false
      properties:
        businessDate:
          description: "The target business date: at most 31 days past the current one, never before it. It is the idempotency key: the current date closes nothing, and a resend resumes at the first day that did not close."
          examples:
            - "2027-02-01"
          format: date
          type: string
      required:
        - businessDate
      type: object
    BusinessDateBody:
      additionalProperties: false
      properties:
        businessDate:
          description: "The tenant's business date: its latest closed day, or today in São Paulo before its first advance."
          examples:
            - "2027-02-01"
          format: date
          type: string
        now:
          description: "The business instant every \"today\" decision of the tenant reads: inside the business date, moving with the wall clock and held at the day's end."
          format: date-time
          type: string
        pinned:
          description: True once the tenant's first advance pinned it; until then it reads the wall clock.
          type: boolean
      required:
        - businessDate
        - now
        - pinned
      type: object
    BusinessDayClosedBody:
      additionalProperties: false
      properties:
        date:
          description: The business day closed.
          examples:
            - "2027-02-01"
          format: date
          type: string
        durationMs:
          description: How long the day's chain took, in milliseconds.
          format: int64
          type: integer
        steps:
          description: The nightly chain's steps the day ran, in order.
          items:
            type: string
          type: array
      required:
        - date
        - steps
        - durationMs
      type: object
    CETDisclosureResponse:
      additionalProperties: false
      properties:
        cetAnnualPct:
          description: Custo Efetivo Total, annualized, as a percentage decimal string with scale 8 (e.g. "12.34567890").
          examples:
            - "12.34567890"
          type: string
        cetMonthlyPct:
          description: Custo Efetivo Total, monthly, as a percentage decimal string with scale 8 (e.g. "1.23456789").
          examples:
            - "1.23456789"
          type: string
        createdAt:
          description: RFC3339 UTC timestamp at which the disclosure record was created.
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        frozenAt:
          description: RFC3339 UTC timestamp at which the disclosure was frozen and made immutable.
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        id:
          description: Unique identifier (UUID) of the frozen CET disclosure record.
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        jurisdictionCode:
          description: ISO jurisdiction code governing the disclosure (e.g. "BR").
          examples:
            - BR
          type: string
        loanAccountId:
          description: UUID of the loan account the disclosure is bound to.
          examples:
            - 550e8400-e29b-41d4-a716-446655440002
          type: string
        loanApplicationId:
          description: UUID of the loan application this CET disclosure was computed for.
          examples:
            - 550e8400-e29b-41d4-a716-446655440001
          type: string
        memoryOfCalculation:
          description: "Memoria de calculo: structured breakdown of the cash flows and steps producing the CET."
        profileVersion:
          description: Jurisdiction profile version used to compute the CET, captured for auditability.
          examples:
            - 1.0.0
          type: string
        rateTableSnapshot:
          description: Frozen snapshot of the rate/fee table inputs used in the CET calculation.
      required:
        - id
        - loanApplicationId
        - loanAccountId
        - jurisdictionCode
        - profileVersion
        - cetAnnualPct
        - cetMonthlyPct
        - rateTableSnapshot
        - memoryOfCalculation
        - frozenAt
        - createdAt
      type: object
    CapitalizationClauseConsentArtifactResponse:
      additionalProperties: false
      properties:
        acceptedAt:
          description: RFC3339 UTC timestamp when the borrower accepted the clause.
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        acceptedByActor:
          description: Authenticated actor identity (resolved from request context) that accepted the clause.
          type: string
        clauseTextHash:
          description: Server-recomputed SHA-256 hex digest of the canonicalized clause text (64 lowercase hex chars).
          examples:
            - e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
          type: string
        consentEvidence:
          description: Opaque evidence reference proving the borrower accepted the clause.
          type: string
        createdAt:
          description: RFC3339 UTC timestamp when the artifact was persisted.
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        id:
          description: Server-generated UUID of the persisted consent artifact.
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        jurisdictionCode:
          description: ISO 3166-1 alpha-2 jurisdiction code (e.g. "BR").
          examples:
            - BR
          type: string
        loanApplicationId:
          description: UUID of the loan application this consent is attached to.
          examples:
            - 550e8400-e29b-41d4-a716-446655440001
          type: string
        profileVersion:
          description: Jurisdiction profile version in effect when the disclosure was presented (e.g. "1.0.0").
          examples:
            - 1.0.0
          type: string
      required:
        - id
        - loanApplicationId
        - clauseTextHash
        - consentEvidence
        - acceptedAt
        - acceptedByActor
        - profileVersion
        - jurisdictionCode
        - createdAt
      type: object
    ChargeTemplateHumaBody:
      additionalProperties: false
      properties:
        amount:
          description: Flat amount, decimal string.
          examples:
            - "25.00"
          type: string
        chargeCode:
          description: Charge code.
          examples:
            - SERVICING_FEE
          type: string
        chargeTemplateId:
          description: Operator-chosen key for this charge model.
          examples:
            - SERVICING_FEE
          type: string
        chargeType:
          description: Charge type.
          examples:
            - fee
          type: string
        currency:
          description: ISO 4217 currency code.
          examples:
            - BRL
          type: string
        effectiveFrom:
          description: Date this revision takes effect (RFC3339, UTC).
          examples:
            - "2026-04-01T00:00:00Z"
          type: string
        productVersionId:
          description: Product version this model belongs to (uuid).
          examples:
            - 550e8400-e29b-41d4-a716-446655440001
          type: string
        rate:
          description: Rate component, decimal string.
          examples:
            - "0"
          type: string
        refundable:
          description: Whether early payoff gives this charge back pro-rata.
          examples:
            - false
          type: boolean
      required:
        - chargeTemplateId
        - productVersionId
        - chargeCode
        - chargeType
        - amount
        - rate
        - currency
        - effectiveFrom
        - refundable
      type: object
    ChartPositionMoveHumaBody:
      additionalProperties: false
      properties:
        amountCode:
          description: The position that moved, in the vocabulary the posting legs use.
          examples:
            - principal
          type: string
        fromAccount:
          description: The account it is booked at under the outgoing chart.
          examples:
            - 1100-10-001
          type: string
        toAccount:
          description: The account it is booked at under the incoming chart.
          examples:
            - 1100-20-001
          type: string
      required:
        - amountCode
        - fromAccount
        - toAccount
      type: object
    CloseRetainedInstallmentHumaInputBody:
      additionalProperties: false
      properties:
        reason:
          description: Why the rest is the client's loss, kept with the close.
          maxLength: 512
          minLength: 1
          type: string
      required:
        - reason
      type: object
    CollectReturnedPaymentReceivableHumaRequest:
      additionalProperties: false
      properties:
        collectedAt:
          description: RFC 3339 instant the money arrived. Defaults to now when absent.
          examples:
            - "2026-07-01T12:00:00Z"
          format: date-time
          type: string
      type: object
    CollectionAgentChannelAppointHumaInputBody:
      additionalProperties: false
      properties:
        active:
          description: Defaults to true. False turns the channel OFF without deleting the agent's identity, returning issuance to the park; an instrument already issued still names the agent that received it.
          type: boolean
        agentAccountId:
          description: "The collection agent's own receiving account, held at the agent and never an account of the lender's: the agent receives the borrower's cash and the lender ingests the settlement file. It becomes the payment identity of every settlement of the instructions it stamps, so it admits no colon, whitespace or control character — \"conta byx 001\" is refused here, where a 422 costs nothing, instead of stranding a paid borrower's money later."
          maxLength: 255
          minLength: 1
          pattern: ^[^\s:\x00-\x1f\x7f]+$
          type: string
        agentName:
          description: The collection agent, lowercase authority shape. It is stamped VERBATIM on every instruction and the baixa file quotes it back byte-exactly, so mixed case would issue instructions no file could answer.
          maxLength: 100
          minLength: 1
          pattern: ^[a-z0-9][a-z0-9._-]{0,99}$
          type: string
        handlesWithdrawal:
          description: Defaults to false on every appointment. True is the operador's word that this agent withdraws (baixa) a boleto when it receives collection.instruction.withdrawn, and that the Streaming Hub subscription feeding it carries collection_instruction.withdrawn. Only then does Lender withdraw a boleto this agent holds once the instalment is credited another way, and issue what the portador still owes as a new instruction; while false every boleto it holds stands.
          type: boolean
      required:
        - agentName
        - agentAccountId
      type: object
    CollectionAgentChannelHumaBody:
      additionalProperties: false
      properties:
        active:
          description: True while the channel instructs; false parks issuance.
          type: boolean
        agentAccountId:
          description: The agent's receiving account.
          type: string
        agentName:
          description: The appointed collection agent.
          type: string
        handlesWithdrawal:
          description: True while Lender withdraws a boleto this agent holds through collection.instruction.withdrawn.
          type: boolean
      required:
        - agentName
        - agentAccountId
        - active
        - handlesWithdrawal
      type: object
    CollectionInstructionHumaBody:
      additionalProperties: false
      properties:
        agentAccountId:
          description: The agent account the money is received into. Never an account of ours.
          type: string
        agentName:
          description: The collection agent this instruction was issued to.
          type: string
        amount:
          description: Amount to collect, cent scale, decimal string; never a float. For a payoff this is the FROZEN number and it does not change inside the window.
          type: string
        competencia:
          description: YYYYMM payroll period the instruction answers for. Absent when the instruction answers for the whole debt rather than one period.
          type: string
        currency:
          description: ISO 4217 currency code.
          type: string
        instructionRef:
          description: The reference the baixa file must quote back for this instruction. Byte-exact.
          type: string
        instrumentId:
          description: Collection instrument identifier (uuid).
          type: string
        issuedAt:
          description: UTC instant this instruction was issued (RFC3339).
          type: string
        kind:
          description: "What to collect: an overdue payroll instalment residual, a frozen full-payoff amount the worker pays, a frozen full-payoff amount the institution TAKING THE CONTRACT OVER pays, or the early settlement owed to a fund. The four literals are the closed vocabulary the durable instruction CHECK admits (BR migrations 000039 and 000044)."
          enum:
            - arrear
            - payoff
            - payoff_portability
            - fund_settlement
          type: string
        loanAccountId:
          description: Servicing account the collection belongs to (uuid).
          type: string
        numeroContrato:
          description: Contract identity on the payroll rail.
          type: string
        validUntil:
          description: "UTC instant this instruction leaves the agent's work queue (RFC3339). It bounds when the borrower may PAY, never when you may declare it: a receipt the agent collected inside the window is accepted whenever the file arrives. What differs by kind is the payment instant itself. A payoff amount is FROZEN, so it stops being the amount owed — a payment the borrower made at or after this instant is refused and the payoff must be re-quoted. An arrear residual does not go stale: the instruction stays valid, so even a late payment is accepted."
          type: string
      required:
        - instrumentId
        - loanAccountId
        - instructionRef
        - agentName
        - agentAccountId
        - kind
        - numeroContrato
        - amount
        - currency
        - issuedAt
        - validUntil
      type: object
    CollectionInstructionListHumaBody:
      additionalProperties: false
      properties:
        data:
          description: Open instructions, oldest first.
          items:
            $ref: "#/components/schemas/CollectionInstructionHumaBody"
          type:
            - array
            - "null"
      required:
        - data
      type: object
    CollectionRefundOwedHumaBody:
      additionalProperties: false
      properties:
        amountToRefund:
          description: Amount held and owed back to the portador (2 d.p. string).
          examples:
            - "30.00"
          type: string
        applicationId:
          description: The held collection payment; the id the record route takes.
          format: uuid
          type: string
        appliedAmount:
          description: Amount applied to the contract (2 d.p. string).
          examples:
            - "100.00"
          type: string
        currency:
          description: ISO 4217 currency code.
          type: string
        loanAccountId:
          description: Loan account the payment was collected for.
          format: uuid
          type: string
        numeroContrato:
          description: Consignado contract number; empty when the account has no consignado servicing contract.
          type: string
        provider:
          description: The agent or provider that received the money.
          type: string
        providerPaymentId:
          description: Its payment reference, for the treasury to find the payment.
          type: string
        receivedAmount:
          description: Amount collected (2 d.p. string).
          examples:
            - "130.00"
          type: string
        receivedAt:
          description: RFC 3339 instant the payment was received.
          format: date-time
          type: string
        repairReason:
          description: Why the money is held; one of the reasons the operation lists.
          type: string
        sourceType:
          description: What the collected instrument was issued for.
          enum:
            - direct_collection
            - payoff_quote
          type: string
        state:
          description: "paid_unapplied: nothing was applied; partially_applied: the remainder above what was open is held."
          enum:
            - paid_unapplied
            - partially_applied
          type: string
      required:
        - applicationId
        - loanAccountId
        - numeroContrato
        - sourceType
        - state
        - repairReason
        - receivedAmount
        - appliedAmount
        - amountToRefund
        - currency
        - provider
        - providerPaymentId
        - receivedAt
      type: object
    CollectionRefundOwedListHumaBody:
      additionalProperties: false
      properties:
        data:
          description: Held collection payments owed back, oldest receipt first.
          items:
            $ref: "#/components/schemas/CollectionRefundOwedHumaBody"
          type:
            - array
            - "null"
      required:
        - data
      type: object
    CollectionSettlementIngestHumaBody:
      additionalProperties: false
      properties:
        agentName:
          description: "The collection agent the file came from. Checked before anything was stored: it has to be this tenant's active channel, or the agent an instruction still open was issued to."
          type: string
        currency:
          description: ISO 4217 currency code.
          type: string
        fileDigest:
          description: sha-256 of exactly the ingested bytes — the identity a re-upload is recognised by.
          type: string
        layoutVersion:
          description: The layout the bytes were parsed under, recorded on every line.
          type: string
        lineCount:
          description: Settlements the file carries.
          format: int64
          type: integer
        replayed:
          description: True when every line of this file was already known and nothing was written.
          type: boolean
        storedCount:
          description: "Settlements this upload durably added. Zero on a re-upload: every line was already known and nothing was applied a second time."
          format: int64
          type: integer
        totalPaid:
          description: Total the file declares, cent scale, decimal string; never a float.
          type: string
      required:
        - fileDigest
        - layoutVersion
        - agentName
        - lineCount
        - storedCount
        - totalPaid
        - currency
        - replayed
      type: object
    CollectionSettlementQuarantineHumaBody:
      additionalProperties: false
      properties:
        agentAccountId:
          description: The agent account the money was received into. Never an account of ours.
          type: string
        agentName:
          description: The collection agent that declared the receipt.
          type: string
        amount:
          description: Amount the agent DECLARED it received, cent scale, decimal string; never a float.
          type: string
        attemptCount:
          description: Attempts spent before the line was parked.
          format: int64
          type: integer
        currency:
          description: ISO 4217 currency code.
          type: string
        fileDigest:
          description: SHA-256 of the uploaded file the line came from, hex. Identity of the delivery, never of the payment.
          type: string
        id:
          description: Inbox line identifier (uuid). This is the id the requeue route takes.
          type: string
        instructionRef:
          description: The instruction the line answers, byte-exact.
          type: string
        paidAt:
          description: UTC instant the agent says the borrower paid (RFC3339).
          type: string
        paymentReference:
          description: "The agent's own payment reference for the receipt. Evidence to quote back to the agent, never an identity: it is not required to be unique and nothing is matched on it."
          type: string
        quarantinedAt:
          description: UTC instant the line was parked (RFC3339).
          type: string
        reason:
          description: "Why it is parked: the drainer's label plus the underlying cause."
          type: string
        receivedAt:
          description: UTC instant the file was ingested (RFC3339).
          type: string
        requeueCount:
          description: How many times an operator has already released this line.
          format: int64
          type: integer
        sequence:
          description: The line's position in that file.
          format: int64
          type: integer
      required:
        - id
        - fileDigest
        - sequence
        - agentName
        - agentAccountId
        - instructionRef
        - amount
        - currency
        - paidAt
        - paymentReference
        - attemptCount
        - requeueCount
        - reason
        - receivedAt
        - quarantinedAt
      type: object
    CollectionSettlementQuarantineListHumaBody:
      additionalProperties: false
      properties:
        data:
          description: Parked settlement lines, oldest parked first.
          items:
            $ref: "#/components/schemas/CollectionSettlementQuarantineHumaBody"
          type:
            - array
            - "null"
      required:
        - data
      type: object
    CollectionSettlementRefusedHumaBody:
      additionalProperties: false
      properties:
        amount:
          description: Amount this line declared, cent scale, decimal string; never a float.
          type: string
        currency:
          description: ISO 4217 currency code this line declared.
          type: string
        fileDigest:
          description: SHA-256 of the file this line arrived in, hex. The same digest the upload answered with.
          type: string
        instructionRef:
          description: The instruction reference this line quoted. Byte-exact, as delivered.
          type: string
        paidAt:
          description: UTC instant this line declared the receipt was taken (RFC3339).
          type: string
        paymentReference:
          description: The payment reference this line carried.
          type: string
        reason:
          description: "The same refusal in a sentence, for a human reading the list. Prose: it may be reworded between releases."
          type: string
        reasonCode:
          description: "Why the line was refused. This token is the contract: branch on it, never on the sentence. 'unprocessable' means the refusal is not one this surface can attribute to the line, and the line is held for operator review."
          enum:
            - unknown_instruction
            - not_an_agent_instruction
            - partial_amount
            - currency_mismatch
            - predates_instruction
            - future_receipt
            - payoff_window_closed
            - already_settled
            - payment_refused
            - invalid_line
            - unprocessable
          type: string
        refusedAt:
          description: UTC instant the line was refused (RFC3339).
          type: string
        sequence:
          description: Position of this line inside that file, as the file itself numbers it.
          format: int64
          type: integer
      required:
        - fileDigest
        - sequence
        - instructionRef
        - amount
        - currency
        - paidAt
        - paymentReference
        - refusedAt
        - reasonCode
        - reason
      type: object
    CollectionSettlementRefusedListHumaBody:
      additionalProperties: false
      properties:
        data:
          description: Refused lines, NEWEST refusal first.
          items:
            $ref: "#/components/schemas/CollectionSettlementRefusedHumaBody"
          type:
            - array
            - "null"
        nextCursor:
          description: Pass back as the cursor query parameter to read the next (older) page. Absent when this page is the end of the feed.
          type: string
      required:
        - data
      type: object
    CollectionTreasuryRefundHumaBody:
      additionalProperties: false
      properties:
        amount:
          description: "Amount returned: the whole held amount (2 d.p. string)."
          examples:
            - "30.00"
          type: string
        applicationId:
          description: The returned collection payment.
          format: uuid
          type: string
        currency:
          description: ISO 4217 currency code.
          type: string
        loanAccountId:
          description: Loan account the payment was collected for.
          format: uuid
          type: string
        recordedBy:
          description: Validated identity that recorded the return.
          type: string
        reference:
          description: The reference the treasury paid under.
          type: string
        refundRequestId:
          description: The refund the return was recorded as.
          format: uuid
          type: string
        refundedAt:
          description: RFC 3339 instant the money left.
          format: date-time
          type: string
      required:
        - applicationId
        - refundRequestId
        - loanAccountId
        - amount
        - currency
        - reference
        - refundedAt
        - recordedBy
      type: object
    CompensatingAdjustmentEvidenceHumaBody:
      additionalProperties: false
      properties:
        adjustmentId:
          description: Compensating adjustment operation this evidence is attached to.
          type: string
        createdAt:
          description: RFC3339 UTC.
          type: string
        existing:
          description: True when this call replayed an already-stored upload (same adjustment, same digest), never a duplicate.
          type: boolean
        id:
          description: Evidence record identifier.
          type: string
        mimeType:
          description: application/pdf, image/jpeg or image/png.
          type: string
        sizeBytes:
          description: Uploaded size in bytes.
          format: int64
          type: integer
      required:
        - id
        - adjustmentId
        - mimeType
        - sizeBytes
        - createdAt
        - existing
      type: object
    CompensatingAdjustmentHumaBody:
      additionalProperties: false
      properties:
        adjustmentAmount:
          description: Signed compensating entry magnitude, exact two-decimal string.
          type: string
        correctionEventId:
          description: Landed correction event this adjustment resolves, when set.
          type: string
        createdAt:
          description: RFC3339 UTC.
          type: string
        createdBy:
          description: Validated actor identity that created this operation.
          type: string
        currency:
          description: ISO-4217 currency code.
          type: string
        debtAmountAfter:
          description: CCB debt after, when this adjustment changes the debt.
          type: string
        debtAmountBefore:
          description: CCB debt before, when this adjustment changes the debt.
          type: string
        divergenceId:
          description: Divergence this adjustment resolves, when set.
          type: string
        existing:
          description: True when this call replayed an already-committed operation for the same idempotency key, never a duplicate.
          type: boolean
        id:
          description: Compensating adjustment operation identifier.
          type: string
        idempotencyKey:
          description: Idempotency key this operation was created (or replayed) under.
          type: string
        justification:
          description: Operator's structured justification.
          type: string
        numeroContrato:
          description: Canonical rail contract number.
          type: string
        reason:
          description: Closed reason catalog.
          type: string
        resolvedGlAccount:
          description: "GL account this operation was authorized against: the suspense account, or the above or below account a disbursement_* reason clears. A contract that already booked into the role keeps that account; otherwise the role's account, configured or the Lender's default when it provisions accounts."
          type: string
      required:
        - id
        - numeroContrato
        - reason
        - justification
        - currency
        - adjustmentAmount
        - idempotencyKey
        - createdBy
        - createdAt
        - resolvedGlAccount
        - existing
      type: object
    CompensatingAdjustmentHumaRequest:
      additionalProperties: false
      properties:
        adjustmentAmount:
          description: "Signed compensating entry magnitude, exact two-decimal string. Sign convention: payment_shortfall must be negative, payment_excess and every disbursement_* reason must be positive."
          type: string
        correctionEventId:
          description: Landed correction event this adjustment resolves. At most one of divergenceId/correctionEventId may be set.
          maxLength: 255
          type: string
        currency:
          description: ISO-4217 currency code.
          maxLength: 3
          minLength: 3
          type: string
        debtAmountAfter:
          description: CCB debt after this adjustment. Both-or-neither with debtAmountBefore.
          type: string
        debtAmountBefore:
          description: CCB debt before this adjustment. Both-or-neither with debtAmountAfter.
          type: string
        divergenceId:
          description: Divergence this adjustment resolves. At most one of divergenceId/correctionEventId may be set.
          format: uuid
          type: string
        justification:
          description: Operator's structured justification.
          maxLength: 4000
          minLength: 1
          type: string
        numeroContrato:
          description: Canonical rail contract number.
          maxLength: 15
          minLength: 2
          type: string
        reason:
          description: "Closed reason catalog; no free-form 'other'. A disbursement_* or refinance_payoff_* reason clears a disbursement in parts or a refinance payoff: it names the divergence and moves exactly its open amount."
          enum:
            - payment_shortfall
            - payment_excess
            - immutable_client_correction
            - internal_ccb_residual
            - disbursement_excess_recovered
            - disbursement_excess_loss
            - disbursement_remainder_paid_off_rail
            - disbursement_remainder_cancelled
            - refinance_payoff_short_recovered
            - refinance_payoff_short_loss
            - refinance_payoff_excess_refunded
          type: string
      required:
        - numeroContrato
        - reason
        - justification
        - currency
        - adjustmentAmount
      type: object
    ConfigureAccountingProfileHumaInputBody:
      additionalProperties: false
      properties:
        accountingMode:
          description: Accounting recognition mode.
          enum:
            - accrual
          examples:
            - accrual
          type: string
        loanProductVersionId:
          description: Loan product version identifier.
          examples:
            - 550e8400-e29b-41d4-a716-446655440001
          format: uuid
          type: string
        midazLedgerId:
          description: "Optional per-product Midaz ledger the profile's postings route into; both-or-neither with midazOrganizationId, except where Lender provisions Midaz accounts: there it may be omitted beside midazOrganizationId, and Lender reuses the ledger the product already books into in that organization, or finds or creates its own ledger lender-product-<loan product id> there. The response names the ledger chosen. A ledger with Midaz route validation on is refused (LENDER-0452). Every version of a product books into the ledger its first configured version chose: another ledger, or only another organization, is refused (LENDER-0453)."
          examples:
            - ledger-def
          maxLength: 128
          type: string
        midazOrganizationId:
          description: Optional per-product Midaz organization the profile's postings route into. Required under multi-tenant mode; empty single-tenant profiles fall back to the env default.
          examples:
            - org-abc
          maxLength: 128
          type: string
        postingRules:
          description: "Non-null GL account mappings per accounting event. New profiles require disbursement, repayment, prepayment, accrual, accrual_withholding, renegotiation_gain, renegotiation_loss, collection_unapplied, collection_reapply, collection_refund, provision_constitution, provision_reversal, provision_incurred_constitution and provision_incurred_reversal. accrual_withholding books the interest Res. CMN 4.966 art. 17 withholds on a problem asset: it debits the account the accrual rule debits and credits the product's rendas a apropriar account, which must be one shared account, never per-operation, and not the accrual's revenue, and receipts later move it from there to that revenue; accrual_tax, accrual_fee_amortization, assignment_derecognition, assignment_retained_settlement, assignment_secured_borrowing, assignment_funding_amortization, assignment_funding_payoff, assignment_repurchase, refinance_payoff, refinance_payoff_reversal, renegotiation_derecognition, renegotiation_recognition, returned_payment_recognition, returned_payment_provision_constitution, returned_payment_provision_reversal, returned_payment_write_off, payroll_payer_provision_constitution and payroll_payer_provision_reversal are optional. charge_appropriation is optional, and required when the version declares a charge template an operator can apply after the release, of any type but origination_fee with a positive flat amount in whole cents (LENDER-0989): it takes exactly two legs, a required per-operation charge_deferred component debit and a required shared charge_revenue component credit, and the repayment rule must then credit a per-operation fees component leg, the contract's own receivable the charge is billed on. compensation_control is optional: each control is a pair of per-operation legs, the control code a debit on an account of debit nature and <control>_contra a credit on an account of credit nature, in accounts no other rule uses. Accepted controls: written_off_credit, guarantee_received. credit_loss_recovery is optional: one debit on the cash account the client chooses and one credit on the recovery revenue account, both shared; it books money a written-off borrower pays later (Res. CMN 4.966 art. 49). A product whose receivables are ever assigned to a fund MUST carry assignment_derecognition: the cession flip and its write-off are both-or-nothing, so an acceptance over a product without it refuses and queues an exception case. It MUST also carry assignment_retained_settlement to be sellable mid-cycle: an instalment that fell due before the cession cut stays with the assignor, and this rule names the account it is reclassified into at acceptance and liquidated out of when its payroll repasse lands. Without it an acceptance over a receivable that retains one refuses instead of selling flow the fund did not buy. A product whose receivables are ever assigned WITH the assignor answering for them (coobrigação) MUST carry assignment_secured_borrowing: Res. CMN 4.966 art. 29 keeps such a receivable on the balance sheet and turns the price received into an obligation measured at amortized cost, appropriated over the remaining term, so this rule names the liability account the consideration is credited to. It is a different posting and not a variant of the write-off — it credits no receivable and books no gain or loss on the sale date — and a cession declared with retained risk over a product that lacks it is REFUSED rather than booked down the write-off path, which would take off the balance sheet the one asset regulation requires to stay on it. Such a product MUST carry assignment_funding_amortization beside it: the sale raises an obligation carried for the whole remaining term and the repasse posting is the only thing that ends it, so a chart with the sale rule alone can open a liability it can never close. The two are accepted together — a retained-risk cession over a product missing assignment_funding_amortization is refused AT ACCEPTANCE, before any obligation exists, rather than months later at the first repasse. assignment_funding_payoff ends a cession early and is not required yet; it becomes required on the same terms once the early-end payoff is issuable. Both stay optional to every product that does not sell with retained risk. A product whose sold receivables can be settled early by the bancarizador (a refinance) MUST carry assignment_repurchase: without it the fund-settlement receipt is refused, because flipping the contract back onto this book with nothing to recognize the asset against is the failure the both-or-nothing rule exists to stop. A product that is refinanced MUST also carry refinance_payoff and refinance_payoff_reversal, which discharge the old contract against the refinance rule's own counterparty account, funded by the new contract's undisbursed remainder (what the remainder cannot fund debits the tenant's suspense account). The refinance_payoff counterparty account MUST be the account the disbursement's below role credits, because every reader treats the payoff as drawn from it. refinance_payoff_reversal restores the old contract's receivable if the rail undoes the swap inside its regret window. A product that retains an origination fee at disbursement MUST carry accrual_fee_amortization, and its disbursement rule MUST carry the optional origination_fee component credit leg: the fee is withheld from the borrower's cash at t0 and earned back as yield over the life, so without them the fee has no account to be deferred in and none to be earned out of, and every centavo of it is refused rather than falling back onto the borrower's interest receivable. Every product MUST carry provision_constitution and provision_reversal (the additional provision, Res. BCB 352 art. 78) and provision_incurred_constitution and provision_incurred_reversal (the incurred loss, art. 76), each pair with one debit and one credit and the incurred allowance on an account other than the additional one (LENDER-0455), as art. 79 registers the two apart (a chart without them is refused; no institution reaches the balance sheet with zero PDD): the engine measures every contract's provision on every business date and posts the movement against the previous measurement, so a product without them accrues a measured provision that never reaches the ledger. renegotiation_gain and renegotiation_loss book a restructuring under Res. CMN 4.966/2021 art. 22: the difference between the modified payments at the effective rate in force and the carrying amount is posted on the day against one per-operation adjustment account of its own, which the nightly run unwinds to zero by payoff; a reschedule that is not a restructuring re-solves its effective rate under art. 23 and posts nothing on the day. A product MUST carry renegotiation_derecognition and renegotiation_recognition to be renegotiated SUBSTANTIALLY: that modification ends the old contract and mints a new one, so the two halves post separately against a bridge account, and a product missing either would derecognise a contract with nothing recognised in its place. A product whose final payments can be given back after the payroll mandate is already gone MUST carry returned_payment_recognition together with returned_payment_provision_constitution, returned_payment_provision_reversal and returned_payment_write_off: the diverted payment becomes a debt of the borrower's own that is due from day 1 and provisions by age on this product's own ladder, so a chart that can open one and cannot provision it is refused here rather than at 05:00 on the nightly sweep, where the debt would sit at face value for ever with nothing flagging it. A product whose repayment rule carries the payroll_payer_receivable leg MUST carry payroll_payer_provision_constitution and payroll_payer_provision_reversal: what the employer withheld and did not pay over is the employer's own debt, which ages on the contract's PDD ladder from the remittance deadline and is provisioned in accounts of its own, never in the contract's loan-loss allowance. A version whose jurisdiction withholds a tax from the borrower's net at disbursement (Brazil's IOF, on every tax regime but none) MUST credit that component, e.g. iof, on its disbursement rule (LENDER-0430). The repayment rule MUST credit an interest leg, on the account the accrual rule debits: every payment clears interest, so a chart that cannot book it is refused (LENDER-0440)."
          items:
            $ref: "#/components/schemas/PostingRuleHumaInputBody"
          maxItems: 35
          minItems: 10
          type: array
      required:
        - loanProductVersionId
        - accountingMode
        - postingRules
      type: object
    ConsignadoQuoteCreditInstrumentHumaBody:
      additionalProperties: false
      properties:
        contentDigest:
          description: sha-256 hex digest of the rendered PDF bytes.
          type: string
        createdAt:
          description: Row creation timestamp (RFC3339, UTC).
          type: string
        documentTemplateVersionId:
          description: Exact template version rendered (uuid).
          type: string
        emittedAt:
          description: Emission instant (RFC3339, UTC).
          type: string
        emittedBy:
          description: Validated actor identity that requested emission.
          type: string
        id:
          description: Instrument identifier (uuid).
          type: string
        idempotencyKey:
          description: Caller's idempotency key.
          type: string
        quoteId:
          description: Owning durable quote identifier (uuid).
          type: string
        sizeBytes:
          description: Size of the rendered document in bytes.
          format: int64
          type: integer
      required:
        - id
        - quoteId
        - documentTemplateVersionId
        - idempotencyKey
        - contentDigest
        - sizeBytes
        - emittedAt
        - emittedBy
        - createdAt
      type: object
    ConsignadoQuoteCreditInstrumentListHumaBody:
      additionalProperties: false
      properties:
        data:
          description: Emission history, newest first; empty when none exist.
          items:
            $ref: "#/components/schemas/ConsignadoQuoteCreditInstrumentHumaBody"
          type:
            - array
            - "null"
      required:
        - data
      type: object
    ConsignadoQuoteHumaBody:
      additionalProperties: false
      properties:
        expectedDisbursementDate:
          description: Proposed civil date, YYYY-MM-DD, not an instant.
          examples:
            - "2026-10-08"
          format: date
          type: string
        firstDueDate:
          description: First installment civil date, YYYY-MM-DD.
          examples:
            - "2026-11-05"
          format: date
          type: string
        grossAmount:
          description: Financed principal in major currency units.
          examples:
            - "1201.20"
          type: string
        installmentAmount:
          description: Optional fixed payroll installment; omitted or zero uses the generated installment.
          examples:
            - "112.19"
          type: string
        loanProductVersionId:
          description: Product version that supplies the BR pricing and tax rules.
          format: uuid
          type: string
        originationFeeAmount:
          description: Optional fee withheld once from principal; omitted means zero.
          examples:
            - "10.00"
          type: string
        requestedInstallments:
          examples:
            - 12
          format: int64
          maximum: 600
          minimum: 1
          type: integer
        requestedInterestRate:
          description: Monthly interest rate as a decimal fraction; 0.018 means 1.8% per month.
          examples:
            - "0.018"
          type: string
      required:
        - loanProductVersionId
        - grossAmount
        - requestedInterestRate
        - requestedInstallments
        - expectedDisbursementDate
        - firstDueDate
      type: object
    ConsignadoQuoteHumaResponse:
      additionalProperties: false
      properties:
        calendarReference:
          type: string
        effectiveCost:
          $ref: "#/components/schemas/SchedulePreviewHumaEffectiveCost"
        grossAmount:
          type: string
        installments:
          items:
            $ref: "#/components/schemas/SchedulePreviewHumaInstallmentLine"
          type:
            - array
            - "null"
        iofAdditional:
          type: string
        iofDaily:
          type: string
        jurisdictionCode:
          type: string
        netDeliveredAmount:
          type: string
        originationFeeAmount:
          type: string
        profileVersion:
          type: string
        rateTableSnapshotId:
          type: string
        totalInterest:
          type: string
        totalIof:
          type: string
        totalPrincipal:
          type: string
        totalTax:
          type: string
      required:
        - grossAmount
        - originationFeeAmount
        - netDeliveredAmount
        - totalTax
        - totalIof
        - iofDaily
        - iofAdditional
        - totalPrincipal
        - totalInterest
        - jurisdictionCode
        - profileVersion
        - calendarReference
        - rateTableSnapshotId
        - installments
        - effectiveCost
      type: object
    ConsignadoQuoteRecordHumaBody:
      additionalProperties: false
      properties:
        computedAt:
          description: Calculation instant, UTC. Identical content replays the original instant.
          format: date-time
          type: string
        id:
          description: Durable quote identifier.
          format: uuid
          type: string
        input:
          $ref: "#/components/schemas/ConsignadoQuoteHumaBody"
          description: The quoted input; omitted fee and fixed installment read as 0.00.
        result:
          $ref: "#/components/schemas/ConsignadoQuoteHumaResponse"
          description: The frozen calculation, in the preview response shape.
      required:
        - id
        - computedAt
        - input
        - result
      type: object
    ContractDivergenceDetailHumaBody:
      additionalProperties: false
      properties:
        divergence:
          $ref: "#/components/schemas/ContractDivergenceHumaBody"
        events:
          description: Full append-only history, newest first.
          items:
            $ref: "#/components/schemas/ContractDivergenceEventHumaBody"
          type:
            - array
            - "null"
        gatewayEvidence:
          description: Raw gateway-observed evidence. Secondary to the structured fields.
        lenderEvidence:
          description: Raw Lender-produced evidence. Secondary to the structured fields.
      required:
        - divergence
        - gatewayEvidence
        - lenderEvidence
        - events
      type: object
    ContractDivergenceEventHumaBody:
      additionalProperties: false
      properties:
        actor:
          description: Identity or system source that performed the transition.
          type: string
        createdAt:
          description: Instant history durably captured it (RFC3339 UTC).
          type: string
        detail:
          description: Transition-specific structured detail.
        id:
          description: History entry identifier.
          type: string
        occurredAt:
          description: Business instant of the transition (RFC3339 UTC).
          type: string
        sequence:
          description: Monotonic sequence within the item.
          format: int64
          type: integer
        type:
          description: opened|assigned|requeued|adjustment_requested|adjustment_posted|disposed|restated.
          type: string
      required:
        - id
        - sequence
        - type
        - actor
        - occurredAt
        - createdAt
      type: object
    ContractDivergenceHumaBody:
      additionalProperties: false
      properties:
        adjustmentStatus:
          description: not_required|required|requested|posted.
          type: string
        amountCurrency:
          description: ISO-4217 currency of the contested amounts.
          type: string
        assignedAt:
          description: Instant of the current assignment (RFC3339 UTC).
          type: string
        assignee:
          description: Operator currently responsible, when assigned.
          type: string
        authority:
          description: "Source of truth for the contested value: client|dataprev|gateway|lender."
          type: string
        calculatedAt:
          description: Instant the Lender calculation was produced (RFC3339 UTC).
          type: string
        category:
          description: "Bounded category: cash|rate|terms|margin|registration|technical."
          type: string
        classification:
          description: Specific durable exception inside the category.
          type: string
        clientDeclaredAmount:
          description: Authoritative value the client declared, when a comparison exists; on a ceded_cash_unplaced item, the router's current figure of the rail's cash no desk line holds.
          type: string
        contractId:
          description: Contract the divergence belongs to.
          type: string
        createdAt:
          description: RFC3339 UTC.
          type: string
        disposable:
          description: "True when the item is open and Dispose accepts it. False on a closed item and on a competência parked for its re-run (posting_pending employer_shortfall of a month no live cession holds, or reconciliation_hold_for_review), which leaves only by Requeue; true on its placed item (occurrenceKey run=placed|...), on a run held for its escrituração, on the review hold of a settle the rail never confirmed (lenderEvidence rail 0) and on every review hold of a month whose escrituração Dataprev flagged or a live cession holds, whose money the operador then holds. An employer_shortfall of a month a live cession holds (sold or retained) is also true: disposing it posts nothing, and a repurchase still books the employer's receivable from the escrituração."
          type: boolean
        disposedAt:
          description: Instant of disposition (RFC3339 UTC), present once disposed.
          type: string
        dispositionActor:
          description: Identity that disposed the item, present once disposed.
          type: string
        dispositionJustification:
          description: Free-text justification, present once disposed.
          type: string
        dispositionResult:
          description: Structured outcome, present once disposed.
          type: string
        dispositionState:
          description: open|disposed.
          type: string
        effect:
          description: "What the item does to the flow: audit_only|posting_pending|adjustment_required|booking_blocked."
          type: string
        firstObservedAt:
          description: First durable persist (RFC3339 UTC); the SLA clock start.
          type: string
        id:
          description: Contract divergence identifier.
          type: string
        latestObservedAt:
          description: Most recent observation (RFC3339 UTC).
          type: string
        lenderCalculatedAmount:
          description: Lender calculation. Audit evidence only, never authoritative.
          type: string
        occurrenceKey:
          description: Replay-fencing key for the observed occurrence.
          type: string
        railAcceptedAt:
          description: Instant the rail accepted the underlying fact (RFC3339 UTC).
          type: string
        rerunnable:
          description: "True when the item is open and Requeue re-executes it: a parked payroll competência, an unserviced repasse, a renegociação link, a closed contract's month, a ceded_cash_unplaced item whose month no live cession holds, or a review hold naming money on a month a live cession holds. The re-run reads the live books and can still be refused with its reason (a contract sold again, cash the cession's desk holds, an escrituração Dataprev flagged), the item staying open. False on a closed item, where the requeue only records a retry signal, and where the item itself shows a refusal every time: an item naming the fund's money, a ceded_cash_unplaced item of a month a live cession holds."
          type: boolean
        ruleVersion:
          description: Version of the rule that produced the Lender calculation.
          type: string
        slaDueAt:
          description: Resolution deadline (RFC3339 UTC).
          type: string
        updatedAt:
          description: RFC3339 UTC.
          type: string
        version:
          description: "Compare-and-swap guard: every mutation supplies this as expectedVersion."
          format: int64
          type: integer
      required:
        - id
        - contractId
        - category
        - classification
        - effect
        - authority
        - occurrenceKey
        - railAcceptedAt
        - firstObservedAt
        - latestObservedAt
        - slaDueAt
        - dispositionState
        - adjustmentStatus
        - version
        - createdAt
        - updatedAt
      type: object
    ContractDivergenceListHumaBody:
      additionalProperties: false
      properties:
        asOf:
          description: RFC3339 UTC cutoff this page used for SLA-breached display ordering only. Resend as asOf on the next page.
          type: string
        data:
          description: Page of divergences; always present, empty slice when none match.
          items:
            $ref: "#/components/schemas/ContractDivergenceHumaBody"
          type:
            - array
            - "null"
        hasMore:
          description: True when at least one more item exists beyond this page.
          type: boolean
      required:
        - data
        - hasMore
        - asOf
      type: object
    ContractLinkHumaItem:
      additionalProperties: false
      properties:
        loanAccountId:
          description: Null until the contract is disbursed.
          format: uuid
          type:
            - string
            - "null"
        loanApplicationId:
          format: uuid
          type: string
        numeroContrato:
          type: string
      required:
        - numeroContrato
        - loanApplicationId
        - loanAccountId
      type: object
    ContractLinksHumaBody:
      additionalProperties: false
      properties:
        items:
          description: One entry per known contract number, by number; empty when none is known.
          items:
            $ref: "#/components/schemas/ContractLinkHumaItem"
          type: array
      required:
        - items
      type: object
    ContractPreparationHumaBody:
      additionalProperties: false
      properties:
        declaredOriginationFeeAmount:
          description: Origination fee the client declared at registration; "0.00" when undeclared. Not the per-disbursement fee.
          examples:
            - "10.00"
          type: string
        loanApplicationId:
          format: uuid
          type: string
        numeroContrato:
          type: string
        preparation:
          $ref: "#/components/schemas/DeclaredContractPreparationHumaBody"
          description: Absent when the client declared no Lender preparation.
      required:
        - loanApplicationId
        - numeroContrato
        - declaredOriginationFeeAmount
      type: object
    CorrectDailyIndexRateHumaInputBody:
      additionalProperties: false
      properties:
        annualRate:
          description: DI rate of the day, % a.a. base 252, as a decimal string with at most two places. Never negative.
          examples:
            - "14.15"
          type: string
        reason:
          description: Why the day is corrected. Required, and kept with the revision for audit.
          examples:
            - BCB republished the day
          maxLength: 1000
          type: string
      required:
        - annualRate
        - reason
      type: object
    CreateAccrualRunHumaInputBody:
      additionalProperties: false
      properties:
        businessDate:
          description: "Business date (YYYY-MM-DD) the run is executed on. The run recognizes the last CIVIL MONTH that fully elapsed before this date — a run dated anywhere in July closes June — for the WHOLE book, pro rata temporis by calendar days, with the loan's contracting month apportioned within that month. Any date up to today in São Paulo works, and no account is skipped for the day of the month it was disbursed on; a date after today in São Paulo is refused with 422 (LENDER-0424) and nothing is written, because a run does not accept a future business date. Re-running the same competência is a no-op, so this is also the backfill lever: to close a month that was missed, post a date inside the following month."
          examples:
            - "2026-06-14"
          format: date
          type: string
        loanProductIds:
          description: Optional loan product identifiers to scope the run.
          items:
            format: uuid
            type: string
          maxItems: 100
          type:
            - array
            - "null"
        mode:
          description: Label recorded on the run for correlation and logs. It does not change the cadence or select which accounts are recognized. The label is part of the run's correlation id, so "heartbeat" is reserved for the scheduled driver and is refused here.
          examples:
            - daily
          maxLength: 32
          minLength: 1
          type: string
      required:
        - businessDate
        - mode
      type: object
    CreateAssignmentSetHumaInputBody:
      additionalProperties: false
      properties:
        fundId:
          description: Fund registration this composition is offered to. Its cession rate prices every receivable and its regulation supplies the concentration limits.
          format: uuid
          type: string
        receivableRefs:
          description: The receivables the desk chose, by rail contract reference. A reference the tenant's assignable pool does not carry is refused by name — never dropped from the set silently.
          items:
            type: string
          maxItems: 500
          minItems: 1
          type:
            - array
            - "null"
        retainedFraction:
          description: "The share of the expected loss this institution keeps after THIS sale, a decimal string from 0 to 1 with at most 8 decimal places (0 keeps nothing, 0.1 keeps 10%). Omit it to take the fraction the fund proposes. Whichever results is frozen onto the cession next to the institution's substantial-retention threshold of that day, and the regime is derived from those two frozen values, never re-read from the fund. Refusals: null or blank LENDER-0503; not a decimal, below 0, above 1 or more than 8 decimal places LENDER-0506; a fraction at or above the threshold (substantial retention) LENDER-0504, not bookable yet."
          examples:
            - "0"
          type: string
        sellerRetainsControl:
          description: "Whether the seller keeps control of what THIS sale transfers, the middle band of Res. CMN 4.966 art. 26 III that a fraction cannot express. Omit it to take what the fund proposes. Refusals: null LENDER-0503; true LENDER-0505, a band this product does not book and never will."
          examples:
            - false
          type: boolean
      required:
        - fundId
        - receivableRefs
      type: object
    CreateChargeTemplateHumaInputBody:
      additionalProperties: false
      properties:
        amount:
          description: "Flat amount, decimal string, non-negative. A late_fee or default_interest the version's CDC regime caps carries none: it is a rate no higher than the cap (LENDER-0116)."
          examples:
            - "25.00"
          type: string
        chargeCode:
          description: Charge code carried onto every charge assessed from this model.
          examples:
            - SERVICING_FEE
          minLength: 1
          type: string
        chargeTemplateId:
          description: Operator-chosen key for this charge model. Charges are applied by naming it.
          examples:
            - SERVICING_FEE
          maxLength: 128
          minLength: 1
          type: string
        chargeType:
          description: "Charge type. Not a label: the Brazilian consumer-credit cap applies to late_fee and default_interest only, so a wrong type escapes its own ceiling. Every revision of a chargeTemplateId keeps the type of its earlier revisions. origination_fee: retained at every direct-credit release; one template per version, new revisions under the same chargeTemplateId, each in force from the Brazilian civil day its effectiveFrom falls on; amount is the fixed part per release, rate the fraction of the release's gross (0.02 is 2%); never refundable; the version's currency; the version must accrue by effective interest."
          enum:
            - late_fee
            - default_interest
            - origination_fee
            - fee
          examples:
            - fee
          type: string
        currency:
          description: ISO 4217 currency code.
          examples:
            - BRL
          maxLength: 3
          minLength: 3
          type: string
        effectiveFrom:
          description: "Date this revision takes effect (RFC3339 or YYYY-MM-DD, UTC). Must be strictly after the newest revision of the same model on this version: a revision never reaches backwards into days already priced."
          examples:
            - "2026-04-01"
          type: string
        rate:
          description: Rate component, decimal string, non-negative, as a fraction (0.02 is 2%). Defaults to 0.
          examples:
            - "0"
          type: string
        refundable:
          description: "Whether early payoff gives this charge back pro-rata (CDC art. 52 par. 2), measured from the day it was assessed to the contract's final scheduled due date. ABSENT MEANS NOT REFUNDABLE: a charge earned when it was levied, such as a flat origination fee, must be left false. The assessed charge freezes this declaration, so revising the model never changes what is owed on a charge already levied."
          examples:
            - false
          type: boolean
      required:
        - chargeTemplateId
        - chargeCode
        - chargeType
        - amount
        - currency
        - effectiveFrom
      type: object
    CreateDocumentTemplateHumaInputBody:
      additionalProperties: false
      properties:
        kind:
          description: "Document kind. A loan product owns its CCB clausulados (ccb for applications, consignado_quote_ccb for durable CLT quotes) and nothing else: the registry's kind and scope form one closed domain, and the assignment endorsement term is published per fund under /api/v1/assignment/funds/{fundId}/document-templates."
          enum:
            - ccb
            - consignado_quote_ccb
          type: string
        requiredFields:
          description: Placeholder field names this template declares it needs; unioned with the jurisdiction's own minimum catalog at render time.
          items:
            type: string
          type:
            - array
            - "null"
        sections:
          description: Ordered clauses.
          items:
            $ref: "#/components/schemas/DocumentTemplateSectionHumaBody"
          minItems: 1
          type:
            - array
            - "null"
        signatureBlock:
          description: Signature block text.
          type: string
        title:
          description: Template title.
          type: string
      required:
        - kind
        - title
        - sections
        - signatureBlock
      type: object
    CreateFundDocumentTemplateHumaInputBody:
      additionalProperties: false
      properties:
        kind:
          description: Document kind; a fund owns the endorsement-term clausulado and nothing else.
          enum:
            - assignment_term
          type: string
        requiredFields:
          description: Placeholder field names this template declares it needs; the term recorder supplies them from the approved set's frozen snapshot.
          items:
            type: string
          type:
            - array
            - "null"
        sections:
          description: Ordered clauses.
          items:
            $ref: "#/components/schemas/DocumentTemplateSectionHumaBody"
          minItems: 1
          type:
            - array
            - "null"
        signatureBlock:
          description: Signature block text.
          type: string
        title:
          description: Template title.
          type: string
      required:
        - kind
        - title
        - sections
        - signatureBlock
      type: object
    CreateLoanApplicationHumaRequest:
      additionalProperties: false
      properties:
        borrowerDocument:
          description: "The borrower's CPF (11 digits) or CNPJ (14 characters, the alphanumeric CNPJ included); the mask's dots, dash, slash and spaces are ignored and the check digits must hold (LENDER-0258). It names whose credit this is: a CPF is a pessoaFisica, a CNPJ a pessoaJuridica, and the pinned product version must admit that kind (LENDER-0228). The Lender finds the borrower's holder by it in the Midaz CRM of the product's institution; the response's borrowerId is that holder. The proposal records that id, never the document."
          examples:
            - "52998224725"
          type: string
        borrowerName:
          description: The borrower's name. A holder the Lender registers for this proposal carries it; an existing holder of the document keeps its own. The proposal never records it; blank refused (LENDER-0258).
          examples:
            - Maria da Silva
          maxLength: 256
          type: string
        expectedDisbursementDate:
          description: Expected disbursement date (RFC3339).
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        firstDueDate:
          description: "Day the first instalment falls due (YYYY-MM-DD or RFC3339; an instant names the Brazilian civil day it falls on). OPTIONAL: omit it and the application records the day the schedule generator strikes for expectedDisbursementDate — one month later, moved to a business day. Bounded by the loan product version's admitted window, counted from the expected disbursement day (LENDER-0235). Mutually exclusive with gracePeriodDays (LENDER-0232). Every schedule of this application hangs on the recorded date: the credit instrument's table and the release."
          examples:
            - "2026-07-14"
          type: string
        gracePeriodDays:
          description: "Carência in calendar days, in place of firstDueDate (LENDER-0232): the application records as its first due date the business day the schedule generator moves expectedDisbursementDate plus this many days to, the day a schedule preview with the same gracePeriodDays, loanProductVersionId and startDate strikes. Bounded by the loan product version's admitted window as a chosen firstDueDate is (LENDER-0235); zero is none. The application records only the date."
          examples:
            - 45
          format: int64
          maximum: 365
          minimum: 0
          type: integer
        loanProductVersionId:
          description: Loan product version identifier (UUID).
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        previewScheduleSnapshotId:
          description: "Schedule offer this application cites: the scheduleOfferSnapshotId a schedule preview returned. OPTIONAL — an application does not have to be simulated first. When supplied it must name an offer on file, or the application is refused with LENDER-0236; its terms are never compared with the application's."
          examples:
            - 6ba7b810-9dad-11d1-80b4-00c04fd430c8
          format: uuid
          type: string
        requestedInstallmentAmount:
          description: "Instalment the proposal is asked by, as a decimal string, in place of requestedPrincipalAmount: a proposal names exactly one of this, requestedPrincipalAmount and requestedNetAmount (LENDER-0255). The loan product version must admit the installment amount anchor (LENDER-0254). The principal recorded is the largest, in cents, whose every instalment on the recorded first due date is at most this amount; when none is, LENDER-0256. The version's principal limits apply to the resolved principal: its maximum caps the search, and a principal below its minimum is refused (LENDER-0250)."
          examples:
            - "300.00"
          type: string
        requestedInstallments:
          description: "Number of installments. Bounded, inclusive, by the loan product version's installment limits when it declares them (LENDER-0252). The term they span is bounded by its term limits (LENDER-0251): months from the expected disbursement day to the last instalment's grid date, a started month counting whole."
          examples:
            - 24
          format: int64
          maximum: 600
          minimum: 1
          type: integer
        requestedInterestRate:
          description: Requested monthly interest rate as a decimal string, scale 8 (e.g. "0.00000100").
          examples:
            - "0.00000100"
          type: string
        requestedNetAmount:
          description: "Net the borrower is to receive, as a decimal string, in place of requestedPrincipalAmount: a proposal names exactly one of this, requestedPrincipalAmount and requestedInstallmentAmount (LENDER-0255). The loan product version must admit the net amount anchor (LENDER-0254). The principal recorded is the least gross, in cents, whose release on the expected disbursement day delivers this amount after the jurisdiction withholding and the origination fee, or 0.01 above it. A fee that takes the whole net is refused with LENDER-0209, and a borrower kind the deployment prices no tax for with LENDER-0233. The version's principal limits apply to the resolved gross and never cap it (LENDER-0250)."
          examples:
            - "10000.00"
          type: string
        requestedPrincipalAmount:
          description: Requested principal amount as a decimal string (e.g. "50000.00"). A proposal names exactly one of this, requestedInstallmentAmount and requestedNetAmount (LENDER-0255). Bounded, inclusive, by the loan product version's principal limits when it declares them (LENDER-0250).
          examples:
            - "50000.00"
          type: string
        taxRegime:
          description: "Tax regime the borrower declared. OPTIONAL: omit it and the release uses the loan product version's own regime: on a version whose own regime is brazilSimplesNacional a pessoaJuridica is priced as an optante, and anyone else at the borrower kind's rate. It must be one of the regimes the version admits (LENDER-0930), which GET /api/v1/br/loan-product-versions/{id}/tax-regimes lists. brazilSimplesNacional is for a pessoaJuridica opting into the Simples Nacional, MEI included (LENDER-0931): the release withholds the IOF of Decreto 6.306/2007, art. 7o, VI, 0.00274% a day plus 0.38%, while the operation's contracted principal is R$ 30.000,00 or less, and the pessoaJuridica rate above it. The client keeps the borrower's art. 45, II declaration; the application records only the regime."
          examples:
            - brazilSimplesNacional
          type: string
      required:
        - loanProductVersionId
        - borrowerDocument
        - borrowerName
        - requestedInterestRate
        - requestedInstallments
        - expectedDisbursementDate
      type: object
    CreateLoanProductHumaRequest:
      additionalProperties: false
      properties:
        jurisdictionCode:
          description: Jurisdiction profile code (e.g. BR).
          examples:
            - BR
          type: string
        loanType:
          description: Loan product type.
          examples:
            - personal
          type: string
        name:
          description: Loan product display name.
          type: string
      required:
        - name
        - loanType
        - jurisdictionCode
      type: object
    CreateLoanProductVersionHumaInputBody:
      additionalProperties: false
      properties:
        admittedBorrowerKinds:
          description: Kinds of borrower this version will originate for. Omitting it, or sending an empty list, declares NOTHING and admits NOBODY — it does not mean "both". Brazil taxes the two kinds at different IOF rates (Decreto 6.306/2007, art. 7o, I, "b"), so a product that has not said whose credit it grants cannot be priced. Duplicates are collapsed and the set is stored sorted; any other value is refused with 422.
          examples:
            -   - pessoaFisica
          items:
            enum:
              - pessoaFisica
              - pessoaJuridica
            type: string
          maxItems: 2
          type:
            - array
            - "null"
        changeReason:
          description: Reason for the new version.
          type: string
        currency:
          description: ISO 4217 currency code the product version denominates (3 uppercase letters); the loan's currency source of truth.
          examples:
            - BRL
          maxLength: 3
          minLength: 3
          type: string
        firstDueDateWindow:
          $ref: "#/components/schemas/FirstDueDateWindowHumaBody"
          description: "Span of days after the money date in which this version admits a CHOSEN first instalment date. OPTIONAL, unlike the price band: omit it and the version bounds no chosen date, which is how every product that takes the generator's monthly grid behaves. Omitted is not a window of zero. It also bounds a release on another day than the application expected: the span from the money day to the application's recorded first due date must fall inside it."
        fixedAnnualRateBps:
          description: Fixed annual rate in basis points.
          examples:
            - 1850
          format: int64
          type: integer
        floatingRateTableId:
          description: Floating-rate table identifier.
          examples:
            - 550e8400-e29b-41d4-a716-446655440002
          type: string
        floatingSpreadBps:
          description: Floating spread in basis points.
          examples:
            - 1850
          format: int64
          type: integer
        jurisdictionCode:
          description: Jurisdiction profile code.
          examples:
            - BR
          type: string
        jurisdictionExtensions:
          additionalProperties: true
          description: Per-jurisdiction version fields. A key the jurisdiction does not read is refused with 422 LENDER-0115.
          type: object
        rateBand:
          $ref: "#/components/schemas/RateBandHumaBody"
          description: "Price band this version authorizes, in annual basis points. Required: a version declaring no band originates nothing. A pointer so an omitted band is refused instead of defaulting to a zero-to-zero band that authorizes only a 0% rate."
        rateMode:
          description: Rate mode (fixed|floating).
          examples:
            - fixed
          type: string
        requiresFloatingRate:
          description: Whether a floating-rate table is required.
          type: boolean
        terms:
          $ref: "#/components/schemas/VersionTermsHumaBody"
          description: "What the version admits. Optional, and so is each member: an absent member takes its default."
      required:
        - jurisdictionCode
        - changeReason
        - currency
        - rateBand
      type: object
    CreateRateTableHumaInputBody:
      additionalProperties: false
      properties:
        name:
          description: "Reference rate table name. Unique per tenant, case-insensitively: the name is how the curve is picked, so two curves cannot share one."
          examples:
            - CDI Diario
          maxLength: 200
          minLength: 1
          type: string
      required:
        - name
      type: object
    CreditInstrumentHumaBody:
      additionalProperties: false
      properties:
        contentDigest:
          description: sha-256 hex digest of the rendered PDF bytes.
          type: string
        createdAt:
          description: Row creation timestamp (RFC3339, UTC).
          type: string
        documentTemplateVersionId:
          description: Exact template version rendered (uuid).
          type: string
        emittedAt:
          description: Emission instant (RFC3339, UTC).
          type: string
        emittedBy:
          description: Validated actor identity that requested emission.
          type: string
        id:
          description: Instrument identifier (uuid).
          type: string
        idempotencyKey:
          description: Caller's idempotency key.
          type: string
        loanApplicationId:
          description: Owning loan application identifier (uuid).
          type: string
        sizeBytes:
          description: Size of the rendered document in bytes.
          format: int64
          type: integer
        supersededByInstrumentId:
          description: Identifier (uuid) of the later instrument, for the same loan application, that superseded this one. Set only on the list endpoint; absent means this is the current instrument for its application.
          type: string
      required:
        - id
        - loanApplicationId
        - documentTemplateVersionId
        - idempotencyKey
        - contentDigest
        - sizeBytes
        - emittedAt
        - emittedBy
        - createdAt
      type: object
    CreditInstrumentIssuanceHumaBody:
      additionalProperties: false
      properties:
        canEmit:
          description: "true when the application passes the emission eligibility gates (origination front, who issues the instrument per the product version, application status). It does not promise an active template or a sufficient parties block: POST still answers those."
          type: boolean
        refusalCode:
          description: "The error code POST would refuse with (LENDER-0601: the product version leaves the instrument to the client; LENDER-0602: the application's front or status admits no emission). Absent when canEmit is true, when custody is unavailable, or when the application does not resolve."
          type: string
      required:
        - canEmit
      type: object
    CreditInstrumentListHumaBody:
      additionalProperties: false
      properties:
        data:
          description: Emission history, newest first; always present, empty slice when none exist.
          items:
            $ref: "#/components/schemas/CreditInstrumentHumaBody"
          type:
            - array
            - "null"
        issuance:
          $ref: "#/components/schemas/CreditInstrumentIssuanceHumaBody"
          description: Whether the loan application passes the emission eligibility gates now.
      required:
        - data
        - issuance
      type: object
    CreditLossCollectionEndResponse:
      additionalProperties: false
      properties:
        collectionEndedAt:
          description: RFC 3339 instant the declaration was recorded; the server clock dates it.
          format: date-time
          type: string
        collectionEndedBy:
          description: Subject of the validated identity that declared it; empty when none reached the route.
          type: string
        loanAccountId:
          description: Written-off loan account.
          format: uuid
          type: string
        requestId:
          description: X-Idempotency key the declaration was recorded under.
          type: string
        writeOffId:
          description: Write-off whose collection ended.
          format: uuid
          type: string
      required:
        - writeOffId
        - loanAccountId
        - requestId
        - collectionEndedAt
        - collectionEndedBy
      type: object
    CreditLossRecoveryResponse:
      additionalProperties: false
      properties:
        amount:
          description: Money received (2 d.p. string).
          examples:
            - "9000.00"
          type: string
        controlReleased:
          description: Written-off control the recovery released (2 d.p. string).
          examples:
            - "8650.00"
          type: string
        currency:
          description: ISO 4217 currency of the amounts.
          examples:
            - BRL
          type: string
        id:
          description: Recorded recovery.
          format: uuid
          type: string
        loanAccountId:
          description: Written-off loan account.
          format: uuid
          type: string
        receivedAt:
          description: RFC 3339 instant the money arrived, with fractional seconds.
          format: date-time
          type: string
        recordedAt:
          description: RFC 3339 instant the recovery was recorded.
          format: date-time
          type: string
        recordedBy:
          description: Subject of the validated identity that recorded it; empty when none reached the route.
          type: string
        recoveredBefore:
          description: Recovered by the recoveries recorded before this one (2 d.p. string).
          examples:
            - "1200.00"
          type: string
        remainingAfter:
          description: Debt still standing after this recovery (2 d.p. string).
          examples:
            - "1400.00"
          type: string
        requestId:
          description: X-Idempotency key the recovery was recorded under.
          type: string
        reversedAt:
          description: RFC 3339 instant the recovery was reversed, with fractional seconds; absent while it stands. A reversed recovery no longer counts in recoveredTotal, remainingDebt or controlOpen.
          format: date-time
          type: string
        reversedBy:
          description: Subject that reversed it.
          type: string
        taxAmount:
          description: PIS/COFINS booked on the taxed part; 0.00 when nothing is taxed (2 d.p. string).
          examples:
            - "16.28"
          type: string
        taxedAmount:
          description: "Part above W: new revenue, taxed by PIS/COFINS (2 d.p. string)."
          examples:
            - "350.00"
          type: string
        untaxedAmount:
          description: "Part that settles the written-off amount W first: untaxed (2 d.p. string)."
          examples:
            - "8650.00"
          type: string
        writeOffId:
          description: Write-off the recovery pays down.
          format: uuid
          type: string
      required:
        - id
        - writeOffId
        - loanAccountId
        - requestId
        - amount
        - receivedAt
        - recordedAt
        - recordedBy
        - currency
        - recoveredBefore
        - untaxedAmount
        - taxedAmount
        - taxAmount
        - controlReleased
        - remainingAfter
      type: object
    CreditLossWriteOffResponse:
      additionalProperties: false
      properties:
        additionalLoss:
          description: "Loss above the allowance booked to provision expense: W - B when positive (2 d.p. string)."
          examples:
            - "3850.00"
          type: string
        carryingAmount:
          description: "Carrying amount written off (W): the book net of the withheld interest, after the held cash paid what it reached (2 d.p. string)."
          examples:
            - "9850.00"
          type: string
        currency:
          description: ISO 4217 currency of the amounts.
          examples:
            - BRL
          type: string
        debtAtWriteOff:
          description: "Debt D the borrower still owes after the write-off: the contract's full payoff of the write-off day, frozen at the write-off; recoveries pay it down (2 d.p. string)."
          examples:
            - "11600.00"
          type: string
        heldCashApplied:
          description: Held cash the write-off's receipt applied to the debt first (2 d.p. string).
          examples:
            - "150.00"
          type: string
        id:
          description: Recorded write-off.
          format: uuid
          type: string
        loanAccountId:
          description: Written-off loan account.
          format: uuid
          type: string
        provisionConsumed:
          description: "Provision the write-off consumed: the lesser of the allowance B and W (2 d.p. string)."
          examples:
            - "6000.00"
          type: string
        provisionReleased:
          description: "Allowance beyond the loss booked as a provision reversal: B - W when positive (2 d.p. string)."
          examples:
            - "0.00"
          type: string
        reason:
          description: Why the contract was written off.
          type: string
        recordedBy:
          description: Subject of the validated identity that wrote it off; empty when none reached the route.
          type: string
        requestId:
          description: X-Idempotency key the write-off was recorded under.
          type: string
        withheldDerecognized:
          description: Withheld interest cleared from rendas a apropriar (2 d.p. string).
          examples:
            - "1600.00"
          type: string
        writtenOffAt:
          description: RFC 3339 instant the write-off was recorded, with fractional seconds; the server clock dates it.
          format: date-time
          type: string
      required:
        - id
        - requestId
        - loanAccountId
        - writtenOffAt
        - reason
        - recordedBy
        - currency
        - carryingAmount
        - heldCashApplied
        - withheldDerecognized
        - provisionConsumed
        - additionalLoss
        - provisionReleased
        - debtAtWriteOff
      type: object
    CreditLossWriteOffStandingResponse:
      additionalProperties: false
      properties:
        additionalLoss:
          description: "Loss above the allowance booked to provision expense: W - B when positive (2 d.p. string)."
          examples:
            - "3850.00"
          type: string
        carryingAmount:
          description: "Carrying amount written off (W): the book net of the withheld interest, after the held cash paid what it reached (2 d.p. string)."
          examples:
            - "9850.00"
          type: string
        collectionEndedAt:
          description: RFC 3339 instant the client operator declared collection ended; absent until declared.
          format: date-time
          type: string
        collectionEndedBy:
          description: Subject that declared it.
          type: string
        controlOpen:
          description: Written-off control still open (2 d.p. string); 0.00 once it was released.
          examples:
            - "0.00"
          type: string
        controlReleasedAt:
          description: Business day the rest of the control left the books, the later of 5 years after the write-off and the declared end; absent while it stands.
          examples:
            - "2032-03-10"
          format: date
          type: string
        currency:
          description: ISO 4217 currency of the amounts.
          examples:
            - BRL
          type: string
        debtAtWriteOff:
          description: "Debt D the borrower still owes after the write-off: the contract's full payoff of the write-off day, frozen at the write-off; recoveries pay it down (2 d.p. string)."
          examples:
            - "11600.00"
          type: string
        heldCashApplied:
          description: Held cash the write-off's receipt applied to the debt first (2 d.p. string).
          examples:
            - "150.00"
          type: string
        id:
          description: Recorded write-off.
          format: uuid
          type: string
        loanAccountId:
          description: Written-off loan account.
          format: uuid
          type: string
        provisionConsumed:
          description: "Provision the write-off consumed: the lesser of the allowance B and W (2 d.p. string)."
          examples:
            - "6000.00"
          type: string
        provisionReleased:
          description: "Allowance beyond the loss booked as a provision reversal: B - W when positive (2 d.p. string)."
          examples:
            - "0.00"
          type: string
        reason:
          description: Why the contract was written off.
          type: string
        recordedBy:
          description: Subject of the validated identity that wrote it off; empty when none reached the route.
          type: string
        recoveredTotal:
          description: Recovered so far across every standing recovery, reversed ones excluded (2 d.p. string).
          examples:
            - "10200.00"
          type: string
        recoveries:
          description: The latest 100 recoveries, newest first, reversed ones included.
          items:
            $ref: "#/components/schemas/CreditLossRecoveryResponse"
          type:
            - array
            - "null"
        remainingDebt:
          description: "Debt still standing: debtAtWriteOff minus recoveredTotal (2 d.p. string)."
          examples:
            - "1400.00"
          type: string
        requestId:
          description: X-Idempotency key the write-off was recorded under.
          type: string
        withheldDerecognized:
          description: Withheld interest cleared from rendas a apropriar (2 d.p. string).
          examples:
            - "1600.00"
          type: string
        writtenOffAt:
          description: RFC 3339 instant the write-off was recorded, with fractional seconds; the server clock dates it.
          format: date-time
          type: string
      required:
        - recoveredTotal
        - remainingDebt
        - controlOpen
        - recoveries
        - id
        - requestId
        - loanAccountId
        - writtenOffAt
        - reason
        - recordedBy
        - currency
        - carryingAmount
        - heldCashApplied
        - withheldDerecognized
        - provisionConsumed
        - additionalLoss
        - provisionReleased
        - debtAtWriteOff
      type: object
    CreditOperationDescriptorResponse:
      additionalProperties: false
      properties:
        accrualState:
          description: "Interest accrual state: accruing or suspended; omitted when not set."
          examples:
            - accruing
          type: string
        annualRate:
          description: Contractual nominal annual interest rate as a percentage decimal string.
          examples:
            - "24.50"
          type: string
        asOfDate:
          description: Valuation date the financial figures are reconstructed as of (YYYY-MM-DD, UTC).
          examples:
            - "2026-06-14"
          type: string
        borrowerKind:
          description: "Whose credit this operation is: pessoaFisica or pessoaJuridica, as declared on the loan application. Brazil taxes and reports the two apart, so a contract whose application declared no kind is refused with 422 LENDER-0230 instead of being described under an assumed one."
          examples:
            - pessoaFisica
          type: string
        cetAnnualPct:
          description: Custo Efetivo Total, annualized, as a percentage decimal string.
          examples:
            - "28.40"
          type: string
        cetMonthlyPct:
          description: Custo Efetivo Total, monthly, as a percentage decimal string.
          examples:
            - "2.11"
          type: string
        consumerProtectionRegime:
          description: Applicable consumer-protection regime label; omitted when not classified.
          type: string
        createdAt:
          description: RFC3339 UTC timestamp when the descriptor record was created.
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        descriptorDate:
          description: Date the descriptor snapshot was generated (YYYY-MM-DD, UTC).
          examples:
            - "2026-06-14"
          type: string
        id:
          description: Unique identifier (UUID) of the credit operation descriptor snapshot.
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        installmentCount:
          description: Total number of installments in the amortization schedule.
          examples:
            - 24
          format: int64
          type: integer
        iofAmount:
          description: IOF (Imposto sobre Operacoes Financeiras) amount as a decimal string, scale 2; omitted when not applicable.
          examples:
            - "50.34"
          type: string
        jurisdictionCode:
          description: ISO jurisdiction code governing the descriptor (e.g. "BR").
          examples:
            - BR
          type: string
        lastPaymentDate:
          description: Date of the most recent payment received (YYYY-MM-DD, UTC); omitted if no payment recorded.
          examples:
            - "2026-06-14"
          type: string
        loanAccountId:
          description: UUID of the loan account the descriptor summarizes.
          examples:
            - 550e8400-e29b-41d4-a716-446655440001
          type: string
        loanApplicationId:
          description: UUID of the originating loan application.
          examples:
            - 550e8400-e29b-41d4-a716-446655440002
          type: string
        monthlyRate:
          description: Contractual nominal monthly interest rate as a percentage decimal string.
          examples:
            - "1.85"
          type: string
        nextDueDate:
          description: Due date of the next scheduled installment (YYYY-MM-DD, UTC); omitted if none pending.
          examples:
            - "2026-06-14"
          type: string
        originalTerm:
          description: Original contracted term of the loan in number of installments.
          examples:
            - 24
          format: int64
          type: integer
        outstandingBalance:
          description: Total outstanding balance (principal plus accrued charges) as a decimal string, scale 2.
          examples:
            - "43250.75"
          type: string
        overdueInstallmentCount:
          description: Number of installments currently past due.
          examples:
            - 1
          format: int64
          type: integer
        paidInstallmentCount:
          description: Number of installments fully paid to date.
          examples:
            - 6
          format: int64
          type: integer
        pddStage:
          description: "Current PDD delinquency staging: one of current, stage_1, stage_2, stage_3; omitted when unstaged."
          examples:
            - stage_1
          type: string
        prepaymentSettlementId:
          description: UUID of the prepayment settlement that closed the operation; omitted unless settled via prepayment.
          examples:
            - 550e8400-e29b-41d4-a716-446655440003
          type: string
        principalOutstanding:
          description: Outstanding principal as a decimal string in major currency units, scale 2.
          examples:
            - "42000.00"
          type: string
        profileVersion:
          description: Jurisdiction profile version used to compute the descriptor.
          examples:
            - 1.0.0
          type: string
        refreshedAt:
          description: RFC3339 UTC timestamp when the descriptor figures were last refreshed.
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        status:
          description: Lifecycle status of the credit operation (e.g. active, settled).
          examples:
            - active
          type: string
        totalCharges:
          description: Cumulative fees and charges as a decimal string in major currency units, scale 2.
          examples:
            - "320.00"
          type: string
        totalTaxes:
          description: Cumulative taxes (IOF withheld at release plus the complementary IOF financed by reschedules) as a decimal string in major currency units, scale 2.
          examples:
            - "86.84"
          type: string
      required:
        - id
        - loanAccountId
        - loanApplicationId
        - descriptorDate
        - asOfDate
        - profileVersion
        - jurisdictionCode
        - borrowerKind
        - status
        - principalOutstanding
        - outstandingBalance
        - annualRate
        - monthlyRate
        - cetAnnualPct
        - cetMonthlyPct
        - originalTerm
        - installmentCount
        - paidInstallmentCount
        - overdueInstallmentCount
        - totalCharges
        - totalTaxes
        - refreshedAt
        - createdAt
      type: object
    DailyIndexRateHumaBody:
      additionalProperties: false
      properties:
        actorId:
          description: Authenticated subject that corrected the day; absent on a Central Bank revision.
          examples:
            - lerian/ana
          type: string
        annualRateBps:
          description: DI rate of the day, % a.a. base 252, in basis points (14.15% = 1415).
          examples:
            - 1415
          format: int64
          type: integer
        createdAt:
          description: When this revision was stored (RFC3339, UTC).
          examples:
            - "2026-10-15T13:05:00Z"
          type: string
        date:
          description: Civil day the rate applies to (YYYY-MM-DD).
          examples:
            - "2026-10-14"
          type: string
        reason:
          description: Why an operator corrected the day; absent on a Central Bank revision.
          examples:
            - BCB republished the day
          type: string
        revision:
          description: Revision of the day, from 1. The highest revision of a day is the one in force.
          examples:
            - 2
          format: int64
          type: integer
        source:
          description: "Who stored this revision: the Central Bank series (bcb_sgs) or an operator correction."
          enum:
            - bcb_sgs
            - operator
          examples:
            - operator
          type: string
      required:
        - date
        - annualRateBps
        - source
        - revision
        - createdAt
      type: object
    DailyIndexRateListHumaBody:
      additionalProperties: false
      properties:
        data:
          description: Every revision of each day in the window, by day then revision; empty when the window holds none.
          items:
            $ref: "#/components/schemas/DailyIndexRateHumaBody"
          type: array
      required:
        - data
      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: "Authenticated subject of the loan officer assigned to the loan, or empty on a system-originated contract, which has no human officer. Whatever the identity provider issues as the subject: not necessarily a UUID."
          examples:
            - officer-xyz
          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
          format: uuid
          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
        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.
          examples:
            - 550e8400-e29b-41d4-a716-446655440020
          type: string
        source:
          description: Origin of the metrics; always "snapshot", because a business date the producer has not measured is refused with 503 rather than answered with zeros.
          type: string
        stalenessReason:
          description: Explanation of why the data is considered stale; omitted when fresh.
          type: string
      required:
        - snapshotId
        - snapshotAsOfDate
        - generatedAt
        - source
        - 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
    DeclareNormClassificationBody:
      additionalProperties: false
      properties:
        normModality:
          description: "Optional refinement the norm keys a rate on beyond the carteira. 'consignado' selects the art. 78 §6º carve-out (Res. BCB 397/2024): payroll-deducted personal credit at up to fourteen days provisions at 0,5% instead of C5's 1,9%."
          enum:
            - consignado
          examples:
            - consignado
          type: string
        normPortfolioClass:
          description: Carteira the credit booked under this version belongs to (Res. BCB 352/2023 art. 81). Consignado, CDC and cartão rotativo sem garantia are C5 (art. 81, V, a); PJ capital de giro sem garantia is C4 (art. 81, IV, a). Where more than one carteira fits, art. 81 §1º takes the one giving the lower provision for an asset defaulted less than one month.
          enum:
            - C1
            - C2
            - C3
            - C4
            - C5
          examples:
            - C5
          type: string
      required:
        - normPortfolioClass
      type: object
    DeclareNormClassificationResponse:
      additionalProperties: false
      properties:
        loanProductVersionId:
          type: string
        normModality:
          description: Modality the norm keys a rate on beyond the carteira; absent until one is declared.
          enum:
            - consignado
          type: string
        normPortfolioClass:
          type: string
      required:
        - loanProductVersionId
        - normPortfolioClass
      type: object
    DeclareProblemAssetAssessmentHumaBody:
      additionalProperties: false
      properties:
        characterizesProblemAsset:
          description: The verdict. False records that the trigger was evaluated and did NOT characterise the asset — which is how a prior characterisation is withdrawn, and is not the same as never having looked.
          type: boolean
        declaredBy:
          description: Declaring subject, used ONLY on a deployment with authentication disabled. When the request carries a validated identity, that subject is recorded and this field is ignored.
          maxLength: 256
          type: string
        evaluatedOn:
          description: "The business day the assessment was made (YYYY-MM-DD). A day and not an instant: it is compared against a competencia, which is a civil day."
          examples:
            - "2026-09-30"
          type: string
        evidenceNotes:
          description: "The assessor's own notes. Optional: the reference is what makes the declaration checkable, the prose is what makes it readable."
          maxLength: 4096
          type: string
        evidenceReference:
          description: "Mandatory pointer to the evidence: a document id, a case number, a URL. Required because this declaration suspends the contract's income recognition and raises its provision, and one that cites nothing cannot be reviewed."
          examples:
            - proc-0801234-56.2026.8.26.0100
          maxLength: 512
          type: string
        source:
          description: "Where the characterisation came from: the credit committee, the bureau feed, the court notice."
          examples:
            - Comite de credito 2026-09-30
          maxLength: 256
          type: string
        trigger:
          description: "The norm article the assessment invokes. Free text because art. 3 par. 2 is an open list (\"entre outros\"): the console offers the incisos as presets and accepts any other article an assessor names. Stored trimmed and lower-cased, because the article is the identity a later withdrawal has to match: sent as ART_3_P2_III it is stored, returned and withdrawn as art_3_p2_iii. Examples: art_3_p1, art_3_p2_i, art_3_p2_iii, art_3_p2_iv, art_3_p2_vi. Reserved: pdd_manual_stage is the floor a manual stage_2 or stage_3 holds; declare it with characterizesProblemAsset false to release the floor, or true to reaffirm it."
          examples:
            - art_3_p2_iii
          maxLength: 128
          type: string
      required:
        - trigger
        - source
        - evidenceReference
        - evaluatedOn
        - characterizesProblemAsset
      type: object
    DeclareScrModalityBody:
      additionalProperties: false
      properties:
        scrModality:
          description: "SCR 3040 modality of the credit booked under this version: attribute Mod of the Leiaute do Documento 3040, Anexo 3 (Modalidade Operação), four digits, modalidade then submodalidade. 0202 is crédito pessoal com consignação em folha de pagamento; 0203 is crédito pessoal sem consignação. A code outside Anexo 3 is refused with 422 LENDER-0420."
          examples:
            - "0202"
          type: string
      required:
        - scrModality
      type: object
    DeclaredContractPreparationHumaBody:
      additionalProperties: false
      properties:
        creditInstrumentId:
          description: Client-declared original CCB instrument id; not verified.
          format: uuid
          type: string
        originalCcbDigestSha256:
          description: Client-declared lowercase SHA-256 of the original CCB; not verified.
          pattern: ^[0-9a-f]{64}$
          type: string
        quoteId:
          description: Client-declared Lender quote id; not verified.
          format: uuid
          type: string
      required:
        - quoteId
        - creditInstrumentId
        - originalCcbDigestSha256
      type: object
    DeferredFeeFiguresHumaBody:
      additionalProperties: false
      properties:
        deferred:
          description: Credited to the fee accounts at disbursement.
          examples:
            - "150.00"
          type: string
        difference:
          description: "Present only when DIVERGENT: deferred - retainedFee, or the negative remaining when the deferral agrees."
          examples:
            - "-150.00"
          type: string
        recognised:
          description: Amortised to income so far, including the full release an early exit runs through the monthly amortization.
          examples:
            - "25.00"
          type: string
        released:
          description: "Moved out when the contract leaves the book before earning it: a substantial renegotiation, a credit-loss write-off or a cession that derecognizes the contract."
          examples:
            - "125.00"
          type: string
        remaining:
          description: deferred - recognised - released.
          examples:
            - "0.00"
          type: string
      required:
        - deferred
        - recognised
        - released
        - remaining
      type: object
    DeferredFeeReconciliationHumaBody:
      additionalProperties: false
      properties:
        accounts:
          description: The contract's own deferred-fee accounts the figures were read from, one per chart the contract lived under, oldest first; always present, empty when the contract's charts defer no fee.
          items:
            type: string
          type:
            - array
            - "null"
        currency:
          description: Asset the fee is held in.
          examples:
            - BRL
          type: string
        figures:
          $ref: "#/components/schemas/DeferredFeeFiguresHumaBody"
          description: What the ledger holds on the fee accounts. Present on MATCH and DIVERGENT, absent on UNAVAILABLE.
        loanAccountId:
          description: Loan account (uuid) of the contract reconciled.
          examples:
            - 550e8400-e29b-41d4-a716-446655440003
          type: string
        retainedFee:
          description: Fee the contract record says was withheld at disbursement, summed over every tranche, as a fixed two-decimal string.
          examples:
            - "150.00"
          type: string
        status:
          description: "MATCH: the ledger deferred exactly the fee the contract retained. DIVERGENT: the two differ, or remaining is negative (the fee was earned more than once); figures.difference says by how much. UNAVAILABLE: the ledger did not answer, so figures is absent."
          enum:
            - MATCH
            - DIVERGENT
            - UNAVAILABLE
          type: string
      required:
        - loanAccountId
        - currency
        - status
        - accounts
        - retainedFee
      type: object
    DelinquentLoanRowHuma:
      additionalProperties: false
      properties:
        asOfDate:
          description: Business date the row was computed for (RFC3339, UTC midnight).
          examples:
            - "2026-06-14T12:00:00Z"
          format: date-time
          type: string
        assignedOfficerId:
          description: "Authenticated subject of the loan officer assigned to the loan, or empty on a system-originated contract, which has no human officer. Whatever the identity provider issues as the subject: not necessarily a UUID."
          examples:
            - officer-xyz
          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
          format: uuid
          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 oldest unpaid due date as of the business date.
          examples:
            - 45
          format: int64
          type: integer
        loanAccountId:
          description: Loan account identifier (UUID) for this delinquent loan.
          examples:
            - 550e8400-e29b-41d4-a716-446655440010
          type: string
        oldestDueDate:
          description: Due date of the oldest unpaid installment driving the delinquency (RFC3339, UTC).
          examples:
            - "2026-06-14T12:00:00Z"
          format: date-time
          type: string
        outstandingAmount:
          description: "Exposure on the loan: principal still owed plus interest recognised and not yet received (decimal string, two-decimal scale)."
          examples:
            - "12500.00"
          type: string
        overdueAmount:
          description: Total past-due amount on the loan (decimal string, two-decimal scale).
          examples:
            - "3200.00"
          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:
        - loanAccountId
        - borrowerId
        - assignedOfficerId
        - assignedOfficerName
        - productId
        - productVersionId
        - bucketCode
        - daysOverdue
        - overdueAmount
        - outstandingAmount
        - oldestDueDate
        - asOfDate
      type: object
    DelinquentLoansHumaBody:
      additionalProperties: false
      properties:
        asOfDate:
          description: Business date the rows were computed for (RFC3339, UTC midnight).
          examples:
            - "2026-06-14T12:00:00Z"
          format: date-time
          type: string
        freshness:
          $ref: "#/components/schemas/DashboardFreshnessHuma"
          description: "Provenance of the rows: snapshot identity, staleness, and freshness policy."
        limit:
          description: Page size echoed back from the request (max rows in this response).
          examples:
            - 25
          format: int64
          type: integer
        loans:
          description: Delinquent loan drill-down rows for the page; always a JSON array (never null).
          items:
            $ref: "#/components/schemas/DelinquentLoanRowHuma"
          type:
            - array
            - "null"
        offset:
          description: Zero-based row offset echoed back from the request.
          examples:
            - 0
          format: int64
          type: integer
      required:
        - loans
        - freshness
        - asOfDate
        - limit
        - offset
      type: object
    Detail:
      additionalProperties: true
      properties:
        code:
          description: "Stable, machine-readable domain error code scoped to the emitting service (format: <SERVICE>-NNNN)."
          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
        upstream:
          $ref: "#/components/schemas/Upstream"
          description: "RFC 9457 extension member: the error a proxied third-party provider reported. Absent unless the emitting service explicitly surfaced one."
      type: object
    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). Omit it and Lender stamps the tenant's business now. A day after the São Paulo day three calendar months from today is refused (LENDER-0212).
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        firstDueDate:
          description: "Day the first instalment falls due (YYYY-MM-DD or RFC3339), read exactly as the schedule preview and the tax quote read it: an RFC3339 instant names the Brazilian civil day it falls on, so 2026-03-09T22:00:00-03:00 is 9 March. OPTIONAL, and normally omitted: the application records its first instalment date and the release keeps it. A date other than the recorded one is refused (LENDER-0950). A later tranche may repeat the date its first tranche recorded; any other date is refused (LENDER-0235), as is any date on a contract released before the date existed."
          examples:
            - "2026-03-10"
          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, stored and replay-checked whole; in Brazil the Lender reads only the capitalization clause consent from it (capitalizationClauseConsentSupplied, capitalizationClauseConsent), and no other key changes the tax or the CET.
          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"). Must equal grossRequestedAmount minus the jurisdiction withholdings minus the origination fee the product version's origination_fee template sets for this release; POST /api/v1/br/tax/preview quotes both.
          examples:
            - "49500.00"
          type: string
        trancheNumber:
          description: "Optional tranche position for a multi-tranche release: 1 for the first, 2 for the second, and so on. It must be exactly one more than the number of disbursements this application already carries. Omit it only for an application's SINGLE disbursement, which must then release the approved amount exactly — a second disbursement that declares no tranche is refused 409 LENDER-0201, and a wrong position or a total above the approved amount is refused 422 LENDER-0202."
          examples:
            - 2
          format: int64
          minimum: 1
          type: integer
      required:
        - loanAccountId
        - grossRequestedAmount
        - netDeliveredAmount
      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
        ledgerCorrelationId:
          description: Correlation this disbursement's ledger posting is recorded under; GET /api/v1/journal-references?correlation_id= resolves it once the ledger acknowledged the posting and answers 404 until then. A payroll-rail disbursement names its own posting key. Omitted on a contract minted by a substantial renegotiation, whose opening entry is the renegotiation's recognition posting and not a disbursement posting.
          examples:
            - origination.disbursement:7c9e6679-7425-40de-944b-e07fc1f90ae7:disburse-2026-06-14-001
          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
        originationFeeAmount:
          description: "Origination fee retained from this release, scale 2: the product version's fee on a direct-credit release, the declared fee on a payroll-rail release, 0.00 when none."
          examples:
            - "130.00"
          type: string
        profileVersion:
          description: Jurisdiction profile version applied by the disbursement pipeline.
          examples:
            - 1.0.0
          type: string
      required:
        - id
        - loanAccountId
        - grossRequestedAmount
        - netDeliveredAmount
        - originationFeeAmount
        - disbursedAt
        - profileVersion
      type: object
    DiscardAssignmentSetHumaInputBody:
      additionalProperties: false
      properties:
        note:
          description: The particulars, in the operator's own words. Optional; omitted rather than blanked on the audit row when there is nothing to add.
          maxLength: 512
          type: string
        reason:
          description: "Why the composition was called off. abandoned: nobody is going to finish it. member_ineligible: a line in it can never be sold and was holding every other line with it. counterparty_declined: the fund or its administrator walked away outside the remessa. superseded: replaced by another composition. Required — free text is a disposition nobody can count."
          enum:
            - abandoned
            - member_ineligible
            - counterparty_declined
            - superseded
          type: string
      required:
        - reason
      type: object
    DiscardRecordHumaBody:
      additionalProperties: false
      properties:
        causeKind:
          description: "Which gate quarantined the record: codec, handler, source_mismatch or unhandled_key."
          examples:
            - handler
          type: string
        envelopeError:
          description: Why the CloudEvents envelope could not be read. Present means the tenant and event type above are unknown rather than absent.
          type: string
        errorClass:
          description: The transport's classification of the cause. Forensic metadata, never a routing decision.
          type: string
        errorMessage:
          description: The underlying error, sanitised and bounded before it was recorded.
          type: string
        errorMessageOriginalBytes:
          description: Length of the original error when it was cut.
          format: int64
          type: integer
        errorMessageTruncated:
          description: True when errorMessage is a CUT message, so a short message is never mistaken for a complete one.
          type: boolean
        eventId:
          description: "CloudEvents id of the quarantined record. Not an identity for this row: a replay can quarantine the same event twice."
          type: string
        eventSource:
          description: The application that PRODUCED the record. Never the one that quarantined it.
          examples:
            - consignado-gw
          type: string
        eventType:
          description: The event key of the quarantined record.
          examples:
            - contract.registered
          type: string
        firstFailureAt:
          description: When the quarantine verdict was stamped (RFC3339, UTC). Absent when the record carried no readable stamp.
          type: string
        firstSeenAt:
          description: When the record was first recorded (RFC3339, UTC).
          type: string
        headerError:
          description: Why a forensic header could not be read.
          type: string
        id:
          description: Identifier of this forensic record (uuid).
          type: string
        lastSeenAt:
          description: When it was most recently delivered again (RFC3339, UTC).
          type: string
        originUnknown:
          description: "True when the record carried no usable origin: a producer-side quarantine, or coordinates the library refused rather than half-parsed. The record cannot be retrieved from its source."
          type: boolean
        payloadBytes:
          description: Size of the payload that was dropped, when one was.
          format: int64
          type: integer
        payloadOmitted:
          description: True when the quarantine copy was published without its payload because it would not fit.
          type: boolean
        producerId:
          description: The consumer group that quarantined the record.
          type: string
        retryCount:
          description: Transient retries consumed before the terminal verdict.
          format: int64
          type: integer
        seenCount:
          description: How many times this quarantine has been delivered to the reader. Above one means redelivery, never a second failure.
          format: int64
          type: integer
        sourceOffset:
          description: Offset it came from — with the topic and partition, the route back to the record itself, which this service never copies.
          format: int64
          type: integer
        sourcePartition:
          description: Partition it came from. Meaningless unless sourceTopic is present.
          format: int32
          type: integer
        sourceTopic:
          description: Topic the quarantined record came from. Absent when the record carried no usable origin.
          type: string
        tenantId:
          description: The tenant that owned the quarantined record.
          type: string
      required:
        - id
        - causeKind
        - tenantId
        - eventSource
        - eventType
        - eventId
        - sourcePartition
        - sourceOffset
        - originUnknown
        - errorClass
        - errorMessage
        - errorMessageTruncated
        - retryCount
        - producerId
        - payloadOmitted
        - seenCount
        - firstSeenAt
        - lastSeenAt
      type: object
    DisposeContractDivergenceHumaRequest:
      additionalProperties: false
      properties:
        expectedVersion:
          description: "Compare-and-swap guard: the version this request was read against."
          format: int64
          minimum: 1
          type: integer
        justification:
          description: Optional free-text justification.
          maxLength: 4000
          type: string
        result:
          description: Bounded, category-specific structured outcome.
          maxLength: 128
          minLength: 1
          type: string
      required:
        - result
        - expectedVersion
      type: object
    DisposeOverDeductionRefundHumaInputBody:
      additionalProperties: false
      properties:
        executionSource:
          description: Where the execution fact came from. The client's treasury moves the money; the lender registers it.
          enum:
            - client_treasury
          type: string
        expectedAmount:
          description: The case's amount as the operador read it, which the treasury returned. A case a renegotiated number's later registro grew since is refused (LENDER-0949) and nothing is booked. Required once a later registro grew the case; omitted on a case that never grew, the case closes at the amount it holds.
          pattern: ^[0-9]+(\.[0-9]{1,2})?$
          type: string
        occurredAt:
          description: UTC instant the money was returned (RFC3339), between the hold and now. Defaults to now.
          format: date-time
          type: string
        reference:
          description: The reference the money was returned under.
          maxLength: 256
          minLength: 1
          type: string
      required:
        - reference
        - executionSource
      type: object
    DocumentTemplateHumaBody:
      additionalProperties: false
      properties:
        active:
          description: Whether this is the currently active published version.
          type: boolean
        createdAt:
          description: Creation timestamp (RFC3339, UTC).
          type: string
        id:
          description: Template version identifier (uuid).
          type: string
        kind:
          description: Document kind.
          type: string
        loanProductId:
          description: Owning loan product identifier (uuid); absent on a fund-scoped template.
          type: string
        publishedAt:
          description: Publication timestamp (RFC3339, UTC); absent while draft.
          type: string
        requiredFields:
          description: Declared placeholder field names.
          items:
            type: string
          type:
            - array
            - "null"
        scopeId:
          description: "Owner identifier (uuid): the loan product or the assignment fund."
          type: string
        scopeKind:
          description: Owner kind this template hangs off (loan_product|assignment_fund).
          type: string
        sections:
          description: Ordered clauses.
          items:
            $ref: "#/components/schemas/DocumentTemplateSectionHumaBody"
          type:
            - array
            - "null"
        signatureBlock:
          description: Signature block text.
          type: string
        status:
          description: Lifecycle status (draft|published).
          type: string
        title:
          description: Template title.
          type: string
        updatedAt:
          description: Last-update timestamp (RFC3339, UTC).
          type: string
        versionNumber:
          description: Sequential version number within (tenant, product, kind).
          format: int64
          type: integer
      required:
        - id
        - scopeKind
        - scopeId
        - kind
        - versionNumber
        - status
        - active
        - title
        - sections
        - signatureBlock
        - requiredFields
        - createdAt
        - updatedAt
      type: object
    DocumentTemplateListHumaBody:
      additionalProperties: false
      properties:
        data:
          description: Version history, newest first; always present, empty slice when none exist.
          items:
            $ref: "#/components/schemas/DocumentTemplateHumaBody"
          type:
            - array
            - "null"
      required:
        - data
      type: object
    DocumentTemplateSectionHumaBody:
      additionalProperties: false
      properties:
        body:
          description: Clause body; may carry text/template placeholders (e.g. "{{.PrincipalAmount}}") the render engine interprets.
          type: string
        heading:
          description: Clause heading.
          type: string
      required:
        - heading
        - body
      type: object
    EndAssignmentFundingEarlyHumaInputBody:
      additionalProperties: false
      properties:
        agreedAmount:
          description: What the fund agreed to take, decimal string. Omit it entirely to pass the borrower's payoff through; an informed amount must be above zero and never above the face of the instalments still owed.
          type: string
        borrowerPayoff:
          description: "What the borrower actually paid to end his own contract, decimal string. Required: it is the default the fund is offered when no amount is agreed, and a pass-through of nothing would book the whole obligation as a gain."
          type: string
        receivableRef:
          description: The receivable whose funding obligation ends. The obligation is carried per receivable, so one borrower prepaying ends one obligation and not the cession's others.
          maxLength: 128
          type: string
      required:
        - receivableRef
        - borrowerPayoff
      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
    FirstDueDateWindowHumaBody:
      additionalProperties: false
      properties:
        maxDays:
          description: Latest admitted first instalment, inclusive; never below the floor.
          examples:
            - 45
          format: int64
          minimum: 1
          type: integer
        minDays:
          description: "Earliest admitted first instalment, inclusive, in days after the money date. At least one: a first instalment on the day the money moves is no period at all."
          examples:
            - 15
          format: int64
          minimum: 1
          type: integer
      required:
        - minDays
        - maxDays
      type: object
    FloatingRatePeriodHumaBody:
      additionalProperties: false
      properties:
        annualRateBps:
          description: Annual rate for the period in basis points (1 bps = 0.01%).
          examples:
            - 1850
          format: int64
          type: integer
        effectiveDate:
          description: Date the period becomes effective (RFC3339, UTC).
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        endDate:
          description: Date the period stops applying (RFC3339, UTC); absent when open-ended.
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        id:
          description: Rate period identifier (uuid).
          examples:
            - 550e8400-e29b-41d4-a716-446655440006
          type: string
      required:
        - id
        - effectiveDate
        - annualRateBps
      type: object
    FloatingRateTableHumaBody:
      additionalProperties: false
      properties:
        period:
          $ref: "#/components/schemas/FloatingRatePeriodHumaBody"
          description: Effective period for the requested as-of date; present when one applies.
        rateMode:
          description: Resolved product-version rate mode (fixed|floating).
          examples:
            - floating
          type: string
        table:
          $ref: "#/components/schemas/FloatingRateTableInnerHumaBody"
          description: Linked floating-rate table with its periods; present in floating mode.
        terms:
          $ref: "#/components/schemas/FloatingRateTermsHumaBody"
          description: Product-version rate linkage terms; present when resolved.
      required:
        - rateMode
      type: object
    FloatingRateTableInnerHumaBody:
      additionalProperties: false
      properties:
        id:
          description: Floating-rate table identifier (uuid).
          examples:
            - 550e8400-e29b-41d4-a716-446655440002
          type: string
        name:
          description: Floating-rate table display name.
          type: string
        periods:
          description: Effective-dated rate periods, ordered by effective date.
          items:
            $ref: "#/components/schemas/FloatingRatePeriodHumaBody"
          type:
            - array
            - "null"
      required:
        - id
        - name
        - periods
      type: object
    FloatingRateTermsHumaBody:
      additionalProperties: false
      properties:
        fixedAnnualRateBps:
          description: Fixed annual rate in basis points (1 bps = 0.01%).
          examples:
            - 1850
          format: int64
          type: integer
        floatingRateTableId:
          description: Linked floating-rate table identifier (uuid); empty in fixed mode.
          examples:
            - 550e8400-e29b-41d4-a716-446655440002
          type: string
        floatingSpreadBps:
          description: Floating spread in basis points (1 bps = 0.01%).
          examples:
            - 1850
          format: int64
          type: integer
        rateMode:
          description: Rate mode for the version (fixed|floating).
          examples:
            - floating
          type: string
        requiresFloatingRate:
          description: Whether a floating-rate table is required for this version.
          type: boolean
        versionId:
          description: Loan product version these terms belong to (uuid).
          examples:
            - 550e8400-e29b-41d4-a716-446655440001
          type: string
      required:
        - versionId
        - rateMode
        - floatingSpreadBps
        - fixedAnnualRateBps
        - requiresFloatingRate
      type: object
    FullSettlementPrepaymentQuoteRequest:
      additionalProperties: false
      properties:
        businessDate:
          description: Optional valuation date (RFC3339 or YYYY-MM-DD); defaults to now (UTC).
          examples:
            - "2026-06-14"
          type: string
        instrumentType:
          description: Borrower payment rail.
          enum:
            - pix
            - boleto
          type: string
        overridePdd:
          description: When true, overrides the PDD stage gate during quote generation.
          type: boolean
        payoffPurpose:
          description: "Who pays this payoff: the borrower prepaying, or the institution taking the contract over by portability. Required when the loan is consignado (omitting it is refused with 422); optional for other loans."
          enum:
            - borrower_prepayment
            - portability
          examples:
            - borrower_prepayment
          type: string
        quoteType:
          description: "Discriminator: full settlement of the outstanding balance."
          enum:
            - full_settlement
          type: string
      required:
        - quoteType
        - instrumentType
      type: object
    GetJurisdictionResponse:
      additionalProperties: false
      properties:
        data:
          $ref: "#/components/schemas/JurisdictionDTO"
          description: The single registered jurisdiction profile matching the requested code.
      required:
        - data
      type: object
    IOFRateHumaBody:
      additionalProperties: false
      properties:
        additionalPercent:
          description: Additional alíquota in percent.
          examples:
            - "0.38"
          type: string
        borrowerKind:
          description: The rate-table key.
          examples:
            - pessoaJuridica
          type: string
        dailyPercent:
          description: Daily alíquota in percent.
          examples:
            - "0.0082"
          type: string
        dayCap:
          description: Taxable days per instalment, art. 7, § 1.
          examples:
            - 365
          format: int64
          type: integer
      required:
        - borrowerKind
        - dailyPercent
        - additionalPercent
        - dayCap
      type: object
    IOFRatesHumaBody:
      additionalProperties: false
      properties:
        changedBy:
          description: Who priced the version; empty for the version the deployment shipped.
          type: string
        effectiveFrom:
          description: When the version came into force.
          format: date-time
          type: string
        rateTableSnapshotId:
          description: The version a disbursement made now pins.
          examples:
            - br-tax-rates-v1
          type: string
        rates:
          description: "The kinds priced, sorted by key. A kind absent here is refused: LENDER-0233 at disbursement, LENDER-0900 at the tax preview."
          items:
            $ref: "#/components/schemas/IOFRateHumaBody"
          type:
            - array
            - "null"
        sourceReference:
          description: The legal basis cited; empty for the version the deployment shipped.
          type: string
      required:
        - rateTableSnapshotId
        - effectiveFrom
        - changedBy
        - sourceReference
        - rates
      type: object
    IngestAssignmentRemessaHumaInputBody:
      additionalProperties: false
      properties:
        content:
          description: "The fund administrator's return file, base64-encoded, exactly as received. Its sha-256 is the file's identity: the same file re-uploaded changes nothing, and a different file over a set that already accepted one is refused."
          format: byte
          minLength: 1
          type: string
      required:
        - content
      type: object
    IngestCapitalizationConsentBody:
      additionalProperties: false
      properties:
        acceptedAt:
          description: RFC3339 timestamp the borrower accepted the clause.
          format: date-time
          type: string
        clauseText:
          description: Raw capitalization clause text presented to the borrower.
          type: string
        clauseTextHash:
          description: Client-computed SHA-256 hex digest of the canonicalized clause text.
          examples:
            - a3b1c2d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f90
          maxLength: 64
          minLength: 64
          pattern: ^[a-f0-9]{64}$
          type: string
        consentEvidence:
          description: Opaque evidence reference proving the borrower accepted the clause.
          type: string
      required:
        - clauseText
        - clauseTextHash
        - consentEvidence
        - acceptedAt
      type: object
    IngestCollectionSettlementHumaInputBody:
      additionalProperties: false
      properties:
        content:
          description: "The collection agent's Arquivo de Baixa Extraordinária, base64-encoded, exactly as received. Its sha-256 is the file's identity: the same file re-uploaded changes nothing and reduces no debt twice."
          format: byte
          minLength: 1
          type: string
      required:
        - content
      type: object
    IssueConsignadoQuoteCreditInstrumentHumaInputBody:
      additionalProperties: false
      properties:
        idempotencyKey:
          description: Caller idempotency key. The same key and parties replay the same instrument; the same key with different parties is refused.
          minLength: 1
          type: string
        parties:
          additionalProperties:
            type: string
          description: "Caller-declared parties: BorrowerName, BorrowerDocument, CreditorName, IssuePlace and PaymentPlace. Financial values come only from the stored quote."
          type: object
      required:
        - idempotencyKey
        - parties
      type: object
    IssueCreditInstrumentHumaInputBody:
      additionalProperties: false
      properties:
        idempotencyKey:
          description: Caller idempotency key. The same key replays the same instrument; the same key with a different parties block is refused.
          minLength: 1
          type: string
        parties:
          additionalProperties:
            type: string
          description: Caller-supplied parties block (issuer/creditor names and documents, place of issuance/payment, and any other field the resolved template or the jurisdiction's legal catalog declares). Frozen into the instrument's snapshot; the core stores no borrower PII beyond it.
          type: object
      required:
        - idempotencyKey
      type: object
    JournalReferenceHumaBody:
      additionalProperties: false
      properties:
        correlationId:
          description: Correlation identifier the reference was resolved by. For an accrual run it links the reference to the originating run; for a single acknowledged posting it is that posting's key, which is the same value the ledger carries in the transaction's correlationId metadata.
          examples:
            - 550e8400-e29b-41d4-a716-446655440007
          type: string
        externalJournalReferenceId:
          description: "The external ledger's own identifier for the transaction this posting became — the reconciliation key, usable to look the transaction up in the ledger directly. Omitted until the posting has been acknowledged, and always omitted on an accrual RUN reference, whose grain is many postings rather than one. A 404 on this endpoint is not proof the posting never happened: it also covers a posting intent that has not been relayed successfully yet, which is then either still in flight or quarantined on its outbox event."
          type: string
        id:
          description: UUID of the journal reference record.
          examples:
            - 550e8400-e29b-41d4-a716-446655440006
          type: string
        outboxEventId:
          description: UUID of the emitted outbox event; omitted when no outbox event was recorded.
          examples:
            - 550e8400-e29b-41d4-a716-446655440008
          type: string
        postingStatus:
          description: Status of the downstream ledger posting for this reference. "pending" means the ledger has not confirmed it yet, "posted" means the ledger accepted it, and "no_items" means the run recorded no recognition, so no posting was sent.
          examples:
            - posted
          type: string
      required:
        - id
        - correlationId
        - postingStatus
      type: object
    JurisdictionDTO:
      additionalProperties: false
      properties:
        booksCredit:
          description: "Whether credit may be booked under this jurisdiction. False marks a development base: listing, reference reads and schedule preview work, but every operation that books credit is refused — proposing, approving and disbursing a loan application; creating a loan product or product version; activating a product; issuing a credit instrument; and booking or posting the disbursement of a payroll contract."
          examples:
            - true
          type: boolean
        code:
          description: ISO 3166-1 alpha-2 jurisdiction identifier (e.g. BR, XX).
          examples:
            - BR
          type: string
        displayName:
          description: Human-readable profile name (e.g. Brazil).
          type: string
        profileVersion:
          description: Semver version string of the compiled profile definition, stamped onto schedule_versions and cet_disclosures for audit replay.
          examples:
            - 1.0.0
          type: string
        status:
          description: "Profile lifecycle status: one of active, preview, or disabled. Registered profiles default to active in the MVP."
          examples:
            - active
          type: string
      required:
        - code
        - displayName
        - status
        - profileVersion
        - booksCredit
      type: object
    LatePaymentTermsHumaBody:
      additionalProperties: false
      properties:
        defaultInterestMonthly:
          description: Default interest as a fraction a month, simple, pro rata die over 30.
          examples:
            - "0.01"
          type: string
        finePct:
          description: "Fine as a fraction of the overdue installment: 0.02 is 2%."
          examples:
            - "0.02"
          type: string
        graceDays:
          description: Days past the due date before charges apply; past them, charges count from the due date. Defaults to 0.
          examples:
            - 0
          format: int64
          type: integer
      required:
        - finePct
        - defaultInterestMonthly
      type: object
    ListJurisdictionsResponse:
      additionalProperties: false
      properties:
        data:
          description: Array of jurisdiction profiles compiled into the running service; empty array (never null) when none are registered.
          items:
            $ref: "#/components/schemas/JurisdictionDTO"
          type:
            - array
            - "null"
      required:
        - data
      type: object
    ListReturnedPaymentReceivablesHumaBody:
      additionalProperties: false
      properties:
        data:
          description: Returned-payment receivables, newest first.
          items:
            $ref: "#/components/schemas/ReturnedPaymentReceivableHumaBody"
          type:
            - array
            - "null"
      required:
        - data
      type: object
    LoanAccountListHumaBody:
      additionalProperties: false
      properties:
        data:
          description: Page of loan accounts, newest first; always present, empty slice when none match.
          items:
            $ref: "#/components/schemas/LoanAccountSummaryHumaBody"
          type:
            - array
            - "null"
      required:
        - data
      type: object
    LoanAccountPaymentHealthHumaBody:
      additionalProperties: false
      properties:
        daysOverdue:
          description: Whole calendar days from the oldest still-unpaid installment's due date to today, counted in the contract's own civil calendar. 0 when nothing is past due. OMITTED when state is unknown — against an unminted schedule the count would describe a billing plan the borrower will never be billed against, and on a closed contract it would state as this institution's delinquency a debt it no longer carries.
          examples:
            - 0
          format: int64
          type: integer
        regulatoryStage:
          description: "The jurisdiction's own recorded characterisation of this contract — for Brazil, the PDD stage Res. CMN 4.966 requires ('current', 'stage_1', 'stage_2', 'stage_3'). OMITTED when the jurisdiction holds no record, which is the ordinary answer where no regulator demands one and for a contract nothing has yet been recorded against. Absent is NOT the same as 'current': 'current' is a decision the book made, absent means no one has decided anything. The values are jurisdiction-defined identifiers, so do not assume this enumeration."
          examples:
            - stage_1
          type: string
        regulatoryStageAsOf:
          description: RFC 3339 UTC instant the recorded stage took effect, so a characterisation made this morning can be told from one that has stood for a quarter. Present exactly when regulatoryStage is.
          examples:
            - "2026-09-01T03:00:00Z"
          type: string
        state:
          description: "current: nothing is past due — both a contract paying on time and one with nothing left to pay. overdue: at least one installment's due date has passed unpaid, and daysOverdue says by how much. unknown: arrears are not assessable, which is NOT a synonym for current. Two things produce it: the contract has no minted schedule yet, so there is no billing plan to be late against; or the credit risk no longer sits on this book, which today means any lifecycleState other than active — settled means it was discharged, ceded and ported mean the receivable belongs to the fund or the new holder, renegotiated means the successor contract carries it, reversed means the disbursement was undone, and written_off means it was written off as a credit loss."
          enum:
            - current
            - overdue
            - unknown
          examples:
            - current
          type: string
      required:
        - state
      type: object
    LoanAccountSummaryHumaBody:
      additionalProperties: false
      properties:
        assignedOfficerId:
          description: "Identifier of the loan officer assigned to service this account, or empty on a system-originated contract, which has no human officer. Whatever the identity provider issues as the subject: not necessarily a UUID."
          examples:
            - officer-xyz
          type: string
        borrowerId:
          description: Identifier (UUID) of the borrower who holds this account.
          examples:
            - 550e8400-e29b-41d4-a716-446655440002
          format: uuid
          type: string
        createdAt:
          description: RFC 3339 UTC timestamp the originating application was created.
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        currency:
          description: ISO-4217 denomination of the contract.
          examples:
            - BRL
          type: string
        disbursedAt:
          description: ISO-8601 date the funds left; omitted while the account carries no disbursement timestamp.
          examples:
            - "2026-06-15"
          type: string
        lifecycleStatus:
          description: "How this account was closed; absent for a live account, and only ever present when includeClosed is true. settled: the borrower discharged the debt. ceded: the receivable was sold. ported: the contract moved to another institution. reversed: a refinance the rail undid inside its regret window. renegotiated: a substantial renegotiation replaced this contract, and the debt is carried on the new account it opened. written_off: the institution wrote the contract off as a credit loss (Res. CMN 4.966 art. 49); irreversible. Only settled means the borrower discharged the debt — do not label any of the other five as one."
          enum:
            - settled
            - ceded
            - ported
            - reversed
            - renegotiated
            - written_off
          examples:
            - settled
          type: string
        loanAccountId:
          description: Loan account UUID.
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        loanProductVersionId:
          description: Loan product version the contract was booked under.
          examples:
            - 550e8400-e29b-41d4-a716-446655440001
          type: string
        principalAmount:
          description: Contracted/disbursed principal (2 d.p. string). This is the amount lent, NOT the outstanding balance.
          examples:
            - "1234.56"
          type: string
        status:
          description: Originating application status (disbursed or active). Not a balance state.
          examples:
            - active
          type: string
      required:
        - loanAccountId
        - borrowerId
        - assignedOfficerId
        - loanProductVersionId
        - status
        - currency
        - principalAmount
        - createdAt
      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), or empty on a system-originated application, which has no human officer. Whatever the identity provider issues as the subject: not necessarily a UUID, at most 255 characters."
          examples:
            - officer-xyz
          type: string
        borrowerId:
          description: The borrower's holder id in the Midaz CRM of the product's institution (UUID).
          examples:
            - 550e8400-e29b-41d4-a716-446655440002
          format: uuid
          type: string
        borrowerKind:
          description: "Whose credit this is: pessoaFisica for a CPF borrowerDocument, pessoaJuridica for a CNPJ. ABSENT on an application created before the declaration existed: such an application cannot be taxed or described, and the paths that need the kind refuse it with LENDER-0230 rather than assuming one."
          examples:
            - pessoaFisica
          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
        firstDueDate:
          description: First instalment date the application records (YYYY-MM-DD). ABSENT on an application created before the date was recorded, on a payroll-rail application and on a renegotiated contract.
          examples:
            - "2026-07-14"
          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: "Schedule offer this application cites (UUID). ABSENT when it cites none, which is allowed: simulating first is optional."
          examples:
            - 6ba7b810-9dad-11d1-80b4-00c04fd430c8
          type: string
        rejectionDecision:
          $ref: "#/components/schemas/ReasonedDecisionHumaBody"
          description: Rejection facts; present only when the application is rejected.
        requestedInstallmentAmount:
          description: Instalment the proposal was asked by, as a decimal string, minor-unit precision scale 2. ABSENT when the proposal named another amount.
          examples:
            - "300.00"
          type: string
        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
        requestedNetAmount:
          description: Net the proposal was asked by, as a decimal string, minor-unit precision scale 2. ABSENT when the proposal named another amount.
          examples:
            - "10000.00"
          type: string
        requestedPrincipalAmount:
          description: Requested principal amount as a decimal string, minor-unit precision scale 2 (e.g. "50000.00"). On a proposal asked by its instalment, the principal the Lender resolved for it; on one asked by its net, the gross the Lender resolved for it.
          examples:
            - "50000.00"
          type: string
        status:
          description: "Lifecycle status: one of pending_approval, approved, rejected, withdrawn, disbursed."
          examples:
            - pending_approval
          type: string
        taxRegime:
          description: Tax regime the borrower declared at creation. ABSENT when none was declared, and the release uses the loan product version's regime.
          examples:
            - brazilSimplesNacional
          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
      type: object
    LoanApplicationReadHumaBody:
      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), or empty on a system-originated application, which has no human officer. Whatever the identity provider issues as the subject: not necessarily a UUID, at most 255 characters."
          examples:
            - officer-xyz
          type: string
        borrowerId:
          description: The borrower's holder id in the Midaz CRM of the product's institution (UUID).
          examples:
            - 550e8400-e29b-41d4-a716-446655440002
          format: uuid
          type: string
        borrowerKind:
          description: "Whose credit this is: pessoaFisica for a CPF borrowerDocument, pessoaJuridica for a CNPJ. ABSENT on an application created before the declaration existed: such an application cannot be taxed or described, and the paths that need the kind refuse it with LENDER-0230 rather than assuming one."
          examples:
            - pessoaFisica
          type: string
        createdAt:
          description: Creation timestamp (RFC3339, UTC).
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        currency:
          description: ISO-4217 alpha currency the loan is denominated in.
          examples:
            - BRL
          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
        firstDueDate:
          description: First instalment date the application records (YYYY-MM-DD). ABSENT on an application created before the date was recorded, on a payroll-rail application and on a renegotiated contract.
          examples:
            - "2026-07-14"
          type: string
        id:
          description: Loan application identifier (UUID).
          examples:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
          type: string
        loanAccountId:
          description: Loan account this application produced; present only once disbursed.
          examples:
            - 7c9e6679-7425-40de-944b-e07fc1f90ae7
          type: string
        loanProductVersionId:
          description: Loan product version this application was created against (UUID).
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        originationFront:
          description: "Trusted channel that created the application: one of gateway_clt, lender_direct, unknown_legacy."
          examples:
            - lender_direct
          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: "Schedule offer this application cites (UUID). ABSENT when it cites none, which is allowed: simulating first is optional."
          examples:
            - 6ba7b810-9dad-11d1-80b4-00c04fd430c8
          type: string
        rejectionDecision:
          $ref: "#/components/schemas/ReasonedDecisionHumaBody"
          description: Rejection facts; present only when the application is rejected.
        requestedInstallmentAmount:
          description: Instalment the proposal was asked by, as a decimal string, minor-unit precision scale 2. ABSENT when the proposal named another amount.
          examples:
            - "300.00"
          type: string
        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
        requestedNetAmount:
          description: Net the proposal was asked by, as a decimal string, minor-unit precision scale 2. ABSENT when the proposal named another amount.
          examples:
            - "10000.00"
          type: string
        requestedPrincipalAmount:
          description: Requested principal amount as a decimal string, minor-unit precision scale 2 (e.g. "50000.00"). On a proposal asked by its instalment, the principal the Lender resolved for it; on one asked by its net, the gross the Lender resolved for it.
          examples:
            - "50000.00"
          type: string
        status:
          description: "Lifecycle status: one of pending_approval, approved, rejected, withdrawn, disbursed."
          examples:
            - pending_approval
          type: string
        taxRegime:
          description: Tax regime the borrower declared at creation. ABSENT when none was declared, and the release uses the loan product version's regime.
          examples:
            - brazilSimplesNacional
          type: string
        updatedAt:
          description: Last-update timestamp (RFC3339, UTC).
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        withdrawalDecision:
          $ref: "#/components/schemas/ReasonedDecisionHumaBody"
          description: Withdrawal facts; present only when the application is withdrawn.
      required:
        - currency
        - originationFront
        - createdAt
        - updatedAt
        - id
        - loanProductVersionId
        - borrowerId
        - assignedOfficerId
        - status
        - requestedPrincipalAmount
        - requestedInterestRate
        - requestedInstallments
        - expectedDisbursementDate
        - previewProfileVersion
        - previewJurisdictionCode
      type: object
    LoanApplicationReadListHumaBody:
      additionalProperties: false
      properties:
        data:
          description: Page of loan applications, newest first; always present, empty slice when none match.
          items:
            $ref: "#/components/schemas/LoanApplicationReadHumaBody"
          type:
            - array
            - "null"
      required:
        - data
      type: object
    LoanAuditEventHumaBody:
      additionalProperties: false
      properties:
        amount:
          description: Event amount (2 d.p. string).
          examples:
            - "113.84"
          type: string
        eventType:
          description: Audit event kind (e.g. original_repayment, reversal).
          examples:
            - original_repayment
          type: string
        lineage:
          description: Ordered lineage links for this event.
          items:
            $ref: "#/components/schemas/LoanAuditLineageHumaBody"
          type:
            - array
            - "null"
        occurredAt:
          description: RFC 3339 UTC timestamp of the event.
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        operatorNote:
          description: Human-readable note explaining this event for operators.
          type: string
        scheduleVersionId:
          description: Identifier of the schedule version in effect for this event; omitted when not applicable.
          examples:
            - 550e8400-e29b-41d4-a716-446655440030
          type: string
        sequence:
          description: Monotonic per-account ordering position of this event in the audit history.
          examples:
            - 1
          format: int64
          type: integer
        transactionId:
          description: Identifier of the transaction this event relates to; omitted for events with no transaction.
          examples:
            - 550e8400-e29b-41d4-a716-446655440010
          type: string
      required:
        - sequence
        - eventType
        - amount
        - occurredAt
        - lineage
        - operatorNote
      type: object
    LoanAuditHistoryHumaBody:
      additionalProperties: false
      properties:
        data:
          description: Ordered immutable audit history events.
          items:
            $ref: "#/components/schemas/LoanAuditEventHumaBody"
          type:
            - array
            - "null"
        operatorSummary:
          description: Human-readable operator summary of the audit history.
          type: string
      required:
        - data
        - operatorSummary
      type: object
    LoanAuditLineageHumaBody:
      additionalProperties: false
      properties:
        relation:
          description: Lineage relation type (e.g. reverses, replays_after_reversal).
          examples:
            - reverses
          type: string
        transactionId:
          description: Identifier of the transaction this lineage link points to.
          examples:
            - 550e8400-e29b-41d4-a716-446655440010
          type: string
      required:
        - relation
        - transactionId
      type: object
    LoanChargeHumaBody:
      additionalProperties: false
      properties:
        accountCreatedAt:
          description: Loan account creation timestamp (RFC3339, UTC).
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        amount:
          description: Charge amount as a decimal string in major currency units, fixed scale of 2 decimal places.
          examples:
            - "1234.56"
          type: string
        assessedAt:
          description: Timestamp the charge was assessed (RFC3339, UTC).
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        billedDueDate:
          description: ISO-8601 due date of the instalment the charge is billed on. Absent with billedInstallmentNumber.
          examples:
            - "2026-07-15"
          type: string
        billedInstallmentNumber:
          description: "Instalment the charge is billed on: the first, in schedule order, due on a São Paulo civil day after the later of the charge's day and today, still owing something and promised to no automatic prepayment. Absent on a charge recorded before charges were billed."
          examples:
            - 3
          format: int64
          type: integer
        chargeCode:
          description: Charge code resolved from the template.
          examples:
            - LATE_FEE
          type: string
        chargeTemplateId:
          description: Charge template the fact was derived from.
          type: string
        chargeType:
          description: Charge type resolved from the template.
          type: string
        currency:
          description: ISO 4217 currency code of the amount.
          examples:
            - BRL
          type: string
        loanAccountId:
          description: Loan account the charge was applied to (uuid).
          examples:
            - 550e8400-e29b-41d4-a716-446655440005
          type: string
        rate:
          description: Charge rate as a decimal string (fractional, e.g. "0.015" for 1.5%).
          examples:
            - "0.015"
          type: string
        regulatoryWarnings:
          description: Non-blocking regulatory warnings raised while assessing the charge.
          items:
            type: string
          type:
            - array
            - "null"
        sourceProductVersionId:
          description: Product version whose template produced this charge (uuid).
          examples:
            - 550e8400-e29b-41d4-a716-446655440001
          type: string
      required:
        - loanAccountId
        - sourceProductVersionId
        - chargeTemplateId
        - chargeCode
        - chargeType
        - amount
        - rate
        - currency
        - accountCreatedAt
        - assessedAt
      type: object
    LoanProductHumaBody:
      additionalProperties: false
      properties:
        createdAt:
          description: Creation timestamp (RFC3339, UTC).
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        currentVersionId:
          description: Identifier (uuid) of the pinned active version; empty until activation.
          examples:
            - 550e8400-e29b-41d4-a716-44665544000a
          type: string
        id:
          description: Server-assigned loan product identifier (uuid).
          examples:
            - 550e8400-e29b-41d4-a716-446655440009
          type: string
        jurisdictionCode:
          description: Jurisdiction profile code (e.g. BR).
          examples:
            - BR
          type: string
        loanType:
          description: Loan product type.
          examples:
            - personal
          type: string
        name:
          description: Loan product display name.
          type: string
        status:
          description: "Lifecycle status: draft, active or archived."
          examples:
            - active
          type: string
      required:
        - id
        - name
        - loanType
        - status
        - jurisdictionCode
        - createdAt
      type: object
    LoanProductListHumaBody:
      additionalProperties: false
      properties:
        data:
          description: Page of loan products; always present, empty slice when none match.
          items:
            $ref: "#/components/schemas/LoanProductHumaBody"
          type:
            - array
            - "null"
      required:
        - data
      type: object
    LoanProductVersionHumaBody:
      additionalProperties: false
      properties:
        accrualBasis:
          description: Interest recognition method the servicing accrual engine applies; always effective_interest.
          examples:
            - effective_interest
          type: string
        admittedBorrowerKinds:
          description: Kinds of borrower this version will originate for, de-duplicated and sorted. An EMPTY list means the version declares nothing and admits nobody; it never means "both".
          examples:
            -   - pessoaFisica
          items:
            type: string
          type: array
        changeReason:
          description: Reason recorded for creating this version.
          type: string
        createdAt:
          description: Creation timestamp (RFC3339, UTC).
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        currency:
          description: ISO 4217 currency code the product version denominates (3 uppercase letters).
          examples:
            - BRL
          type: string
        firstDueDateWindow:
          $ref: "#/components/schemas/FirstDueDateWindowHumaBody"
          description: "Span of days after the money date in which this version admits a chosen first instalment date. Absent means the version bounds no chosen date, which is the ordinary case. It also bounds a release on another day than the application expected: the span from the money day to the application's recorded first due date must fall inside it."
        fixedAnnualRateBps:
          description: Fixed annual rate in basis points (1 bps = 0.01%).
          examples:
            - 1850
          format: int64
          type: integer
        floatingRateTableId:
          description: Linked floating-rate table identifier (uuid); empty in fixed mode.
          examples:
            - 550e8400-e29b-41d4-a716-446655440002
          type: string
        floatingSpreadBps:
          description: Floating spread in basis points (1 bps = 0.01%).
          examples:
            - 1850
          format: int64
          type: integer
        id:
          description: Server-assigned version identifier (uuid).
          examples:
            - 550e8400-e29b-41d4-a716-446655440001
          type: string
        jurisdictionCode:
          description: Jurisdiction profile code (e.g. BR).
          examples:
            - BR
          type: string
        jurisdictionExtensions:
          additionalProperties: true
          description: Opaque per-jurisdiction version fields, echoed from the request for traceability.
          type: object
        productId:
          description: Owning loan product identifier (uuid).
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        rateBand:
          $ref: "#/components/schemas/RateBandHumaBody"
          description: Price band this version authorizes, in annual basis points. Absent only on a stored version that predates the band; such a version originates nothing.
        rateMode:
          description: Rate mode (fixed|floating).
          examples:
            - fixed
          type: string
        requiresFloatingRate:
          description: Whether a floating-rate table is required for this version.
          type: boolean
        terms:
          $ref: "#/components/schemas/VersionTermsHumaBody"
          description: What the version admits.
      required:
        - id
        - productId
        - jurisdictionCode
        - currency
        - accrualBasis
        - rateMode
        - floatingSpreadBps
        - fixedAnnualRateBps
        - requiresFloatingRate
        - admittedBorrowerKinds
        - changeReason
        - createdAt
        - terms
      type: object
    LoanProductVersionListHumaBody:
      additionalProperties: false
      properties:
        data:
          description: Page of product version snapshots, newest first; always present, empty slice when none match.
          items:
            $ref: "#/components/schemas/LoanProductVersionHumaBody"
          type:
            - array
            - "null"
      required:
        - data
      type: object
    OpenAssignmentIntegrationCaseHumaInputBody:
      additionalProperties: false
      properties:
        attempts:
          description: Delivery attempts made.
          format: int64
          minimum: 0
          type: integer
        destination:
          description: The integration destination.
          pattern: ^[a-z][a-z0-9_]{0,31}$
          type: string
        externalCode:
          description: The destination's code, or the orchestrator's reason.
          pattern: ^[A-Za-z0-9_.:-]{0,64}$
          type: string
        fields:
          description: Names of the fields the destination refused.
          items:
            pattern: ^[A-Za-z][A-Za-z0-9_.]{0,63}$
            type: string
          maxItems: 20
          type:
            - array
            - "null"
        httpStatus:
          description: The destination's last HTTP status; 0 or absent when nothing answered.
          format: int64
          maximum: 599
          minimum: 0
          type: integer
        itemStatus:
          description: Where the item stopped.
          enum:
            - rejected
            - blocked
            - outcome_unknown
          type: string
        purpose:
          description: Why the item is delivered, for example assignment_offer.
          pattern: ^[a-z][a-z0-9_]{0,63}$
          type: string
        receivableRef:
          description: The receivable the item is about; absent for a step about the whole set.
          maxLength: 128
          type: string
        step:
          description: The integration step that stopped, for example contract or attachment.ccb.
          pattern: ^[a-z][a-z0-9_.-]{0,63}$
          type: string
      required:
        - destination
        - purpose
        - step
        - itemStatus
      type: object
    OriginationLimitsHumaBody:
      additionalProperties: false
      properties:
        maxInstallments:
          description: Most installments.
          examples:
            - 48
          format: int64
          type: integer
        maxPrincipal:
          description: Largest principal.
          examples:
            - "50000.00"
          type: string
        maxTermMonths:
          description: "Longest term: months from the expected disbursement day to the last instalment's grid date before any business-day roll, a started month counting whole."
          examples:
            - 48
          format: int64
          type: integer
        minInstallments:
          description: Fewest installments.
          examples:
            - 1
          format: int64
          type: integer
        minPrincipal:
          description: Smallest principal.
          examples:
            - "100.00"
          type: string
        minTermMonths:
          description: "Shortest term: months from the expected disbursement day to the last instalment's grid date before any business-day roll, a started month counting whole."
          examples:
            - 1
          format: int64
          type: integer
      type: object
    OverDeductionRefundHumaBody:
      additionalProperties: false
      properties:
        amount:
          description: Owed back to the worker, cent scale, decimal string; never a float.
          type: string
        competencia:
          description: YYYYMM the worker was over-deducted in.
          type: string
        currency:
          description: ISO 4217 currency code.
          type: string
        detectingRunId:
          description: Reconciliation run that first observed it, or the rail registro ({object_ref}#{record_id}) that opened a renegotiated number's excess. Provenance, never identity.
          type: string
        disposedAt:
          description: UTC instant the money was returned (RFC3339). Absent while the obligation is open.
          type: string
        dispositionActor:
          description: Validated identity that recorded the return.
          type: string
        dispositionReference:
          description: The reference the money was returned under.
          type: string
        executionSource:
          description: Where the execution fact came from.
          type: string
        id:
          description: Case identifier (uuid).
          type: string
        loanAccountId:
          description: Servicing account the over-deduction hit (uuid).
          type: string
        numeroContrato:
          description: Contract identity on the payroll rail.
          type: string
        recordedAt:
          description: UTC instant the obligation was recorded (RFC3339).
          type: string
        reversalSourceReference:
          description: The reversal posting-intent this case is the counterpart of.
          type: string
        status:
          description: recorded is an OPEN obligation; disposed carries the execution fact.
          enum:
            - recorded
            - disposed
          type: string
      required:
        - id
        - numeroContrato
        - competencia
        - detectingRunId
        - loanAccountId
        - amount
        - currency
        - reversalSourceReference
        - status
        - recordedAt
      type: object
    OverDeductionRefundListHumaBody:
      additionalProperties: false
      properties:
        data:
          description: Refund cases, oldest obligation first.
          items:
            $ref: "#/components/schemas/OverDeductionRefundHumaBody"
          type:
            - array
            - "null"
      required:
        - data
      type: object
    PDDStageLadderBandResponse:
      additionalProperties: false
      properties:
        carteira:
          description: "Norm portfolio class C1..C5, or empty for the catch-all scope. Scope is chosen before any day bound: a contract whose carteira has ANY band here is decided only by that carteira's bands and never sees the catch-all, so a carteira scope may be more lenient as well as stricter. Every carteira it names needs its own band at 0 days overdue."
          type: string
        minDaysOverdue:
          description: Inclusive lower bound of the band, in days overdue.
          format: int64
          type: integer
        regime:
          description: arrears (the day count of Res. CMN 4.966 art. 3 I) or problem_asset (the floor a declared characterisation imposes).
          type: string
        stage:
          description: PDD bucket a contract inside the band belongs to.
          type: string
      required:
        - carteira
        - regime
        - minDaysOverdue
        - stage
      type: object
    PDDStageLadderResponse:
      additionalProperties: false
      properties:
        bands:
          description: The carteira x days-overdue x regime rows.
          items:
            $ref: "#/components/schemas/PDDStageLadderBandResponse"
          type:
            - array
            - "null"
        effectiveFrom:
          description: First business date this ladder decides (YYYY-MM-DD).
          type: string
        ladderVersionId:
          description: Identifier a stage transition records as the policy that decided it.
          type: string
        scope:
          description: tenant when this tenant published the ladder, default when it is the shipped norm ladder.
          type: string
        sourceReference:
          description: Where the numbers came from.
          type: string
      required:
        - ladderVersionId
        - scope
        - effectiveFrom
        - sourceReference
        - bands
      type: object
    PDDStageResponse:
      additionalProperties: false
      properties:
        accrualState:
          description: "Interest accrual state implied by the current stage: accruing or suspended."
          examples:
            - accruing
          type: string
        businessDate:
          description: Business date the current stage applies to (YYYY-MM-DD, UTC).
          examples:
            - "2026-06-14"
          type: string
        currentStage:
          description: "Current PDD delinquency stage: one of current, stage_1, stage_2, stage_3."
          examples:
            - stage_1
          type: string
        effectiveAt:
          description: RFC3339 UTC timestamp at which the current stage became effective.
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        jurisdictionCode:
          description: ISO jurisdiction code governing the staging (e.g. "BR").
          examples:
            - BR
          type: string
        latestTransition:
          $ref: "#/components/schemas/PDDStageTransitionDTO"
          description: Detail of the most recent stage transition; omitted when no transition exists.
        latestTransitionId:
          description: UUID of the most recent PDD stage transition applied to the account.
          examples:
            - 550e8400-e29b-41d4-a716-446655440001
          type: string
        loanAccountId:
          description: UUID of the loan account whose PDD staging state is reported.
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        profileVersion:
          description: Jurisdiction profile version in effect for the staging rules.
          examples:
            - 1.0.0
          type: string
        reason:
          description: Reason recorded for entering the current stage.
          type: string
        triggeredBy:
          description: Actor or system that triggered the current stage.
          type: string
        updatedAt:
          description: RFC3339 UTC timestamp when the staging state was last updated.
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
      required:
        - loanAccountId
        - currentStage
        - accrualState
        - latestTransitionId
        - reason
        - effectiveAt
        - businessDate
        - triggeredBy
        - profileVersion
        - jurisdictionCode
        - updatedAt
      type: object
    PDDStageTransitionDTO:
      additionalProperties: false
      properties:
        accrualState:
          description: "Interest accrual state resulting from the transition: accruing or suspended."
          examples:
            - accruing
          type: string
        businessDate:
          description: Business date the transition applies to (YYYY-MM-DD, UTC).
          examples:
            - "2026-06-14"
          type: string
        createdAt:
          description: RFC3339 UTC timestamp when the transition record was created.
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        effectiveAt:
          description: RFC3339 UTC timestamp at which the transition became effective.
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        fromStage:
          description: "PDD stage before the transition: one of current, stage_1, stage_2, stage_3."
          examples:
            - current
          type: string
        id:
          description: Unique identifier (UUID) of the PDD stage transition record.
          examples:
            - 550e8400-e29b-41d4-a716-446655440002
          type: string
        jurisdictionCode:
          description: ISO jurisdiction code governing the transition (e.g. "BR").
          examples:
            - BR
          type: string
        profileVersion:
          description: Jurisdiction profile version in effect when the transition was applied.
          examples:
            - 1.0.0
          type: string
        reason:
          description: Reason recorded for the transition or cure.
          type: string
        toStage:
          description: "PDD stage after the transition: one of current, stage_1, stage_2, stage_3."
          examples:
            - stage_1
          type: string
        triggeredBy:
          description: Actor or system that triggered the transition.
          type: string
      required:
        - id
        - fromStage
        - toStage
        - accrualState
        - reason
        - effectiveAt
        - businessDate
        - triggeredBy
        - profileVersion
        - jurisdictionCode
        - createdAt
      type: object
    ParkedPostingHumaBody:
      additionalProperties: false
      properties:
        amount:
          description: Amount of the posting, a decimal string.
          examples:
            - "1000.00"
          type: string
        attempts:
          description: Delivery attempts the outbox made before it parked the posting.
          format: int64
          type: integer
        contractId:
          description: "The contract the posting belongs to: its loan account, or the loan application that owns the posting before the account exists."
          type: string
        currency:
          description: Asset of the posting.
          examples:
            - BRL
          type: string
        eventId:
          description: "Outbox event id of the parked posting: the id the release command takes."
          type: string
        factDate:
          description: Date of the business fact the posting books.
          format: date-time
          type: string
        lastError:
          description: The last error Midaz or the relay answered, as the outbox stored it (secrets redacted, cut at 512 characters); empty when none was recorded.
          type: string
        lastSentAt:
          description: When the lender's sent record for this posting key was written, in UTC, exactly as stored (microsecond precision). Omitted when the key has no sent record. Send it back as ledgerCheckedAbsentSentAt after confirming Midaz holds nothing.
          format: date-time
          type: string
        parkedSince:
          description: When the outbox gave up and quarantined the posting.
          format: date-time
          type: string
        postingKey:
          description: "The posting's correlation id: look this key up in Midaz before confirming the ledger does not hold it."
          examples:
            - disb:5b0f1c0e-8a53-5a07-9d5e-2f6a1e4f9a10
          type: string
        postingType:
          description: Accounting event the posting books.
          examples:
            - disbursement
          type: string
      required:
        - eventId
        - contractId
        - postingType
        - amount
        - currency
        - factDate
        - parkedSince
        - attempts
        - lastError
        - postingKey
      type: object
    ParkedPostingsOutputBody:
      additionalProperties: false
      properties:
        data:
          description: Open cases, parked longest first, at most 100; always present, empty slice when none.
          items:
            $ref: "#/components/schemas/ParkedPostingHumaBody"
          type:
            - array
            - "null"
      required:
        - data
      type: object
    PartialPrepaymentQuoteRequest:
      additionalProperties: false
      properties:
        amortization:
          description: "How the partial shortens the contract: reduce_term keeps every instalment and ends the contract earlier; reduce_installment keeps the remaining due dates and lowers the instalments to equal ones. When absent, existing earliest-open-principal behavior applies. A consignado contract only reduces the term: reduce_installment is refused with 422 (LENDER-0952)."
          enum:
            - reduce_term
            - reduce_installment
          examples:
            - reduce_term
          type: string
        amount:
          description: Prepayment amount in major currency units (e.g. "100.00").
          examples:
            - "42000.00"
          type: string
        businessDate:
          description: Optional valuation date (RFC3339 or YYYY-MM-DD); defaults to now (UTC).
          examples:
            - "2026-06-14"
          type: string
        overridePdd:
          description: When true, overrides the PDD stage gate during quote generation.
          type: boolean
        quoteType:
          description: "Discriminator: partial principal prepayment."
          enum:
            - partial
          type: string
      required:
        - quoteType
        - amount
      type: object
    PayoffBoletoInstructions:
      additionalProperties: false
      properties:
        barcode:
          type: string
        digitableLine:
          type: string
        documentUrl:
          format: uri
          type: string
      type: object
    PayoffInstrumentResponse:
      additionalProperties: false
      properties:
        boleto:
          $ref: "#/components/schemas/PayoffBoletoInstructions"
        id:
          format: uuid
          type: string
        issuedAt:
          format: date-time
          type: string
        pix:
          $ref: "#/components/schemas/PayoffPIXInstructions"
        requestedAt:
          format: date-time
          type: string
        status:
          enum:
            - requested
            - issued
            - paid
            - expired
            - cancelled
            - failed
          type: string
        type:
          enum:
            - pix
            - boleto
          type: string
      required:
        - id
        - type
        - status
        - requestedAt
      type: object
    PayoffPIXInstructions:
      additionalProperties: false
      properties:
        copyPasteCode:
          type: string
        qrCodeUrl:
          format: uri
          type: string
      type: object
    PayoffRefundDueResponse:
      additionalProperties: false
      properties:
        amountOutstanding:
          description: What the client still has to pay the borrower (2 d.p. string).
          examples:
            - "197.48"
          type: string
        amountRefunded:
          description: What the client has recorded as paid back so far (2 d.p. string).
          examples:
            - "100.00"
          type: string
        amountToRefund:
          description: "The held cash left on the settled or renegotiated contract, whatever ended it, owed back to the borrower: what the borrower's payments left unapplied and the interest moved there for days after the exit, a payoff's or an art. 22 renegotiation's (2 d.p. string)."
          examples:
            - "297.48"
          type: string
        loanAccountId:
          description: Settled or renegotiated loan account.
          format: uuid
          type: string
        settledAt:
          description: "RFC 3339 instant the contract ended: settled, or renegotiated under art. 22."
          format: date-time
          type: string
      required:
        - loanAccountId
        - settledAt
        - amountToRefund
        - amountRefunded
        - amountOutstanding
      type: object
    PayoffRefundResponse:
      additionalProperties: false
      properties:
        amount:
          description: Amount refunded (2 d.p. string).
          examples:
            - "297.48"
          type: string
        amountOutstanding:
          description: What the client still has to pay the borrower (2 d.p. string).
          examples:
            - "197.48"
          type: string
        amountRefunded:
          description: What the client has recorded as paid back so far (2 d.p. string).
          examples:
            - "100.00"
          type: string
        amountToRefund:
          description: "The held cash left on the settled or renegotiated contract, whatever ended it, owed back to the borrower: what the borrower's payments left unapplied and the interest moved there for days after the exit, a payoff's or an art. 22 renegotiation's (2 d.p. string)."
          examples:
            - "297.48"
          type: string
        id:
          description: Recorded refund.
          format: uuid
          type: string
        loanAccountId:
          description: Settled or renegotiated loan account.
          format: uuid
          type: string
        refundedAt:
          description: RFC 3339 instant the money left.
          format: date-time
          type: string
        requestId:
          description: X-Idempotency key the refund was recorded under.
          type: string
        settledAt:
          description: "RFC 3339 instant the contract ended: settled, or renegotiated under art. 22."
          format: date-time
          type: string
      required:
        - id
        - requestId
        - amount
        - refundedAt
        - loanAccountId
        - settledAt
        - amountToRefund
        - amountRefunded
        - amountOutstanding
      type: object
    PayoffRefundsDueListResponse:
      additionalProperties: false
      properties:
        data:
          description: Settled or renegotiated contracts still owing the borrower money back, oldest ending first.
          items:
            $ref: "#/components/schemas/PayoffRefundDueResponse"
          type:
            - array
            - "null"
      required:
        - data
      type: object
    PayoffStatementResponse:
      additionalProperties: false
      properties:
        accruedInterest:
          description: "Interest the payoff charges up to its day: accrued and unpaid, less what a standing automatic-prepayment promise earned by then, as the payment that promised an instalment counts at its present value that day (2 d.p. string)."
          type: string
        amountToRefund:
          description: Interest that receipts recorded before the payoff paid for days after its exit, and held cash past what the payoff spent, owed back to the borrower once the payoff is accepted (2 d.p. string). Zero before acceptance. What is still outstanding is on GET /api/v1/br/payoff-refunds-due.
          type: string
        chargeDiscount:
          type: string
        currency:
          type: string
        expiresAt:
          format: date-time
          type: string
        fees:
          description: Applied charges the schedule holds open on the payoff day, charged on top of the principal (2 d.p. string).
          type: string
        grossAmount:
          type: string
        heldCashApplied:
          description: Cash the contract already held, paid ahead of its due dates, that the payoff spends before asking the borrower for the rest (2 d.p. string).
          type: string
        instrument:
          $ref: "#/components/schemas/PayoffInstrumentResponse"
          description: The charge the borrower pays the payoff through; absent when the held cash covers the payoff.
        interestDiscount:
          type: string
        iofReconciliation:
          type: string
        lateCharges:
          description: Late fine and mora open on the payoff day, charged on top of the principal (2 d.p. string).
          type: string
        loanAccountId:
          format: uuid
          type: string
        netAmount:
          description: "What the borrower pays: the payoff less the held cash it spends, never below zero (2 d.p. string). At zero no charge is issued and instrument is absent."
          type: string
        principalOutstanding:
          type: string
        quoteId:
          format: uuid
          type: string
        slaDueAt:
          format: date-time
          type: string
        slaStatus:
          enum:
            - pending
            - met
            - breached
          type: string
        statementAvailableAt:
          format: date-time
          type: string
      required:
        - quoteId
        - loanAccountId
        - principalOutstanding
        - accruedInterest
        - lateCharges
        - fees
        - interestDiscount
        - chargeDiscount
        - iofReconciliation
        - grossAmount
        - heldCashApplied
        - netAmount
        - amountToRefund
        - currency
        - statementAvailableAt
        - slaDueAt
        - slaStatus
        - expiresAt
      type: object
    PortabilityInboundLineageHumaBody:
      additionalProperties: false
      properties:
        currency:
          description: ISO 4217 currency code.
          type: string
        effectiveAt:
          description: UTC instant the portability took effect at the ORIGIN (RFC3339, sub-second precision preserved to the microsecond the row stores). Not the instant we booked.
          type: string
        numeroContrato:
          description: The rail contract number.
          type: string
        origins:
          description: The contracts paid off, one per origin bank and contract, in the order the booking fact stated them.
          items:
            $ref: "#/components/schemas/PortabilityInboundOriginHumaBody"
          type:
            - array
            - "null"
        transferredPrincipal:
          description: "Total paid off at the origins, cent scale: their sum, at most the booked principal. The difference is the troco, new money to the worker."
          type: string
      required:
        - numeroContrato
        - origins
        - transferredPrincipal
        - currency
        - effectiveAt
      type: object
    PortabilityInboundOriginHumaBody:
      additionalProperties: false
      properties:
        externalOperationRef:
          description: The contract number at the origin bank. Opaque, preserved verbatim; this is what a dispute is quoted against.
          type: string
        originInstitution:
          description: The origin bank's COMPE code, three digits.
          type: string
        transferredPrincipal:
          description: What this contract's payoff cost, cent scale.
          type: string
      required:
        - originInstitution
        - externalOperationRef
        - transferredPrincipal
      type: object
    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."
        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:
        - asOfDate
        - summary
        - delinquencyDistribution
        - drillDown
        - freshness
        - trend
      type: object
    PostingLegHumaInputBody:
      additionalProperties: false
      properties:
        account:
          description: "GL account for this leg, as its Midaz alias: at most 50 letters, digits, ':', '_' and '-', with an optional leading '@', or @external/<ASSET> (LENDER-0429 otherwise)."
          examples:
            - 1100-10-001
          maxLength: 128
          type: string
        component:
          description: Open withholding component code (e.g. "iof"); set this XOR role.
          examples:
            - iof
          maxLength: 64
          type: string
        nature:
          description: "The account's own nature, not this leg's side: debit for an asset or expense, credit for a liability, equity or revenue. A contra account takes its own nature (rendas a apropriar is credit), and the art. 22 renegotiation adjustment is a contra-asset of credit nature. The ledger fixes the account's balance direction from it when the account is first created, and it never changes; every leg naming one account must declare the same nature."
          enum:
            - debit
            - credit
          examples:
            - debit
          type: string
        optional:
          description: Whether a component amount may be omitted or zero at posting time. Permitted only on component legs; omitted defaults to false.
          type: boolean
        perOperation:
          description: Whether this leg books into a per-operation account instead of one aggregated per product. A borrower position (principal, interest, fees, penalties, unapplied_cash, assignment_retained, returned_payment) must be per operation, except a revenue or expense leg and the accrual_withholding credit to rendas a apropriar; a sale's assignment_interest leg books the accrual's interest receivable, same account and same flag (LENDER-0408 otherwise). When true, "account" is a prefix limited to 17 characters of letters, digits, '_' and '-'; omitted defaults to false (aggregated). The counterparty leg of renegotiation_derecognition and renegotiation_recognition (the art. 22 bridge) is one account for the product and is refused per operation.
          type: boolean
        role:
          description: Reserved economic role of this leg; set this XOR component.
          enum:
            - principal
            - interest
            - iof
            - tax
            - cash
            - unapplied_cash
            - counterparty
            - suspense
          examples:
            - principal
          type: string
        side:
          description: Whether this leg debits or credits the account.
          enum:
            - debit
            - credit
          examples:
            - debit
          type: string
      required:
        - account
        - side
        - nature
      type: object
    PostingRuleHumaInputBody:
      additionalProperties: false
      properties:
        eventType:
          description: Accounting event type.
          enum:
            - disbursement
            - repayment
            - prepayment
            - accrual
            - accrual_tax
            - accrual_fee_amortization
            - accrual_withholding
            - collection_unapplied
            - collection_reapply
            - collection_refund
            - assignment_derecognition
            - assignment_retained_settlement
            - assignment_secured_borrowing
            - assignment_funding_amortization
            - assignment_funding_payoff
            - assignment_repurchase
            - refinance_payoff
            - refinance_payoff_reversal
            - provision_constitution
            - provision_reversal
            - provision_incurred_constitution
            - provision_incurred_reversal
            - renegotiation_gain
            - renegotiation_loss
            - renegotiation_derecognition
            - renegotiation_recognition
            - returned_payment_recognition
            - returned_payment_provision_constitution
            - returned_payment_provision_reversal
            - returned_payment_write_off
            - payroll_payer_provision_constitution
            - payroll_payer_provision_reversal
            - compensation_control
            - charge_appropriation
            - credit_loss_recovery
          examples:
            - disbursement
          type: string
        legs:
          description: "Non-null ordered posting legs. Prepayment requires exactly five legs in this component order: cash, charge_rebate, iof_refund, principal, iof_due; cash is a required debit, principal is a required credit, and the three component legs are optional with the corresponding sides. Assignment_derecognition requires exactly five legs in this component order: cash, assignment_loss, principal, assignment_interest, assignment_gain; cash is a required debit, principal is a required credit, and the assignment_interest credit and the two result legs are optional with the corresponding sides. The assignment_interest leg names the account the accrual rule debits: a sold receivable leaves at its amortized cost, which is principal plus the interest already recognized as income and not yet received, so both positions are relieved by the write-off. Assignment_retained_settlement requires exactly two legs in this order: a required cash debit and a required assignment_retained credit. Assignment_repurchase mirrors assignment_derecognition and requires exactly four legs in this order: a required principal debit, an optional assignment_loss debit, a required counterparty credit and an optional assignment_gain credit. Refinance_payoff requires exactly two legs in this order: a required counterparty debit and a required principal credit; refinance_payoff_reversal requires the mirror, a required principal debit and a required counterparty credit. The refinance_payoff posting also credits the interest the old contract owed through the swap to the accrual rule's interest receivable. Accrual_fee_amortization requires exactly two legs in this order: a required origination_fee component debit and a required interest role credit, neither optional. The debit account MUST be the same account the disbursement rule credits under its optional origination_fee component leg, because that is where the retained fee was parked at t0 and the only account releasing it can close; a sold contract's assignment_derecognition debits it for the fee still deferred. Accrual_withholding requires exactly two interest role legs in this order: a required debit on the account, and per-operation flag, the accrual rule debits, and a required credit on rendas a apropriar, one shared account, never per-operation, other than the accrual rule's revenue, because the contract a substantial renegotiation mints recognises the withheld interest of the one it replaces from that same account; a sold contract's assignment_derecognition debits that credit account for the rendas a apropriar it still carries. Assignment_funding_amortization requires exactly three legs in this component order: assignment_funding, assignment_funding_expense, assignment_funding_repasse; the assignment_funding debit and the assignment_funding_repasse credit are required and the assignment_funding_expense debit is optional, because a cession priced AT face has a zero effective rate and honestly posts two. The repasse leg is a PAYABLE to the fund and never cash: the borrower's deduction lands on the assignor's own rail account and a human repasses it days later, so crediting cash here would show money leaving before it leaves. Assignment_funding_payoff is that shape plus a fourth leg, an optional assignment_funding_gain credit, in this component order: assignment_funding, assignment_funding_expense, assignment_funding_repasse, assignment_funding_gain. What ends a cession early is the amount the fund AGREED to take, so unlike a monthly repasse it can land BELOW the obligation, and the deságio that stops being appropriable over a term that has just ended is credited there. Exactly one of the expense and gain legs ever carries an amount, and at an agreed amount equal to the obligation neither does. A monthly repasse cannot produce a gain and is refused for declaring one. The assignment_funding debit account MUST be the same account assignment_secured_borrowing credits under its own assignment_funding leg, for the reason the deferred origination fee names one account at both ends: an obligation raised in one account and discharged from another posts balanced entries for the life of the cession while the first never closes and the second goes negative by the whole price. Renegotiation_gain requires exactly two legs in this order: a required per-operation renegotiation_adjustment component debit and a required renegotiation_gain credit; renegotiation_loss requires the mirror, a required renegotiation_loss debit and a required per-operation renegotiation_adjustment credit. Both name the same adjustment account, apart from principal, interest receivable, rendas a apropriar and the deferred fee. Renegotiation_derecognition requires exactly three legs in this component order: counterparty, renegotiation_loss, renegotiation_gain; the counterparty debit is required and the two result legs are optional with the corresponding sides. It names NO asset leg, deliberately: which accounts a contract stops holding when it leaves the book is read from the ledger on the day, one leg per account that holds anything, so it cannot be declared here. The counterparty leg carries what moves to the replacement contract; on a contract a non-substantial renegotiation has already re-carried, the ledger holds more than the borrower owes and the result legs carry the difference, which is why a product cannot map this event without naming both result accounts. Every position a borrower can carry must be mapped to a per-operation account, or this event is refused at posting time because the ledger cannot say what one contract holds; renegotiation_recognition requires exactly two legs in this order: a required principal debit and a required counterparty credit. Other events require at least one debit and one credit."
          items:
            $ref: "#/components/schemas/PostingLegHumaInputBody"
          maxItems: 16
          minItems: 2
          type: array
        metadata:
          additionalProperties:
            type: string
          description: Optional metadata.
          type: object
      required:
        - eventType
        - legs
      type: object
    PrepaidInstallmentHumaBody:
      additionalProperties: false
      properties:
        discount:
          description: The interest not yet due that comes off on its due date (2 d.p. string).
          examples:
            - "14.96"
          type: string
        dueDate:
          description: ISO-8601 due date of that instalment, the day it closes.
          examples:
            - "2026-06-15"
          type: string
        installmentNumber:
          description: The instalment the payment covers.
          examples:
            - 1
          format: int64
          type: integer
        presentValue:
          description: "What it closes by on its due date: what it owed, discounted back to the payment day at the contract's rate (2 d.p. string)."
          examples:
            - "507.27"
          type: string
      required:
        - installmentNumber
        - dueDate
        - presentValue
        - discount
      type: object
    PrepayLoanAccountHumaRequest:
      additionalProperties: false
      properties:
        amount:
          description: Prepayment amount (2 d.p. string). Amount-only prepayment is available only for non-BR accounts; BR accounts require quoteId.
          examples:
            - "100.00"
          type: string
        businessDate:
          description: YYYY-MM-DD business date applied to the prepayment.
          examples:
            - "2026-06-14"
          type: string
        effectiveDate:
          description: The moment the settlement money moved, as a full RFC 3339 instant with a time and an offset. A bare YYYY-MM-DD calendar date is refused with LENDER-0348. Omit it and Lender stamps the tenant's business now.
          examples:
            - "2026-06-14T17:30:00Z"
          type: string
        quoteId:
          description: Settlement quote identifier. Required when amount is empty.
          examples:
            - 550e8400-e29b-41d4-a716-446655440020
          type: string
        transactionId:
          description: Operator-supplied prepayment transaction identifier.
          maxLength: 128
          type: string
      required:
        - transactionId
        - businessDate
      type: object
    PrepaymentOfferHumaBody:
      additionalProperties: false
      properties:
        asOf:
          description: ISO-8601 civil day the offer prices to.
          examples:
            - "2026-05-16"
          type: string
        discount:
          description: The interest not yet due that comes off; never more than its open interest (2 d.p. string).
          examples:
            - "14.96"
          type: string
        dueDate:
          description: ISO-8601 due date of that instalment, the day it closes.
          examples:
            - "2026-06-15"
          type: string
        installmentNumber:
          description: The next instalment to fall due after asOf.
          examples:
            - 1
          format: int64
          type: integer
        presentValue:
          description: What it still owes, discounted from its due date back to asOf at the contract's rate (2 d.p. string).
          examples:
            - "507.27"
          type: string
      required:
        - installmentNumber
        - dueDate
        - presentValue
        - discount
        - asOf
      type: object
    PrepaymentQuoteResponse:
      additionalProperties: false
      properties:
        acceptedAt:
          description: RFC3339 UTC timestamp when the quote was accepted; empty while still pending.
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        acceptedTransactionId:
          description: Identifier of the settlement transaction that accepted the quote; empty while still pending.
          examples:
            - 550e8400-e29b-41d4-a716-446655440002
          type: string
        accruedInterest:
          description: "Interest a full settlement charges on top of the principal up to the payoff day: accrued and unpaid, less what a standing automatic-prepayment promise earned by then, as the payment that promised an instalment counts at its present value that day; zero on a partial. Decimal string, scale 2."
          examples:
            - "111.74"
          type: string
        amortization:
          description: "How the partial shortens the contract: reduce_term (the instalments stay, the contract ends earlier) or reduce_installment (the due dates stay, the instalments fall). Echoes an explicit choice; omitted when no choice was made or on a full settlement."
          examples:
            - reduce_term
          type: string
        arrearsFees:
          description: Fees of the instalments due on or before the valuation day, paid first by a partial prepayment; zero on a full settlement. Decimal string, scale 2.
          examples:
            - "0.00"
          type: string
        arrearsInterest:
          description: Interest of the instalments due on or before the valuation day, paid first by a partial prepayment; zero on a full settlement. Decimal string, scale 2.
          examples:
            - "0.00"
          type: string
        arrearsLateCharges:
          description: Late fine and mora of the instalments due on or before the valuation day, paid first by a partial prepayment; zero on a full settlement. Decimal string, scale 2.
          examples:
            - "7.00"
          type: string
        arrearsPrincipal:
          description: Principal of the instalments due on or before the valuation day, which a partial prepayment pays before retiring principal; zero on a full settlement and when nothing is due. Decimal string, scale 2.
          examples:
            - "300.00"
          type: string
        chargeRebate:
          description: Rebate of unaccrued charges and fees credited on prepayment, as a decimal string, scale 2.
          examples:
            - "120.00"
          type: string
        consumerProtectionRegime:
          description: Consumer-protection regime label applied to the prepayment terms.
          type: string
        createdAt:
          description: RFC3339 UTC timestamp when the quote was created.
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        currency:
          description: ISO 4217 currency code of the loan and quote.
          examples:
            - BRL
          type: string
        expiresAt:
          description: RFC3339 UTC timestamp after which the quote is no longer valid.
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        fees:
          description: Applied charges the schedule holds open on the payoff day, charged on top of the principal on a full settlement; zero on a partial, whose charges stay on the instalments that bill them. Decimal string, scale 2.
          examples:
            - "25.00"
          type: string
        grossAmount:
          description: Retired settlement principal being paid off (equals the outstanding principal for a full settlement; on a partial, the principal retired once the arrears are paid), as a decimal string, scale 2.
          examples:
            - "42000.00"
          type: string
        heldCashApplied:
          description: "Cash the contract already holds, paid ahead of its due dates, that the prepayment spends before asking the borrower for the rest: on a partial at most the amount asked, the rest staying held for the due dates, and on an automatic-prepayment version never the present value already promised to an instalment. Decimal string, scale 2."
          examples:
            - "507.27"
          type: string
        id:
          description: Unique identifier (UUID) of the prepayment quote.
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        interestRebate:
          description: Mandatory interest rebate (juros nao incorridos) disclosed on prepayment, as a decimal string, scale 2. On a full settlement it is the interest not yet incurred on the payoff day.
          examples:
            - "1250.75"
          type: string
        iofReconciliation:
          description: IOF adjustment as a decimal string, scale 2. Defined-principal loans report zero because IOF is not refunded on early payoff.
          examples:
            - "0.00"
          type: string
        jurisdictionCode:
          description: ISO jurisdiction code governing the quote (e.g. "BR").
          examples:
            - BR
          type: string
        lateCharges:
          description: Late fine and mora open on the payoff day, charged on top of the principal on a full settlement; zero on a partial. Decimal string, scale 2.
          examples:
            - "7.00"
          type: string
        loanAccountId:
          description: UUID of the loan account the quote was generated for.
          examples:
            - 550e8400-e29b-41d4-a716-446655440001
          type: string
        netSettlementAmount:
          description: "Net cash payable to settle: gross settlement principal plus accrued interest, late charges and applied charges, minus charge rebate, plus any IOF due, plus on a partial the arrears it pays first, minus the held cash it spends, never below zero, as a decimal string, scale 2. At zero the borrower pays nothing and a full settlement issues no charge; held cash above a payoff is owed back on the payoff refund desk. Interest rebate is disclosure-only; defined-principal loans report zero IOF reconciliation because IOF is not refunded."
          examples:
            - "41992.23"
          type: string
        payoffPurpose:
          description: "Who pays this frozen payoff: borrower_prepayment or portability. Omitted when the quote does not state one."
          examples:
            - portability
          type: string
        principalOutstanding:
          description: Outstanding principal at quote time as a decimal string in major currency units, scale 2.
          examples:
            - "42000.00"
          type: string
        profileVersion:
          description: Jurisdiction profile version used to compute the quote.
          examples:
            - 1.0.0
          type: string
        quoteType:
          description: "Quote variant: partial (principal prepayment) or full_settlement."
          examples:
            - partial
          type: string
        rebateMandatory:
          description: True when regulation mandates applying the interest rebate to this quote.
          type: boolean
        slaDueAt:
          description: RFC3339 UTC full-settlement SLA deadline; omitted for partial quotes.
          examples:
            - "2026-06-19T12:00:00Z"
          type: string
      required:
        - id
        - loanAccountId
        - quoteType
        - principalOutstanding
        - accruedInterest
        - lateCharges
        - fees
        - interestRebate
        - chargeRebate
        - iofReconciliation
        - grossAmount
        - heldCashApplied
        - netSettlementAmount
        - arrearsPrincipal
        - arrearsInterest
        - arrearsFees
        - arrearsLateCharges
        - rebateMandatory
        - expiresAt
        - currency
        - profileVersion
        - jurisdictionCode
        - consumerProtectionRegime
        - createdAt
      type: object
    PreviewCompensatingAdjustmentHumaBody:
      additionalProperties: false
      properties:
        adjustmentAmount:
          description: Normalized signed amount, exact two-decimal string.
          type: string
        creditRole:
          description: "above|cash|suspense: the account a disbursement_* reason credits."
          type: string
        currency:
          description: ISO-4217 currency code.
          type: string
        debitRole:
          description: "cash|loss|below: the account a disbursement_* reason debits."
          type: string
        debtAmountAfter:
          description: CCB debt after, when this adjustment changes the debt.
          type: string
        debtAmountBefore:
          description: CCB debt before, when this adjustment changes the debt.
          type: string
        numeroContrato:
          description: Canonical rail contract number.
          type: string
        principalSide:
          description: "debit|credit: the direction the eventual posting intent moves the contract's principal (receivable) account. Always opposite suspenseSide. Absent for a disbursement_* reason."
          type: string
        reason:
          description: Closed reason catalog.
          type: string
        suspenseSide:
          description: "debit|credit: the direction the eventual posting intent moves the tenant's suspense account. Absent for a disbursement_* reason."
          type: string
      required:
        - numeroContrato
        - reason
        - currency
        - adjustmentAmount
      type: object
    ProblemAssetAssessmentHistoryResponse:
      additionalProperties: false
      properties:
        assessments:
          description: "Declarations, newest first. Withdrawals are listed beside the characterisations they withdraw rather than replacing them: a declaration is never edited or deleted, so the history IS the record."
          items:
            $ref: "#/components/schemas/ProblemAssetAssessmentResponse"
          type:
            - array
            - "null"
        loanAccountId:
          description: Contract the history belongs to.
          type: string
      required:
        - loanAccountId
        - assessments
      type: object
    ProblemAssetAssessmentResponse:
      additionalProperties: false
      properties:
        assessmentId:
          description: Identity of this declaration.
          type: string
        characterizesProblemAsset:
          description: The verdict recorded.
          type: boolean
        createdAt:
          description: When the declaration was recorded (RFC 3339, UTC).
          type: string
        declaredBy:
          description: Authenticated subject that declared it, as free text.
          type: string
        evaluatedOn:
          description: Business day the assessment was made (YYYY-MM-DD).
          type: string
        evidenceNotes:
          description: The assessor's own notes, empty when none were written.
          type: string
        evidenceReference:
          description: Pointer to the evidence behind the declaration.
          type: string
        loanAccountId:
          description: Contract the declaration is about.
          type: string
        source:
          description: Where the characterisation came from.
          type: string
        trigger:
          description: The norm article invoked, trimmed and lower-cased. This is the form a withdrawal of this declaration must use.
          type: string
      required:
        - assessmentId
        - loanAccountId
        - trigger
        - source
        - evidenceReference
        - evidenceNotes
        - evaluatedOn
        - characterizesProblemAsset
        - declaredBy
        - createdAt
      type: object
    ProblemAssetReassessmentOverdueListResponse:
      additionalProperties: false
      properties:
        businessDate:
          description: "Business date the rows belong to: the one asked for, or the latest the sweep recorded. Empty only when no sweep has ever run for this tenant."
          type: string
        hasMore:
          description: True when the backlog runs past the rows returned. Ask again with a larger limit to see the rest.
          type: boolean
        overdue:
          description: Contracts whose standing qualitative characterisation has outlived its re-assessment horizon, ordered by contract.
          items:
            $ref: "#/components/schemas/ProblemAssetReassessmentOverdueResponse"
          type:
            - array
            - "null"
        totalCount:
          description: How many contracts are overdue on this business date in total, not how many this page carries. On a compliance surface the size of the backlog is the number that matters, and a full page with no total reads exactly like a backlog the size of the page.
          format: int64
          type: integer
      required:
        - businessDate
        - overdue
        - totalCount
        - hasMore
      type: object
    ProblemAssetReassessmentOverdueResponse:
      additionalProperties: false
      properties:
        businessDate:
          description: Business date this row was raised for (YYYY-MM-DD).
          type: string
        daysOverdueForReassessment:
          description: "Days past the horizon on this business date. One on the first overdue day: a contract at exactly the horizon is still inside its deadline and is not listed."
          format: int64
          type: integer
        horizonDays:
          description: The re-assessment interval the contract's product version declares, in days.
          format: int64
          type: integer
        lastAssessedOn:
          description: "The day somebody last looked at this contract at all (YYYY-MM-DD): the newest evaluation date across every live declaration, characterising or withdrawn."
          type: string
        loanAccountId:
          description: Contract whose characterisation is due for review.
          type: string
        trigger:
          description: The norm article of the characterisation still standing, trimmed and lower-cased — the same form a withdrawal of it must use.
          type: string
      required:
        - loanAccountId
        - businessDate
        - trigger
        - lastAssessedOn
        - horizonDays
        - daysOverdueForReassessment
      type: object
    PromoteLoanProductVersionHumaInputBody:
      additionalProperties: false
      properties:
        versionId:
          description: Loan product version that new applications should originate on from now on. It must be a version of this product.
          examples:
            - 550e8400-e29b-41d4-a716-446655440001
          format: uuid
          type: string
      required:
        - versionId
      type: object
    PublishPDDStageLadderBand:
      additionalProperties: false
      properties:
        carteira:
          description: Norm portfolio class this band is written for. Omit for a band that applies to every carteira.
          enum:
            - ""
            - C1
            - C2
            - C3
            - C4
            - C5
          type: string
        minDaysOverdue:
          description: Inclusive lower bound of the band, in days overdue.
          examples:
            - 15
          format: int64
          minimum: 0
          type: integer
        regime:
          description: arrears is the day count; problem_asset is the floor a declared characterisation imposes and must open at 0 days.
          enum:
            - arrears
            - problem_asset
          examples:
            - arrears
          type: string
        stage:
          description: PDD bucket a contract inside the band belongs to.
          enum:
            - current
            - stage_1
            - stage_2
            - stage_3
          examples:
            - stage_1
          type: string
      required:
        - regime
        - minDaysOverdue
        - stage
      type: object
    PublishPDDStageLadderHumaBody:
      additionalProperties: false
      properties:
        bands:
          description: "The bands of the ladder. Every scope needs a floor: an arrears band AND a problem_asset band at 0 days with no carteira, plus a band at 0 days for each carteira the ladder names — a carteira scope is resolved alone and never falls back to the catch-all."
          items:
            $ref: "#/components/schemas/PublishPDDStageLadderBand"
          maxItems: 200
          minItems: 1
          type:
            - array
            - "null"
        effectiveFrom:
          description: "First business date the new ladder decides (YYYY-MM-DD). Must be in the future: configuration never reclassifies history."
          examples:
            - "2026-10-01"
          type: string
        sourceReference:
          description: Where the numbers came from — the norm article, the committee decision.
          examples:
            - Credit committee 2026-09-30
          maxLength: 512
          type: string
      required:
        - effectiveFrom
        - sourceReference
        - bands
      type: object
    PutIOFRateHumaInputBody:
      additionalProperties: false
      properties:
        additionalPercent:
          description: "One-off additional alíquota of art. 7, § 15, in percent: 0.38 is 0,38%. Above 1.5 is LENDER-0935; a sign or more than 6 decimals is refused by the schema."
          examples:
            - "0.38"
          pattern: ^[0-9]{1,2}(\.[0-9]{1,6})?$
          type: string
        changedBy:
          description: Who makes the change, read only when the deployment runs without authentication; an authenticated subject always wins. A change naming nobody is refused LENDER-0941.
          examples:
            - tax-desk
          maxLength: 256
          type: string
        dailyPercent:
          description: "Daily alíquota in percent, as the decree writes it: 0.0082 is 0,0082% ao dia. Above 1.5, the maximum of art. 6, is LENDER-0935; a sign or more than 6 decimals is refused by the schema."
          examples:
            - "0.0082"
          pattern: ^[0-9]{1,2}(\.[0-9]{1,6})?$
          type: string
        sourceReference:
          description: The legal basis of the rate, kept with it.
          examples:
            - Decreto 6.306/2007, art. 7, I, b, 1, redação do Decreto 12.499/2025; ADC 96 cautelar em vigor
          maxLength: 512
          pattern: \S
          type: string
      required:
        - dailyPercent
        - additionalPercent
        - sourceReference
      type: object
    PutSuspenseAccountHumaInputBody:
      additionalProperties: false
      properties:
        gl_account:
          description: "GL account in the tenant's ledger, as its Midaz alias: at most 50 letters, digits, ':', '_' and '-', with an optional leading '@', or @external/<ASSET> (LENDER-0429 otherwise)."
          examples:
            - 2100-90-001
          maxLength: 128
          minLength: 1
          type: string
      required:
        - gl_account
      type: object
    RateBandHumaBody:
      additionalProperties: false
      properties:
        maxAnnualRateBps:
          description: Band ceiling in annual basis points, inclusive; never below the floor.
          examples:
            - 4800
          format: int64
          minimum: 0
          type: integer
        minAnnualRateBps:
          description: Band floor in annual basis points, inclusive (1 bps = 0.01%). Zero is a legitimate floor.
          examples:
            - 1200
          format: int64
          minimum: 0
          type: integer
      required:
        - minAnnualRateBps
        - maxAnnualRateBps
      type: object
    RateTableDetailHumaBody:
      additionalProperties: false
      properties:
        createdAt:
          description: Creation timestamp (RFC3339, UTC).
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        id:
          description: Floating-rate table identifier (uuid).
          examples:
            - 66666666-6666-6666-6666-666666666666
          type: string
        name:
          description: Reference rate table name.
          examples:
            - Selic
          type: string
        periods:
          description: Effective-dated curve, oldest first; always present, empty slice when the table carries no period yet.
          items:
            $ref: "#/components/schemas/RateTablePeriodHumaBody"
          type:
            - array
            - "null"
      required:
        - id
        - name
        - createdAt
        - periods
      type: object
    RateTableHumaBody:
      additionalProperties: false
      properties:
        createdAt:
          description: Creation timestamp (RFC3339, UTC).
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        id:
          description: Floating-rate table identifier (uuid).
          examples:
            - 66666666-6666-6666-6666-666666666666
          type: string
        name:
          description: Reference rate table name.
          examples:
            - Selic
          type: string
      required:
        - id
        - name
        - createdAt
      type: object
    RateTableListHumaBody:
      additionalProperties: false
      properties:
        data:
          description: Page of floating-rate table headers, newest first; always present, empty slice when none exist.
          items:
            $ref: "#/components/schemas/RateTableHumaBody"
          type:
            - array
            - "null"
      required:
        - data
      type: object
    RateTablePeriodHumaBody:
      additionalProperties: false
      properties:
        annualRateBps:
          description: Reference annual rate for the period, basis points.
          examples:
            - 1075
          format: int64
          type: integer
        effectiveDate:
          description: Date this rate takes effect, inclusive (RFC3339, UTC).
          examples:
            - "2026-01-01T00:00:00Z"
          type: string
        endDate:
          description: Date this rate stops applying, inclusive (RFC3339, UTC); absent while the period is open-ended.
          examples:
            - "2026-06-30T00:00:00Z"
          type: string
        id:
          description: Rate period identifier (uuid).
          examples:
            - 77777777-7777-7777-7777-777777777777
          type: string
      required:
        - id
        - effectiveDate
        - annualRateBps
      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
    ReconcileCompensatingAdjustmentHumaBody:
      additionalProperties: false
      properties:
        confirmed:
          description: True when the ledger already carries a transaction for this operation's correlation identity.
          type: boolean
        id:
          description: Compensating adjustment operation identifier.
          type: string
        status:
          description: "The latest append-only history status after this call: posted|reconciliation_unknown."
          type: string
      required:
        - id
        - confirmed
        - status
      type: object
    RecordAssignmentSetFactHumaInputBody:
      additionalProperties: false
      properties:
        acceptance:
          $ref: "#/components/schemas/AssignmentAcceptanceHumaBody"
          description: The administrator's acceptance document, in the pinned shape. Required when factType is accepted and provenance is administrator_file.
        amountPaid:
          description: "What the fund sent for the lot in all, as the bank shows it, less only what the desk refunded it for an over-payment. Never subtract refundToFund: the Lender keeps what the desk settles for lines taken out through their case apart and nets it itself. Decimal string in the lot's currency, above zero, at most 2 decimal places. REQUIRED on paid and refused on any other fact (LENDER-0510). The latest statement wins until a line of the lot is accepted; after that it stands (LENDER-0515). While it differs, net of those refunds, from the frozen prices of the paid lines still in the lot by more than the tolerance the lot froze from its fund, a fund_payment_divergence case is open, the title transfer waits and the acceptance is held (LENDER-0511)."
          type: string
        factType:
          description: "The externally-observed fact being confirmed. offer_sent is the operator confirming the authorized offer file was delivered to the fund's administrator, and requires an authorized file to exist. paid, transferred and accepted are per-receivable progress facts and follow one another in that order; accepted is the administrator accepting the title transfer, which takes the receivable out of this portfolio and writes it off. term_signed is NOT here: it is derived from the signed endorsement instrument itself."
          enum:
            - offer_sent
            - paid
            - transferred
            - accepted
          type: string
        offerFileId:
          description: "The X-Offer-File-Id of the offer file that was sent. On offer_sent, when present, it must be the newest file authorized for the lot, or nothing is recorded (LENDER-1505): a file another download replaced is not the offer the Lender serves as sent, and a repeated confirmation naming it is refused too. Required on offer_sent once the lot holds more than one authorized file, which happens when a line left the lot and a later download replaced the file. Ignored on any other fact."
          format: uuid
          type: string
        provenance:
          description: "Where the fact came from. REQUIRED for paid, transferred and accepted; ignored for offer_sent, which is by construction an operator's own confirmation about a file we generated. On a transferred fact it also decides whether the registradora's title-transfer command is settled: only registry_provider does that, because the acceptance guard treats a settled command as proof the title moved, and a desk's or an administrator's own statement is not the registradora's acatamento. Where the fund reaches no registradora the guard does not apply at all."
          enum:
            - administrator_file
            - registry_provider
            - operator
          type: string
        receivableRefs:
          description: "Narrows a per-receivable fact to exactly these receivables. Omit it to mean the WHOLE surviving composition — the honest reading of an administrator stating that a portfolio was paid. A reference the set does not carry, or carries as cut or removed, is refused. It must be EMPTY when an acceptance document is present: the document already names what was accepted, and two lists are two answers."
          items:
            maxLength: 128
            minLength: 1
            pattern: \S
            type: string
          maxItems: 500
          type:
            - array
            - "null"
      required:
        - factType
      type: object
    RecordAssignmentTermHumaInputBody:
      additionalProperties: false
      properties:
        artifact:
          description: The administrator's own signed endorsement term, base64-encoded. Required if and only if the set froze administrator_generated as its term mode at assembly; refused for a set the Lender emits for.
          format: byte
          type: string
        artifactReference:
          description: The administrator's own identifier for that document (its term/protocol number). Required alongside artifact.
          maxLength: 256
          type: string
        coObligation:
          description: "Whether this term binds the assignor to answer for the receivable it sold (coobrigação). REQUIRED, and the only accepted value is false. An omitted field is refused rather than read as false: silence about a signed instrument is not a statement about its clauses, and this table is append-only, so a term recorded under an assumption cannot be corrected afterwards. Same reason proposedRetainedFraction is required on the fund route. A term WITH co-obligation is a retained-risk assignment under Res. CMN 4.966: the receivable stays on the balance sheet, the price is recorded as a liability and the result is appropriated over the remaining term. That treatment does not exist yet, so the clause is refused rather than recorded and then booked as an outright sale. Declared here as a structured fact and never read out of the document's wording."
          type: boolean
        idempotencyKey:
          description: Caller idempotency key. The same key replays the same term; the same key over a different approved composition, a different template version or different artifact bytes is refused.
          maxLength: 256
          minLength: 1
          type: string
      required:
        - idempotencyKey
        - coObligation
      type: object
    RecordB3RegistrationBody:
      additionalProperties: false
      properties:
        ccbNumber:
          description: The client's number for the contract's CCB, with no leading or trailing space and no control character. Optional.
          examples:
            - TRN-000123
          maxLength: 64
          pattern: ^[^\s\x00-\x1F\x7F](?:[^\x00-\x1F\x7F]*[^\s\x00-\x1F\x7F])?$
          type: string
        instrumentCode:
          description: "The instrument code (Código IF) B3 assigned when the client registered the contract: 1 to 14 letters and digits, stored exactly as sent."
          examples:
            - CCB0000ABCD12
          pattern: ^[A-Za-z0-9]{1,14}$
          type: string
        registrationDate:
          description: The civil day B3 registered the contract (YYYY-MM-DD), from the approval day to today in Brasília. Optional.
          examples:
            - "2026-10-08"
          format: date
          type: string
      required:
        - instrumentCode
      type: object
    RecordCollectionTreasuryRefundHumaInputBody:
      additionalProperties: false
      properties:
        occurredAt:
          description: RFC 3339 instant the client's treasury paid, from the second the payment was held to 5 minutes past the tenant's business now. Omit it and Lender stamps the tenant's business now.
          format: date-time
          type: string
        reference:
          description: "The Pix end-to-end id or TED control number the treasury paid under: 1 to 255 bytes of UTF-8 once trimmed, no control characters."
          type: string
      required:
        - reference
      type: object
    RecordCreditLossRecoveryRequest:
      additionalProperties: false
      properties:
        amount:
          description: "Money received: a positive decimal string with at most 2 decimal places. A repeat of the same X-Idempotency key must carry the same amount and receivedAt."
          examples:
            - "1200.00"
          type: string
        receivedAt:
          description: RFC 3339 instant the money arrived; its São Paulo day dates the entry. Not after today and not before the write-off instant.
          examples:
            - "2027-04-15T13:00:00Z"
          type: string
      type: object
    RecordCreditLossWriteOffRequest:
      additionalProperties: false
      properties:
        reason:
          description: "Why the contract is written off: 1 to 500 characters, edge spaces trimmed. A repeat of the same X-Idempotency key must carry the same reason."
          examples:
            - Uncollectable after 360 days in arrears
          type: string
      required:
        - reason
      type: object
    RecordPayoffRefundRequest:
      additionalProperties: false
      properties:
        amount:
          description: "Amount paid to the borrower (2 d.p. string): above zero and at most what the contract still owes."
          examples:
            - "297.48"
          type: string
        refundedAt:
          description: RFC 3339 instant the money left by Pix or TED, between the contract's settlement and now, tolerating 5 minutes of client clock skew. Defaults to now.
          examples:
            - "2026-10-07T15:00:00Z"
          format: date-time
          type: string
      required:
        - amount
      type: object
    RecordSignedCreditInstrumentHumaInputBody:
      additionalProperties: false
      properties:
        creditInstrumentId:
          description: The Lender-emitted CCB that was signed. Required when the product version has the Lender emit; refused when the client issues.
          format: uuid
          type: string
        document:
          description: The signed PDF, base64-encoded (standard alphabet), at most 20 MiB decoded.
          format: byte
          type: string
        evidenceRef:
          description: The integrator's reference to the signature evidence.
          maxLength: 1024
          minLength: 1
          type: string
        originalDocumentDigest:
          description: sha-256 hex of the document that was signed. Required when the client issues; when the Lender emitted, optional and checked against its CCB.
          pattern: ^[0-9a-fA-F]{64}$
          type: string
        replacementReason:
          description: "Only to replace: why, in one line of at most 500 characters. Goes with supersedes."
          maxLength: 500
          type: string
        signatories:
          description: Every party that signed.
          items:
            $ref: "#/components/schemas/SignatoryHumaInput"
          maxItems: 20
          minItems: 1
          type:
            - array
            - "null"
        signedAt:
          description: When the signature completed (RFC3339); at most 5 minutes after the Lender's clock, the signature provider's clock skew.
          format: date-time
          type: string
        signedDocumentDigest:
          description: sha-256 hex of the decoded document. The Lender computes its own and refuses a mismatch (LENDER-0605).
          pattern: ^[0-9a-fA-F]{64}$
          type: string
        supersedes:
          description: "Only to replace: the id of the proposal's newest record. Goes with replacementReason."
          format: uuid
          type: string
      required:
        - document
        - signedDocumentDigest
        - signedAt
        - evidenceRef
        - signatories
      type: object
    RefinanceTermsHumaBody:
      additionalProperties: false
      properties:
        ratePolicy:
          description: Rate the new contract may carry against the contracts it refinances.
          enum:
            - lower_than_weighted_average
            - unrestricted
          examples:
            - lower_than_weighted_average
          type: string
      required:
        - ratePolicy
      type: object
    RejectLoanApplicationHumaRequest:
      additionalProperties: false
      properties:
        decisionAt:
          description: Decision timestamp (RFC3339). Omit it and Lender stamps the tenant's business now.
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        reason:
          description: Rejection reason.
          type: string
      required:
        - reason
      type: object
    ReleaseParkedPostingHumaBody:
      additionalProperties: false
      properties:
        ledgerCheckedAbsentSentAt:
          description: The case's lastSentAt, sent back only after the operator looked the posting key up in Midaz and it holds nothing. Releases a posting whose sent record Midaz cannot confirm (LENDER-0457) by sending it once, and only while the sent record is no younger than this value; ignored when midazTransactionId is given.
          format: date-time
          type: string
        midazTransactionId:
          description: The id of the Midaz transaction that holds this posting, when the operator found it there (LENDER-0457). The lender reads that transaction by id, checks its correlationId metadata is this posting's key, and writes the receipt from it; nothing is sent.
          format: uuid
          type: string
      type: object
    ReleaseParkedPostingOutputBody:
      additionalProperties: false
      properties:
        released:
          description: "True when this call closed the case: Midaz already held the posting and its receipt was written, or the posting was sent once. False when the posting was not parked (a receipt exists or it is not quarantined); nothing was changed."
          type: boolean
      required:
        - released
      type: object
    RemoveAssignmentExceptionLineHumaInputBody:
      additionalProperties: false
      properties:
        disposition:
          description: Why the line leaves the lot and how the fund is settled, in the operator's own words.
          maxLength: 512
          minLength: 1
          type: string
      required:
        - disposition
      type: object
    RepairExclusionResponse:
      additionalProperties: false
      properties:
        new_request_ref:
          type: string
        request_ref:
          type: string
        status:
          type: string
      required:
        - request_ref
        - new_request_ref
        - status
      type: object
    RepaymentAllocationHumaBody:
      additionalProperties: false
      properties:
        dueDate:
          description: ISO-8601 installment due date.
          examples:
            - "2026-06-14"
          type: string
        feesAmount:
          description: Fees component (2 d.p. string).
          examples:
            - "3.50"
          type: string
        fullyPaid:
          description: True if this installment is fully settled.
          type: boolean
        installmentNumber:
          description: 1-based installment sequence number.
          examples:
            - 3
          format: int64
          type: integer
        interestAmount:
          description: Interest component (2 d.p. string).
          examples:
            - "20.00"
          type: string
        penaltiesAmount:
          description: Penalties component (2 d.p. string).
          examples:
            - "1.50"
          type: string
        principalAmount:
          description: Principal component (2 d.p. string).
          examples:
            - "100.00"
          type: string
        totalAmount:
          description: Total installment amount (2 d.p. string).
          examples:
            - "125.00"
          type: string
      required:
        - installmentNumber
        - dueDate
        - principalAmount
        - interestAmount
        - feesAmount
        - penaltiesAmount
        - totalAmount
        - fullyPaid
      type: object
    RepaymentAllocationHumaEntry:
      additionalProperties: false
      properties:
        dueDate:
          description: ISO-8601 installment due date.
          examples:
            - "2026-06-14"
          type: string
        feesAmount:
          description: Fees applied (2 d.p. string).
          examples:
            - "1.50"
          type: string
        fullyPaid:
          description: True if this installment is fully settled.
          type: boolean
        installmentNumber:
          description: 1-based installment sequence number.
          examples:
            - 3
          format: int64
          type: integer
        interestAmount:
          description: Interest applied (2 d.p. string).
          examples:
            - "12.34"
          type: string
        penaltiesAmount:
          description: Penalties applied (2 d.p. string).
          examples:
            - "0.00"
          type: string
        principalAmount:
          description: Principal applied (2 d.p. string).
          examples:
            - "100.00"
          type: string
        totalAmount:
          description: Total applied to this installment (2 d.p. string).
          examples:
            - "113.84"
          type: string
      required:
        - installmentNumber
        - dueDate
        - principalAmount
        - interestAmount
        - feesAmount
        - penaltiesAmount
        - totalAmount
        - fullyPaid
      type: object
    RepaymentPreviewHumaBody:
      additionalProperties: false
      properties:
        allocations:
          description: Per-installment allocation breakdown.
          items:
            $ref: "#/components/schemas/RepaymentAllocationHumaBody"
          type:
            - array
            - "null"
        appliedAmount:
          description: Amount applied to the loan (2 d.p. string).
          examples:
            - "125.00"
          type: string
        backdated:
          description: True if the repayment effective date is before the business date.
          type: boolean
        effectiveDate:
          description: "YYYY-MM-DD São Paulo day of the instant this preview is dated at: the one the request named, or the tenant's business now when it named none."
          examples:
            - "2026-06-14"
          type: string
        loanAccountId:
          description: Loan account UUID.
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        overpaymentAmount:
          description: "Part of the payment that no instalment due on or before the effective date absorbed (2 d.p. string). It is not an excess over the whole balance: instalments due later take none of the payment, so paying ahead of the schedule lands here."
          examples:
            - "0.00"
          type: string
        prepaidInstallment:
          $ref: "#/components/schemas/PrepaidInstallmentHumaBody"
          description: The instalment this payment would cover ahead of the schedule, closing at its present value on its due date. Omitted when it would promise nothing.
      required:
        - loanAccountId
        - effectiveDate
        - allocations
        - appliedAmount
        - overpaymentAmount
        - backdated
      type: object
    RepaymentRecordHumaBody:
      additionalProperties: false
      properties:
        allocations:
          description: Per-installment allocation breakdown.
          items:
            $ref: "#/components/schemas/RepaymentAllocationHumaBody"
          type:
            - array
            - "null"
        appliedAmount:
          description: Amount applied to the loan (2 d.p. string).
          examples:
            - "125.00"
          type: string
        backdated:
          description: True if the repayment effective date is before the business date.
          type: boolean
        effectiveDate:
          description: "YYYY-MM-DD São Paulo day of the instant the money moved: the one the request named, or the tenant's business now Lender stamped when it named none. A replay answers the day of the original payment."
          examples:
            - "2026-06-14"
          type: string
        loanAccountId:
          description: Loan account UUID.
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        overpaymentAmount:
          description: "Part of the payment that no instalment due on or before the effective date absorbed (2 d.p. string). It is not an excess over the whole balance: instalments due later take none of the payment, so paying ahead of the schedule lands here."
          examples:
            - "0.00"
          type: string
        prepaidInstallment:
          $ref: "#/components/schemas/PrepaidInstallmentHumaBody"
          description: "The instalment this payment covers ahead of the schedule: on a product version that prepays automatically, an overpaymentAmount of at least the day's present value of the next instalment promises it, and it closes at that present value on its due date from the held overpayment. Omitted when the payment promises nothing."
        requestId:
          description: X-Idempotency key echoed from the request.
          examples:
            - 550e8400-e29b-41d4-a716-446655440010
          type: string
        transactionId:
          description: Recorded repayment transaction UUID.
          examples:
            - 550e8400-e29b-41d4-a716-446655440001
          type: string
      required:
        - transactionId
        - loanAccountId
        - effectiveDate
        - allocations
        - appliedAmount
        - overpaymentAmount
        - backdated
      type: object
    RepaymentRequestHumaBody:
      additionalProperties: false
      properties:
        amount:
          description: Repayment amount in major currency units (e.g. "125.00"). Must be positive with at most 2 fractional digits.
          examples:
            - "125.00"
          type: string
        effectiveDate:
          description: The moment the money moved, as a full RFC 3339 instant with a time and an offset. A bare YYYY-MM-DD calendar date is refused with LENDER-0348. Omit it and transactionDate, and Lender stamps the tenant's business now.
          examples:
            - "2026-06-14T17:30:00Z"
          type: string
        transactionDate:
          description: The moment the money moved, as a full RFC 3339 instant, read when effectiveDate is absent. A bare YYYY-MM-DD calendar date is refused with LENDER-0348.
          examples:
            - "2026-06-14T17:30:00Z"
          type: string
      required:
        - amount
      type: object
    RequeueConsignadoInboxHumaBody:
      additionalProperties: false
      properties:
        id:
          description: The item's identifier.
          type: string
        inbox:
          description: The inbox the item belongs to.
          type: string
        requeued:
          description: True when the item was quarantined and is now back on the queue.
          type: boolean
        requeuedAt:
          description: UTC instant of the requeue (RFC3339).
          type: string
      required:
        - inbox
        - id
        - requeued
        - requeuedAt
      type: object
    RequeueContractDivergenceHumaRequest:
      additionalProperties: false
      properties:
        competenciaInicioDesconto:
          description: On a renegotiation_* item only, the YYYYMM competência the new contract's deductions start at (K), when the renegociação did not name one; refused when it names another or on any other item.
          pattern: ^[0-9]{4}(0[1-9]|1[0-2])$
          type: string
        expectedVersion:
          description: "Compare-and-swap guard: the version this request was read against."
          format: int64
          minimum: 1
          type: integer
        reason:
          description: Optional free-text reason for the retry.
          maxLength: 4000
          type: string
      required:
        - expectedVersion
      type: object
    RescheduleLoanAccountHumaRequest:
      additionalProperties: false
      properties:
        businessDate:
          description: YYYY-MM-DD business date applied to the reschedule.
          examples:
            - "2026-06-14"
          type: string
        effectiveDate:
          description: YYYY-MM-DD effective date of the reschedule.
          examples:
            - "2026-06-14"
          type: string
        firstRescheduledDueDate:
          description: YYYY-MM-DD first due date of the rescheduled plan.
          examples:
            - "2026-06-14"
          type: string
        indexChanged:
          description: "RENEGOTIATION. Declare that the modification changed the contract's index. A SUBSTANTIAL trigger under art. 22, except on a restructuring, which stays on the contract. It is DECLARED and never inferred: an index is not a concept this core models, so no reading of the stored schedule could tell one change from another. Declaration beats calculation, and a declared change is substantial however small its effect on present value."
          type: boolean
        isRestructuring:
          description: "RESTRUCTURING CLASS. Whether this renegotiation is a restructuring (reestruturação, Res. CMN 4.966; forbearance). Omit to record the default the Lender computes: in Brazil, a restructuring when the debt is more than 30 days overdue on the effective date, or the contract already carries a restructuring, or a contract it replaced carried one (the mark does not expire), and the renegotiation grants any concession: the new plan ends after the original term, is priced below the original rate, folds overdue instalments into the new principal, or waives late charges (waiveLateCharges). On a contract already restructured, a concession is measured against the terms in force (a new extension into a later month or a new cut); a raise, a shortening or a due-day move within the month is not one. A restructuring never ends the contract: it is measured and settled in place. A value different from the default requires restructuringJustification."
          type: boolean
        newCurrency:
          description: "RENEGOTIATION. NOT SUPPORTED YET: any value is refused with 422 (LENDER-0330) and nothing is written, on a restructuring or not. The field is named so a currency change on a renegotiation is a possible future feature."
          type: string
        newMonthlyInterestRate:
          description: "RENEGOTIATION. Monthly interest rate as a decimal FRACTION (0.025 is 2.5% a month) to price the new schedule at, in place of the rate the contract was written at; 0 is accepted, a zero-interest concession that bills the interest accrued before it on the first row and principal alone after, and the product's rate floor is not asked. A substantial renegotiation priced above the product version's ceiling is refused with 422 (LENDER-0215), and a 0% one that is not a restructuring with 422 (LENDER-0359); nothing is written. Omit to re-time at the contract's own rate. Supplying it makes this a renegotiation under Res. CMN 4.966/2021 art. 22, which is judged before anything is written: a substantial one ends this contract and mints a replacement (see substantialRenegotiation in the response); any other re-solves the rate (art. 23) and posts nothing. Only a restructuring posts its art. 22 result against the result account, whatever its size, and keeps the contract."
          examples:
            - "0.025"
          type: string
        newTermMonths:
          description: "Number of monthly instalments of the rescheduled plan, at most 600. The term they span is bounded by the loan product version's maximum term when it declares one (LENDER-0396): months from the effective date to the last instalment's grid date, a started month counting whole."
          examples:
            - 24
          format: int64
          minimum: 1
          type: integer
        rateTypeChanged:
          description: RENEGOTIATION. Declare that the modification changed the contract's rate type, for instance fixed to floating. A SUBSTANTIAL trigger under art. 22, except on a restructuring, declared for the same reason as indexChanged.
          type: boolean
        reason:
          description: Operator-supplied reschedule reason.
          maxLength: 128
          type: string
        restructuringJustification:
          description: RESTRUCTURING CLASS. Written justification, required when isRestructuring differs from the computed default and ignored when it agrees.
          maxLength: 2048
          type: string
        transactionId:
          description: Operator-supplied reschedule transaction identifier.
          maxLength: 128
          type: string
        waiveLateCharges:
          description: Waive the late fine and default interest the contract owes on the effective date. Omit, or false, to carry them into the new principal and recognise them. Waived, what month closes already recognised goes to the renegotiation loss and the rest is never recognised.
          type: boolean
      required:
        - transactionId
        - newTermMonths
        - firstRescheduledDueDate
        - effectiveDate
        - businessDate
        - reason
      type: object
    ResolveAssignmentExceptionHumaInputBody:
      additionalProperties: false
      properties:
        disposition:
          description: What was decided about this case, in the operator's own words. Required — the queue exists because software could not decide, so closing one with nothing recorded discards the question.
          maxLength: 512
          minLength: 1
          type: string
      required:
        - disposition
      type: object
    RestructuringClassHumaBody:
      additionalProperties: false
      properties:
        defaultIsRestructuring:
          description: The default the Lender computed for this renegotiation.
          type: boolean
        isRestructuring:
          description: Whether the renegotiation is a restructuring (reestruturação, Res. CMN 4.966; forbearance), as recorded.
          type: boolean
        justification:
          description: The operator's written justification. Present exactly when isRestructuring differs from defaultIsRestructuring.
          type: string
        recordedAt:
          description: RFC 3339 UTC instant the class was recorded.
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        recordedBy:
          description: Authenticated subject that recorded the renegotiation; empty when the deployment runs without authentication.
          examples:
            - officer-xyz
          type: string
      required:
        - isRestructuring
        - defaultIsRestructuring
        - recordedBy
        - recordedAt
      type: object
    RetainedInstallmentCloseHumaBody:
      additionalProperties: false
      properties:
        carvedOutAt:
          description: RFC 3339 instant the instalment was carved out at the sale.
          format: date-time
          type: string
        cash:
          description: The cash on the desk the close applies to it (2 d.p. string).
          examples:
            - "187.40"
          type: string
        closedAt:
          description: RFC 3339 instant of the close, which dates the posting.
          format: date-time
          type: string
        competencia:
          description: YYYYMM payroll cycle of the instalment.
          type: string
        currency:
          description: ISO 4217 currency code.
          type: string
        id:
          description: The retained instalment; the id the close route takes.
          format: uuid
          type: string
        numeroContrato:
          description: Consignado contract number.
          type: string
        owed:
          description: What the instalment owes the client (2 d.p. string).
          examples:
            - "250.00"
          type: string
        rest:
          description: What the close books as the client's credit loss (2 d.p. string).
          examples:
            - "62.60"
          type: string
      required:
        - closedAt
        - id
        - numeroContrato
        - competencia
        - currency
        - owed
        - cash
        - rest
        - carvedOutAt
      type: object
    RetainedInstallmentHumaBody:
      additionalProperties: false
      properties:
        carvedOutAt:
          description: RFC 3339 instant the instalment was carved out at the sale.
          format: date-time
          type: string
        cash:
          description: The cash on the desk the close applies to it (2 d.p. string).
          examples:
            - "187.40"
          type: string
        competencia:
          description: YYYYMM payroll cycle of the instalment.
          type: string
        currency:
          description: ISO 4217 currency code.
          type: string
        id:
          description: The retained instalment; the id the close route takes.
          format: uuid
          type: string
        numeroContrato:
          description: Consignado contract number.
          type: string
        owed:
          description: What the instalment owes the client (2 d.p. string).
          examples:
            - "250.00"
          type: string
        rest:
          description: What the close books as the client's credit loss (2 d.p. string).
          examples:
            - "62.60"
          type: string
      required:
        - id
        - numeroContrato
        - competencia
        - currency
        - owed
        - cash
        - rest
        - carvedOutAt
      type: object
    RetainedInstallmentListHumaBody:
      additionalProperties: false
      properties:
        data:
          description: Short retained instalments of the set, oldest carve-out first.
          items:
            $ref: "#/components/schemas/RetainedInstallmentHumaBody"
          type:
            - array
            - "null"
      required:
        - data
      type: object
    RetryAccrualRunHumaInputBody:
      additionalProperties: false
      properties:
        itemIds:
          description: "Accrual run item identifiers to retry. Selecting an item the ledger has already acknowledged is not an error — it is skipped, and the response says which items were actually re-sent. An id that is not an item of this run IS an error: the whole request is refused with 422 and the unknown ids are named."
          items:
            format: uuid
            type: string
          maxItems: 500
          minItems: 1
          type:
            - array
            - "null"
      required:
        - itemIds
      type: object
    ReturnedPaymentReceivableHumaBody:
      additionalProperties: false
      properties:
        amount:
          description: Amount owed (2 d.p. string).
          examples:
            - "125.00"
          type: string
        borrowerId:
          description: Party who owes the returned money.
          examples:
            - 550e8400-e29b-41d4-a716-446655440020
          format: uuid
          type: string
        collectedAt:
          description: RFC 3339 UTC instant of the collection; absent while open.
          examples:
            - "2026-07-01T12:00:00Z"
          type: string
        collectedBy:
          description: Authenticated subject that recorded the collection; empty when the collection was recorded by the system.
          type: string
        collectedOn:
          description: Civil day of the collection; absent while open.
          examples:
            - "2026-07-01"
          type: string
        currency:
          description: ISO-4217 currency of the debt.
          examples:
            - BRL
          type: string
        id:
          description: Returned-payment receivable identifier.
          examples:
            - 550e8400-e29b-41d4-a716-446655440003
          format: uuid
          type: string
        loanAccountId:
          description: Loan account whose payment reversal opened this debt. The reversal reopens that contract; the debt is collected apart from it.
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          format: uuid
          type: string
        openedAt:
          description: RFC 3339 UTC instant the debt was opened.
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        openedOn:
          description: Civil day the debt was opened on.
          examples:
            - "2026-06-14"
          type: string
        originalTransactionId:
          description: Payment that was given back.
          examples:
            - 550e8400-e29b-41d4-a716-446655440001
          type: string
        provisionAmount:
          description: Credit-loss allowance the ledger holds against this debt right now (2 d.p. string). Zero on a collected debt, which released it, and on a written-off one, which consumed it.
          examples:
            - "4.38"
          type: string
        reversalTransactionId:
          description: Compensating reversal that opened this debt.
          examples:
            - 550e8400-e29b-41d4-a716-446655440002
          type: string
        stage:
          description: Where the origin credit product's stage ladder put the debt at its last aging. The vocabulary belongs to the jurisdiction publishing the ladder; absent until the first nightly sweep reaches the row.
          examples:
            - stage_1
          type: string
        status:
          description: "'open' while the borrower still owes it, 'collected' once it was paid by other means, 'written_off' once the ladder charged it off to loss."
          enum:
            - open
            - collected
            - written_off
          examples:
            - open
          type: string
        writtenOffAt:
          description: RFC 3339 UTC instant of the charge-off; absent unless written off.
          examples:
            - "2026-09-01T05:00:00Z"
          type: string
        writtenOffOn:
          description: Civil day of the charge-off; absent unless written off.
          examples:
            - "2026-09-01"
          type: string
      required:
        - id
        - loanAccountId
        - borrowerId
        - originalTransactionId
        - reversalTransactionId
        - currency
        - amount
        - status
        - openedAt
        - openedOn
        - provisionAmount
      type: object
    ReverseRepaymentHumaBody:
      additionalProperties: false
      properties:
        amount:
          description: Reversed amount (2 d.p. string).
          examples:
            - "125.00"
          type: string
        destination:
          description: "Where the reversed money went: always 'revived', the debt returned to this contract and its schedule is back."
          enum:
            - revived
          examples:
            - revived
          type: string
        effectiveDate:
          description: YYYY-MM-DD São Paulo day of the payment the reversal undoes.
          examples:
            - "2026-06-14"
          type: string
        jurisdictionCode:
          description: Jurisdiction code applied to the reversal.
          examples:
            - BR
          type: string
        loanAccountId:
          description: Loan account UUID.
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        originalTransactionId:
          description: Reversed original transaction UUID.
          examples:
            - 550e8400-e29b-41d4-a716-446655440001
          type: string
        profileVersion:
          description: Product profile version applied to the reversal.
          examples:
            - 1.0.0
          type: string
        reason:
          description: Operator-supplied reversal reason.
          type: string
        requestId:
          description: X-Idempotency key echoed from the request.
          examples:
            - 550e8400-e29b-41d4-a716-446655440010
          type: string
        returnedPaymentReceivableId:
          description: Identifier of the returned-payment receivable this reversal opened for the held cash the client had already refunded the borrower. Absent when no held cash was refunded.
          examples:
            - 550e8400-e29b-41d4-a716-446655440003
          format: uuid
          type: string
        transactionId:
          description: Compensating reversal transaction UUID.
          examples:
            - 550e8400-e29b-41d4-a716-446655440002
          type: string
      required:
        - transactionId
        - originalTransactionId
        - loanAccountId
        - reason
        - profileVersion
        - effectiveDate
        - amount
        - destination
      type: object
    ReverseRepaymentHumaRequest:
      additionalProperties: false
      properties:
        jurisdictionCode:
          description: Optional jurisdiction code.
          examples:
            - BR
          type: string
        profileVersion:
          description: Product profile version applied to the reversal.
          examples:
            - 1.0.0
          type: string
        reason:
          description: Operator-supplied reversal reason.
          minLength: 1
          type: string
      required:
        - reason
      type: object
    SchedulePreviewHumaBody:
      additionalProperties: false
      properties:
        calendarReference:
          description: Identifier of the business calendar used to resolve due dates.
          type: string
        effectiveCostPreview:
          $ref: "#/components/schemas/SchedulePreviewHumaEffectiveCost"
          description: Effective-cost breakdown; present only when the jurisdiction profile computes one.
        installments:
          description: Ordered amortisation schedule, one entry per installment.
          items:
            $ref: "#/components/schemas/SchedulePreviewHumaInstallmentLine"
          type:
            - array
            - "null"
        jurisdictionCode:
          description: ISO-2 jurisdiction code resolved for this preview.
          examples:
            - BR
          type: string
        jurisdictionExtensions:
          $ref: "#/components/schemas/SchedulePreviewHumaJurisdictionExtensions"
          description: Per-jurisdiction overlay payload; present only when the profile emits one.
        netDeliveredAmount:
          description: "Net that release delivers to the borrower: totalPrincipal minus withholdingAmount minus originationFeeAmount, the netAmount asked or 0.01 above it. Present only on a preview by netAmount."
          examples:
            - "10000.01"
          type: string
        originationFeeAmount:
          description: Origination fee the version retains from that release, minor-unit precision scale 2. Present only on a preview by netAmount.
          examples:
            - "255.06"
          type: string
        profileVersion:
          description: Jurisdiction profile version used to compute the schedule.
          examples:
            - 1.0.0
          type: string
        scheduleOfferSnapshotId:
          description: Identifier of the offer this preview recorded; derived from the frozen inputs, so an identical preview returns the same value. Absent whenever no offer was recorded — the request carries no tenant identity, the offer store was unavailable, or the service is misconfigured — and the schedule is returned in every one of those cases.
          examples:
            - 6f2b9a41-0c3d-5e7f-9a12-4b8c6d0e1f37
          type: string
        totalInterest:
          description: Sum of interest across all installments as a decimal string, minor-unit precision scale 2 (e.g. "4321.00").
          examples:
            - "4321.00"
          type: string
        totalPrincipal:
          description: Sum of principal across all installments as a decimal string, minor-unit precision scale 2 (e.g. "50000.00").
          examples:
            - "50000.00"
          type: string
        withholdingAmount:
          description: Jurisdiction withholding the release of totalPrincipal on the start date retains, minor-unit precision scale 2. Present only on a preview by netAmount.
          examples:
            - "41.37"
          type: string
      required:
        - installments
        - totalInterest
        - totalPrincipal
        - jurisdictionCode
        - profileVersion
        - calendarReference
      type: object
    SchedulePreviewHumaEffectiveCost:
      additionalProperties: false
      properties:
        effectiveCostAnnualPct:
          description: Effective annual cost as a decimal-string percentage, scale 8 (e.g. "12.00000000").
          examples:
            - "12.00000000"
          type: string
        effectiveCostMonthlyPct:
          description: Effective monthly cost as a decimal-string percentage, scale 8 (e.g. "0.94888100").
          examples:
            - "0.94888100"
          type: string
        memoryOfCalculation:
          additionalProperties: {}
          description: Opaque step-by-step record of the effective-cost calculation (audit trail).
          type: object
        methodId:
          description: Identifier of the effective-cost calculation method applied by the jurisdiction profile.
          type: string
        rateTableSnapshot:
          additionalProperties: {}
          description: Opaque snapshot of the rate table inputs used in the calculation.
          type: object
      required:
        - methodId
        - effectiveCostAnnualPct
        - effectiveCostMonthlyPct
        - rateTableSnapshot
        - memoryOfCalculation
      type: object
    SchedulePreviewHumaInstallmentLine:
      additionalProperties: false
      properties:
        dueDate:
          description: Installment due date (date-only, YYYY-MM-DD).
          examples:
            - "2026-06-14"
          type: string
        interestAmount:
          description: Interest portion of the installment as a decimal string, minor-unit precision scale 2 (e.g. "234.56").
          examples:
            - "234.56"
          type: string
        number:
          description: 1-based installment sequence number.
          examples:
            - 1
          format: int64
          type: integer
        principalAmount:
          description: Principal portion of the installment as a decimal string, minor-unit precision scale 2 (e.g. "1000.00").
          examples:
            - "1000.00"
          type: string
        remainingBalance:
          description: Outstanding principal balance after this installment as a decimal string, minor-unit precision scale 2 (e.g. "49000.00").
          examples:
            - "49000.00"
          type: string
        totalAmount:
          description: Total installment amount (principal + interest) as a decimal string, minor-unit precision scale 2 (e.g. "1234.56").
          examples:
            - "1234.56"
          type: string
      required:
        - number
        - dueDate
        - totalAmount
        - principalAmount
        - interestAmount
        - remainingBalance
      type: object
    SchedulePreviewHumaJurisdictionExtensions:
      additionalProperties: false
      properties:
        body:
          additionalProperties: {}
          description: Opaque per-jurisdiction overlay payload decoded from the use-case result.
          type: object
        overlayKey:
          description: Identifier of the jurisdiction overlay that produced this extension payload.
          type: string
      required:
        - overlayKey
        - body
      type: object
    SchedulePreviewHumaRequest:
      additionalProperties: false
      properties:
        annualInterestRate:
          description: "Annual interest rate as a decimal-string percentage (e.g. \"12.00000000\" is 12% a year): an application's monthly requestedInterestRate fraction times 1200."
          examples:
            - "12.00000000"
          type: string
        borrowerKind:
          description: "Whose credit this is: it prices the IOF the release withholds, so the IOF rates disclosed, the gross a netAmount must cover and, with loanProductVersionId, the CET; a kind the deployment's rate table does not price is refused with LENDER-0233. Omitted, a preview prices a pessoaFisica."
          enum:
            - pessoaFisica
            - pessoaJuridica
          examples:
            - pessoaFisica
          type: string
        firstDueDate:
          description: "Day the first instalment falls due (RFC3339 or YYYY-MM-DD). Omit it and the first instalment falls one month after the start date, clamped to the month's last day; a request naming loanProductVersionId instead hangs every instalment on the schedule generator's first date for that day, rolled to a business day. To preview an application's release, send the application's firstDueDate. Supply it and it becomes the grid: every later instalment falls on that day of the month, clamped to each month's last day so a ladder anchored on the 31st falls on the 30th in April and never spills into May, and the first period runs from the start date to this day — longer or shorter than a month, and charged as its whole months plus each remaining day at a thirtieth of a month. Refused when, rolled onto a business day, it falls on or before the start date (LENDER-0229), or when gracePeriodDays is also set (LENDER-0232). First-period interest the first instalment does not cover is carried: it bears interest and is billed in the following instalments ahead of principal."
          examples:
            - "2026-03-10"
          type: string
        gracePeriodDays:
          description: "Carência in calendar days: the first instalment falls this many days after the start date, on the business day the schedule generator moves that day to, and the preview is then exactly the one firstDueDate set to that business day answers: same ladder, CET and scheduleOfferSnapshotId. Mutually exclusive with firstDueDate (LENDER-0232). On a preview naming loanProductVersionId the day must be one the version's first due date window admits (LENDER-0235)."
          examples:
            - 30
          format: int64
          maximum: 365
          minimum: 0
          type: integer
        installmentAmount:
          description: "Instalment to preview the principal of, as a decimal string, in place of principalAmount: a preview names exactly one of this, principalAmount and netAmount (LENDER-0255). Needs loanProductVersionId (LENDER-0255), on a version that admits the installment amount anchor (LENDER-0254). totalPrincipal is then the largest principal, in cents, whose every instalment is at most this amount: the principal a proposal records for the same instalment, version and dates. When none is, LENDER-0256."
          examples:
            - "300.00"
          type: string
        jurisdictionCode:
          description: ISO-2 jurisdiction code. Ignored on a preview that names loanProductVersionId, which prices under the named version's own jurisdiction, as a proposal does.
          examples:
            - BR
          maxLength: 2
          minLength: 2
          type: string
        loanProductVersionId:
          description: "Loan product version whose admitted first-due-date window this preview should be bounded by, and whose origination fee it prices into the CET. Optional: omit it and the preview prices whatever the arithmetic allows, with no fee, which is what a quote made before a product is picked needs. Supply it together with firstDueDate and the preview answers the same refusal booking will, rather than quoting a ladder the door will not take. Naming it also nets out of the CET the fee of the version's origination_fee template revision in force on the start date's civil day, the fee the release retains, and the IOF the release of the principal on the start date withholds for borrowerKind (a pessoaFisica when omitted) under taxRegime (the version's own when omitted), so the CET is the one that release discloses. A fee that leaves nothing of the principal less that IOF is refused with LENDER-0209, as the release refuses it, a taxRegime the version does not admit with LENDER-0930, brazilSimplesNacional for other than a pessoaJuridica with LENDER-0931, and a borrower kind the deployment prices no IOF for with LENDER-0233."
          examples:
            - 018f4e4e-7a3f-7c2e-9a1b-2c3d4e5f6071
          format: uuid
          type: string
        netAmount:
          description: "Net the borrower is to receive, as a decimal string, in place of principalAmount: a preview names exactly one of this, principalAmount and installmentAmount (LENDER-0255). Needs loanProductVersionId and borrowerKind (LENDER-0255), on a version that admits the net amount anchor (LENDER-0254). totalPrincipal is then the gross a proposal records for the same net, version, borrower kind and dates, and withholdingAmount, originationFeeAmount and netDeliveredAmount say what its release on the start date delivers. A borrower kind the version does not admit is refused with LENDER-0228, a fee that takes the net with LENDER-0209, and a borrower kind the deployment prices no tax for with LENDER-0233."
          examples:
            - "10000.00"
          type: string
        principalAmount:
          description: Principal amount as a decimal string (e.g. "50000.00"). A preview names exactly one of this, installmentAmount and netAmount (LENDER-0255).
          examples:
            - "50000.00"
          type: string
        startDate:
          description: Schedule start date (RFC3339 or YYYY-MM-DD).
          examples:
            - "2026-06-14T00:00:00Z"
          type: string
        taxRegime:
          description: "Tax regime the borrower declared: the withholding is priced under it as a proposal's creation prices it, refused when the version does not admit it (LENDER-0930) and for Simples Nacional on other than a pessoaJuridica (LENDER-0931). Omitted, the version's own regime prices the release."
          examples:
            - brazilSimplesNacional
          type: string
        termMonths:
          description: Number of months.
          examples:
            - 24
          format: int64
          maximum: 600
          minimum: 1
          type: integer
      required:
        - annualInterestRate
        - termMonths
        - jurisdictionCode
        - startDate
      type: object
    ScheduleVersionCommandHumaBody:
      additionalProperties: false
      properties:
        previousScheduleVersionId:
          description: Predecessor schedule version UUID.
          examples:
            - 550e8400-e29b-41d4-a716-446655440031
          type: string
        scheduleVersion:
          $ref: "#/components/schemas/ScheduleVersionHumaBody"
          description: The newly appended immutable schedule version.
        substantialRenegotiation:
          $ref: "#/components/schemas/SubstantialRenegotiationHumaBody"
          description: "Present only when a reschedule was a SUBSTANTIAL renegotiation under Res. CMN 4.966/2021 art. 22: this contract was ended (scheduleVersion is its last ladder, at zero) and a replacement contract now carries the debt. Never present on a restructuring, which stays on its contract. Omitted on every other outcome."
      required:
        - previousScheduleVersionId
        - scheduleVersion
      type: object
    ScheduleVersionHumaBody:
      additionalProperties: false
      properties:
        createdAt:
          description: ISO-8601 creation timestamp (UTC).
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        financedTaxAmount:
          description: Tax the reschedule levied and financed into the new principal (in Brazil, the IOF complementar of Decreto 6.306/2007 art. 7 par. 7), 2 d.p. string. Omitted when nothing was levied.
          examples:
            - "25.72"
          type: string
        id:
          description: Schedule version UUID.
          examples:
            - 550e8400-e29b-41d4-a716-446655440030
          type: string
        installments:
          description: Recalculated installment schedule.
          items:
            $ref: "#/components/schemas/ScheduleVersionInstallmentHumaBody"
          type:
            - array
            - "null"
        loanAccountId:
          description: Loan account UUID.
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        predecessorVersionId:
          description: Predecessor schedule version UUID, if any.
          examples:
            - 550e8400-e29b-41d4-a716-446655440031
          type: string
        pricedAtMonthlyRate:
          description: Monthly interest rate as a decimal fraction that the product's schedule generator actually priced this version at. Omitted when unrecorded.
          examples:
            - "0.025"
          type: string
        reason:
          description: Reason the version was appended.
          type: string
        restructuring:
          $ref: "#/components/schemas/RestructuringClassHumaBody"
          description: The restructuring class recorded with this renegotiation. Present on a reschedule; omitted on any other schedule change.
        triggerTransactionId:
          description: Transaction that triggered the recalculation.
          type: string
        versionNumber:
          description: Monotonic schedule version number.
          examples:
            - 2
          format: int64
          type: integer
        waivedLateCharges:
          description: Late fine and default interest the reschedule waived instead of carrying into the new principal (waiveLateCharges), 2 d.p. string. Omitted when nothing was waived.
          examples:
            - "7.30"
          type: string
      required:
        - id
        - loanAccountId
        - versionNumber
        - reason
        - triggerTransactionId
        - createdAt
        - installments
      type: object
    ScheduleVersionInstallmentHumaBody:
      additionalProperties: false
      properties:
        dueDate:
          description: ISO-8601 due date.
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        feesAmount:
          description: Fees due (2 d.p. string).
          examples:
            - "3.50"
          type: string
        interestAmount:
          description: Interest due (2 d.p. string).
          examples:
            - "20.00"
          type: string
        number:
          description: Installment ordinal (1-based).
          examples:
            - 3
          format: int64
          type: integer
        penaltiesAmount:
          description: Penalties due (2 d.p. string).
          examples:
            - "1.50"
          type: string
        principalAmount:
          description: Principal due (2 d.p. string).
          examples:
            - "100.00"
          type: string
        principalRemaining:
          description: Unpaid principal for THIS installment (per-installment, 2 d.p. string) — not the whole-loan declining balance.
          examples:
            - "100.00"
          type: string
        totalAmount:
          description: Total due (2 d.p. string).
          examples:
            - "125.00"
          type: string
      required:
        - number
        - dueDate
        - principalAmount
        - principalRemaining
        - interestAmount
        - feesAmount
        - penaltiesAmount
        - totalAmount
      type: object
    ScrModalityResponse:
      additionalProperties: false
      properties:
        loanProductVersionId:
          type: string
        scrModality:
          description: SCR 3040 modality (Anexo 3) the version declares; absent until one is declared.
          type: string
      required:
        - loanProductVersionId
      type: object
    SessionBody:
      additionalProperties: false
      properties:
        authMode:
          description: "Whether this deployment enforces authentication. 'disabled' carries no session: subject and permissions are null."
          enum:
            - enabled
            - disabled
          examples:
            - enabled
          type: string
        permissions:
          description: Effective permissions as 'resource:action', sorted. Null when the grant is UNKNOWN — the token carries no RBAC claims, or every role name it carries is unknown to this service — in which case server-side authorization remains the only gate. An empty array is a known grant of nothing.
          examples:
            -   - loan_product:read
                - loan_accounts:repayment:record
          items:
            type: string
          type:
            - array
            - "null"
        subject:
          description: Validated subject of the bearer token, for display only. Null when auth is disabled.
          examples:
            - lerian/6f2b1c2e
          type:
            - string
            - "null"
      required:
        - authMode
        - subject
        - permissions
      type: object
    SetProblemAssetReassessmentHorizonBody:
      additionalProperties: false
      properties:
        reassessmentHorizonDays:
          description: "Days a qualitative problem-asset characterisation (Res. CMN 4.966 art. 3 paragraphs 1 and 2) may stand on a contract of this version before somebody must re-assess it. Omit the field to clear the horizon, which restores 'never re-assessed'. Must be positive: zero would mark every characterisation overdue on the day it is made."
          examples:
            - 365
          format: int64
          minimum: 1
          type: integer
      type: object
    SetProblemAssetReassessmentHorizonResponse:
      additionalProperties: false
      properties:
        loanProductVersionId:
          type: string
        reassessmentHorizonDays:
          description: The horizon now in force, absent when the version sets none.
          format: int64
          type: integer
      required:
        - loanProductVersionId
      type: object
    SignatoryHumaBody:
      additionalProperties: false
      properties:
        role:
          description: The party's role in the instrument.
          type: string
        signedAt:
          description: When this party signed (RFC3339, UTC).
          type: string
      required:
        - role
        - signedAt
      type: object
    SignatoryHumaInput:
      additionalProperties: false
      properties:
        name:
          description: The party's name. Recorded, never returned by the API.
          maxLength: 256
          minLength: 1
          type: string
        role:
          description: The party's role in the instrument, e.g. borrower.
          maxLength: 64
          minLength: 1
          type: string
        signedAt:
          description: When this party signed (RFC3339); not after the instrument's signedAt.
          format: date-time
          type: string
        taxId:
          description: The party's tax document. Its shape belongs to the jurisdiction. Recorded, never returned by the API.
          maxLength: 32
          minLength: 1
          type: string
      required:
        - role
        - name
        - taxId
        - signedAt
      type: object
    SignedCreditInstrumentHumaBody:
      additionalProperties: false
      properties:
        creditInstrumentId:
          description: The Lender-emitted CCB that was signed (uuid). Absent when the client issued.
          type: string
        custodian:
          description: "Who holds the signed PDF: lender, downloadable here; or integrator, whose gateway holds it while the Lender keeps its digest."
          type: string
        evidenceRef:
          description: The integrator's reference to the signature evidence.
          type: string
        id:
          description: Record identifier (uuid).
          type: string
        loanApplicationId:
          description: Loan application identifier (uuid).
          type: string
        origin:
          description: "Who issued what was signed: lender_emitted or client_issued."
          type: string
        originalDocumentDigest:
          description: sha-256 hex of the document that was signed. Empty when the integrator declared no original.
          type: string
        recordedAt:
          description: When the Lender recorded it (RFC3339, UTC).
          type: string
        replacementReason:
          description: Why this record replaced the previous one. Absent on the first record.
          type: string
        signatories:
          description: Every party that signed, without name or document.
          items:
            $ref: "#/components/schemas/SignatoryHumaBody"
          type:
            - array
            - "null"
        signedAt:
          description: When the signature completed (RFC3339, UTC).
          type: string
        signedDocumentDigest:
          description: sha-256 hex the Lender computed over the signed PDF.
          type: string
        signedDocumentSize:
          description: Size of the signed PDF in bytes.
          format: int64
          type: integer
        supersedesId:
          description: The record this one replaced (uuid). Absent on the proposal's first record.
          type: string
      required:
        - id
        - loanApplicationId
        - origin
        - originalDocumentDigest
        - signedDocumentDigest
        - signedDocumentSize
        - custodian
        - signatories
        - signedAt
        - evidenceRef
        - recordedAt
      type: object
    StreamingDiscardListHumaBody:
      additionalProperties: false
      properties:
        data:
          description: Quarantined records, most recently seen first; always present, empty slice when none match.
          items:
            $ref: "#/components/schemas/DiscardRecordHumaBody"
          type:
            - array
            - "null"
      required:
        - data
      type: object
    SubstantialRenegotiationHumaBody:
      additionalProperties: false
      properties:
        replacedLifecycleState:
          description: Lifecycle state of the contract named in the path, which left the book.
          enum:
            - renegotiated
          type: string
        replacementLoanAccountId:
          description: Loan account UUID of the replacement contract, which now carries the debt.
          examples:
            - 550e8400-e29b-41d4-a716-446655440040
          type: string
        replacementLoanApplicationId:
          description: Loan application UUID of the replacement contract.
          examples:
            - 550e8400-e29b-41d4-a716-446655440041
          type: string
        trigger:
          description: "What made the modification substantial: the present-value test, or a declared change of index or rate type."
          enum:
            - present_value
            - index
            - rate_type
          type: string
      required:
        - replacementLoanAccountId
        - replacementLoanApplicationId
        - replacedLifecycleState
        - trigger
      type: object
    SupersedeAccountingProfileHumaBody:
      additionalProperties: false
      properties:
        charts:
          description: The new chart written for every affected version, one per version.
          items:
            $ref: "#/components/schemas/AccountingProfileHumaBody"
          type: array
        effectiveFrom:
          description: First civil day (YYYY-MM-DD) the new chart governs.
          examples:
            - "2026-08-01"
          type: string
        loanProductId:
          description: The product whose chart changed (uuid).
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        movedPositions:
          description: Every per-operation position that changes account. Each one produces a balance-transfer posting on the effective date, on every live contract of every affected version, so no contract ends with its balance split across two accounts. Empty means the change files nothing anywhere new.
          items:
            $ref: "#/components/schemas/ChartPositionMoveHumaBody"
          type: array
      required:
        - loanProductId
        - effectiveFrom
        - charts
        - movedPositions
      type: object
    SupersedeAccountingProfileHumaInputBody:
      additionalProperties: false
      properties:
        accountingMode:
          description: Accounting recognition mode.
          enum:
            - accrual
          examples:
            - accrual
          type: string
        effectiveFrom:
          description: "First civil day (YYYY-MM-DD) the new chart governs. Always a month start, and always a month that has not opened by tomorrow, so on the last day of a month the earliest is the 1st of the month after next: a chart landing inside the open competência would change the accounts of a month already partly accrued, and one landing on a posted month could never be corrected — the ledger dedupes a replayed month on a key that does not carry which chart produced the posting, so the correction is built, sent, and dropped in silence."
          examples:
            - "2026-08-01"
          format: date
          type: string
        midazLedgerId:
          description: "Optional per-product Midaz ledger the new chart's postings route into; may be omitted beside midazOrganizationId, and the new chart books into the ledger the product books into in that organization today. A chart change never creates or moves the product's ledger: a chart resolving to another organization or ledger than the one it replaces is refused (LENDER-0443)."
          examples:
            - ledger-def
          maxLength: 128
          type: string
        midazOrganizationId:
          description: Optional per-product Midaz organization the new chart's postings route into.
          examples:
            - org-abc
          maxLength: 128
          type: string
        postingRules:
          description: "The complete new chart, in the same shape the configure route admits. It must keep every borrower position booked per operation, and must keep every per-operation position the outgoing chart had: a position the new chart stops booking leaves the balance already sitting there with nowhere to go, and the double entry would never complain. Every shared balance account the outgoing chart books (an allowance, a payable, cash) keeps its account and its sharing mode, because no balance transfer moves a shared account; revenue and expense accounts may move."
          items:
            $ref: "#/components/schemas/PostingRuleHumaInputBody"
          maxItems: 35
          minItems: 10
          type: array
      required:
        - effectiveFrom
        - accountingMode
        - postingRules
      type: object
    SuspenseAccountHumaBody:
      additionalProperties: false
      properties:
        currency:
          description: ISO 4217 code of the asset the account holds.
          examples:
            - BRL
          type: string
        gl_account:
          description: GL account in the tenant's ledger.
          examples:
            - 2100-90-001
          type: string
        role:
          description: What the account takes.
          enum:
            - suspense
            - below
            - above
            - loss
          examples:
            - below
          type: string
      required:
        - currency
        - role
        - gl_account
      type: object
    SweepChartBalanceTransfersHumaBody:
      additionalProperties: false
      properties:
        contractsVisited:
          description: Every contract the pass read the book for.
          examples:
            - 1200
          format: int64
          type: integer
        effectiveFrom:
          description: The civil day (YYYY-MM-DD) of the chart change this pass worked on.
          examples:
            - "2026-08-01"
          type: string
        loanProductId:
          description: The product whose contracts were swept (uuid).
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        transfersRecorded:
          description: How many of them had a balance to move. Zero on a rerun of a finished change.
          examples:
            - 318
          format: int64
          type: integer
      required:
        - loanProductId
        - effectiveFrom
        - contractsVisited
        - transfersRecorded
      type: object
    SweepChartBalanceTransfersHumaInputBody:
      additionalProperties: false
      properties:
        effectiveFrom:
          description: "The civil day (YYYY-MM-DD) the chart being settled took force. Nothing moves before that day has arrived and the close of the month before it has run: until then the old chart is still in force and still filing postings there."
          examples:
            - "2026-08-01"
          format: date
          type: string
      required:
        - effectiveFrom
      type: object
    TaxPreviewEnvelopeResponse:
      additionalProperties: false
      properties:
        data:
          $ref: "#/components/schemas/TaxPreviewResponse"
          description: The computed tax-preview result (IOF, PIS, COFINS, and net delivered amount) for the requested disbursement.
      required:
        - data
      type: object
    TaxPreviewHumaBody:
      additionalProperties: false
      properties:
        borrowerKind:
          description: "Kind of taxpayer the credit is granted to. Brazil sets a different daily IOF aliquota per kind (Decreto 6.306/2007, art. 7, I, \"b\"), so the preview quotes the rate priced for the kind named here. The deployment ships pricing pessoaFisica, which is also what an omitted value previews; every kind is priced with PUT /api/v1/br/tax/iof-rates/{borrowerKind}, and the rate table's keys are not a closed list. Simples Nacional, MEI included, is a regime and not a kind: send taxRegime brazilSimplesNacional with pessoaJuridica. A kind, or a declared Simples Nacional, the deployment does not price is refused 422 LENDER-0900 rather than previewed at another kind's rate."
          examples:
            - pessoaFisica
          type: string
        disbursementDate:
          description: Disbursement date (RFC3339).
          examples:
            - "2026-06-14T12:00:00Z"
          format: date-time
          type: string
        finalDueDate:
          description: Final due date (RFC3339).
          examples:
            - "2026-06-14T12:00:00Z"
          format: date-time
          type: string
        firstDueDate:
          description: "Day the first instalment falls due (RFC3339 or YYYY-MM-DD). Omit it and the first instalment falls one month after the disbursement date, clamped to the month's last day; a quote naming loanProductVersionId instead hangs every instalment on the schedule generator's first date for that day, rolled to a business day. To quote an application's release, send the application's firstDueDate. Supply it and it becomes the ladder's anchor: the first period runs from the disbursement date to this day, longer or shorter than a month. Its interest is its whole months plus its extra days over 30 at the monthly rate; the IOF quoted here counts its real days, so it moves with it. Ignored without requestedInstallments and requestedInterestRate, because there is no ladder to anchor."
          examples:
            - "2026-03-10"
          type: string
        grossAmount:
          description: Gross disbursement amount in major currency units (e.g. "100000.00").
          examples:
            - "100000.00"
          type: string
        installmentAmount:
          description: "Instalment the payroll deducts, in major currency units (e.g. \"112.19\"), as a consignado contract declares it. Supply it together with firstDueDate, requestedInstallments and requestedInterestRate and the quote strikes the ladder booking strikes for a payroll contract: every instalment but the last is exactly this amount, the first period's interest beyond what the instalment covers is carried, and the last instalment closes the balance. The IOF quoted is then the IOF booking withholds. Omit it and the ladder is the generator's own level instalment. Ignored without all three, because there is no payroll ladder to strike. Refused 422 when it is not a positive amount, when after the first period it does not cover a month's interest, or when it repays the loan before the last instalment: the same refusals booking gives."
          examples:
            - "112.19"
          type: string
        jurisdictionCode:
          description: "Jurisdiction the quote is for. This route quotes Brazilian taxes only: \"BR\", in either letter case. Any other two-letter code is refused 422 LENDER-0925."
          examples:
            - BR
          maxLength: 2
          minLength: 2
          type: string
        loanProductVersionId:
          description: "Loan product version this quote is for. Supply it and the quote prices the tax regime this version declares, the one the disbursement withholds under, unless taxRegime names another regime the version admits; a version whose tax profile cannot be resolved is refused 422 LENDER-0207, as the disbursement refuses it. Omit it and taxRegime is required, and the quote prices whatever the arithmetic allows, which is what a quote made before a product is picked needs. The version also bounds the first due date: supply it together with firstDueDate, requestedInstallments and requestedInterestRate and the quote answers the same refusal booking will, rather than quoting a tax on a ladder the door will not take. The window is read only on a quote that strikes a ladder: without both ladder inputs there is no first due date to bound, so no window refusal can come back."
          examples:
            - 018f4e4e-7a3f-7c2e-9a1b-2c3d4e5f6071
          format: uuid
          type: string
        netDeliveredAmount:
          description: Optional net delivered amount in major currency units.
          examples:
            - "99949.66"
          type: string
        requestedInstallments:
          description: Number of monthly instalments the contract amortises over. Supply it together with requestedInterestRate and the quote is computed on the instalment ladder the schedule generator strikes, which is the ladder the disbursement door withholds against. Omit either and the quote values the operation as a single window from the disbursement date to the final due date, which is what a bullet operation is.
          examples:
            - 12
          format: int64
          maximum: 600
          minimum: 0
          type: integer
        requestedInterestRate:
          description: "Monthly interest rate as a decimal FRACTION, not a percentage: \"0.02\" is 2% a month. Required together with requestedInstallments to quote on the instalment ladder."
          examples:
            - "0.02"
          type: string
        taxRegime:
          description: Tax regime selector understood by the jurisdiction tax engine. Required when loanProductVersionId is omitted, and then quoted as declared. With loanProductVersionId, a regime the version admits (GET /api/v1/br/loan-product-versions/{id}/tax-regimes) is quoted as declared, as the release of an application declaring it is; any other is ignored and the version's own regime is quoted. A brazilSimplesNacional regime in force, sent or the version's own, with pessoaJuridica quotes Decreto 6.306/2007, art. 7, VI while grossAmount is R$ 30.000,00 or less, and the pessoaJuridica rate above it. The release compares the operation's contracted principal, so a tranche is quoted here on its own amount.
          type: string
      required:
        - grossAmount
        - disbursementDate
        - finalDueDate
        - jurisdictionCode
      type: object
    TaxPreviewResponse:
      additionalProperties: false
      properties:
        cofins:
          description: COFINS contribution amount, decimal string in major currency units (scale 2).
          examples:
            - "0.00"
          type: string
        grossAmount:
          description: Gross disbursement amount before tax, decimal string in major currency units (scale 2).
          examples:
            - "100000.00"
          type: string
        iofAdditional:
          description: Additional fixed-rate IOF component, decimal string in major currency units (scale 2).
          examples:
            - "38.00"
          type: string
        iofDaily:
          description: Daily IOF component, decimal string in major currency units (scale 2).
          examples:
            - "12.34"
          type: string
        jurisdictionCode:
          description: ISO 3166-1 alpha-2 jurisdiction code (e.g. "BR").
          examples:
            - BR
          type: string
        netDeliveredAmount:
          description: Net amount delivered to the borrower after tax and origination fee deduction, decimal string in major currency units (scale 2).
          examples:
            - "99949.66"
          type: string
        originationFeeAmount:
          description: Origination fee the named product version retains from this release, scale 2; 0.00 when no version is named or the version declares none.
          examples:
            - "0.00"
          type: string
        pis:
          description: PIS contribution amount, decimal string in major currency units (scale 2).
          examples:
            - "0.00"
          type: string
        profileVersion:
          description: Compiled jurisdiction profile version used to compute the preview (e.g. "1.0.0").
          examples:
            - 1.0.0
          type: string
        rateTableSnapshotId:
          description: Identifier of the rate-table snapshot whose rates produced these amounts.
          examples:
            - 550e8400-e29b-41d4-a716-446655440002
          type: string
        taxRegime:
          description: Tax regime selector applied by the jurisdiction tax engine.
          type: string
        totalIof:
          description: Sum of daily and additional IOF, decimal string in major currency units (scale 2).
          examples:
            - "50.34"
          type: string
        totalTax:
          description: Total tax (IOF + PIS + COFINS), decimal string in major currency units (scale 2).
          examples:
            - "50.34"
          type: string
      required:
        - iofDaily
        - iofAdditional
        - totalIof
        - pis
        - cofins
        - totalTax
        - grossAmount
        - originationFeeAmount
        - netDeliveredAmount
        - taxRegime
        - jurisdictionCode
        - profileVersion
        - rateTableSnapshotId
      type: object
    TaxRegimesResponse:
      additionalProperties: false
      properties:
        admittedTaxRegimes:
          description: "The tax regimes a loan application may declare on this version: the version's own regime alone, or brazilFullIof and brazilSimplesNacional."
          items:
            type: string
          type: array
        loanProductVersionId:
          type: string
        taxRegime:
          description: The version's own tax regime.
          type: string
      required:
        - loanProductVersionId
        - taxRegime
        - admittedTaxRegimes
      type: object
    UpsertAssignmentFundHumaInputBody:
      additionalProperties: false
      properties:
        administratorName:
          description: Fund administrator name.
          maxLength: 256
          minLength: 1
          type: string
        administratorTaxId:
          description: Fund administrator registration identifier (opaque; no jurisdiction format is assumed).
          maxLength: 64
          minLength: 1
          type: string
        assignmentRate:
          description: Monthly effective cession rate as a decimal fraction string in [0, 1] with at most 8 decimals (0.0175 = 1.75% per month). Zero means assignment at par.
          examples:
            - "0.0175"
          type: string
        assignorConcentrationLimit:
          description: "Concentration limit per assignor as a decimal fraction string in (0, 1] with at most 8 decimals. REQUIRED and nullable, as borrowerConcentrationLimit: null registers none."
          examples:
            - "0.30"
          type:
            - string
            - "null"
        borrowerConcentrationLimit:
          description: "Concentration limit per debtor as a decimal fraction string in (0, 1] with at most 8 decimals. REQUIRED and nullable: this call REPLACES the stored registration, so null must be stated to register none, and an omitted field is refused rather than read as an erased limit. With none, a lot of one receivable can sell; a registered limit has no exemption for a lone exposure."
          examples:
            - "0.20"
          type:
            - string
            - "null"
        eligibilityMode:
          description: Whether our eligibility verification is authoritative (full), runs as a pre-filter before the administrator's own (prefilter), or is left to the client, who checks eligibility at the fund (none). Under none the limits and policies below are kept but not applied, except repeatedCutLimit; the ledger's own integrity rules run in every mode.
          enum:
            - full
            - prefilter
            - none
          type: string
        excludeOverdue:
          description: "Whether a receivable carrying an open arrear is cut. REQUIRED: this call REPLACES the stored registration. false when the fund buys arrears."
          examples:
            - true
          type: boolean
        excludeSuspendedRegistration:
          description: "Whether a receivable whose registration is suspended at the rail is cut, at scoring and at approval. REQUIRED: this call REPLACES the stored registration. false when the fund buys suspended registrations."
          examples:
            - false
          type: boolean
        fundName:
          description: Fund name.
          maxLength: 256
          minLength: 1
          type: string
        fundTaxId:
          description: "Fund registration identifier. Re-posting the same value REPLACES that fund's configuration and keeps its identifier. A replacement governs the next set assembled: a set already assembled keeps the term mode, eligibility mode, limits, policies and windows it froze. Bounded at 32 bytes because this is the one value carried into the fixed-width offer file, which refuses rather than truncates."
          maxLength: 32
          minLength: 1
          type: string
        offerFileLayoutRef:
          description: "The custodian export layout: lerian-offer-v0, or reporter:<templateId> naming a Reporter template UUID in its canonical lowercase form."
          examples:
            - lerian-offer-v0
          maxLength: 128
          minLength: 1
          type: string
        offerSentToRemessaReceivedWindowSeconds:
          description: How long the fund may take to return its file after the offer was sent, in whole seconds. The fund always returns one, with a verdict for every receivable of the set, so a set still at offer_sent past this window opens an offer_sent_without_remessa case for the operator.
          examples:
            - 172800
          format: int64
          maximum: 31536000
          minimum: 1
          type: integer
        paidToTransferredWindowSeconds:
          description: Orphan-detector window for "paid without transferred", in whole seconds.
          examples:
            - 172800
          format: int64
          maximum: 31536000
          minimum: 1
          type: integer
        paymentSourceConcentrationLimit:
          description: "Concentration limit per payment source as a decimal fraction string in (0, 1] with at most 8 decimals (e.g. \"0.15\"). REQUIRED and nullable, as borrowerConcentrationLimit: null registers none."
          examples:
            - "0.15"
          type:
            - string
            - "null"
        paymentTolerance:
          description: "How far what the fund pays for a lot may sit from the frozen prices of its paid lines, above or below, before a fund_payment_divergence case opens and the acceptance is held: a decimal string, zero or more, at most 2 decimal places. Omitted means 0.00, exact to the centavo; this call REPLACES the stored registration, so a save that omits it resets it. Each lot freezes the tolerance at assembly."
          examples:
            - "0.00"
          type: string
        proposedRetainedFraction:
          description: "The retained fraction this fund PROPOSES for the cessions assembled against it: the share of the expected loss this institution keeps after the sale, a decimal string from 0 to 1 with at most 8 decimal places (0 keeps nothing). REQUIRED and never inferred: this call REPLACES the stored registration. A cession may state its own fraction and freezes whichever it ends up with, next to the institution's threshold; a fraction at or above the threshold derives substantial retention, which a cession cannot be booked under yet (LENDER-0504). Not a decimal, below 0, above 1 or more than 8 decimal places: LENDER-0506."
          examples:
            - "0"
          type: string
        proposesSellerRetainsControl:
          description: Whether this fund PROPOSES that the seller keeps control of what it sells, the middle band of Res. CMN 4.966 art. 26 III. REQUIRED. A cession may state its own; one that ends up with true is refused (LENDER-0505).
          examples:
            - false
          type: boolean
        registryProvider:
          description: "Which registry governs this fund's cession. REQUIRED, and only none is accepted: the Lender today registers no cession at a registry, the institution registers each contract in its own flow. Any other value is refused, and the refusal names the accepted values. A fund stored on a registry earlier still reads back with it, and no set is assembled over it until it is saved with none."
          examples:
            - none
          type: string
        repeatedCutLimit:
          description: "How many times this fund may cut the same receivable in its remessa before the receivable stops returning to the pool automatically, at least 1. REQUIRED and nullable: null registers no brake, and a cut receivable then always returns to the pool. It applies in every eligibility mode."
          format: int64
          minimum: 1
          type:
            - integer
            - "null"
        termMode:
          description: "Who produces the endorsement term. administrator_generated (the usual case): the administrator and the fund sign it outside the Lender; payment opens at the fund's return file and never waits for the term, and a signed PDF the operator receives may be recorded as optional evidence. lender_emitted: the Lender emits it from the fund's published template, and payment waits for it. Each set freezes the mode at assembly, so a change governs the next set."
          enum:
            - lender_emitted
            - administrator_generated
          type: string
        transferredToAcceptedWindowSeconds:
          description: Orphan-detector window for "transferred without accepted", in whole seconds.
          examples:
            - 86400
          format: int64
          maximum: 31536000
          minimum: 1
          type: integer
      required:
        - administratorName
        - administratorTaxId
        - fundName
        - fundTaxId
        - termMode
        - eligibilityMode
        - borrowerConcentrationLimit
        - paymentSourceConcentrationLimit
        - assignorConcentrationLimit
        - excludeOverdue
        - excludeSuspendedRegistration
        - assignmentRate
        - repeatedCutLimit
        - offerFileLayoutRef
        - registryProvider
        - proposedRetainedFraction
        - proposesSellerRetainsControl
        - paidToTransferredWindowSeconds
        - transferredToAcceptedWindowSeconds
        - offerSentToRemessaReceivedWindowSeconds
      type: object
    Upstream:
      additionalProperties: false
      properties:
        code:
          description: The upstream provider's own error code, verbatim.
          examples:
            - E4001
          type: string
        message:
          description: The upstream provider's own error message, verbatim (bounded, never its raw response body).
          examples:
            - account not found at provider
          type: string
      type: object
    VersionTermsHumaBody:
      additionalProperties: false
      properties:
        admitsAssignment:
          description: Whether contracts on this version may be assigned. Defaults to false.
          type: boolean
        amortizationSystems:
          description: Amortization systems a contract on this version may use. Defaults to [price].
          examples:
            -   - price
          items:
            enum:
              - price
              - sac
              - american
            type: string
          type:
            - array
            - "null"
        amountAnchors:
          description: "Amounts a direct proposal may be asked by. Defaults to [gross]: the principal. installment lets it name the instalment that fits in place of the principal, and a version that leaves gross out refuses a proposal by its principal (LENDER-0254). net lets it name the net the borrower receives, and the Lender resolves the gross."
          examples:
            -   - gross
          items:
            enum:
              - gross
              - net
              - installment
            type: string
          type:
            - array
            - "null"
        creditInstrumentMode:
          description: Who issues the credit instrument. Defaults to lender_emitted.
          enum:
            - lender_emitted
            - client_issued
          examples:
            - lender_emitted
          type: string
        dayCount:
          description: Day-count convention of the interest. Defaults to monthly_30.
          enum:
            - monthly_30
            - calendar_365
            - business_252
          examples:
            - monthly_30
          type: string
        latePayment:
          $ref: "#/components/schemas/LatePaymentTermsHumaBody"
          description: "Late charges. Absent: the version charges none. A consignado version (normModality consignado or scrModality 0202) takes none: it is refused with LENDER-0114."
        limits:
          $ref: "#/components/schemas/OriginationLimitsHumaBody"
          description: "Bound a direct (lender_direct) proposal: the principal at creation and again at approval, the term and installments at creation. A gateway_clt contract is never refused by them. An absent bound does not bound. Bounds are inclusive."
        originationFronts:
          description: Fronts that may originate on this version. Defaults to both. Leaving lender_direct out refuses direct proposals with LENDER-0253; gateway_clt cannot be left out, because the payroll rail is never refused by version terms.
          examples:
            -   - gateway_clt
                - lender_direct
          items:
            enum:
              - gateway_clt
              - lender_direct
            type: string
          type:
            - array
            - "null"
        paymentPeriodicities:
          description: Installment periodicities a contract on this version may use. Defaults to [monthly].
          examples:
            -   - monthly
          items:
            enum:
              - monthly
              - fortnightly
              - weekly
            type: string
          type:
            - array
            - "null"
        payoffQuoteValidityHours:
          description: "Hours a payoff quote stays valid, 1 to 168. Absent: the deployment default."
          examples:
            - 24
          format: int64
          type: integer
        prepaymentMode:
          description: How a prepayment is settled. Defaults to desk.
          enum:
            - desk
            - automatic
          examples:
            - desk
          type: string
        refinance:
          $ref: "#/components/schemas/RefinanceTermsHumaBody"
          description: "Refinance terms. Absent: the version admits no refinance."
      type: object
    WithdrawLoanApplicationHumaRequest:
      additionalProperties: false
      properties:
        decisionAt:
          description: Decision timestamp (RFC3339). Omit it and Lender stamps the tenant's business now.
          examples:
            - "2026-06-14T12:00:00Z"
          type: string
        reason:
          description: Withdrawal reason.
          type: string
      required:
        - reason
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http
info:
  contact:
    email: contact@lerian.studio
    name: Lerian Studio
    url: https://lerian.studio
  description: "Code-first OpenAPI 3.1 surface for the Lender service. Routes that move money are at-most-once per X-Idempotency: when one answers 5xx, the X-Idempotency-Fenced response header says whether that key is now refusing resends (true) or free to retry (false or absent)."
  license:
    name: Lerian Studio General License
  title: Lender API
  version: 1.0.0
openapi: 3.1.0
paths:
  /api/v1/accounting-profiles:
    get:
      description: Returns a page of the posting configurations attached to loan product versions, newest first, each with how many posting rules it holds and which business events those rules cover.
      operationId: listAccountingProfiles
      parameters:
        - description: Narrow to the charts of one loan product version. A version owns a chain of charts, each with the day it takes force; combine with asOf for the one governing a given day.
          explode: false
          in: query
          name: loanProductVersionId
          schema:
            description: Narrow to the charts of one loan product version. A version owns a chain of charts, each with the day it takes force; combine with asOf for the one governing a given day.
            format: uuid
            type: string
        - description: Narrow to one accounting mode.
          explode: false
          in: query
          name: accountingMode
          schema:
            description: Narrow to one accounting mode.
            enum:
              - accrual
            type: string
        - description: "Narrow to the chart IN FORCE on this civil day (YYYY-MM-DD), one per loan product version: the one with the greatest effectiveFrom at or below it. Omit to list the whole chain, which is what an audit of how the configuration changed needs. A future day answers what the product will book into once a scheduled chart takes force."
          explode: false
          in: query
          name: asOf
          schema:
            description: "Narrow to the chart IN FORCE on this civil day (YYYY-MM-DD), one per loan product version: the one with the greatest effectiveFrom at or below it. Omit to list the whole chain, which is what an audit of how the configuration changed needs. A future day answers what the product will book into once a scheduled chart takes force."
            format: date
            type: string
        - description: Page size.
          explode: false
          in: query
          name: limit
          schema:
            default: 25
            description: Page size.
            format: int64
            maximum: 100
            minimum: 1
            type: integer
        - description: Page offset.
          explode: false
          in: query
          name: offset
          schema:
            default: 0
            description: Page offset.
            format: int64
            maximum: 10000
            minimum: 0
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AccountingProfileListHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: List accounting profiles
      tags:
        - Accounting
      x-mint:
        href: /en/reference/products/lender/list-accounting-profiles
  /api/v1/accounting-profiles/{id}:
    get:
      description: "Returns one chart whole: every posting rule with its legs, and the Midaz organization and ledger it books into. The rubric of every posting lives only in this chart, so this is the auditor's source."
      operationId: getAccountingProfile
      parameters:
        - description: Accounting profile identifier.
          in: path
          name: id
          required: true
          schema:
            description: Accounting profile identifier.
            examples:
              - 550e8400-e29b-41d4-a716-446655440004
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AccountingProfileHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Get accounting profile
      tags:
        - Accounting
      x-mint:
        href: /en/reference/products/lender/get-accounting-profile
  /api/v1/accrual-runs:
    get:
      description: Returns a page of the accrual runs executed for this tenant, newest first. Filtering by correlationId returns EVERY run sharing that identifier, which is how the full lineage behind one correlation is read.
      operationId: listAccrualRuns
      parameters:
        - description: Narrow to the runs executed on one business date.
          explode: false
          in: query
          name: businessDate
          schema:
            description: Narrow to the runs executed on one business date.
            examples:
              - "2026-06-14"
            format: date
            type: string
        - description: Narrow to one run lifecycle status.
          explode: false
          in: query
          name: status
          schema:
            description: Narrow to one run lifecycle status.
            examples:
              - queued
            maxLength: 32
            type: string
        - description: "Narrow by the state of the downstream ledger posting. pending: the ledger has not confirmed it. posted: the ledger accepted it. no_items: the run recognized nothing, so nothing was sent."
          explode: false
          in: query
          name: postingStatus
          schema:
            description: "Narrow by the state of the downstream ledger posting. pending: the ledger has not confirmed it. posted: the ledger accepted it. no_items: the run recognized nothing, so nothing was sent."
            enum:
              - pending
              - posted
              - no_items
            type: string
        - description: Narrow to every run sharing one correlation identifier. Several runs can share one, so this returns a page, not a single row.
          explode: false
          in: query
          name: correlationId
          schema:
            description: Narrow to every run sharing one correlation identifier. Several runs can share one, so this returns a page, not a single row.
            maxLength: 256
            type: string
        - description: Page size.
          explode: false
          in: query
          name: limit
          schema:
            default: 25
            description: Page size.
            format: int64
            maximum: 100
            minimum: 1
            type: integer
        - description: Page offset.
          explode: false
          in: query
          name: offset
          schema:
            default: 0
            description: Page offset.
            format: int64
            maximum: 10000
            minimum: 0
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AccrualRunListHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: List accrual runs
      tags:
        - Accounting
      x-mint:
        href: /en/reference/products/lender/list-accrual-runs
    post:
      description: Queues an accrual batch for a business date and returns available journal/outbox reference data.
      operationId: createAccrualRun
      parameters:
        - description: "Canonical idempotency request ID. Required: this request moves money, and without a key a retry cannot be told apart from a second instruction."
          in: header
          name: X-Idempotency
          required: true
          schema:
            description: "Canonical idempotency request ID. Required: this request moves money, and without a key a retry cannot be told apart from a second instruction."
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateAccrualRunHumaInputBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AccrualRunHumaBody"
          description: Created
          headers:
            X-Idempotency-Replayed:
              description: "\"true\" when this response replays a request already executed under the same X-Idempotency, so nothing ran a second time and no money moved again. Absent on a first execution."
              schema:
                type: string
        "400":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: "The at-most-once contract refused the request before any handler ran: no X-Idempotency header (IDEMPOTENCY_KEY_REQUIRED), a key under a spelling this service does not read (IDEMPOTENCY_KEY_HEADER_UNKNOWN), or a request that could not be scoped to a tenant (IDEMPOTENCY_TENANT_REQUIRED). The code is in the problem document's `code` member."
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Create accrual run
      tags:
        - Accounting
      x-mint:
        href: /en/reference/products/lender/create-accrual-run
  /api/v1/accrual-runs/{id}:
    get:
      description: Returns one accrual run header by id.
      operationId: getAccrualRun
      parameters:
        - description: Accrual run identifier.
          in: path
          name: id
          required: true
          schema:
            description: Accrual run identifier.
            examples:
              - 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AccrualRunReadHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Get accrual run
      tags:
        - Accounting
      x-mint:
        href: /en/reference/products/lender/get-accrual-run
  /api/v1/accrual-runs/{id}/items:
    get:
      description: "Returns what the engine decided for every contract in the accounting month this run closes, plus every recognition the run booked in another month, such as an exit run's exit month. One row is one contract-competência, NOT one row the run inserted: `runId` names the run that booked the recognition, or, for a withheld month, the run that CLAIMED it, so on a re-run it differs from the identifier in the path and the page still shows the month's decisions instead of coming back empty. An empty page therefore means the month has no decisions at all, never that a re-run did nothing. `outcome` says where the income went: recognized into P&L, or suspended and withheld under Res. CMN 4.966 art. 17. The recognition fields are ABSENT, not zero, on a withheld month. An unknown run identifier is 404."
      operationId: listAccrualRunItems
      parameters:
        - description: Accrual run identifier.
          in: path
          name: id
          required: true
          schema:
            description: Accrual run identifier.
            examples:
              - 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
        - description: Narrow to one recognition kind, e.g. interest or pis_cofins.
          explode: false
          in: query
          name: kind
          schema:
            description: Narrow to one recognition kind, e.g. interest or pis_cofins.
            examples:
              - interest
            maxLength: 32
            type: string
        - description: Narrow by the state of the item's downstream ledger posting.
          explode: false
          in: query
          name: postingStatus
          schema:
            description: Narrow by the state of the item's downstream ledger posting.
            enum:
              - pending
              - posted
            type: string
        - description: Narrow to one accounting month (YYYY-MM).
          explode: false
          in: query
          name: competencia
          schema:
            description: Narrow to one accounting month (YYYY-MM).
            examples:
              - 2026-05
            pattern: ^\d{4}-\d{2}$
            type: string
        - description: Narrow to one loan account's recognitions within this run.
          explode: false
          in: query
          name: loanAccountId
          schema:
            description: Narrow to one loan account's recognitions within this run.
            format: uuid
            type: string
        - description: Page size.
          explode: false
          in: query
          name: limit
          schema:
            default: 25
            description: Page size.
            format: int64
            maximum: 100
            minimum: 1
            type: integer
        - description: Page offset.
          explode: false
          in: query
          name: offset
          schema:
            default: 0
            description: Page offset.
            format: int64
            maximum: 10000
            minimum: 0
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AccrualRunItemListHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: List accrual run decisions
      tags:
        - Accounting
      x-mint:
        href: /en/reference/products/lender/list-accrual-run-decisions
  /api/v1/accrual-runs/{id}/retry:
    post:
      description: "Re-sends to the ledger the recognitions of a run that it has not acknowledged. Of the items selected, only those still unposted are re-sent; an acknowledged recognition is never sent twice, and each re-send carries the same deterministic key as the original attempt, so a recognition already in the ledger is deduplicated there rather than booked again. The response lists the items actually re-sent, which may be fewer than those asked for; whatever it could not send is listed in unpostableItems with a reason. Status is \"queued\" when at least one recognition went out, \"nothing_to_retry\" only when the ledger had already acknowledged everything selected, and \"blocked\" when unacknowledged recognitions exist and none of them could be re-sent. An id that belongs to no item of this run is refused with 422 (LENDER-0407) before any of that is decided, and nothing is re-sent — so \"nothing_to_retry\" can only ever mean the ledger has everything selected. That refusal names AT MOST TEN unknown ids, one per errors[] member at body.itemIds; the detail always states how many there are in total, so a selection with more than ten unknown ids reports the true count and lists the first ten. Safe to repeat: pressing retry twice enqueues one posting per recognition."
      operationId: retryAccrualRun
      parameters:
        - description: Accrual run identifier.
          in: path
          name: id
          required: true
          schema:
            description: Accrual run identifier.
            format: uuid
            type: string
        - description: "Canonical idempotency request ID. Required: this request moves money, and without a key a retry cannot be told apart from a second instruction."
          in: header
          name: X-Idempotency
          required: true
          schema:
            description: "Canonical idempotency request ID. Required: this request moves money, and without a key a retry cannot be told apart from a second instruction."
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RetryAccrualRunHumaInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AccrualRunRetryHumaBody"
          description: OK
          headers:
            X-Idempotency-Replayed:
              description: "\"true\" when this response replays a request already executed under the same X-Idempotency, so nothing ran a second time and no money moved again. Absent on a first execution."
              schema:
                type: string
        "400":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: "The at-most-once contract refused the request before any handler ran: no X-Idempotency header (IDEMPOTENCY_KEY_REQUIRED), a key under a spelling this service does not read (IDEMPOTENCY_KEY_HEADER_UNKNOWN), or a request that could not be scoped to a tenant (IDEMPOTENCY_TENANT_REQUIRED). The code is in the problem document's `code` member."
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Retry accrual run items
      tags:
        - Accounting
      x-mint:
        href: /en/reference/products/lender/retry-accrual-run-items
  /api/v1/assignment/exceptions:
    get:
      description: "Returns the tenant's exception cases, newest first. A case is opened when the cession flow must not decide by itself: a receivable this fund has now cut as many times as its configuration allows (repeated_cut), a second and different return file over a set that already accepted one (remessa_conflict), or a return file refusing a receivable the set does not carry (remessa_divergence). Every filter is optional and narrows."
      operationId: listAssignmentExceptions
      parameters:
        - description: Narrow to open or resolved cases. Omit for both.
          explode: false
          in: query
          name: state
          schema:
            description: Narrow to open or resolved cases. Omit for both.
            enum:
              - open
              - resolved
            type: string
        - description: Narrow to one case type. Omit for all.
          explode: false
          in: query
          name: caseType
          schema:
            description: Narrow to one case type. Omit for all.
            enum:
              - repeated_cut
              - remessa_conflict
              - remessa_divergence
              - offer_sent_without_remessa
              - paid_without_transferred
              - transferred_without_accepted
              - signed_without_acceptable
              - derecognition_unpostable
              - derecognition_unvaluable
              - derecognition_already_sold
              - derecognition_unsellable
              - derecognition_contract_closed
              - transfer_absent
              - registry_command_unconfirmed
              - assigned_contract_passthrough
              - fund_payment_divergence
              - integration_item_stuck
            type: string
        - description: Narrow to one fund (uuid). Omit for all.
          explode: false
          in: query
          name: fundId
          schema:
            description: Narrow to one fund (uuid). Omit for all.
            type: string
        - description: Narrow to one assignment set (uuid). Omit for all.
          explode: false
          in: query
          name: setId
          schema:
            description: Narrow to one assignment set (uuid). Omit for all.
            type: string
        - description: Page size. Defaults to 50.
          explode: false
          in: query
          name: limit
          schema:
            description: Page size. Defaults to 50.
            format: int64
            maximum: 200
            minimum: 1
            type: integer
        - description: Rows to skip.
          explode: false
          in: query
          name: offset
          schema:
            description: Rows to skip.
            format: int64
            minimum: 0
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AssignmentExceptionListOutputBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: List the assignment exception queue
      tags:
        - AssignmentExceptions
      x-mint:
        href: /en/reference/products/lender/list-the-assignment-exception-queue
  /api/v1/assignment/exceptions/{caseId}:
    get:
      description: Returns one of the tenant's exception cases, the same body the queue lists for it. A case of another tenant is answered as not found.
      operationId: getAssignmentException
      parameters:
        - description: Exception case identifier.
          in: path
          name: caseId
          required: true
          schema:
            description: Exception case identifier.
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AssignmentExceptionHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Read one assignment exception case
      tags:
        - AssignmentExceptions
      x-mint:
        href: /en/reference/products/lender/read-one-assignment-exception-case
  /api/v1/assignment/exceptions/{caseId}/accept-payment:
    post:
      description: "For an OPEN fund_payment_divergence case where the fund paid LESS than the lot is due beyond its tolerance: the operator takes what the fund paid as the lot's full payment. The case is resolved with the operator's disposition and the held title transfers of the paid lines are commanded at the registradora, but for a line under an open dead-line case. Nothing is written off here: the acceptance can then proceed, and writes each line off at the cash the fund paid for it, the shortfall spread over the lines pro rata to their frozen price into the cession result. Refused with LENDER-0512 for any other case, for an over-payment (the desk refunds the excess and the operator re-marks paid, less that refund)."
      operationId: acceptAssignmentExceptionPayment
      parameters:
        - description: Exception case identifier.
          in: path
          name: caseId
          required: true
          schema:
            description: Exception case identifier.
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AcceptAssignmentExceptionPaymentHumaInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AssignmentExceptionHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Accept what the fund paid for a lot as its full payment
      tags:
        - AssignmentExceptions
      x-mint:
        href: /en/reference/products/lender/accept-what-the-fund-paid-for-a-lot-as-its-full-payment
  /api/v1/assignment/exceptions/{caseId}/delivered-outside:
    post:
      description: "For an OPEN integration_item_stuck case: the case is resolved with the operator's disposition, which says how the item was delivered, and detail.resolutionAction delivered_outside; the orchestrator records the item as delivered. Nothing else changes in the Lender. Refused with LENDER-0596 for an unknown case, LENDER-0597 once the case is resolved and LENDER-1503 for any other case type."
      operationId: markAssignmentIntegrationItemDeliveredOutside
      parameters:
        - description: Exception case identifier.
          in: path
          name: caseId
          required: true
          schema:
            description: Exception case identifier.
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ActOnAssignmentIntegrationCaseHumaInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AssignmentExceptionHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Close an integration case whose item was delivered by another channel
      tags:
        - AssignmentExceptions
      x-mint:
        href: /en/reference/products/lender/close-an-integration-case-whose-item-was-delivered-by-another-channel
  /api/v1/assignment/exceptions/{caseId}/remove-line:
    post:
      description: "For an OPEN case naming a line that can no longer be sold after the fund answered for the lot (signed_without_acceptable, derecognition_unsellable, derecognition_already_sold, derecognition_contract_closed), or an integration_item_stuck case naming a receivable, which also holds before the fund answers, from approval on: the line leaves the lot with exitReason the case type, the case is resolved with the operator's disposition and keeps the line's frozen price in detail.removedLine, every other open dead-line or integration case about the line closes with it, and the lot moves as far as its remaining lines have gone, up to accepted; the last line out cancels the lot (operator_removed_all_lines). Nothing is posted for the removed line. detail.removedLine.refundToFund is what the exception desk settles with the fund for it: what the fund paid for the line, its frozen price if paid, less its share of the lot's accepted or tolerated difference, pro rata to price over the paid lines still open and all of what is left when it is the last open line, and 0.00 for a line the fund never paid. The Lender keeps it apart from what the fund sent and nets it itself, so the lot stays as settled as it was and paid is never re-marked for it. Refused with LENDER-0507 for any other case or one naming no receivable, with LENDER-0508 once the line left the lot or was accepted, or the lot was accepted, with LENDER-0574 or LENDER-0576 when an integration case's line already had its title moved to the fund or its transfer lodged at the registradora, with LENDER-1506 when an integration case's lot already has its endorsement term recorded: the term lists the line, so it stays in the lot; close the case by resend or delivered-outside. Refused with LENDER-0514 for a paid line while what the fund paid is not settled: re-mark paid or accept the short payment on the lot's fund_payment_divergence case first."
      operationId: removeAssignmentExceptionLine
      parameters:
        - description: Exception case identifier.
          in: path
          name: caseId
          required: true
          schema:
            description: Exception case identifier.
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RemoveAssignmentExceptionLineHumaInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AssignmentExceptionHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Take the line an exception case names out of its lot
      tags:
        - AssignmentExceptions
      x-mint:
        href: /en/reference/products/lender/take-the-line-an-exception-case-names-out-of-its-lot
  /api/v1/assignment/exceptions/{caseId}/resend:
    post:
      description: "For an OPEN integration_item_stuck case: the case is resolved with the operator's disposition and detail.resolutionAction resend, and the orchestrator delivers the item again; after outcome_unknown the operator accepts the risk of a duplicate. Nothing else changes in the Lender. Refused with LENDER-0596 for an unknown case, LENDER-0597 once the case is resolved and LENDER-1503 for any other case type."
      operationId: resendAssignmentIntegrationItem
      parameters:
        - description: Exception case identifier.
          in: path
          name: caseId
          required: true
          schema:
            description: Exception case identifier.
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ActOnAssignmentIntegrationCaseHumaInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AssignmentExceptionHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Close an integration case so the item is delivered again
      tags:
        - AssignmentExceptions
      x-mint:
        href: /en/reference/products/lender/close-an-integration-case-so-the-item-is-delivered-again
  /api/v1/assignment/exceptions/{caseId}/resolve:
    post:
      description: Closes one OPEN case with what a named operator decided about it. Resolving a case somebody else already disposed of is refused rather than overwriting their disposition, and a resolution with nothing recorded is refused outright.
      operationId: resolveAssignmentException
      parameters:
        - description: Exception case identifier.
          in: path
          name: caseId
          required: true
          schema:
            description: Exception case identifier.
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ResolveAssignmentExceptionHumaInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AssignmentExceptionHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Record a disposition against one exception case
      tags:
        - AssignmentExceptions
      x-mint:
        href: /en/reference/products/lender/record-a-disposition-against-one-exception-case
  /api/v1/assignment/funds:
    get:
      description: Returns the tenant's registered funds ordered by name.
      operationId: listAssignmentFunds
      parameters:
        - description: Page size.
          explode: false
          in: query
          name: limit
          schema:
            default: 25
            description: Page size.
            format: int64
            maximum: 100
            minimum: 1
            type: integer
        - description: Page offset.
          explode: false
          in: query
          name: offset
          schema:
            default: 0
            description: Page offset.
            format: int64
            maximum: 10000
            minimum: 0
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AssignmentFundListHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: List assignment funds
      tags:
        - AssignmentFunds
      x-mint:
        href: /en/reference/products/lender/list-assignment-funds
    post:
      description: Creates or replaces the registration of one fund and its administrator, keyed by fundTaxId within the validated tenant. Identifier and creation instant of an existing registration are preserved, so this is the update path as well as the create path.
      operationId: upsertAssignmentFund
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpsertAssignmentFundHumaInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AssignmentFundHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Register or update an assignment fund
      tags:
        - AssignmentFunds
      x-mint:
        href: /en/reference/products/lender/register-or-update-an-assignment-fund
  /api/v1/assignment/funds/{fundId}:
    get:
      description: Returns one fund registration by identifier; 404 when the validated tenant has none with that identifier.
      operationId: getAssignmentFund
      parameters:
        - description: Fund registration identifier.
          in: path
          name: fundId
          required: true
          schema:
            description: Fund registration identifier.
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AssignmentFundHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Get assignment fund
      tags:
        - AssignmentFunds
      x-mint:
        href: /en/reference/products/lender/get-assignment-fund
  /api/v1/assignment/funds/{fundId}/candidates:
    get:
      description: "Scores the tenant's assignable pool against ONE fund's registration and returns a verdict per receivable: eligible, or cut with exactly one reason. Every limit and policy (per debtor, payment source, assignor, arrears, suspended registration, repeated cuts) is the fund's own; one it did not register is not applied, and in mode none only the repeated-cut brake is. The ledger's integrity rules run in every mode. Concentration is measured against the fund's accepted stock plus the admitted set, and the response states that base. A receivable attributed to another fund at origination is not in this fund's pool."
      operationId: listAssignmentFundCandidates
      parameters:
        - description: Fund registration identifier.
          in: path
          name: fundId
          required: true
          schema:
            description: Fund registration identifier.
            format: uuid
            type: string
        - description: Pool window size. Verdicts are computed over the returned window as the proposed set.
          explode: false
          in: query
          name: limit
          schema:
            default: 100
            description: Pool window size. Verdicts are computed over the returned window as the proposed set.
            format: int64
            maximum: 500
            minimum: 1
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AssignmentCandidatesHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: List assignment candidates with eligibility verdicts
      tags:
        - AssignmentFunds
      x-mint:
        href: /en/reference/products/lender/list-assignment-candidates-with-eligibility-verdicts
  /api/v1/assignment/funds/{fundId}/document-templates:
    get:
      description: Returns this fund's version history for the given kind, newest first.
      operationId: listAssignmentFundDocumentTemplates
      parameters:
        - description: Owning assignment fund identifier.
          in: path
          name: fundId
          required: true
          schema:
            description: Owning assignment fund identifier.
            format: uuid
            type: string
        - description: Document kind.
          explode: false
          in: query
          name: kind
          required: true
          schema:
            description: Document kind.
            enum:
              - assignment_term
            type: string
        - description: Page size.
          explode: false
          in: query
          name: limit
          schema:
            default: 25
            description: Page size.
            format: int64
            maximum: 100
            minimum: 1
            type: integer
        - description: Page offset.
          explode: false
          in: query
          name: offset
          schema:
            default: 0
            description: Page offset.
            format: int64
            maximum: 10000
            minimum: 0
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DocumentTemplateListHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: List assignment fund document template versions
      tags:
        - AssignmentFundDocumentTemplates
      x-mint:
        href: /en/reference/products/lender/list-assignment-fund-document-template-versions
    post:
      description: Creates a new DRAFT endorsement-term template version for one assignment fund. The clausulado is legal content of that fund's own regulation, which is why it is versioned per fund rather than per loan product.
      operationId: createAssignmentFundDocumentTemplate
      parameters:
        - description: Owning assignment fund identifier.
          in: path
          name: fundId
          required: true
          schema:
            description: Owning assignment fund identifier.
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateFundDocumentTemplateHumaInputBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DocumentTemplateHumaBody"
          description: Created
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Create assignment fund document template draft
      tags:
        - AssignmentFundDocumentTemplates
      x-mint:
        href: /en/reference/products/lender/create-assignment-fund-document-template-draft
  /api/v1/assignment/funds/{fundId}/document-templates/active:
    get:
      description: Returns the currently active published version for the given kind; 404 when the fund has none — which is also what makes the term recorder refuse emission for that fund.
      operationId: getActiveAssignmentFundDocumentTemplate
      parameters:
        - description: Owning assignment fund identifier.
          in: path
          name: fundId
          required: true
          schema:
            description: Owning assignment fund identifier.
            format: uuid
            type: string
        - description: Document kind.
          explode: false
          in: query
          name: kind
          required: true
          schema:
            description: Document kind.
            enum:
              - assignment_term
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DocumentTemplateHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Get active assignment fund document template
      tags:
        - AssignmentFundDocumentTemplates
      x-mint:
        href: /en/reference/products/lender/get-active-assignment-fund-document-template
  /api/v1/assignment/funds/{fundId}/document-templates/{templateId}:
    get:
      description: Returns one of this fund's template versions by id.
      operationId: getAssignmentFundDocumentTemplate
      parameters:
        - description: Owning assignment fund identifier.
          in: path
          name: fundId
          required: true
          schema:
            description: Owning assignment fund identifier.
            format: uuid
            type: string
        - description: Template version identifier.
          in: path
          name: templateId
          required: true
          schema:
            description: Template version identifier.
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DocumentTemplateHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Get assignment fund document template version
      tags:
        - AssignmentFundDocumentTemplates
      x-mint:
        href: /en/reference/products/lender/get-assignment-fund-document-template-version
  /api/v1/assignment/funds/{fundId}/document-templates/{templateId}/publish:
    post:
      description: Publishes a draft version, atomically superseding whatever version was previously active for this fund. A published version is immutable.
      operationId: publishAssignmentFundDocumentTemplate
      parameters:
        - description: Owning assignment fund identifier.
          in: path
          name: fundId
          required: true
          schema:
            description: Owning assignment fund identifier.
            format: uuid
            type: string
        - description: Template version identifier to publish.
          in: path
          name: templateId
          required: true
          schema:
            description: Template version identifier to publish.
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DocumentTemplateHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Publish assignment fund document template
      tags:
        - AssignmentFundDocumentTemplates
      x-mint:
        href: /en/reference/products/lender/publish-assignment-fund-document-template
  /api/v1/assignment/receivables/{receivableRef}/dossier:
    get:
      description: Streams the receivable's evidence dossier (PDF). The first call freezes the receivable's facts into an immutable snapshot, renders the artifact and custodies it; every later call replays that snapshot and re-verifies that it still reproduces the recorded normalized-form digest. The response headers carry the whole determinism record, plus the declared strength of the lastro. The dossier never asserts byte-level correspondence with an emitted original.
      operationId: getReceivableDossier
      parameters:
        - description: The receivable this call is about, as an opaque identifier. Which format it carries belongs to the jurisdiction that booked it; nothing here parses it.
          in: path
          name: receivableRef
          required: true
          schema:
            description: The receivable this call is about, as an opaque identifier. Which format it carries belongs to the jurisdiction that booked it; nothing here parses it.
            maxLength: 128
            minLength: 1
            type: string
      responses:
        "200":
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Get receivable assignment dossier
      tags:
        - AssignmentDocuments
      x-mint:
        href: /en/reference/products/lender/get-receivable-assignment-dossier
  /api/v1/assignment/sets:
    get:
      description: Returns one page of the validated tenant's sets, newest first, each with the item count and the totals of its SURVIVING composition. Optionally narrowed to one fund or one lifecycle state.
      operationId: listAssignmentSets
      parameters:
        - description: Narrow to the sets offered to one fund.
          explode: false
          in: query
          name: fundId
          schema:
            description: Narrow to the sets offered to one fund.
            examples:
              - 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
        - description: Narrow to one step of the lifecycle, to cancelled for the compositions that were discarded, or to settled for the art. 29 cessions whose funding obligation is extinguished.
          explode: false
          in: query
          name: state
          schema:
            description: Narrow to one step of the lifecycle, to cancelled for the compositions that were discarded, or to settled for the art. 29 cessions whose funding obligation is extinguished.
            enum:
              - draft
              - eligibility_checked
              - pending_approval
              - approved
              - offer_sent
              - remessa_received
              - term_signed
              - paid
              - transferred
              - accepted
              - cancelled
              - settled
            type: string
        - description: Page size.
          explode: false
          in: query
          name: limit
          schema:
            default: 25
            description: Page size.
            format: int64
            maximum: 100
            minimum: 1
            type: integer
        - description: Page offset.
          explode: false
          in: query
          name: offset
          schema:
            default: 0
            description: Page offset.
            format: int64
            maximum: 10000
            minimum: 0
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AssignmentSetListHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: List assignment sets
      tags:
        - AssignmentSets
      x-mint:
        href: /en/reference/products/lender/list-assignment-sets
    post:
      description: "Composes a DRAFT set from the chosen receivables: freezes each one's facts and prices it with the fund's own cession rate, so the composition a manager later approves is the composition that was measured. A receivable already travelling inside another set is refused, never silently dropped."
      operationId: createAssignmentSet
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateAssignmentSetHumaInputBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AssignmentSetDetailHumaBody"
          description: Created
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Assemble an assignment set
      tags:
        - AssignmentSets
      x-mint:
        href: /en/reference/products/lender/assemble-an-assignment-set
  /api/v1/assignment/sets/{setId}:
    get:
      description: Returns one set with its whole composition — survivors and departures alike, each carrying the verdict that removed it and the price it was valued at — plus the immutable approval fact when there is one. 404 when the validated tenant has no set with that identifier.
      operationId: getAssignmentSet
      parameters:
        - description: Assignment set identifier.
          in: path
          name: setId
          required: true
          schema:
            description: Assignment set identifier.
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AssignmentSetDetailHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Get assignment set
      tags:
        - AssignmentSets
      x-mint:
        href: /en/reference/products/lender/get-assignment-set
  /api/v1/assignment/sets/{setId}/accepted-stock:
    get:
      description: "Returns what the set's fund already holds from the validated tenant, outside this set, as of the São Paulo civil day in observedOn: the total and one amount per borrower of the set, the same stock the eligibility engine measures concentration against. 404 for an unknown set; 503 when the stock cannot be read."
      operationId: getAssignmentSetAcceptedStock
      parameters:
        - description: Assignment set identifier.
          in: path
          name: setId
          required: true
          schema:
            description: Assignment set identifier.
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AssignmentSetAcceptedStockHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Get the fund's accepted stock outside an assignment set
      tags:
        - AssignmentSets
      x-mint:
        href: /en/reference/products/lender/get-the-funds-accepted-stock-outside-an-assignment-set
  /api/v1/assignment/sets/{setId}/approve:
    post:
      description: "Re-reads the rail state behind the composition and approves exactly what that reading covers: a receivable the rail no longer carries leaves the set, an altered one is repriced by the same ruler and stays. The approval is immutable, and a retry over the same composition replays it rather than creating a second authority. A surviving receivable with no evidence dossier gets one materialized by the approval itself."
      operationId: approveAssignmentSet
      parameters:
        - description: Assignment set identifier.
          in: path
          name: setId
          required: true
          schema:
            description: Assignment set identifier.
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AssignmentSetApprovalResultHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Approve an assignment set
      tags:
        - AssignmentSets
      x-mint:
        href: /en/reference/products/lender/approve-an-assignment-set
  /api/v1/assignment/sets/{setId}/discard:
    post:
      description: "Calls a composition off and RELEASES its receivables back to the assignable pool. Allowed from every state except accepted, whose receivables were sold and written off, and refused for any composition that already sold part of itself: a line already accepted and written off, or a title already moved to the fund at the registry. Nothing is deleted: the set rests in the terminal cancelled state with its items, its transitions, its approval and its custodied signature evidence intact, and one append-only audit row names who called it off and why. Discarding a set that is already cancelled is inert."
      operationId: discardAssignmentSet
      parameters:
        - description: Assignment set identifier.
          in: path
          name: setId
          required: true
          schema:
            description: Assignment set identifier.
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DiscardAssignmentSetHumaInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AssignmentSetDiscardResultHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Discard an assignment set
      tags:
        - AssignmentSets
      x-mint:
        href: /en/reference/products/lender/discard-an-assignment-set
  /api/v1/assignment/sets/{setId}/eligibility:
    post:
      description: Measures the composition's FROZEN entry snapshots against the fund's eligibility and concentration limits and records the verdicts. A set waiting for the manager may be re-scored; an approved one never is.
      operationId: checkAssignmentSetEligibility
      parameters:
        - description: Assignment set identifier.
          in: path
          name: setId
          required: true
          schema:
            description: Assignment set identifier.
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AssignmentSetEligibilityHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Score an assignment set against its fund's rule
      tags:
        - AssignmentSets
      x-mint:
        href: /en/reference/products/lender/score-an-assignment-set-against-its-fund-s-rule
  /api/v1/assignment/sets/{setId}/facts:
    post:
      description: "Records a fact the operator confirms and moves the set accordingly. offer_sent confirms the authorized offer file was delivered to the fund's administrator, and requires an authorized file to exist and the newest one to cover the lines still in the lot and, when the confirmation names the file sent (offerFileId), to be that file (LENDER-1505); once a later download replaced a file, the confirmation must name it. paid, transferred and accepted are per-receivable and follow one another in that order once the set's payment is open: for a fund whose administrator generates the term, as soon as the fund's return file is accepted; for a fund the Lender emits for, once that term is signed. Each names where it came from, and each applies either to named receivables or to the whole surviving composition. accepted is the flip: the contract leaves this portfolio and its write-off is enqueued in the SAME transaction, or neither happens. A repeated confirmation is inert and reported as replayed rather than recording a second send or a second write-off. Re-stating paid is also the way to re-issue a title transfer the registradora refused: the fact writes nothing the second time, while the registry command is reached again through its own deterministic reference. Only a transferred fact whose provenance is registry_provider settles that command — the acceptance's proof of a moved title is the registradora's own statement and nobody else's. paid states amountPaid, what the bank shows the fund sent for the lot; while it differs, net of the desk's refunds for lines taken out, from the frozen prices of the paid lines still in the lot by more than the lot's tolerance, the title transfer waits and the acceptance is held (LENDER-0511). Settling the payment commands no title for a line under an open dead-line case. accepted is refused while a line still in the lot is not paid (LENDER-0516). Once a line of the lot is accepted, a paid that states a new amount is refused (LENDER-0515): money the fund sends after is settled at the exception desk."
      operationId: recordAssignmentSetFact
      parameters:
        - description: Assignment set identifier.
          in: path
          name: setId
          required: true
          schema:
            description: Assignment set identifier.
            format: uuid
            type: string
        - description: "Canonical idempotency request ID. Required: this request moves money, and without a key a retry cannot be told apart from a second instruction."
          in: header
          name: X-Idempotency
          required: true
          schema:
            description: "Canonical idempotency request ID. Required: this request moves money, and without a key a retry cannot be told apart from a second instruction."
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RecordAssignmentSetFactHumaInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AssignmentSetFactHumaBody"
          description: OK
          headers:
            X-Idempotency-Replayed:
              description: "\"true\" when this response replays a request already executed under the same X-Idempotency, so nothing ran a second time and no money moved again. Absent on a first execution."
              schema:
                type: string
        "400":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: "The at-most-once contract refused the request before any handler ran: no X-Idempotency header (IDEMPOTENCY_KEY_REQUIRED), a key under a spelling this service does not read (IDEMPOTENCY_KEY_HEADER_UNKNOWN), or a request that could not be scoped to a tenant (IDEMPOTENCY_TENANT_REQUIRED). The code is in the problem document's `code` member."
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Record an externally-observed fact about an assignment set
      tags:
        - AssignmentSets
      x-mint:
        href: /en/reference/products/lender/record-an-externally-observed-fact-about-an-assignment-set
  /api/v1/assignment/sets/{setId}/funding-payoff:
    post:
      description: Ends the obligation raised by a cession booked with the risk retained (Res. CMN 4.966 art. 29) for one of its receivables, at the amount agreed with the fund. The operator informs that amount and what the borrower paid to get out; this service prices the obligation at amortised cost, refuses anything above the face of the instalments still owed, and books the difference as financing expense above the obligation or as released desagio below it. Omitting the agreed amount passes the borrower's payoff straight through; informing zero or less is refused, because a fund settling for nothing is a statement and not an absence. The cession itself reaches 'settled' only when this was the last of its receivables still owing the fund.
      operationId: endAssignmentFundingEarly
      parameters:
        - description: Assignment set identifier.
          in: path
          name: setId
          required: true
          schema:
            description: Assignment set identifier.
            format: uuid
            type: string
        - description: "Canonical idempotency request ID. Required: this request extinguishes a liability, and without a key a retry cannot be told apart from a second instruction."
          in: header
          name: X-Idempotency
          required: true
          schema:
            description: "Canonical idempotency request ID. Required: this request extinguishes a liability, and without a key a retry cannot be told apart from a second instruction."
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/EndAssignmentFundingEarlyHumaInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AssignmentFundingPayoffHumaBody"
          description: OK
          headers:
            X-Idempotency-Replayed:
              description: "\"true\" when this response replays a request already executed under the same X-Idempotency, so nothing ran a second time and no money moved again. Absent on a first execution."
              schema:
                type: string
        "400":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: "The at-most-once contract refused the request before any handler ran: no X-Idempotency header (IDEMPOTENCY_KEY_REQUIRED), a key under a spelling this service does not read (IDEMPOTENCY_KEY_HEADER_UNKNOWN), or a request that could not be scoped to a tenant (IDEMPOTENCY_TENANT_REQUIRED). The code is in the problem document's `code` member."
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: End one receivable's funding obligation before its term
      tags:
        - AssignmentSets
      x-mint:
        href: /en/reference/products/lender/end-one-receivable-s-funding-obligation-before-its-term
  /api/v1/assignment/sets/{setId}/integration-cases:
    post:
      description: "Opens an integration_item_stuck case for one item, keyed on set, receivableRef, destination, purpose and step, or answers the case already open for it: a retry writes nothing and gets the same case. Refused with LENDER-0541 for an unknown set, LENDER-0545 before approval, LENDER-0548 for a receivable the set no longer carries and LENDER-1502 once the set is cancelled or settled."
      operationId: openAssignmentIntegrationCase
      parameters:
        - description: Assignment set identifier.
          in: path
          name: setId
          required: true
          schema:
            description: Assignment set identifier.
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/OpenAssignmentIntegrationCaseHumaInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AssignmentExceptionHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Open the exception case of an integration item that stopped
      tags:
        - AssignmentExceptions
      x-mint:
        href: /en/reference/products/lender/open-the-exception-case-of-an-integration-item-that-stopped
  /api/v1/assignment/sets/{setId}/offer-file:
    get:
      description: "Serializes the set's IMMUTABLE approval into the layout its fund's custodian ingests. The first call over the lot as it stands authorizes the file and records its digest; every later call over it re-derives the same bytes and re-verifies them against that digest, so re-generation is byte-identical and the D+1 rollover re-serves the SAME file with no re-emission. A set that was never approved is refused. Downloading does NOT mark the offer as sent — that is a separate confirmed fact. A fund whose layout is a Reporter template is never generated here: its file is served as custodied, with the Content-Type and extension of its format, once its generation is ready, and refused before (LENDER-0538). The file covers the lines still in the lot, each at its approval price. While the set is approved, a line taken out after the last authorization makes the next call authorize a new file (a line leaving during that authorization refuses it, LENDER-0529); from offer_sent on, the file confirmed as sent is served as it was."
      operationId: getAssignmentOfferFile
      parameters:
        - description: Assignment set identifier.
          in: path
          name: setId
          required: true
          schema:
            description: Assignment set identifier.
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/xml:
              schema:
                type: string
            text/csv; charset=utf-8:
              schema:
                type: string
            text/html; charset=utf-8:
              schema:
                type: string
            text/plain; charset=us-ascii:
              schema:
                type: string
            text/plain; charset=utf-8:
              schema:
                type: string
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Download the offer file of an approved assignment set
      tags:
        - AssignmentDocuments
      x-mint:
        href: /en/reference/products/lender/download-the-offer-file-of-an-approved-assignment-set
  /api/v1/assignment/sets/{setId}/offer-file/generation:
    get:
      description: Returns the generation state; each read of a pending attempt moves it one step. A set reads ready, from any source, once a file is authorized over the lines still in the lot; from offer_sent on, the file sent reads ready. 404 when the set never had a generation and has no file.
      operationId: getAssignmentOfferFileGeneration
      parameters:
        - description: Assignment set identifier.
          in: path
          name: setId
          required: true
          schema:
            description: Assignment set identifier.
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AssignmentOfferFileGenerationHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Read the offer file generation of an assignment set
      tags:
        - AssignmentDocuments
      x-mint:
        href: /en/reference/products/lender/read-the-offer-file-generation-of-an-assignment-set
    post:
      description: "Starts an attempt when the set has none or its last one failed, and otherwise returns the current state. The set must be approved and its fund must name a Reporter template; a fund on a built-in layout is refused (LENDER-0537). The template is read first: Reporter unreachable (LENDER-0539) or refusing it (LENDER-0540) records nothing. An attempt a line left the lot after it started reads failed with composition_changed, and POST starts the next attempt over the lines still in it. Generating never records offer_sent."
      operationId: requestAssignmentOfferFileGeneration
      parameters:
        - description: Assignment set identifier.
          in: path
          name: setId
          required: true
          schema:
            description: Assignment set identifier.
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AssignmentOfferFileGenerationHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Generate the offer file of an approved set through its fund's Reporter template
      tags:
        - AssignmentDocuments
      x-mint:
        href: /en/reference/products/lender/generate-the-offer-file-of-an-approved-set-through-its-funds-reporter-template
  /api/v1/assignment/sets/{setId}/receivables:
    get:
      description: Answers, in one call, the members that survive the set's approval, each with its booked terms, its canonical outstanding balance, the digests of its custodied documents and its persisted schedule. A member whose facts are not persisted now comes back as incomplete. Answers in every state after approval, cancelled included; a set never approved is refused (LENDER-0545). No personal data leaves here.
      operationId: listAssignmentSetReceivables
      parameters:
        - description: Assignment set identifier.
          in: path
          name: setId
          required: true
          schema:
            description: Assignment set identifier.
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AssignmentSetReceivablesHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: List an approved assignment set's receivables
      tags:
        - AssignmentDocuments
      x-mint:
        href: /en/reference/products/lender/list-an-approved-assignment-sets-receivables
  /api/v1/assignment/sets/{setId}/remessa:
    post:
      description: "Reads the administrator's Arquivo Remessa and reconciles it against the composition that was offered. The file must be a lerian-remessa-v2 return, which gives every receivable the set carries a verdict, taken or refused; a file declaring any other layout is refused with LENDER-0520. A file that leaves any receivable without a verdict is refused whole with LENDER-1507, errors[] names each of them, and nothing is written. A taken receivable stays in the set at its frozen price; it is not the accepted fact. A verdict on a receivable the set does not carry refuses the whole file as a divergence and opens a case, except on a line the operator took out of the lot, which stays out. A receivable the fund refuses leaves the composition with its reason and becomes assignable again; once this fund's repeated-cut limit is reached it stops returning automatically and lands in the exception queue instead. A file refusing every receivable cancels the set (counterparty_declined). Identity is the file's CONTENT: the same file re-uploaded is inert, and a different file over a set that already accepted one is refused terminally and opens an exception case — a remessa reprocessed never cedes twice. The bytes of every accepted file are kept."
      operationId: ingestAssignmentRemessa
      parameters:
        - description: Assignment set identifier.
          in: path
          name: setId
          required: true
          schema:
            description: Assignment set identifier.
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/IngestAssignmentRemessaHumaInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AssignmentRemessaHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Ingest the fund administrator's return file for an assignment set
      tags:
        - AssignmentSets
      x-mint:
        href: /en/reference/products/lender/ingest-the-fund-administrator-s-return-file-for-an-assignment-set
  /api/v1/assignment/sets/{setId}/term:
    get:
      description: "Streams the set's current endorsement term (PDF) exactly as custody stored it: the term the Lender emitted, or the administrator's PDF recorded as evidence. 404 when the set has no term."
      operationId: getAssignmentTerm
      parameters:
        - description: Assignment set identifier (uuid).
          in: path
          name: setId
          required: true
          schema:
            description: Assignment set identifier (uuid).
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/pdf:
              schema:
                contentMediaType: application/octet-stream
                format: binary
                type: string
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Download the assignment set's endorsement term
      tags:
        - AssignmentDocuments
      x-mint:
        href: /en/reference/products/lender/download-the-assignment-sets-endorsement-term
    post:
      description: "Records the endorsement/assignment term of one APPROVED set. Which of two paths runs is resolved from the fund's own configured term mode, never from this request: for a fund the Lender emits for, the term is rendered from that fund's own published endorsement-term template (a fund with no published template is refused — there is no generic layout) and payment waits for it; for a fund whose administrator generates the term, nothing is emitted and the administrator's signed PDF is registered, digested exactly as received. Recording it is optional and never gates payment, which opens at the fund's return file; recorded while the set is still at remessa_received, it moves the set to term_signed. The row is append-only: the same idempotency key replays, a new key supersedes by order without erasing, and the set state term_signed is reachable only once a term exists. A term the Lender emits waits while an open exception case names a line of the set that can no longer be sold (LENDER-0509): the operator takes that line out through its case first."
      operationId: recordAssignmentTerm
      parameters:
        - description: Approved assignment set identifier (uuid).
          in: path
          name: setId
          required: true
          schema:
            description: Approved assignment set identifier (uuid).
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RecordAssignmentTermHumaInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AssignmentTermHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Record the assignment set's endorsement term
      tags:
        - AssignmentDocuments
      x-mint:
        href: /en/reference/products/lender/record-the-assignment-set-s-endorsement-term
  /api/v1/br/consignado/collection-instructions:
    get:
      description: "Returns the instructions the client's collection agent still has to act on, oldest first. Only issued instructions still inside their own validity window appear, and only those issued to the agent this tenant currently has appointed. Leaving the window means different things by kind: a payoff amount is frozen, so a payment made at or after the window closes is no longer the amount owed and must be re-quoted, never collected — though a payment made INSIDE the window is credited whenever the file declaring it arrives. This is identical whether the worker pays it (payoff) or the institution taking the contract over pays it (payoff_portability): the frozen amount, the window and the stale-receipt refusal do not care who pays, and the kind exists so the agent knows from WHOM it collects. An arrear residual does not go stale, so it merely leaves this queue and a payment collected inside the window is still accepted when the agent declares it late. The response carries no digitable line and no barcode — the agent registers the boleto in its own account and the borrower-facing code is never ours to state."
      operationId: listConsignadoCollectionInstructions
      parameters:
        - description: Maximum instructions to return. Defaults to 50.
          explode: false
          in: query
          name: limit
          schema:
            description: Maximum instructions to return. Defaults to 50.
            format: int64
            maximum: 200
            minimum: 1
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CollectionInstructionListHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: List open extraordinary-collection instructions
      tags:
        - Consignado
      x-mint:
        href: /en/reference/products/lender/list-open-extraordinary-collection-instructions
  /api/v1/br/consignado/collection-settlements:
    post:
      description: "Accepts the file in which the client's collection agent declares what it received into its own account, against the instructions the lender issued. Identity is the file's CONTENT: the same file re-uploaded is inert and reduces no debt twice. The file's own header names the agent, and a file this tenant cannot attribute to anybody — neither its active channel nor an agent still holding an open instruction — is refused before a single line is stored. Accepting the file applies nothing: each line becomes durable work, applied independently, so one unrecognised instruction is quarantined for an operator instead of blocking every other borrower's payment in the same upload. A line declaring a receipt the agent cannot have taken yet — a paid instant more than a few minutes ahead of the moment we receive the file — is refused too, and refuses the whole file: that instant is the ACCOUNTING instant of the settlement, so a skewed clock or a broken date formatter would book a repayment in the future."
      operationId: ingestConsignadoCollectionSettlements
      parameters:
        - description: "Canonical idempotency request ID. Required: this request moves money, and without a key a retry cannot be told apart from a second instruction."
          in: header
          name: X-Idempotency
          required: true
          schema:
            description: "Canonical idempotency request ID. Required: this request moves money, and without a key a retry cannot be told apart from a second instruction."
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/IngestCollectionSettlementHumaInputBody"
        required: true
      responses:
        "202":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CollectionSettlementIngestHumaBody"
          description: Accepted
          headers:
            X-Idempotency-Replayed:
              description: "\"true\" when this response replays a request already executed under the same X-Idempotency, so nothing ran a second time and no money moved again. Absent on a first execution."
              schema:
                type: string
        "400":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: "The at-most-once contract refused the request before any handler ran: no X-Idempotency header (IDEMPOTENCY_KEY_REQUIRED), a key under a spelling this service does not read (IDEMPOTENCY_KEY_HEADER_UNKNOWN), or a request that could not be scoped to a tenant (IDEMPOTENCY_TENANT_REQUIRED). The code is in the problem document's `code` member."
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Ingest the collection agent's Arquivo de Baixa Extraordinária
      tags:
        - Consignado
      x-mint:
        href: /en/reference/products/lender/ingest-the-collection-agent-s-arquivo-de-baixa-extraordinaria
  /api/v1/br/consignado/collection-settlements/refused:
    get:
      description: "Returns the lines of the Arquivo de Baixa Extraordinária this tenant's currently appointed collection agent delivered and the lender could not apply, NEWEST refusal first. Page with the opaque `cursor` from a response's `nextCursor`; the feed never drains, so paging from the oldest end would pin a long-lived client to the same first page forever. A line appears here only once it is terminal: a line still being retried may yet apply and is not refused. Only the appointed agent's own deliveries are visible — the listing is fenced on the active agent channel by name AND receiving account, so appointing a new agent does not hand it the previous agent's lines. `reasonCode` is the contract to branch on; `reason` is the same fact in prose and may be reworded. A refusal this surface cannot attribute to the line itself is reported as `unprocessable` rather than described: the line is held for operator review and the file is not the thing to correct."
      operationId: listConsignadoRefusedCollectionSettlements
      parameters:
        - description: Maximum refused lines to return.
          explode: false
          in: query
          name: limit
          schema:
            default: 50
            description: Maximum refused lines to return.
            format: int64
            maximum: 200
            minimum: 1
            type: integer
        - description: "Opaque page cursor from a previous response's nextCursor. Omit for the first (newest) page. A malformed cursor is refused (422) rather than ignored, because silently restarting at the newest page would skip every line in between. A well-formed cursor is applied as given: it is not signed, so it can only move your own position inside your own feed."
          explode: false
          in: query
          name: cursor
          schema:
            description: "Opaque page cursor from a previous response's nextCursor. Omit for the first (newest) page. A malformed cursor is refused (422) rather than ignored, because silently restarting at the newest page would skip every line in between. A well-formed cursor is applied as given: it is not signed, so it can only move your own position inside your own feed."
            maxLength: 512
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CollectionSettlementRefusedListHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: List refused lines of the collection agent's own settlement files
      tags:
        - Consignado
      x-mint:
        href: /en/reference/products/lender/list-refused-lines-of-the-collection-agent-s-own-settlement-files
  /api/v1/br/consignado/contract-links:
    get:
      description: Maps each numeroContrato to its loan application and, once the contract is disbursed, its loan account. A number with no consignado contract in the caller's tenant is omitted, not refused.
      operationId: listConsignadoContractLinks
      parameters:
        - description: Dataprev contract number; repeat it 1 to 100 times.
          explode: true
          in: query
          name: numeroContrato
          required: true
          schema:
            description: Dataprev contract number; repeat it 1 to 100 times.
            items:
              type: string
            maxItems: 100
            minItems: 1
            type: array
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ContractLinksHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Resolve Dataprev contract numbers to Lender contracts
      tags:
        - Consignado
      x-mint:
        href: /en/reference/products/lender/resolve-dataprev-contract-numbers-to-lender-contracts
  /api/v1/br/consignado/loan-applications/{applicationId}/preparation:
    get:
      description: Returns the origination fee and the optional Lender preparation references the client declared when the CLT contract was registered. The references are client-declared evidence, never verified against quotes or CCBs. An application without a consignado extension, or of another tenant, is 404.
      operationId: getConsignadoContractPreparation
      parameters:
        - description: Loan application id of a booked consignado CLT contract.
          in: path
          name: applicationId
          required: true
          schema:
            description: Loan application id of a booked consignado CLT contract.
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ContractPreparationHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Get consignado contract registration declarations
      tags:
        - Consignado
      x-mint:
        href: /en/reference/products/lender/get-consignado-contract-registration-declarations
  /api/v1/br/consignado/quotes:
    post:
      description: Calculates exactly as the preview and stores the complete input and financial evidence for the trusted tenant. Identical content returns the stored quote with its original computedAt. Creates no application, borrower, account, debt or reservation.
      operationId: createConsignadoQuote
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ConsignadoQuoteHumaBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConsignadoQuoteRecordHumaBody"
          description: Created
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Create a durable CLT quote
      tags:
        - Loan Applications
      x-mint:
        href: /en/reference/products/lender/create-a-durable-clt-quote
  /api/v1/br/consignado/quotes/preview:
    post:
      description: Computes one installment ladder, IOF, optional retained origination fee, borrower net and CET directly in Lender. Creates no application, account, debt or persisted offer.
      operationId: previewConsignadoQuote
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ConsignadoQuoteHumaBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConsignadoQuoteHumaResponse"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Preview a complete CLT quote
      tags:
        - Loan Applications
      x-mint:
        href: /en/reference/products/lender/preview-a-complete-clt-quote
  /api/v1/br/consignado/quotes/{quoteId}:
    get:
      description: Returns the immutable stored quote of the trusted tenant.
      operationId: getConsignadoQuote
      parameters:
        - description: Durable quote identifier.
          in: path
          name: quoteId
          required: true
          schema:
            description: Durable quote identifier.
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConsignadoQuoteRecordHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Get a durable CLT quote
      tags:
        - Loan Applications
      x-mint:
        href: /en/reference/products/lender/get-a-durable-clt-quote
  /api/v1/br/consignado/quotes/{quoteId}/credit-instruments:
    get:
      description: Returns the quote's emission history, newest first.
      operationId: listConsignadoQuoteCreditInstruments
      parameters:
        - description: Durable quote identifier.
          in: path
          name: quoteId
          required: true
          schema:
            description: Durable quote identifier.
            format: uuid
            type: string
        - description: Page size.
          explode: false
          in: query
          name: limit
          schema:
            default: 25
            description: Page size.
            format: int64
            maximum: 100
            minimum: 1
            type: integer
        - description: Page offset.
          explode: false
          in: query
          name: offset
          schema:
            default: 0
            description: Page offset.
            format: int64
            maximum: 10000
            minimum: 0
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConsignadoQuoteCreditInstrumentListHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: List the CCBs of a durable CLT quote
      tags:
        - CreditInstruments
      x-mint:
        href: /en/reference/products/lender/list-the-ccbs-of-a-durable-clt-quote
    post:
      description: Renders the product's active consignado_quote_ccb template from the stored quote and the caller-declared parties, and custodies the PDF. Idempotent by caller key. Creates no loan application.
      operationId: issueConsignadoQuoteCreditInstrument
      parameters:
        - description: Durable quote identifier.
          in: path
          name: quoteId
          required: true
          schema:
            description: Durable quote identifier.
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/IssueConsignadoQuoteCreditInstrumentHumaInputBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConsignadoQuoteCreditInstrumentHumaBody"
          description: Created
          headers:
            X-Idempotency-Replayed:
              schema:
                description: true when this response replays an instrument already created under the same idempotency key.
                type: boolean
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Issue the CCB of a durable CLT quote
      tags:
        - CreditInstruments
      x-mint:
        href: /en/reference/products/lender/issue-the-ccb-of-a-durable-clt-quote
  /api/v1/br/consignado/quotes/{quoteId}/credit-instruments/{instrumentId}/download:
    get:
      description: Streams the rendered PDF from the Lender's own custody. An instrument of another tenant or another quote never resolves.
      operationId: downloadConsignadoQuoteCreditInstrument
      parameters:
        - description: Durable quote identifier.
          in: path
          name: quoteId
          required: true
          schema:
            description: Durable quote identifier.
            format: uuid
            type: string
        - description: Credit instrument identifier.
          in: path
          name: instrumentId
          required: true
          schema:
            description: Credit instrument identifier.
            format: uuid
            type: string
      responses:
        "200":
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Download the CCB of a durable CLT quote
      tags:
        - CreditInstruments
      x-mint:
        href: /en/reference/products/lender/download-the-ccb-of-a-durable-clt-quote
  /api/v1/br/dashboard/delinquent-loans:
    get:
      description: "Returns delinquent loan drill-down rows for the validated tenant at a requested business date, filterable by loan product, loan product version and by the regulatory carteira C1..C5 of Res. BCB 352/2023 art. 81. The carteira is derived from the product: it narrows to the loan product versions that declare it, so a carteira no product declares returns an empty page."
      operationId: listDelinquentLoansBR
      parameters:
        - description: Regulatory carteira (Res. BCB 352/2023 art. 81). Narrows to the loan product versions that declare it.
          explode: false
          in: query
          name: carteira
          schema:
            description: Regulatory carteira (Res. BCB 352/2023 art. 81). Narrows to the loan product versions that declare it.
            enum:
              - C1
              - C2
              - C3
              - C4
              - C5
            examples:
              - C5
            type: string
        - description: Business date (YYYY-MM-DD); defaults to the current business day in Brazil (UTC-3).
          explode: false
          in: query
          name: asOf
          schema:
            description: Business date (YYYY-MM-DD); defaults to the current business day in Brazil (UTC-3).
            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
        - description: Narrow to one loan officer's book. Free-form authenticated identity subject, not necessarily a UUID, at most 255 characters; a system-originated contract carries the empty officer.
          explode: false
          in: query
          name: assignedOfficerId
          schema:
            description: Narrow to one loan officer's book. Free-form authenticated identity subject, not necessarily a UUID, at most 255 characters; a system-originated contract carries the empty officer.
            examples:
              - officer-xyz
            maxLength: 255
            type: string
        - description: Page size.
          explode: false
          in: query
          name: limit
          schema:
            default: 25
            description: Page size.
            examples:
              - 25
            format: int64
            maximum: 100
            minimum: 1
            type: integer
        - description: Page offset.
          explode: false
          in: query
          name: offset
          schema:
            default: 0
            description: Page offset.
            examples:
              - 0
            format: int64
            maximum: 10000
            minimum: 0
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DelinquentLoansHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: List delinquent loans (Brazil)
      tags:
        - Dashboard
      x-mint:
        href: /en/reference/products/lender/list-delinquent-loans-brazil
  /api/v1/br/loan-accounts/{id}/cet-disclosure:
    get:
      description: Returns the latest immutable CET disclosure artifact frozen for the active loan account.
      operationId: getLoanAccountCETDisclosure
      parameters:
        - description: Loan account identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan account identifier.
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CETDisclosureResponse"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Get loan account CET disclosure
      tags:
        - Loan Accounts
      x-mint:
        href: /en/reference/products/lender/get-loan-account-cet-disclosure
  /api/v1/br/loan-accounts/{id}/credit-descriptor:
    get:
      description: Returns the Res. CMN 5.004/2022 credit operation descriptor, optionally reconstructed as of a business date.
      operationId: getLoanAccountCreditOperationDescriptor
      parameters:
        - description: Loan account identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan account identifier.
            format: uuid
            type: string
        - description: Optional as-of date (YYYY-MM-DD) to reconstruct the descriptor.
          explode: false
          in: query
          name: asOfDate
          schema:
            description: Optional as-of date (YYYY-MM-DD) to reconstruct the descriptor.
            format: date
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreditOperationDescriptorResponse"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Get credit operation descriptor
      tags:
        - Loan Accounts
      x-mint:
        href: /en/reference/products/lender/get-loan-account-credit-operation-descriptor
  /api/v1/br/loan-accounts/{id}/credit-loss-recoveries:
    post:
      description: "Settles the debt a write-off left standing (Res. CMN 4.966 art. 49) with money the borrower paid later, in one transaction; the contract stays written off. The money first pays the written-off amount W, untaxed, and releases the write-off control by that part; what exceeds W is new revenue, taxed by PIS/COFINS (Lei 9.718 art. 3 par. 2 II). An amount above the remaining debt is refused (LENDER-0979) with remainingDebt. The recovery is dated by receivedAt, which must not be before the instant of the write-off nor the day of the latest standing recovery (LENDER-0976): recoveries are recorded in money order, so the split and the tax fall in the right month; a recovery that was reversed no longer counts, which is the way out of an out-of-order day. Keyed on X-Idempotency alone: the same key with the same amount and receivedAt replays the recovery and moves nothing; the same key with another body is refused (LENDER-0978)."
      operationId: recordCreditLossRecovery
      parameters:
        - description: Written-off direct-credit loan account.
          in: path
          name: id
          required: true
          schema:
            description: Written-off direct-credit loan account.
            format: uuid
            type: string
        - description: "Idempotency key of the recovery: 1 to 255 bytes of UTF-8. The route refuses a request without it, or with a blank, longer or non-UTF-8 one (LENDER-0976). X-Request-ID is never read as the key."
          in: header
          name: X-Idempotency
          schema:
            description: "Idempotency key of the recovery: 1 to 255 bytes of UTF-8. The route refuses a request without it, or with a blank, longer or non-UTF-8 one (LENDER-0976). X-Request-ID is never read as the key."
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RecordCreditLossRecoveryRequest"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreditLossRecoveryResponse"
          description: Created
          headers:
            X-Idempotency-Replayed:
              schema:
                description: "\"true\" when this response replays an earlier request with the same X-Idempotency key; absent on a first execution."
                type: string
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Record money a written-off borrower paid
      tags:
        - Loan Accounts
      x-mint:
        href: /en/reference/products/lender/record-money-a-written-off-borrower-paid
  /api/v1/br/loan-accounts/{id}/credit-loss-recoveries/{recoveryId}/reverse:
    post:
      description: "Gives a recovery back, once, in one transaction: the revenue it booked, the PIS/COFINS it booked on its taxed part exactly as booked, and the write-off control it released, all dated by the server on its business date, never by the money day. Only the newest standing recovery reverses (LENDER-0958), so the split of the others never changes; the way out of an out-of-order money day is to reverse the newest recovery and record both in order. A recovery that released control cannot reverse once the control left the books at the end of collection (LENDER-0959); one recorded after it gave back revenue and tax only. A recovery booked from the contract's held payment gives back to the held cash and puts that payment back in custody. The bank reference stays with the reversed recovery: sending it again replays that recovery, so recording the money again needs another reference. Keyed on X-Idempotency per recovery: the same key replays the reversal and moves nothing; another key on a reversed recovery is refused (LENDER-0957)."
      operationId: reverseCreditLossRecovery
      parameters:
        - description: Written-off direct-credit loan account.
          in: path
          name: id
          required: true
          schema:
            description: Written-off direct-credit loan account.
            format: uuid
            type: string
        - description: Recovery to give back.
          in: path
          name: recoveryId
          required: true
          schema:
            description: Recovery to give back.
            format: uuid
            type: string
        - description: "Idempotency key of the reversal: 1 to 255 bytes of UTF-8. The route refuses a request without it, or with a blank, longer or non-UTF-8 one (LENDER-0976). X-Request-ID is never read as the key."
          in: header
          name: X-Idempotency
          schema:
            description: "Idempotency key of the reversal: 1 to 255 bytes of UTF-8. The route refuses a request without it, or with a blank, longer or non-UTF-8 one (LENDER-0976). X-Request-ID is never read as the key."
            type: string
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreditLossRecoveryResponse"
          description: Created
          headers:
            X-Idempotency-Replayed:
              schema:
                description: "\"true\" when this response replays an earlier request with the same X-Idempotency key; absent on a first execution."
                type: string
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Reverse a recovery of a written-off contract
      tags:
        - Loan Accounts
      x-mint:
        href: /en/reference/products/lender/reverse-a-recovery-of-a-written-off-contract
  /api/v1/br/loan-accounts/{id}/payoff-refunds:
    post:
      description: "Records that the client paid the borrower, outside the Lender, part or all of what a settled or renegotiated contract owes back, and books it in the same transaction: Dr unapplied cash / Cr cash through the product's collection_refund rule. Redelivering the same X-Idempotency key replays the refund and moves nothing; the same key with another amount is refused."
      operationId: recordPayoffRefund
      parameters:
        - description: Settled or renegotiated loan account.
          in: path
          name: id
          required: true
          schema:
            description: Settled or renegotiated loan account.
            format: uuid
            type: string
        - description: "Idempotency key of the refund: 1 to 255 bytes of UTF-8. The route refuses a request without it, or with a blank, longer or non-UTF-8 one (LENDER-0917). X-Request-ID is never read as the key."
          in: header
          name: X-Idempotency
          schema:
            description: "Idempotency key of the refund: 1 to 255 bytes of UTF-8. The route refuses a request without it, or with a blank, longer or non-UTF-8 one (LENDER-0917). X-Request-ID is never read as the key."
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RecordPayoffRefundRequest"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayoffRefundResponse"
          description: Created
          headers:
            X-Idempotency-Replayed:
              schema:
                description: "\"true\" when this response replays an earlier request with the same X-Idempotency key; absent on a first execution."
                type: string
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Record a payoff refund
      tags:
        - Loan Accounts
      x-mint:
        href: /en/reference/products/lender/record-a-payoff-refund
  /api/v1/br/loan-accounts/{id}/payoff-statements/{quote_id}:
    get:
      operationId: getPayoffStatement
      parameters:
        - in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
        - in: path
          name: quote_id
          required: true
          schema:
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayoffStatementResponse"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Get payoff statement
      tags:
        - Loan Accounts
      x-mint:
        href: /en/reference/products/lender/get-payoff-statement
  /api/v1/br/loan-accounts/{id}/pdd-stage:
    get:
      description: Returns the current Brazilian PDD delinquency stage and accrual eligibility state.
      operationId: getLoanAccountPDDStage
      parameters:
        - description: Loan account identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan account identifier.
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PDDStageResponse"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Get loan account PDD stage
      tags:
        - Loan Accounts
      x-mint:
        href: /en/reference/products/lender/get-loan-account-pdd-stage
  /api/v1/br/loan-accounts/{id}/pdd-stage/transitions:
    post:
      description: "Records a PDD transition or cure and updates prospective accrual eligibility. A manual stage_2 or stage_3 holds as a floor: the nightly sweep may raise the stage but never lowers it below the floor until a problem-asset declaration under trigger pdd_manual_stage with characterizesProblemAsset false releases it; a manual stage_1 or cure releases it at once. The change is recorded as a pdd_manual_stage declaration beside the transition, so it joins the reassessment queue when the product version's horizon passes."
      operationId: applyLoanAccountPDDStageTransition
      parameters:
        - description: Loan account identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan account identifier.
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ApplyPDDStageTransitionHumaBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PDDStageResponse"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Apply loan account PDD stage transition
      tags:
        - Loan Accounts
      x-mint:
        href: /en/reference/products/lender/apply-loan-account-pdd-stage-transition
  /api/v1/br/loan-accounts/{id}/prepayment-quote:
    post:
      description: "Creates a time-limited, auditable prepayment quote with settlement and rebate breakdown. A full-settlement quote issues its payer a pix or boleto charge, so it is refused with 409 (LENDER-0375) while another full-settlement quote on the contract is neither accepted nor expired and its charge is neither cancelled nor refused. An outdated calculation does not release that charge. That refusal's problem document carries `liveQuoteId` and `liveQuoteExpiresAt`, the quote whose payoff statement to show instead; quote again under a new X-Idempotency once it ends. A quote valued on a São Paulo civil day before the contract's disbursement is refused with 422 (LENDER-0985). A payoff priced before the contract moved is refused with 409 (LENDER-0353 or 0354). The single-live rule applies across all payoff channels, including portability. A partial quote issues no charge, so the single-live rule never refuses it. It carries the borrower's `amortization` choice when supplied, and echoes it. A full-settlement quote waits up to five seconds on another write to the same contract or on a running month close, and is refused past it with 409 (LENDER-0370): retry it under the same X-Idempotency."
      operationId: createPrepaymentQuote
      parameters:
        - description: Loan account identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan account identifier.
            format: uuid
            type: string
        - description: "Canonical idempotency request ID. Required: a full-settlement quote issues a payment demand to the borrower, so without a key a retry cannot be told apart from a second demand."
          in: header
          name: X-Idempotency
          required: true
          schema:
            description: "Canonical idempotency request ID. Required: a full-settlement quote issues a payment demand to the borrower, so without a key a retry cannot be told apart from a second demand."
            type: string
      requestBody:
        content:
          application/json:
            schema:
              discriminator:
                mapping:
                  full_settlement: "#/components/schemas/FullSettlementPrepaymentQuoteRequest"
                  partial: "#/components/schemas/PartialPrepaymentQuoteRequest"
                propertyName: quoteType
              oneOf:
                - $ref: "#/components/schemas/PartialPrepaymentQuoteRequest"
                - $ref: "#/components/schemas/FullSettlementPrepaymentQuoteRequest"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PrepaymentQuoteResponse"
          description: Created
          headers:
            X-Idempotency-Replayed:
              description: "\"true\" when this response replays a request already executed under the same X-Idempotency, so nothing ran a second time and no money moved again. Absent on a first execution."
              schema:
                type: string
        "400":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: "The at-most-once contract refused the request before any handler ran: no X-Idempotency header (IDEMPOTENCY_KEY_REQUIRED), a key under a spelling this service does not read (IDEMPOTENCY_KEY_HEADER_UNKNOWN), or a request that could not be scoped to a tenant (IDEMPOTENCY_TENANT_REQUIRED). The code is in the problem document's `code` member."
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Create prepayment quote
      tags:
        - Loan Accounts
      x-mint:
        href: /en/reference/products/lender/create-prepayment-quote
  /api/v1/br/loan-accounts/{id}/prepayments:
    post:
      description: "BR-aliased path for prepaying a loan account. Resolves to the same handler as the core endpoint, with the jurisdiction resolver inserted into the chain. BR accounts require quoteId; when amount is also provided, it must equal the quote's net settlement amount, or the request yields 422 (LENDER-0351). Idempotency is enforced by the lib-commons idempotency middleware via the X-Idempotency header; a reused key with different facts yields 422 (IDEMPOTENCY_KEY_REUSE). A quote this contract does not hold yields 404 (LENDER-0350); a malformed UUID or an invalid amount yields 422. Deduplication is by key ALONE, and the one-shot quote bounds it: a new key carrying an already-accepted quoteId is refused with 409 (LENDER-0355) and writes nothing, while a new key carrying a new quote is a newly priced settlement and is meant to book. A retry of the same request after the contract closed answers 201 with the version it wrote. A partial whose money is dated before a payment no reversal undid (a reversed due-day settlement still counts), a prepayment or a reschedule the contract holds, on an earlier São Paulo day or at an earlier instant, is refused with 409 (LENDER-0302) and writes nothing. Money dated on a São Paulo civil day after today is refused with 422 (LENDER-0395) and writes nothing; a later hour of today is accepted. A quote accepted with money dated on a São Paulo civil day before the contract's disbursement is refused with 422 (LENDER-0985) and writes nothing. A partial quote settled while a full-settlement quote on the contract is still payable is refused with 409 (LENDER-0375) and writes nothing; liveQuoteId and liveQuoteExpiresAt name that quote."
      operationId: prepayLoanAccountBR
      parameters:
        - description: Loan account identifier (UUID).
          in: path
          name: id
          required: true
          schema:
            description: Loan account identifier (UUID).
            examples:
              - 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
        - description: Canonical idempotency request ID. Enforced by the lib-commons idempotency middleware.
          in: header
          name: X-Idempotency
          required: true
          schema:
            description: Canonical idempotency request ID. Enforced by the lib-commons idempotency middleware.
            examples:
              - 550e8400-e29b-41d4-a716-446655440011
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PrepayLoanAccountHumaRequest"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ScheduleVersionCommandHumaBody"
          description: Created
          headers:
            X-Idempotency-Replayed:
              description: "\"true\" when this response replays a request already executed under the same X-Idempotency, so nothing ran a second time and no money moved again. Absent on a first execution."
              schema:
                type: string
        "400":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: "The at-most-once contract refused the request before any handler ran: no X-Idempotency header (IDEMPOTENCY_KEY_REQUIRED), a key under a spelling this service does not read (IDEMPOTENCY_KEY_HEADER_UNKNOWN), or a request that could not be scoped to a tenant (IDEMPOTENCY_TENANT_REQUIRED). The code is in the problem document's `code` member."
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Prepay loan account (BR alias)
      tags:
        - Loan Accounts
      x-mint:
        href: /en/reference/products/lender/prepay-loan-account-br
  /api/v1/br/loan-accounts/{id}/problem-asset-assessments:
    get:
      description: "Returns the contract's qualitative problem-asset declarations, newest first: what was invoked, by whom, on what evidence, and whether it characterised the asset. Withdrawals appear beside the characterisations they withdraw."
      operationId: listLoanAccountProblemAssetAssessments
      parameters:
        - description: Loan account (contract) identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan account (contract) identifier.
            format: uuid
            type: string
        - description: Maximum declarations to return, newest first. Defaults to 50.
          explode: false
          in: query
          name: limit
          schema:
            description: Maximum declarations to return, newest first. Defaults to 50.
            format: int64
            maximum: 200
            minimum: 1
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemAssetAssessmentHistoryResponse"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: List qualitative problem-asset assessments
      tags:
        - Problem Asset Assessments
      x-mint:
        href: /en/reference/products/lender/list-qualitative-problem-asset-assessments
    post:
      description: "Records an operator's declaration that a contract is, or is not, a problem asset for a qualitative reason under Res. CMN 4.966 art. 3 paragraphs 1 and 2 — the situations that characterise an asset as problematic with no arrears at all. The declaration carries a MANDATORY evidence reference and is immutable: a prior characterisation is withdrawn by declaring the same trigger again with characterizesProblemAsset false and its own evidence, never by deleting. The nightly stage sweep reads the live declarations."
      operationId: declareLoanAccountProblemAssetAssessment
      parameters:
        - description: Loan account (contract) identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan account (contract) identifier.
            format: uuid
            type: string
        - description: "Canonical idempotency request ID. Required: a declaration changes what the contract is provisioned at, so without a key a retry cannot be told apart from a second characterisation."
          in: header
          name: X-Idempotency
          required: true
          schema:
            description: "Canonical idempotency request ID. Required: a declaration changes what the contract is provisioned at, so without a key a retry cannot be told apart from a second characterisation."
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DeclareProblemAssetAssessmentHumaBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemAssetAssessmentResponse"
          description: Created
          headers:
            X-Idempotency-Replayed:
              description: "\"true\" when this response replays a request already executed under the same X-Idempotency, so nothing ran a second time and no money moved again. Absent on a first execution."
              schema:
                type: string
        "400":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: "The at-most-once contract refused the request before any handler ran: no X-Idempotency header (IDEMPOTENCY_KEY_REQUIRED), a key under a spelling this service does not read (IDEMPOTENCY_KEY_HEADER_UNKNOWN), or a request that could not be scoped to a tenant (IDEMPOTENCY_TENANT_REQUIRED). The code is in the problem document's `code` member."
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Declare a qualitative problem-asset assessment
      tags:
        - Problem Asset Assessments
      x-mint:
        href: /en/reference/products/lender/declare-a-qualitative-problem-asset-assessment
  /api/v1/br/loan-accounts/{id}/write-off:
    get:
      description: Answers the write-off of a contract with the debt frozen at it, the total recovered, the debt still standing, the control still open and the latest 100 recoveries, newest first. A contract never written off is refused (LENDER-0977). It also shows when the client operator declared collection ended and the business day the control left the books.
      operationId: getCreditLossWriteOff
      parameters:
        - description: Written-off direct-credit loan account.
          in: path
          name: id
          required: true
          schema:
            description: Written-off direct-credit loan account.
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreditLossWriteOffStandingResponse"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Read a contract's write-off and its recoveries
      tags:
        - Loan Accounts
      x-mint:
        href: /en/reference/products/lender/read-a-contracts-write-off-and-its-recoveries
  /api/v1/br/loan-accounts/{id}/write-off/collection-end:
    post:
      description: "Records that the client operator exhausted the collection of a written-off contract (Res. CMN 4.966 art. 49 par. 1). The write-off's control leaves the books once, the day a daily job finds both this declaration and 5 full years since the write-off (the later of the two): it releases the control left, W less every release a recovery made. Without the declaration the control stays open after 5 years. The declaration is made once: the same X-Idempotency key replays it and moves nothing; another key is refused (LENDER-0981). A contract never written off is refused (LENDER-0977). Recoveries stay open after the exit and are split at W as before."
      operationId: endCreditLossCollection
      parameters:
        - description: Written-off direct-credit loan account.
          in: path
          name: id
          required: true
          schema:
            description: Written-off direct-credit loan account.
            format: uuid
            type: string
        - description: "Idempotency key of the declaration: 1 to 255 bytes of UTF-8. The route refuses a request without it, or with a blank, longer or non-UTF-8 one (LENDER-0965). X-Request-ID is never read as the key."
          in: header
          name: X-Idempotency
          schema:
            description: "Idempotency key of the declaration: 1 to 255 bytes of UTF-8. The route refuses a request without it, or with a blank, longer or non-UTF-8 one (LENDER-0965). X-Request-ID is never read as the key."
            type: string
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreditLossCollectionEndResponse"
          description: Created
          headers:
            X-Idempotency-Replayed:
              schema:
                description: "\"true\" when this response replays an earlier request with the same X-Idempotency key; absent on a first execution."
                type: string
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Declare that collection of a written-off contract ended
      tags:
        - Loan Accounts
      x-mint:
        href: /en/reference/products/lender/declare-that-collection-of-a-written-off-contract-ended
  /api/v1/br/loan-accounts/{id}/write-offs:
    post:
      description: "Writes a direct-credit contract off as a credit loss (Res. CMN 4.966 art. 49) in one transaction. The held cash first pays the debt as a receipt; the entry then clears the contract's book as the ledger holds it against rendas a apropriar for the withheld interest and the provision allowance B, booking W - B to provision expense or B - W to provision reversal, and the contract leaves the book as written off. The write-off is irreversible: money recovered later is a recovery, recorded at POST /api/v1/br/loan-accounts/{id}/credit-loss-recoveries. A contract with nothing to write off is refused (LENDER-0969): when the held cash pays all a receipt reaches and some is left, run the full payoff, which discounts it; when the book carries no loss, the detail names the deferred fee or adjustment to wait out when amortizing it would leave a loss. A consignado contract is refused unless the payroll rail recorded an exit that excluded it (death, fraud, court order): then the same write-off closes it, and the exit case on the operator desk is closed in the same transaction, once no collection payment held for the contract waits to be reapplied (LENDER-0983). A substitution exit (the debt moved to another bank) and a contract a cession still holds stay refused. The write-off is keyed on X-Idempotency alone; redelivering the same key with the same reason replays the write-off and moves nothing; the same key with another reason is refused."
      operationId: recordCreditLossWriteOff
      parameters:
        - description: Direct-credit loan account to write off.
          in: path
          name: id
          required: true
          schema:
            description: Direct-credit loan account to write off.
            format: uuid
            type: string
        - description: "Idempotency key of the write-off: 1 to 255 bytes of UTF-8. The route refuses a request without it, or with a blank, longer or non-UTF-8 one (LENDER-0965). X-Request-ID is never read as the key."
          in: header
          name: X-Idempotency
          schema:
            description: "Idempotency key of the write-off: 1 to 255 bytes of UTF-8. The route refuses a request without it, or with a blank, longer or non-UTF-8 one (LENDER-0965). X-Request-ID is never read as the key."
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RecordCreditLossWriteOffRequest"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreditLossWriteOffResponse"
          description: Created
          headers:
            X-Idempotency-Replayed:
              schema:
                description: "\"true\" when this response replays an earlier request with the same X-Idempotency key; absent on a first execution."
                type: string
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Write a contract off as a credit loss
      tags:
        - Loan Accounts
      x-mint:
        href: /en/reference/products/lender/write-a-contract-off-as-a-credit-loss
  /api/v1/br/loan-applications/{id}/b3-registration:
    get:
      description: Returns the B3 registration the client informed for this loan application.
      operationId: getLoanApplicationB3Registration
      parameters:
        - description: Loan application identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan application identifier.
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/B3RegistrationHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Get the B3 registration of a loan application
      tags:
        - Loan Applications
      x-mint:
        href: /en/reference/products/lender/get-the-b3-registration-of-a-loan-application
    put:
      description: "Records the instrument code (Código IF) B3 assigned when the client registered this contract, with the registration date and the CCB number when informed. The Lender stores it and commands nothing at B3. An approved or disbursed direct-credit contract takes it; a payroll-gateway contract informs it at the gateway (409 LENDER-0972). It is written once: the same values answer the stored registration with X-Idempotency-Replayed: true, and any other value, a field the first call left out included, is refused with 409 LENDER-0973 and writes nothing."
      operationId: recordLoanApplicationB3Registration
      parameters:
        - description: Loan application identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan application identifier.
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RecordB3RegistrationBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/B3RegistrationHumaBody"
          description: OK
          headers:
            X-Idempotency-Replayed:
              schema:
                description: Set to "true" when the same values were already recorded and this response replays them; absent on the first write.
                type: string
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Record the B3 registration of a loan application
      tags:
        - Loan Applications
      x-mint:
        href: /en/reference/products/lender/record-the-b3-registration-of-a-loan-application
  /api/v1/br/loan-applications/{id}/capitalization-consents:
    post:
      description: Hashes clause text server-side and stores an append-only consent artifact for BR-profile disbursement guards.
      operationId: ingestCapitalizationClauseConsent
      parameters:
        - description: Loan application identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan application identifier.
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/IngestCapitalizationConsentBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CapitalizationClauseConsentArtifactResponse"
          description: Created
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Ingest BR capitalization clause consent
      tags:
        - Loan Applications
      x-mint:
        href: /en/reference/products/lender/ingest-capitalization-clause-consent
  /api/v1/br/loan-product-versions/{id}/norm-classification:
    get:
      description: Returns the carteira (Res. BCB 352/2023 art. 81) the Brazilian product version declares and the modality the norm keys a rate on beyond it (consignado), absent when none is declared yet.
      operationId: getLoanProductVersionNormClassification
      parameters:
        - description: Loan product version identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan product version identifier.
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeclareNormClassificationResponse"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Get the BR norm classification of a loan product version
      tags:
        - Loan Products
      x-mint:
        href: /en/reference/products/lender/get-the-br-norm-classification-of-a-loan-product-version
    put:
      description: "Records the carteira (Res. BCB 352/2023 art. 81) the credit booked under this product version belongs to, and optionally the modality the norm keys a rate on beyond it. Works on a version that is already active: the contracts booked on it were always in that carteira under the norm, the system simply could not name it, and until it is declared the provision engine counts and names every contract it cannot price rather than measuring it at zero. There is no automatic backfill, because guessing a carteira is guessing how much capital the institution must hold. A version may be declared ONCE: a second call is refused with 409 naming the carteira on the record, because replacing one reprices every contract ever booked under the version and posts the difference against results in a single movement. Changing a carteira means creating a new product version."
      operationId: declareLoanProductVersionNormClassification
      parameters:
        - description: Loan product version identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan product version identifier.
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DeclareNormClassificationBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeclareNormClassificationResponse"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Declare the BR norm classification of a loan product version
      tags:
        - Loan Products
      x-mint:
        href: /en/reference/products/lender/declare-the-br-norm-classification-of-a-loan-product-version
  /api/v1/br/loan-product-versions/{id}/problem-asset-reassessment-horizon:
    put:
      description: "Records how long a qualitative problem-asset characterisation (Res. CMN 4.966 art. 3 paragraphs 1 and 2) may stand on a contract of this version before somebody must look at the evidence again. Such a characterisation never expires on its own: declared once it stands until a second declaration withdraws it, so a judicial reorganisation declared in 2026 can keep a contract provisioned and income-suspended in 2029 on evidence nobody has re-read. Passing the horizon RELEASES NOTHING — the stage, the provision and the income-recognition decision continue exactly as they were, because a review nobody performed is not evidence that a borrower recovered. What it does is put the contract on a review worklist and publish a fact, once per contract per business date, until somebody declares again with either verdict. The call is idempotent and replaces whatever was set: this is an operating policy, not a regulatory classification. Omit the field to clear the horizon; existing versions that never set one are unaffected."
      operationId: setLoanProductVersionProblemAssetReassessmentHorizon
      parameters:
        - description: Loan product version identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan product version identifier.
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SetProblemAssetReassessmentHorizonBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SetProblemAssetReassessmentHorizonResponse"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Set the problem-asset re-assessment horizon of a loan product version
      tags:
        - Loan Products
      x-mint:
        href: /en/reference/products/lender/set-the-problem-asset-re-assessment-horizon-of-a-loan-product-version
  /api/v1/br/loan-product-versions/{id}/scr-modality:
    get:
      description: Returns the SCR 3040 modality (Anexo 3) the Brazilian product version declares, absent when none is declared yet.
      operationId: getLoanProductVersionScrModality
      parameters:
        - description: Loan product version identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan product version identifier.
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ScrModalityResponse"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Get the SCR 3040 modality of a loan product version
      tags:
        - Loan Products
      x-mint:
        href: /en/reference/products/lender/get-the-scr-3040-modality-of-a-loan-product-version
    put:
      description: "Records the SCR 3040 modality (Anexo 3, attribute Mod) every contract of this Brazilian product version is reported under. A version created without one receives it here, once. Declaring the modality the version already holds succeeds again, so a retry is safe. A DIFFERENT modality is refused with 409 LENDER-0421: it would reclassify every contract already reported, and the correction is a new product version."
      operationId: declareLoanProductVersionScrModality
      parameters:
        - description: Loan product version identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan product version identifier.
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DeclareScrModalityBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ScrModalityResponse"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Declare the SCR 3040 modality of a loan product version
      tags:
        - Loan Products
      x-mint:
        href: /en/reference/products/lender/declare-the-scr-3040-modality-of-a-loan-product-version
  /api/v1/br/loan-product-versions/{id}/tax-regimes:
    get:
      description: Returns the Brazilian product version's own tax regime and the regimes a loan application may declare on it.
      operationId: getLoanProductVersionTaxRegimes
      parameters:
        - description: Loan product version identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan product version identifier.
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaxRegimesResponse"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Get the tax regimes a loan product version admits
      tags:
        - Loan Products
      x-mint:
        href: /en/reference/products/lender/get-the-tax-regimes-a-loan-product-version-admits
  /api/v1/br/loan-products:
    get:
      description: BR-aliased path for listing loan products. Resolves to the same handler as the core endpoint.
      operationId: listLoanProductsBR
      parameters:
        - description: Page size.
          explode: false
          in: query
          name: limit
          schema:
            default: 25
            description: Page size.
            format: int64
            maximum: 100
            minimum: 1
            type: integer
        - description: Page offset.
          explode: false
          in: query
          name: offset
          schema:
            default: 0
            description: Page offset.
            format: int64
            maximum: 10000
            minimum: 0
            type: integer
        - description: false lists every product except archived ones; true lists only archived ones.
          explode: false
          in: query
          name: archived
          schema:
            default: false
            description: false lists every product except archived ones; true lists only archived ones.
            type: boolean
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LoanProductListHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: List loan products (BR alias)
      tags:
        - LoanProducts
      x-mint:
        href: /en/reference/products/lender/list-loan-products-br
    post:
      description: BR-aliased path for creating a loan product. Resolves to the same handler as the core endpoint.
      operationId: createLoanProductBR
      parameters:
        - description: "Optional; only this spelling is read. After a success, a resend under the same key and body replays the first answer (X-Idempotency-Replayed: true) instead of creating a second product; while the first is running it gets 409, and after a server error the key is spent. The same key with another body is refused. Without it nothing is deduplicated."
          in: header
          name: X-Idempotency
          schema:
            description: "Optional; only this spelling is read. After a success, a resend under the same key and body replays the first answer (X-Idempotency-Replayed: true) instead of creating a second product; while the first is running it gets 409, and after a server error the key is spent. The same key with another body is refused. Without it nothing is deduplicated."
            examples:
              - 550e8400-e29b-41d4-a716-446655440004
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateLoanProductHumaRequest"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LoanProductHumaBody"
          description: Created
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Create loan product (BR alias)
      tags:
        - LoanProducts
      x-mint:
        href: /en/reference/products/lender/create-loan-product-br
  /api/v1/br/loan-products/{id}:
    get:
      description: BR-aliased path for retrieving a loan product. Resolves to the same handler as the core endpoint.
      operationId: getLoanProductBR
      parameters:
        - description: Loan product identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan product identifier.
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LoanProductHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Get loan product (BR alias)
      tags:
        - LoanProducts
      x-mint:
        href: /en/reference/products/lender/get-loan-product-br
  /api/v1/br/loan-products/{id}/activate:
    post:
      description: BR-aliased path for activating a loan product. Resolves to the same handler as the core endpoint.
      operationId: activateLoanProductBR
      parameters:
        - description: Loan product identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan product identifier.
            examples:
              - 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ActivateLoanProductHumaInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LoanProductHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Activate loan product (BR alias)
      tags:
        - LoanProducts
      x-mint:
        href: /en/reference/products/lender/activate-loan-product-br
  /api/v1/br/loan-products/{id}/promote:
    post:
      description: BR-aliased path for promoting a loan product version. Resolves to the same handler as the core endpoint.
      operationId: promoteLoanProductVersionBR
      parameters:
        - description: Loan product identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan product identifier.
            examples:
              - 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PromoteLoanProductVersionHumaInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LoanProductHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Promote a loan product version to current (BR alias)
      tags:
        - LoanProducts
      x-mint:
        href: /en/reference/products/lender/promote-a-loan-product-version-to-current-br-alias
  /api/v1/br/loan-products/{id}/versions:
    post:
      description: BR-aliased path for creating a loan product version. Resolves to the same handler as the core endpoint.
      operationId: createLoanProductVersionBR
      parameters:
        - description: Loan product identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan product identifier.
            format: uuid
            type: string
        - description: "Optional; only this spelling is read. After a success, a resend under the same key and body replays the first answer (X-Idempotency-Replayed: true) instead of creating a second version; while the first is running it gets 409, and after a server error the key is spent. The same key with another body is refused. Without it nothing is deduplicated."
          in: header
          name: X-Idempotency
          schema:
            description: "Optional; only this spelling is read. After a success, a resend under the same key and body replays the first answer (X-Idempotency-Replayed: true) instead of creating a second version; while the first is running it gets 409, and after a server error the key is spent. The same key with another body is refused. Without it nothing is deduplicated."
            examples:
              - 550e8400-e29b-41d4-a716-446655440004
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateLoanProductVersionHumaInputBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LoanProductVersionHumaBody"
          description: Created
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Create loan product version (BR alias)
      tags:
        - LoanProducts
      x-mint:
        href: /en/reference/products/lender/create-loan-product-version-br
  /api/v1/br/partner/loan-products/{loanProductId}/tax/preview:
    post:
      description: Answers as POST /api/v1/br/tax/preview to a partner credential bound to the loan product. A loanProductVersionId that is not a version of that product is answered 404, as an unknown product is.
      operationId: previewPartnerTax
      parameters:
        - description: Loan product the quote is for. A loanProductVersionId in the body must be one of its versions.
          in: path
          name: loanProductId
          required: true
          schema:
            description: Loan product the quote is for. A loanProductVersionId in the body must be one of its versions.
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TaxPreviewHumaBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaxPreviewEnvelopeResponse"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Preview jurisdiction tax amounts (partner)
      tags:
        - Tax
      x-mint:
        href: /en/reference/products/lender/preview-jurisdiction-tax-amounts-partner
  /api/v1/br/payoff-refunds-due:
    get:
      description: "Settled or renegotiated contracts that still owe the borrower money back: the held cash left on the contract, whatever ended it (a payoff, a refinance payoff, a guarantee recovery, a payroll terminal settlement, a payment above the last instalment or a due date paid from held cash), including the interest paid for days after the exit; a guarantee recovery's overage is not listed. A contract leaves the list once refunds recorded on it add up to what it owes. A caller without the book:read permission sees only the contracts assigned to them."
      operationId: listPayoffRefundsDue
      parameters:
        - description: Page size.
          explode: false
          in: query
          name: limit
          schema:
            default: 25
            description: Page size.
            format: int64
            maximum: 100
            minimum: 1
            type: integer
        - description: Page offset.
          explode: false
          in: query
          name: offset
          schema:
            default: 0
            description: Page offset.
            format: int64
            maximum: 10000
            minimum: 0
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayoffRefundsDueListResponse"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: List payoff refunds due
      tags:
        - Loan Accounts
      x-mint:
        href: /en/reference/products/lender/list-payoff-refunds-due
  /api/v1/br/pdd-stage-ladders:
    post:
      description: "Publishes a new dated delinquency-stage policy for this tenant, re-tuning the bands without a release. The effective date must be in the future: a ladder never re-answers a business date that has already been staged, and a published version is immutable."
      operationId: publishPDDStageLadder
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PublishPDDStageLadderHumaBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PDDStageLadderResponse"
          description: Created
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Publish a PDD stage ladder version
      tags:
        - PDD Stage Ladder
      x-mint:
        href: /en/reference/products/lender/publish-a-pdd-stage-ladder-version
  /api/v1/br/pdd-stage-ladders/in-force:
    get:
      description: "Returns the dated delinquency-stage policy deciding the requested business date for this tenant: the version identifier every automated stage transition records, and its carteira x days-overdue x regime bands. Whatever the bands say, a stage_2 or stage_3 contract stays at stage_2 or above while any day is overdue (Res. CMN 4.966 art. 3 par. 4 I), and its transition reason says so."
      operationId: getPDDStageLadderInForce
      parameters:
        - description: Business date to resolve the ladder for (YYYY-MM-DD). Defaults to today.
          explode: false
          in: query
          name: asOf
          schema:
            description: Business date to resolve the ladder for (YYYY-MM-DD). Defaults to today.
            examples:
              - "2026-09-17"
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PDDStageLadderResponse"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Get the PDD stage ladder in force
      tags:
        - PDD Stage Ladder
      x-mint:
        href: /en/reference/products/lender/get-the-pdd-stage-ladder-in-force
  /api/v1/br/problem-asset-reassessment-overdue:
    get:
      description: "Returns the contracts whose standing qualitative problem-asset characterisation (Res. CMN 4.966 art. 3 paragraphs 1 and 2) has outlived the re-assessment horizon their product version declares, with no newer declaration of any verdict behind it. It is a WORKLIST and not a verdict: every contract listed keeps exactly the stage, provision and income-recognition decision it already had, because a review nobody performed is not evidence that a borrower recovered. A contract leaves the list when somebody declares again — either verdict, because either one means a person read the evidence. Rows are kept per business date so a past day can be answered as it stood; omit businessDate to read the latest."
      operationId: listProblemAssetReassessmentOverdue
      parameters:
        - description: Business date to read (YYYY-MM-DD). Omitted, the newest day a sweep finished is returned, which is what a console opening the screen wants. A day no completed sweep covers is refused rather than answered with its partial rows.
          explode: false
          in: query
          name: businessDate
          schema:
            description: Business date to read (YYYY-MM-DD). Omitted, the newest day a sweep finished is returned, which is what a console opening the screen wants. A day no completed sweep covers is refused rather than answered with its partial rows.
            examples:
              - "2026-09-20"
            type: string
        - description: Maximum contracts to return. Defaults to 100.
          explode: false
          in: query
          name: limit
          schema:
            description: Maximum contracts to return. Defaults to 100.
            format: int64
            maximum: 500
            minimum: 1
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemAssetReassessmentOverdueListResponse"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: List contracts overdue for problem-asset re-assessment
      tags:
        - Problem Asset Assessments
      x-mint:
        href: /en/reference/products/lender/list-contracts-overdue-for-problem-asset-re-assessment
  /api/v1/br/tax/iof-rates:
    get:
      description: Returns the IOF alíquotas a disbursement made now withholds at, per borrower kind, with who priced them and on what legal basis.
      operationId: getIOFRates
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IOFRatesHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Read the tenant's IOF rates
      tags:
        - Tax
      x-mint:
        href: /en/reference/products/lender/read-the-tenants-iof-rates
  /api/v1/br/tax/iof-rates/{borrowerKind}:
    put:
      description: Makes these alíquotas the kind's IOF for every disbursement from now on, as a new version of the tenant's rate table; every other kind keeps its rates. A disbursement already made keeps the version it withheld at. The deployment ships pessoaFisica priced and pessoaJuridica and simplesNacional unpriced (LENDER-0233 at disbursement, LENDER-0900 at the tax preview).
      operationId: putIOFRate
      parameters:
        - description: "The rate-table key a disbursement reads: the borrower kind, or simplesNacional for a pessoa jurídica under the Simples Nacional regime whose operation is R$ 30.000,00 or less (Decreto 6.306/2007, art. 7, VI)."
          in: path
          name: borrowerKind
          required: true
          schema:
            description: "The rate-table key a disbursement reads: the borrower kind, or simplesNacional for a pessoa jurídica under the Simples Nacional regime whose operation is R$ 30.000,00 or less (Decreto 6.306/2007, art. 7, VI)."
            enum:
              - pessoaFisica
              - pessoaJuridica
              - simplesNacional
            examples:
              - pessoaJuridica
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PutIOFRateHumaInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IOFRatesHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Price the tenant's IOF for one borrower kind
      tags:
        - Tax
      x-mint:
        href: /en/reference/products/lender/price-the-tenants-iof-for-one-borrower-kind
  /api/v1/br/tax/preview:
    post:
      description: Computes disbursement IOF tax amounts using the active compiled jurisdiction profile without persisting data.
      operationId: previewTax
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TaxPreviewHumaBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaxPreviewEnvelopeResponse"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Preview jurisdiction tax amounts
      tags:
        - Tax
      x-mint:
        href: /en/reference/products/lender/preview-tax
  /api/v1/business-date:
    get:
      description: The date every "today" decision of the tenant reads, and the business instant inside it.
      operationId: getBusinessDate
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BusinessDateBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Get the tenant's business date
      tags:
        - Business Date
      x-mint:
        href: /en/reference/products/lender/get-the-tenants-business-date
  /api/v1/business-date/advance:
    post:
      description: "Sandbox and homologação only (BUSINESS_DATE_ENABLED). Closes each day after the business date through the target, in order, running the nightly chain on each. The first advance pins the tenant at today in São Paulo and closes it. Where a ledger relay is configured, a day closes only once its postings reached the ledger. 409 LENDER-0804, 503 LENDER-0805 and 503 LENDER-0808: resend the same target."
      operationId: advanceBusinessDate
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BusinessDateAdvanceRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BusinessDateAdvanceBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Advance the tenant's business date
      tags:
        - Business Date
      x-mint:
        href: /en/reference/products/lender/advance-the-tenants-business-date
  /api/v1/dashboard/delinquent-loans:
    get:
      description: Returns delinquent loan drill-down rows for a bucket at a requested business date. The freshness anchor is book-wide, so the same unmeasured business date that refuses the metrics refuses this register too, with 503.
      operationId: listDelinquentLoans
      parameters:
        - description: Business date (YYYY-MM-DD); defaults to the current business day in Brazil (UTC-3).
          explode: false
          in: query
          name: asOf
          schema:
            description: Business date (YYYY-MM-DD); defaults to the current business day in Brazil (UTC-3).
            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
        - description: Narrow to one loan officer's book. Free-form authenticated identity subject, not necessarily a UUID, at most 255 characters; a system-originated contract carries the empty officer.
          explode: false
          in: query
          name: assignedOfficerId
          schema:
            description: Narrow to one loan officer's book. Free-form authenticated identity subject, not necessarily a UUID, at most 255 characters; a system-originated contract carries the empty officer.
            examples:
              - officer-xyz
            maxLength: 255
            type: string
        - description: Page size.
          explode: false
          in: query
          name: limit
          schema:
            default: 25
            description: Page size.
            examples:
              - 25
            format: int64
            maximum: 100
            minimum: 1
            type: integer
        - description: Page offset.
          explode: false
          in: query
          name: offset
          schema:
            default: 0
            description: Page offset.
            examples:
              - 0
            format: int64
            maximum: 10000
            minimum: 0
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DelinquentLoansHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: List delinquent loans
      tags:
        - Dashboard
      x-mint:
        href: /en/reference/products/lender/list-delinquent-loans
  /api/v1/dashboard/portfolio:
    get:
      description: "Returns portfolio-level risk, delinquency, and freshness metrics for the requested business date. A business date the snapshot producer has not measured is refused with 503, never answered with a zeroed page: the caller should retry, not conclude the book is empty."
      operationId: getPortfolioDashboard
      parameters:
        - description: Business date (YYYY-MM-DD); defaults to the current business day in Brazil (UTC-3).
          explode: false
          in: query
          name: asOf
          schema:
            description: Business date (YYYY-MM-DD); defaults to the current business day in Brazil (UTC-3).
            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
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Get portfolio dashboard
      tags:
        - Dashboard
      x-mint:
        href: /en/reference/products/lender/get-portfolio-dashboard
  /api/v1/internal/accounting/parked-postings:
    get:
      description: Lists the tenant's accounting postings the outbox quarantined after exhausting its attempts and Midaz has not answered for, parked longest first, at most 100. Each line names the contract, the posting, its amount, fact date, attempts and last error, and the posting key to look up in Midaz.
      operationId: listParkedPostings
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ParkedPostingsOutputBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: List the postings stalled before Midaz
      tags:
        - Accounting
      x-mint:
        href: /en/reference/products/lender/list-the-postings-stalled-before-midaz
  /api/v1/internal/accounting/parked-postings/{eventId}/release:
    post:
      description: Re-runs the parked posting through the ledger relay, which asks Midaz first. If Midaz holds it, the receipt is written and nothing is sent. If it does not and the lender's record shows the posting was sent long ago, the call is refused (LENDER-0457) until the operator looks the posting key up in Midaz and repeats it with midazTransactionId, when Midaz holds the transaction (the receipt is written from it, nothing is sent), or with ledgerCheckedAbsentSentAt set to the case's lastSentAt, when it holds nothing (that stale record is deleted and the posting is sent once; a record written after the check is never deleted). A midazTransactionId that is not this posting's is refused (LENDER-0463). If Midaz still refuses, the case stays open (LENDER-0458); if it gives no answer, repeat the release (LENDER-0462). A posting that is not parked answers released false. The attempt is written to the contract's audit history before anything is done.
      operationId: releaseParkedPosting
      parameters:
        - description: Outbox event id of the parked posting, from the case list.
          in: path
          name: eventId
          required: true
          schema:
            description: Outbox event id of the parked posting, from the case list.
            examples:
              - 550e8400-e29b-41d4-a716-446655440003
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ReleaseParkedPostingHumaBody"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ReleaseParkedPostingOutputBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Release a stalled posting
      tags:
        - Accounting
      x-mint:
        href: /en/reference/products/lender/release-a-stalled-posting
  /api/v1/internal/accounting/suspense-accounts/{currency}/{role}:
    get:
      description: Returns the GL account the validated tenant designated for one currency and role; 404 when none is configured, even when the Lender books the role into its default account.
      operationId: getSuspenseAccount
      parameters:
        - description: ISO 4217 code of the asset the account holds.
          in: path
          name: currency
          required: true
          schema:
            description: ISO 4217 code of the asset the account holds.
            examples:
              - BRL
            pattern: ^[A-Z]{3}$
            type: string
        - description: "suspense: the CCB's own residual, on either side. below: still owed to the borrower in a disbursement in parts (valores a liberar ao tomador). above: paid over the liberated amount (pago a maior). loss: the expense a disbursement excess the borrower keeps is written off to."
          in: path
          name: role
          required: true
          schema:
            description: "suspense: the CCB's own residual, on either side. below: still owed to the borrower in a disbursement in parts (valores a liberar ao tomador). above: paid over the liberated amount (pago a maior). loss: the expense a disbursement excess the borrower keeps is written off to."
            enum:
              - suspense
              - below
              - above
              - loss
            examples:
              - below
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SuspenseAccountHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Read the tenant's account for a currency and role
      tags:
        - Accounting
      x-mint:
        href: /en/reference/products/lender/read-the-tenants-account-for-a-currency-and-role
    put:
      description: "Creates or replaces the GL account the validated tenant designates for one currency and role. A disbursement in parts posts what is still owed to the borrower to `below` and what was paid over the liberated amount to `above`; an excess the borrower keeps is written off to `loss`; the CCB residual and the other compensating adjustments post to `suspense`. A contract keeps the account its first amount in a role was booked into, for every later part and adjustment in that role; a new account applies to contracts with none booked yet. A contract whose earlier amounts sit in more than one account resolves none: the adjustment create is then refused 422, nothing is recorded and the divergence stays adjustable. A designated account must already exist in the ledger; the Lender never creates or changes it, except one named exactly as its role's default, which is treated as the default and ensured by the Lender. `below` and `suspense` are credit-directed (deposit; `suspense` with overdraft enabled); `above` and `loss` are debit-directed (lender_debit, registered with defaultDirection debit before the account is created). When the Lender provisions ledger accounts, a BRL role with no designated account books into the Lender's default, which it creates in the posting's ledger with that direction: `suspense` -> `suspensao-brl` (credit, overdraft enabled), `below` -> `valores-a-liberar-brl` (credit), `above` -> `pago-a-maior-brl` (debit), `loss` -> `perdas-brl` (debit)."
      operationId: putSuspenseAccount
      parameters:
        - description: ISO 4217 code of the asset the account holds.
          in: path
          name: currency
          required: true
          schema:
            description: ISO 4217 code of the asset the account holds.
            examples:
              - BRL
            pattern: ^[A-Z]{3}$
            type: string
        - description: "suspense: the CCB's own residual, on either side. below: still owed to the borrower in a disbursement in parts (valores a liberar ao tomador). above: paid over the liberated amount (pago a maior). loss: the expense a disbursement excess the borrower keeps is written off to."
          in: path
          name: role
          required: true
          schema:
            description: "suspense: the CCB's own residual, on either side. below: still owed to the borrower in a disbursement in parts (valores a liberar ao tomador). above: paid over the liberated amount (pago a maior). loss: the expense a disbursement excess the borrower keeps is written off to."
            enum:
              - suspense
              - below
              - above
              - loss
            examples:
              - below
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PutSuspenseAccountHumaInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SuspenseAccountHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Designate the tenant's account for a currency and role
      tags:
        - Accounting
      x-mint:
        href: /en/reference/products/lender/designate-the-tenants-account-for-a-currency-and-role
  /api/v1/internal/br/consignado/collection-agent-channel:
    put:
      description: "Points this tenant at the collection agent it instructs, or switches the channel off. It is the act every other behaviour of the channel depends on: with no active agent, borrower collections stay PARKED in `requested` and are only counted. The agent name and account are stamped verbatim on every instruction and the Arquivo de Baixa Extraordinária quotes them back byte-exactly, so the shapes are refused here by name rather than by a database constraint. Each call writes `handlesWithdrawal`, false when absent; `active: false` parks issuance again WITHOUT deleting the identity an already issued instruction names. Because the identity travels in the SAME call as the on/off switch, a CHANGED name or account is refused with 409 while the current agent still has open instructions: it would abandon them, since the work queue matches the active channel byte-exactly against what each instrument was stamped with. Turn those instructions over first, then the switch goes through. Idempotent via the X-Idempotency header enforced by the platform middleware."
      operationId: appointConsignadoCollectionAgentChannel
      parameters:
        - description: "Canonical idempotency request ID. Required: this request moves money, and without a key a retry cannot be told apart from a second instruction."
          in: header
          name: X-Idempotency
          required: true
          schema:
            description: "Canonical idempotency request ID. Required: this request moves money, and without a key a retry cannot be told apart from a second instruction."
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CollectionAgentChannelAppointHumaInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CollectionAgentChannelHumaBody"
          description: OK
          headers:
            X-Idempotency-Replayed:
              description: "\"true\" when this response replays a request already executed under the same X-Idempotency, so nothing ran a second time and no money moved again. Absent on a first execution."
              schema:
                type: string
        "400":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: "The at-most-once contract refused the request before any handler ran: no X-Idempotency header (IDEMPOTENCY_KEY_REQUIRED), a key under a spelling this service does not read (IDEMPOTENCY_KEY_HEADER_UNKNOWN), or a request that could not be scoped to a tenant (IDEMPOTENCY_TENANT_REQUIRED). The code is in the problem document's `code` member."
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Appoint the tenant's extraordinary-collection agent
      tags:
        - Consignado
      x-mint:
        href: /en/reference/products/lender/appoint-the-tenant-s-extraordinary-collection-agent
  /api/v1/internal/br/consignado/collection-refunds:
    get:
      description: "Collected money the lender holds because the contract had nothing open to apply it to, oldest receipt first. The client's treasury returns it to the portador by Pix or TED and records that here; the payment then leaves the list. Hold reasons listed: direct_payment_overage, agent_declared_overage, inactive_loan, account_discharged_before_payoff."
      operationId: listConsignadoCollectionRefundsOwed
      parameters:
        - description: Page size.
          explode: false
          in: query
          name: limit
          schema:
            default: 25
            description: Page size.
            format: int64
            maximum: 100
            minimum: 1
            type: integer
        - description: Page offset.
          explode: false
          in: query
          name: offset
          schema:
            default: 0
            description: Page offset.
            format: int64
            maximum: 10000
            minimum: 0
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CollectionRefundOwedListHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: List collection payments owed back to the portador
      tags:
        - Consignado
      x-mint:
        href: /en/reference/products/lender/list-collection-payments-owed-back-to-the-portador
  /api/v1/internal/br/consignado/collection-refunds/{applicationId}/dispose:
    post:
      description: "Records that the client's treasury paid the portador back, outside the lender, the whole amount the payment holds, and books it in the same transaction: Dr unapplied cash / Cr cash through the product's collection_refund rule, dated at occurredAt. The payment closes as refunded and collection.payment.refunded is emitted. The recording actor is the caller's validated identity. The same reference again replays the recorded return while the payment is closed as refunded; while a recovery reversal holds a residual of it, that reference is refused with 409 LENDER-0998, as is any other reference on a returned payment. The residual is returned under a new reference. Idempotent via the X-Idempotency header enforced by the platform middleware."
      operationId: recordConsignadoCollectionTreasuryRefund
      parameters:
        - description: The held collection payment.
          in: path
          name: applicationId
          required: true
          schema:
            description: The held collection payment.
            format: uuid
            type: string
        - description: "Canonical idempotency request ID. Required: this request moves money, and without a key a retry cannot be told apart from a second instruction."
          in: header
          name: X-Idempotency
          required: true
          schema:
            description: "Canonical idempotency request ID. Required: this request moves money, and without a key a retry cannot be told apart from a second instruction."
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RecordCollectionTreasuryRefundHumaInputBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CollectionTreasuryRefundHumaBody"
          description: Created
          headers:
            X-Idempotency-Replayed:
              schema:
                description: "\"true\" when this payment was already returned under the same reference and nothing moved; absent on a first recording."
                type: string
        "400":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: "The at-most-once contract refused the request before any handler ran: no X-Idempotency header (IDEMPOTENCY_KEY_REQUIRED), a key under a spelling this service does not read (IDEMPOTENCY_KEY_HEADER_UNKNOWN), or a request that could not be scoped to a tenant (IDEMPOTENCY_TENANT_REQUIRED). The code is in the problem document's `code` member."
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Record that the client's treasury returned a held collection payment
      tags:
        - Consignado
      x-mint:
        href: /en/reference/products/lender/record-that-the-clients-treasury-returned-a-held-collection-payment
  /api/v1/internal/br/consignado/collection-settlements/quarantined:
    get:
      description: "Returns the baixa lines the lender could not act on, oldest parked first. Each one is money a borrower ALREADY paid to the client's collection agent and nobody has credited, so the ordering is the borrower who has waited longest. The `id` is what the requeue route takes: without this listing, releasing a parked line meant hand-written SQL against a production tenant schema."
      operationId: listConsignadoQuarantinedCollectionSettlements
      parameters:
        - description: Maximum parked lines to return. Defaults to 50.
          explode: false
          in: query
          name: limit
          schema:
            description: Maximum parked lines to return. Defaults to 50.
            format: int64
            maximum: 200
            minimum: 1
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CollectionSettlementQuarantineListHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: List quarantined extraordinary-collection settlement lines
      tags:
        - Consignado
      x-mint:
        href: /en/reference/products/lender/list-quarantined-extraordinary-collection-settlement-lines
  /api/v1/internal/br/consignado/compensating-adjustments:
    post:
      description: "Commits a new compensating adjustment operation, its opening history entry and the durable posting-intent outbox event, atomically; the posting intent is always recorded. When no single ledger account resolves for the contract's currency and role (configured, or the Lender's default when it provisions accounts), the create is refused 422, nothing is recorded and the divergence stays adjustable. Any reason but a disbursement clearing on a contract that never disbursed or was cancelled is refused 422 the same way. A disbursement clearing posts its reason's pair: disbursement_excess_recovered Dr cash / Cr above, disbursement_excess_loss Dr loss / Cr above, disbursement_remainder_paid_off_rail Dr below / Cr cash, disbursement_remainder_cancelled Dr below / Cr suspense. A refinance_payoff_vs_rail item clears by refinance_payoff_short_recovered Dr cash / Cr suspense, refinance_payoff_short_loss Dr loss / Cr suspense (the Lender payoff above the rail's) or refinance_payoff_excess_refunded Dr suspense / Cr cash (the rail's above the Lender's). A refinance_reversal_disbursed_change item (the change of a refinance the rail undid) accepts only disbursement_excess_recovered and disbursement_excess_loss, for exactly the item's amount. A refinance_troco_paid_over item (the troco the treasury paid the portador above the new contract's liberated value less the rail's valor_pago, booked on the above account as pago a maior) accepts the same two reasons, for exactly the item's amount. A 202 response means accepted durably, never posted: the ledger relay posts it separately. Idempotent via the X-Idempotency header enforced by the platform middleware."
      operationId: createConsignadoCompensatingAdjustment
      parameters:
        - description: Canonical idempotency request ID (lib-commons enforcer reads this). Reusing the same key on a retry returns the SAME durably accepted operation, never a duplicate.
          in: header
          name: X-Idempotency
          required: true
          schema:
            description: Canonical idempotency request ID (lib-commons enforcer reads this). Reusing the same key on a retry returns the SAME durably accepted operation, never a duplicate.
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CompensatingAdjustmentHumaRequest"
        required: true
      responses:
        "202":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompensatingAdjustmentHumaBody"
          description: Accepted
          headers:
            X-Idempotency-Replayed:
              description: "\"true\" when this response replays a request already executed under the same X-Idempotency, so nothing ran a second time and no money moved again. Absent on a first execution."
              schema:
                type: string
        "400":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: "The at-most-once contract refused the request before any handler ran: no X-Idempotency header (IDEMPOTENCY_KEY_REQUIRED), a key under a spelling this service does not read (IDEMPOTENCY_KEY_HEADER_UNKNOWN), or a request that could not be scoped to a tenant (IDEMPOTENCY_TENANT_REQUIRED). The code is in the problem document's `code` member."
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Create a consignado compensating adjustment
      tags:
        - Consignado
      x-mint:
        href: /en/reference/products/lender/create-consignado-compensating-adjustment
  /api/v1/internal/br/consignado/compensating-adjustments/preview:
    post:
      description: Validates a prospective compensating adjustment against the same domain invariants Create enforces and reports the eventual posting direction, with no database write, object storage call or outbox event.
      operationId: previewConsignadoCompensatingAdjustment
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CompensatingAdjustmentHumaRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PreviewCompensatingAdjustmentHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Preview a consignado compensating adjustment
      tags:
        - Consignado
      x-mint:
        href: /en/reference/products/lender/preview-consignado-compensating-adjustment
  /api/v1/internal/br/consignado/compensating-adjustments/{id}/evidence:
    post:
      description: Streams one operator-supplied evidence file (PDF, JPEG or PNG, up to 20 MiB) to the Lender's own object storage and persists its metadata. Without a configured object store, this fails closed. Idempotent via the X-Idempotency header enforced by the platform middleware; re-uploading the SAME bytes for the same operation is inert.
      operationId: attachConsignadoCompensatingAdjustmentEvidence
      parameters:
        - description: Compensating adjustment operation identifier.
          in: path
          name: id
          required: true
          schema:
            description: Compensating adjustment operation identifier.
            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/pdf:
            schema:
              contentMediaType: application/octet-stream
              format: binary
              type: string
          image/jpeg:
            schema:
              contentMediaType: application/octet-stream
              format: binary
              type: string
          image/png:
            schema:
              contentMediaType: application/octet-stream
              format: binary
              type: string
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompensatingAdjustmentEvidenceHumaBody"
          description: Created
          headers:
            X-Idempotency-Replayed:
              description: "\"true\" when this response replays a request already executed under the same X-Idempotency, so nothing ran a second time and no money moved again. Absent on a first execution."
              schema:
                type: string
        "400":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: "The at-most-once contract refused the request before any handler ran: no X-Idempotency header (IDEMPOTENCY_KEY_REQUIRED), a key under a spelling this service does not read (IDEMPOTENCY_KEY_HEADER_UNKNOWN), or a request that could not be scoped to a tenant (IDEMPOTENCY_TENANT_REQUIRED). The code is in the problem document's `code` member."
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Attach evidence to a consignado compensating adjustment
      tags:
        - Consignado
      x-mint:
        href: /en/reference/products/lender/attach-consignado-compensating-adjustment-evidence
  /api/v1/internal/br/consignado/compensating-adjustments/{id}/reconcile:
    post:
      description: Resolves an operation stuck at posting_intent_recorded by asking the ledger, once, whether a transaction for its correlation identity already exists. Never resubmits the posting. Idempotent via the X-Idempotency header enforced by the platform middleware.
      operationId: reconcileConsignadoCompensatingAdjustment
      parameters:
        - description: Compensating adjustment operation identifier.
          in: path
          name: id
          required: true
          schema:
            description: Compensating adjustment operation identifier.
            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
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ReconcileCompensatingAdjustmentHumaBody"
          description: OK
          headers:
            X-Idempotency-Replayed:
              description: "\"true\" when this response replays a request already executed under the same X-Idempotency, so nothing ran a second time and no money moved again. Absent on a first execution."
              schema:
                type: string
        "400":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: "The at-most-once contract refused the request before any handler ran: no X-Idempotency header (IDEMPOTENCY_KEY_REQUIRED), a key under a spelling this service does not read (IDEMPOTENCY_KEY_HEADER_UNKNOWN), or a request that could not be scoped to a tenant (IDEMPOTENCY_TENANT_REQUIRED). The code is in the problem document's `code` member."
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Reconcile a consignado compensating adjustment
      tags:
        - Consignado
      x-mint:
        href: /en/reference/products/lender/reconcile-consignado-compensating-adjustment
  /api/v1/internal/br/consignado/contracts/{numeroContrato}/portability-inbound:
    get:
      description: "Answers whether this contract ARRIVED by portability and, if so, which banks it came from, which contract was paid off at each and for how much, and as of when. A 404 is the ordinary answer for a contract this lender originated: the lineage row EXISTS only for transferred stock, which is what distinguishes it from new production in portfolio and regulatory reporting. The transferred balance is at most the principal the contract was booked with, the difference being troco paid to the worker, and the record is immutable: a correction is a new fact elsewhere, never a rewrite of where a debt came from."
      operationId: getConsignadoPortabilityInboundLineage
      parameters:
        - description: The rail contract number, byte-exact.
          in: path
          name: numeroContrato
          required: true
          schema:
            description: The rail contract number, byte-exact.
            maxLength: 128
            minLength: 1
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PortabilityInboundLineageHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Read the inbound-portability lineage of a contract
      tags:
        - Consignado
      x-mint:
        href: /en/reference/products/lender/read-the-inbound-portability-lineage-of-a-contract
  /api/v1/internal/br/consignado/divergences:
    get:
      description: "Returns a tenant-scoped, deterministically ordered page of the operational divergence queue. Default order: flow-blocking effect first (booking_blocked, then adjustment_required, then posting_pending, then audit_only), then overdue, then largest absolute client-vs-lender difference, then oldest observation."
      operationId: listConsignadoContractDivergences
      parameters:
        - description: Filter by category (cash|rate|terms|margin|registration|technical).
          explode: false
          in: query
          name: category
          schema:
            description: Filter by category (cash|rate|terms|margin|registration|technical).
            type: string
        - description: "Filter by flow effect (audit_only|posting_pending|adjustment_required|booking_blocked). Also the primary triage ordering key: booking_blocked sorts first, audit_only last."
          explode: false
          in: query
          name: effect
          schema:
            description: "Filter by flow effect (audit_only|posting_pending|adjustment_required|booking_blocked). Also the primary triage ordering key: booking_blocked sorts first, audit_only last."
            type: string
        - description: Filter by disposition state (open|disposed).
          explode: false
          in: query
          name: status
          schema:
            description: Filter by disposition state (open|disposed).
            type: string
        - description: Filter by assignee identity, or the reserved value 'unassigned' for items with no assignee.
          explode: false
          in: query
          name: assignee
          schema:
            description: Filter by assignee identity, or the reserved value 'unassigned' for items with no assignee.
            type: string
        - description: Restrict to open items whose SLA deadline has already passed.
          explode: false
          in: query
          name: slaBreachedOnly
          schema:
            description: Restrict to open items whose SLA deadline has already passed.
            type: boolean
        - description: RFC3339 UTC cutoff for the SLA-breached display ordering only; resend the previous page's response AsOf, omit only on the first page. Must not be in the future or older than the pagination window.
          explode: false
          in: query
          name: asOf
          schema:
            description: RFC3339 UTC cutoff for the SLA-breached display ordering only; resend the previous page's response AsOf, omit only on the first page. Must not be in the future or older than the pagination window.
            format: date-time
            type: string
        - description: Page size.
          explode: false
          in: query
          name: limit
          schema:
            default: 20
            description: Page size.
            format: int64
            maximum: 100
            minimum: 1
            type: integer
        - description: Page offset.
          explode: false
          in: query
          name: offset
          schema:
            default: 0
            description: Page offset.
            format: int64
            minimum: 0
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ContractDivergenceListHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: List consignado contract divergences
      tags:
        - Consignado
      x-mint:
        href: /en/reference/products/lender/list-consignado-contract-divergences
  /api/v1/internal/br/consignado/divergences/{id}:
    get:
      description: Returns the comparative detail (structured fields plus raw secondary evidence) and the full append-only history for one item.
      operationId: getConsignadoContractDivergence
      parameters:
        - description: Contract divergence identifier.
          in: path
          name: id
          required: true
          schema:
            description: Contract divergence identifier.
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ContractDivergenceDetailHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Get consignado contract divergence detail
      tags:
        - Consignado
      x-mint:
        href: /en/reference/products/lender/get-consignado-contract-divergence
  /api/v1/internal/br/consignado/divergences/{id}/assign:
    post:
      description: Claims an open item for an operator. Compare-and-swap guarded by expectedVersion; idempotent via the X-Idempotency header enforced by the platform middleware.
      operationId: assignConsignadoContractDivergence
      parameters:
        - description: Contract divergence identifier.
          in: path
          name: id
          required: true
          schema:
            description: Contract divergence identifier.
            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/AssignContractDivergenceHumaRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ContractDivergenceHumaBody"
          description: OK
          headers:
            X-Idempotency-Replayed:
              description: "\"true\" when this response replays a request already executed under the same X-Idempotency, so nothing ran a second time and no money moved again. Absent on a first execution."
              schema:
                type: string
        "400":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: "The at-most-once contract refused the request before any handler ran: no X-Idempotency header (IDEMPOTENCY_KEY_REQUIRED), a key under a spelling this service does not read (IDEMPOTENCY_KEY_HEADER_UNKNOWN), or a request that could not be scoped to a tenant (IDEMPOTENCY_TENANT_REQUIRED). The code is in the problem document's `code` member."
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Assign consignado contract divergence
      tags:
        - Consignado
      x-mint:
        href: /en/reference/products/lender/assign-consignado-contract-divergence
  /api/v1/internal/br/consignado/divergences/{id}/dispose:
    post:
      description: "Records the operator's structured result and closes the item. A parked payroll competência (employer_shortfall or reconciliation_hold_for_review awaiting its posting) is never disposed: it leaves only by requeue, which re-runs it. The exceptions are the item naming money already placed (run=placed) and a run held for its escrituração: the operador disposes them, and the held money is then his. So is the reconciliation_hold_for_review of a settle the rail never confirmed (lender evidence rail 0): its dispose says the rail did not pay and books the month with what the rail confirmed by then, the rest the employer's receivable where the escrituração proves the withholding, or parks it as its closed_contract_month_unremitted item once the contract left our book; what still refuses that booking answers LENDER-0363 and the item stays open. Compare-and-swap guarded by expectedVersion; idempotent via the X-Idempotency header enforced by the platform middleware."
      operationId: disposeConsignadoContractDivergence
      parameters:
        - description: Contract divergence identifier.
          in: path
          name: id
          required: true
          schema:
            description: Contract divergence identifier.
            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/DisposeContractDivergenceHumaRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ContractDivergenceHumaBody"
          description: OK
          headers:
            X-Idempotency-Replayed:
              description: "\"true\" when this response replays a request already executed under the same X-Idempotency, so nothing ran a second time and no money moved again. Absent on a first execution."
              schema:
                type: string
        "400":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: "The at-most-once contract refused the request before any handler ran: no X-Idempotency header (IDEMPOTENCY_KEY_REQUIRED), a key under a spelling this service does not read (IDEMPOTENCY_KEY_HEADER_UNKNOWN), or a request that could not be scoped to a tenant (IDEMPOTENCY_TENANT_REQUIRED). The code is in the problem document's `code` member."
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Dispose consignado contract divergence
      tags:
        - Consignado
      x-mint:
        href: /en/reference/products/lender/dispose-consignado-contract-divergence
  /api/v1/internal/br/consignado/divergences/{id}/requeue:
    post:
      description: "Records an explicit retry signal over the same immutable command; the requeue itself never reopens a disposed item. A parked payroll competência (employer_shortfall or reconciliation_hold_for_review awaiting its posting), or a reconciliation_hold_for_review naming money on a month a live cession holds, re-runs its stored verdict through the match run's posting path without the repasse composition (the item holds the composed verdict); a run's item takes the route its run's redelivery takes, the post-cession route included on a month a live cession holds. Once the re-run posts, or parks where its run would, the item is disposed with result `rerun`. A reconciliation_hold_for_review item whose verdict_reason is ESCRITURACAO_PENDING (a confirmed remittance held until payroll states what it withheld; its lender evidence names the expected, received and residual amounts) is judged again on the escrituração now on file and, once it posts, runs the match run's whole path, diversion and composition included; with no escrituração yet it is refused and writes nothing. The escrituração's arrival runs this re-run itself for each such item still open; a disposed one keeps the operador's answer. When the instalment settles on a competência whose desk holds an excess, an employer_shortfall or reconciliation_hold_for_review item is disposed as `rerun` and what the rail states beyond the instalment opens as a ceded_cash_unplaced item. A ceded_cash_unplaced item is refused while its contract is still sold; once the repurchase ended the sale it re-runs on our books, a held group at its shortfall door, and one our books still cannot place, or that names the fund's money, is refused and leaves by dispose. A closed_contract_month_unremitted item (a month of a contract that left our book, with no repasse placed) re-runs as its run's redelivery: it is refused while the contract stays closed. The rail's undoing of the refinance that closed it puts the item back open at a newer version, whatever its state; its re-run then books the month at its door and disposes the item with result `rerun`. Any other refused re-run writes nothing, except on a repasse held for a contract the Lender did not service (repasse_contract_not_serviced): there the retry records the stored repasse's receipt and runs its payroll match (a severance registro, verbas_rescisorias, is instead booked as termination-benefit cash, may pay the contract off, and runs no match), then disposes the item with result `rerun`; a payroll repasse naming a renegotiated contract number for a month before the month that number names its loan from is instead held as the portador's excess, as below, and the item is disposed with result `rerun`; a severance under that number pays the loan down from the end, whatever its month; while the contract is still not serviced, or when expectedVersion is stale, it is refused and writes nothing, and a retry refused after it recorded the receipt leaves that receipt recorded: the next retry replays it, never booking it twice. On a renegotiation_* item the requeue links the new contract number (N) to the closed contract's loan (X) from competência K or, when X has a clean escrituração (one Dataprev flagged on none of its checks) for K or a later month, from the month after X's last clean escrituração, keeping X's schedule whatever N's terms, moves the loan to the new bond and disposes the item with result `rerun`; K is the renegociação's, or competenciaInicioDesconto when it named none. It is refused, writing nothing, while X is not serviced, when the renegociação names no new bond or no K, when the month the link starts at falls outside X's schedule, when competenciaInicioDesconto names another K than the renegociação's, or when N already names another loan; competenciaInicioDesconto on any other item is refused. Once the link commits, each repasse_contract_not_serviced item held under N re-runs as its own requeue would; one that does not stays open for that requeue. Every payroll repasse under N for a month before the link's start settles nothing of X: each registro's whole amount is the portador's unapplied cash on X's account, and the over-deduction refund case under N and that month in GET /api/v1/internal/br/consignado/overdeduction-refunds holds the sum of the month's registros for the operador, each growth published again with the case's running total; a held one re-runs into it, and a redelivery holds nothing twice. A registro arriving after the operador disposed that month's case books nothing and opens a repasse_contract_not_serviced item whose requeue is refused (422) until the operador disposes it. On a sold X the registro books nothing and the item only audits it. Compare-and-swap guarded by expectedVersion; idempotent via the X-Idempotency header enforced by the platform middleware."
      operationId: requeueConsignadoContractDivergence
      parameters:
        - description: Contract divergence identifier.
          in: path
          name: id
          required: true
          schema:
            description: Contract divergence identifier.
            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/RequeueContractDivergenceHumaRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ContractDivergenceHumaBody"
          description: OK
          headers:
            X-Idempotency-Replayed:
              description: "\"true\" when this response replays a request already executed under the same X-Idempotency, so nothing ran a second time and no money moved again. Absent on a first execution."
              schema:
                type: string
        "400":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: "The at-most-once contract refused the request before any handler ran: no X-Idempotency header (IDEMPOTENCY_KEY_REQUIRED), a key under a spelling this service does not read (IDEMPOTENCY_KEY_HEADER_UNKNOWN), or a request that could not be scoped to a tenant (IDEMPOTENCY_TENANT_REQUIRED). The code is in the problem document's `code` member."
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Requeue consignado contract divergence
      tags:
        - Consignado
      x-mint:
        href: /en/reference/products/lender/requeue-consignado-contract-divergence
  /api/v1/internal/br/consignado/exclusions/{request_ref}/repairs:
    post:
      description: Files a rejected exclusion again under a new request reference and a corrected exclusion reason, for a contract whose earlier exclusion attempt the rail refused. The original request is kept; the retry is a new request. Answers 400 when the references are not two distinct valid values, the reason is not a declared one, or the body carries anything else.
      operationId: repairConsignadoExclusion
      parameters:
        - in: path
          name: request_ref
          required: true
          schema:
            maxLength: 128
            minLength: 1
            pattern: ^[A-Za-z0-9._-]+$
            type: string
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                motivo_exclusao:
                  description: The corrected reason; the rail must file it under a code no attempt on the contract already carries.
                  enum:
                    - desistencia
                    - falecimento
                    - liquidacao_antecipada
                    - liquidacao_normal
                    - acao_judicial
                    - fraude
                    - outros
                  type: string
                new_request_ref:
                  maxLength: 128
                  minLength: 1
                  pattern: ^[A-Za-z0-9._-]+$
                  type: string
              required:
                - new_request_ref
                - motivo_exclusao
              type: object
        required: true
      responses:
        "202":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RepairExclusionResponse"
          description: Accepted
        "400":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Bad Request
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Retry a rejected consignado exclusion
      tags:
        - Consignado
      x-mint:
        href: /en/reference/products/lender/retry-a-rejected-consignado-exclusion
  /api/v1/internal/br/consignado/inboxes/{inbox}/{id}/requeue:
    post:
      description: "Returns one quarantined item of one durable inbox to work, under operator authority. It resets the attempt budget and clears the failure reason, and it NEVER touches the item's identity, its canonical payload, or any declared money value — a requeue re-runs the fact the inbox already holds, which is why the request carries no body. Lanes: collection_payment, collection_reapply, collection_settlement, correction, disbursement, disbursement_posting, employment_status, portability, refinance, registration. The disbursement inbox's ingestion and posting lanes are separate members on purpose: restarting a posting-stage fact from ingestion could recompute a posting intent that no longer matches what the ledger already holds under the same idempotency key. Idempotent via the X-Idempotency header enforced by the platform middleware."
      operationId: requeueConsignadoInboxItem
      parameters:
        - description: Which durable inbox the item belongs to.
          in: path
          name: inbox
          required: true
          schema:
            description: Which durable inbox the item belongs to.
            type: string
        - description: The quarantined item's identifier.
          in: path
          name: id
          required: true
          schema:
            description: The quarantined item's identifier.
            format: uuid
            type: string
        - description: "Canonical idempotency request ID. Required: this request moves money, and without a key a retry cannot be told apart from a second instruction."
          in: header
          name: X-Idempotency
          required: true
          schema:
            description: "Canonical idempotency request ID. Required: this request moves money, and without a key a retry cannot be told apart from a second instruction."
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RequeueConsignadoInboxHumaBody"
          description: OK
          headers:
            X-Idempotency-Replayed:
              description: "\"true\" when this response replays a request already executed under the same X-Idempotency, so nothing ran a second time and no money moved again. Absent on a first execution."
              schema:
                type: string
        "400":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: "The at-most-once contract refused the request before any handler ran: no X-Idempotency header (IDEMPOTENCY_KEY_REQUIRED), a key under a spelling this service does not read (IDEMPOTENCY_KEY_HEADER_UNKNOWN), or a request that could not be scoped to a tenant (IDEMPOTENCY_TENANT_REQUIRED). The code is in the problem document's `code` member."
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Requeue a quarantined consignado inbox item
      tags:
        - Consignado
      x-mint:
        href: /en/reference/products/lender/requeue-a-quarantined-consignado-inbox-item
  /api/v1/internal/br/consignado/overdeduction-refunds:
    get:
      description: Returns the tenant's over-deduction refund cases, oldest obligation first — payroll deducted MORE than a competência was worth and the residual is owed back to the worker. Repasses under a renegotiated contract number for a month before that number names its loan open one too, under that number and month on the loan's account, holding the sum of the month's registros. `recorded` is an open obligation and `disposed` carries the execution fact of who returned it, when, and under which reference.
      operationId: listConsignadoOverDeductionRefunds
      parameters:
        - description: Restrict to open obligations or to returned ones. Omit for both.
          explode: false
          in: query
          name: status
          schema:
            description: Restrict to open obligations or to returned ones. Omit for both.
            enum:
              - recorded
              - disposed
            type: string
        - description: Maximum cases to return. Defaults to 50.
          explode: false
          in: query
          name: limit
          schema:
            description: Maximum cases to return. Defaults to 50.
            format: int64
            maximum: 200
            minimum: 1
            type: integer
        - description: Cases to skip, in the same oldest-first order.
          explode: false
          in: query
          name: offset
          schema:
            default: 0
            description: Cases to skip, in the same oldest-first order.
            format: int64
            maximum: 10000
            minimum: 0
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OverDeductionRefundListHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: List over-deduction refunds owed to workers
      tags:
        - Consignado
      x-mint:
        href: /en/reference/products/lender/list-over-deduction-refunds-owed-to-workers
  /api/v1/internal/br/consignado/overdeduction-refunds/{id}/dispose:
    post:
      description: "Closes one open refund case with the execution fact. The lender registers the obligation and the client's treasury moves the money, so this records a return that already happened and never pays anybody: it books the held cash out (Dr unapplied cash / Cr cash) at occurredAt, which must fall between the hold and now. The disposing actor is the caller's validated identity, never a body field, and a case is closed exactly once: a second disposition is refused rather than overwriting authorship. Idempotent via the X-Idempotency header enforced by the platform middleware."
      operationId: disposeConsignadoOverDeductionRefund
      parameters:
        - description: The refund case to close.
          in: path
          name: id
          required: true
          schema:
            description: The refund case to close.
            format: uuid
            type: string
        - description: "Canonical idempotency request ID. Required: this request moves money, and without a key a retry cannot be told apart from a second instruction."
          in: header
          name: X-Idempotency
          required: true
          schema:
            description: "Canonical idempotency request ID. Required: this request moves money, and without a key a retry cannot be told apart from a second instruction."
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DisposeOverDeductionRefundHumaInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OverDeductionRefundHumaBody"
          description: OK
          headers:
            X-Idempotency-Replayed:
              description: "\"true\" when this response replays a request already executed under the same X-Idempotency, so nothing ran a second time and no money moved again. Absent on a first execution."
              schema:
                type: string
        "400":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: "The at-most-once contract refused the request before any handler ran: no X-Idempotency header (IDEMPOTENCY_KEY_REQUIRED), a key under a spelling this service does not read (IDEMPOTENCY_KEY_HEADER_UNKNOWN), or a request that could not be scoped to a tenant (IDEMPOTENCY_TENANT_REQUIRED). The code is in the problem document's `code` member."
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Record that an over-deduction refund was returned
      tags:
        - Consignado
      x-mint:
        href: /en/reference/products/lender/record-that-an-over-deduction-refund-was-returned
  /api/v1/internal/br/consignado/retained-installments:
    get:
      description: The set's retained instalments (pre-cut instalments the fund never bought) whose payroll or agent cash reached the desk short of what they owe, oldest carve-out first. Each row carries the cash a close would apply and the rest it would book; an instalment the desk cannot price yet is not listed.
      operationId: listConsignadoClosableRetainedInstallments
      parameters:
        - description: The assignment set whose passthrough case the operador is working.
          explode: false
          in: query
          name: setId
          required: true
          schema:
            description: The assignment set whose passthrough case the operador is working.
            format: uuid
            type: string
        - description: Page size.
          explode: false
          in: query
          name: limit
          schema:
            default: 25
            description: Page size.
            format: int64
            maximum: 50
            minimum: 1
            type: integer
        - description: Page offset.
          explode: false
          in: query
          name: offset
          schema:
            default: 0
            description: Page offset.
            format: int64
            maximum: 10000
            minimum: 0
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RetainedInstallmentListHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: List a set's short retained instalments
      tags:
        - Consignado
      x-mint:
        href: /en/reference/products/lender/list-a-sets-short-retained-instalments
  /api/v1/internal/br/consignado/retained-installments/{id}/close:
    post:
      description: One posting applies the cash on the desk to the instalment (Dr cash) and books the rest as the client's credit loss (Dr the product's provision expense), crediting the retained account for the whole instalment, with the art. 49 § 1 written_off_credit control opened in the same transaction. The posting is dated at the close. The closing actor is the caller's validated identity. Refused, with nothing written, when the escrituração cannot price the instalment yet, the employer withheld more than it sent, no instalment cash arrived, or the cash already covers it. Idempotent via the X-Idempotency header enforced by the platform middleware.
      operationId: closeConsignadoRetainedInstallment
      parameters:
        - description: The retained instalment.
          in: path
          name: id
          required: true
          schema:
            description: The retained instalment.
            format: uuid
            type: string
        - description: "Canonical idempotency request ID. Required: this request moves money, and without a key a retry cannot be told apart from a second instruction."
          in: header
          name: X-Idempotency
          required: true
          schema:
            description: "Canonical idempotency request ID. Required: this request moves money, and without a key a retry cannot be told apart from a second instruction."
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CloseRetainedInstallmentHumaInputBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RetainedInstallmentCloseHumaBody"
          description: Created
          headers:
            X-Idempotency-Replayed:
              description: "\"true\" when this response replays a request already executed under the same X-Idempotency, so nothing ran a second time and no money moved again. Absent on a first execution."
              schema:
                type: string
        "400":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: "The at-most-once contract refused the request before any handler ran: no X-Idempotency header (IDEMPOTENCY_KEY_REQUIRED), a key under a spelling this service does not read (IDEMPOTENCY_KEY_HEADER_UNKNOWN), or a request that could not be scoped to a tenant (IDEMPOTENCY_TENANT_REQUIRED). The code is in the problem document's `code` member."
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Close a short retained instalment from the desk
      tags:
        - Consignado
      x-mint:
        href: /en/reference/products/lender/close-a-short-retained-instalment-from-the-desk
  /api/v1/internal/streaming/discards:
    get:
      description: "The records this service's inbound consumers could not process and quarantined to its dead-letter topic: what died, for which tenant, why, and where it came from. Scoped to the caller's validated tenant. The quarantined payload is deliberately not served — the origin topic, partition and offset are the route back to it."
      operationId: listStreamingDiscards
      parameters:
        - description: "Narrow to one quarantine cause. codec: the record's CloudEvents headers would not decode, so the producer's wire format is the suspect. handler: a consumer returned a terminal error, so the business rejection is. source_mismatch: the record came from an unexpected producer. unhandled_key: no handler is registered for that event, so this service's registrations drifted behind the producer's catalog."
          explode: false
          in: query
          name: causeKind
          schema:
            description: "Narrow to one quarantine cause. codec: the record's CloudEvents headers would not decode, so the producer's wire format is the suspect. handler: a consumer returned a terminal error, so the business rejection is. source_mismatch: the record came from an unexpected producer. unhandled_key: no handler is registered for that event, so this service's registrations drifted behind the producer's catalog."
            enum:
              - codec
              - handler
              - source_mismatch
              - unhandled_key
            type: string
        - description: Narrow to one event key, spelled "<resourceType>.<eventType>" as the producing catalog spells it.
          explode: false
          in: query
          name: eventType
          schema:
            description: Narrow to one event key, spelled "<resourceType>.<eventType>" as the producing catalog spells it.
            examples:
              - contract.registered
            maxLength: 256
            type: string
        - description: Page size.
          explode: false
          in: query
          name: limit
          schema:
            default: 25
            description: Page size.
            format: int64
            maximum: 100
            minimum: 1
            type: integer
        - description: Page offset.
          explode: false
          in: query
          name: offset
          schema:
            default: 0
            description: Page offset.
            format: int64
            maximum: 10000
            minimum: 0
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StreamingDiscardListHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: List quarantined inbound records
      tags:
        - Streaming
      x-mint:
        href: /en/reference/products/lender/list-quarantined-inbound-records
  /api/v1/journal-references:
    get:
      description: Returns journal/outbox reference data resolved by correlation ID.
      operationId: getJournalReference
      parameters:
        - description: Correlation identifier to resolve a journal/outbox reference.
          explode: false
          in: query
          name: correlation_id
          schema:
            description: Correlation identifier to resolve a journal/outbox reference.
            maxLength: 256
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/JournalReferenceHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Get journal reference by correlation id
      tags:
        - Accounting
      x-mint:
        href: /en/reference/products/lender/get-journal-reference
  /api/v1/journal-references/{id}:
    get:
      description: Returns journal/outbox reference data by journal reference ID.
      operationId: getJournalReferenceById
      parameters:
        - description: Journal reference identifier.
          in: path
          name: id
          required: true
          schema:
            description: Journal reference identifier.
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/JournalReferenceHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Get journal reference by id
      tags:
        - Accounting
      x-mint:
        href: /en/reference/products/lender/get-journal-reference-by-id
  /api/v1/jurisdictions:
    get:
      description: Returns the set of jurisdiction profiles compiled into the running service. Public (no tenant scope).
      operationId: listJurisdictions
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListJurisdictionsResponse"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      security: []
      summary: List registered jurisdictions
      tags:
        - Jurisdictions
      x-mint:
        href: /en/reference/products/lender/list-jurisdictions
  /api/v1/jurisdictions/{code}:
    get:
      description: Returns the descriptor for a single registered jurisdiction profile. Public (no tenant scope).
      operationId: getJurisdiction
      parameters:
        - description: ISO 3166-1 alpha-2 jurisdiction code (e.g. BR, XX).
          in: path
          name: code
          required: true
          schema:
            description: ISO 3166-1 alpha-2 jurisdiction code (e.g. BR, XX).
            pattern: ^[A-Za-z]{2}$
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetJurisdictionResponse"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      security: []
      summary: Get jurisdiction by code
      tags:
        - Jurisdictions
      x-mint:
        href: /en/reference/products/lender/get-jurisdiction
  /api/v1/loan-accounts:
    get:
      description: Returns one page of the loan book, newest first, for an operator holding no account identifier. Filters narrow the page; omitting one does not narrow. By default only live accounts are returned — set includeClosed to also see the ones a terminal lifecycle fact closed, each carrying the lifecycleStatus that says whether it was settled, ceded, ported, reversed, renegotiated or written off. A caller without the book:read permission sees only the accounts assigned to them; a request carrying no authenticated identity is refused rather than served the whole book.
      operationId: listLoanAccounts
      parameters:
        - description: Narrow to one originating application status. Only these two statuses ever carry a loan account.
          explode: false
          in: query
          name: status
          schema:
            description: Narrow to one originating application status. Only these two statuses ever carry a loan account.
            enum:
              - disbursed
              - active
            examples:
              - active
            type: string
        - description: Narrow to one borrower's book. The borrower identifier is a UUID — the same identity origination stored on the contract.
          explode: false
          in: query
          name: borrowerId
          schema:
            description: Narrow to one borrower's book. The borrower identifier is a UUID — the same identity origination stored on the contract.
            examples:
              - 550e8400-e29b-41d4-a716-446655440002
            format: uuid
            type: string
        - description: Narrow to one loan officer's book. Free-form authenticated identity subject, not necessarily a UUID, at most 255 characters; a system-originated contract carries the empty officer.
          explode: false
          in: query
          name: assignedOfficerId
          schema:
            description: Narrow to one loan officer's book. Free-form authenticated identity subject, not necessarily a UUID, at most 255 characters; a system-originated contract carries the empty officer.
            examples:
              - officer-xyz
            maxLength: 255
            type: string
        - description: Narrow to the contracts booked under one loan product version.
          explode: false
          in: query
          name: loanProductVersionId
          schema:
            description: Narrow to the contracts booked under one loan product version.
            examples:
              - 550e8400-e29b-41d4-a716-446655440001
            type: string
        - description: Narrow to one ISO-4217 denomination.
          explode: false
          in: query
          name: currency
          schema:
            description: Narrow to one ISO-4217 denomination.
            examples:
              - BRL
            pattern: ^[A-Z]{3}$
            type: string
        - description: "Include accounts a terminal lifecycle fact closed — settled, ceded, ported, reversed, renegotiated or written_off. Default false: the live book only. Included rows carry lifecycleStatus saying which of the six closed them."
          explode: false
          in: query
          name: includeClosed
          schema:
            default: false
            description: "Include accounts a terminal lifecycle fact closed — settled, ceded, ported, reversed, renegotiated or written_off. Default false: the live book only. Included rows carry lifecycleStatus saying which of the six closed them."
            type: boolean
        - description: Page size.
          explode: false
          in: query
          name: limit
          schema:
            default: 25
            description: Page size.
            format: int64
            maximum: 100
            minimum: 1
            type: integer
        - description: Page offset.
          explode: false
          in: query
          name: offset
          schema:
            default: 0
            description: Page offset.
            format: int64
            maximum: 10000
            minimum: 0
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LoanAccountListHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: List loan accounts
      tags:
        - Loan Accounts
      x-mint:
        href: /en/reference/products/lender/list-loan-accounts
  /api/v1/loan-accounts/{id}:
    get:
      description: Returns the active loan account detail read model. A malformed UUID yields 422 (schema error), distinct from 404 when the account does not exist.
      operationId: getActiveLoanAccount
      parameters:
        - description: Loan account identifier (UUID).
          in: path
          name: id
          required: true
          schema:
            description: Loan account identifier (UUID).
            examples:
              - 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ActiveLoanAccountHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Get active loan account
      tags:
        - Loan Accounts
      x-mint:
        href: /en/reference/products/lender/get-active-loan-account
  /api/v1/loan-accounts/{id}/audit-events:
    get:
      description: Returns immutable correction, replay, and operator-visible audit history for a loan account. Schema-bounded limit (1–100, default 50); out-of-range values yield 422. A malformed UUID yields 422 (schema error).
      operationId: listLoanAccountAuditEventsHuma
      parameters:
        - description: Loan account identifier (UUID).
          in: path
          name: id
          required: true
          schema:
            description: Loan account identifier (UUID).
            examples:
              - 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
        - description: Maximum audit events to return (1–100, default 50).
          explode: false
          in: query
          name: limit
          schema:
            default: 50
            description: Maximum audit events to return (1–100, default 50).
            examples:
              - 50
            format: int64
            maximum: 100
            minimum: 1
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LoanAuditHistoryHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: List loan account audit events
      tags:
        - Loan Accounts
      x-mint:
        href: /en/reference/products/lender/list-loan-account-audit-events-huma
  /api/v1/loan-accounts/{id}/charges:
    get:
      description: Returns every charge assessed on the loan account, oldest first. A malformed UUID yields 422, distinct from 404.
      operationId: listActiveLoanCharges
      parameters:
        - description: Loan account identifier (UUID).
          in: path
          name: id
          required: true
          schema:
            description: Loan account identifier (UUID).
            examples:
              - 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ActiveLoanChargesHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: List active loan charges
      tags:
        - Loan Accounts
      x-mint:
        href: /en/reference/products/lender/list-active-loan-charges
  /api/v1/loan-accounts/{id}/deferred-fee-reconciliation:
    get:
      description: "Reads the ledger lines of the contract's own deferred-fee accounts, across every chart it lived under, into deferred, recognised, released and remaining, and holds the deferred figure against the fee the contract record says was retained. The contract is named by its loan account alone: product version, disbursement day, currency and retained fee come from the tenant's contract record. A ledger that does not answer is status UNAVAILABLE, not an error."
      operationId: getDeferredFeeReconciliation
      parameters:
        - description: Loan account identifier of the contract.
          in: path
          name: id
          required: true
          schema:
            description: Loan account identifier of the contract.
            examples:
              - 550e8400-e29b-41d4-a716-446655440003
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeferredFeeReconciliationHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Reconcile a contract's deferred origination fee
      tags:
        - Accounting
      x-mint:
        href: /en/reference/products/lender/reconcile-a-contract-s-deferred-origination-fee
  /api/v1/loan-accounts/{id}/prepayments:
    post:
      description: "Appends an immutable prepayment schedule version and recalculation trigger. BR accounts require quoteId; amount-only prepayment is available only for non-BR accounts. When both are provided, amount must equal the quote's net settlement amount, or the request yields 422 (LENDER-0351). Idempotency is enforced by the lib-commons idempotency middleware via the X-Idempotency header; a reused key with different facts yields 422 (IDEMPOTENCY_KEY_REUSE). A missing required BR quote, malformed UUID, or invalid amount yields 422. Deduplication is by key ALONE: an amount-only settlement resent under a NEW key books a SECOND settlement, so retry under the ORIGINAL key. A BR quote is one-shot and bounds this by itself — a new key carrying an already-accepted quoteId is refused with 409 (LENDER-0355) and writes nothing, while a new key carrying a new quote is a newly priced settlement and is meant to book. A retry of the same request after the contract closed answers 201 with the version it wrote. A partial whose money is dated before a payment no reversal undid (a reversed due-day settlement still counts), a prepayment or a reschedule the contract holds, on an earlier São Paulo day or at an earlier instant, is refused with 409 (LENDER-0302) and writes nothing. Money dated on a São Paulo civil day after today is refused with 422 (LENDER-0395) and writes nothing; a later hour of today is accepted. A quote accepted with money dated on a São Paulo civil day before the contract's disbursement is refused with 422 (LENDER-0985) and writes nothing. A partial quote settled while a full-settlement quote on the contract is still payable is refused with 409 (LENDER-0375) and writes nothing; liveQuoteId and liveQuoteExpiresAt name that quote."
      operationId: prepayLoanAccount
      parameters:
        - description: Loan account identifier (UUID).
          in: path
          name: id
          required: true
          schema:
            description: Loan account identifier (UUID).
            examples:
              - 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
        - description: Canonical idempotency request ID. Enforced by the lib-commons idempotency middleware.
          in: header
          name: X-Idempotency
          required: true
          schema:
            description: Canonical idempotency request ID. Enforced by the lib-commons idempotency middleware.
            examples:
              - 550e8400-e29b-41d4-a716-446655440011
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PrepayLoanAccountHumaRequest"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ScheduleVersionCommandHumaBody"
          description: Created
          headers:
            X-Idempotency-Replayed:
              description: "\"true\" when this response replays a request already executed under the same X-Idempotency, so nothing ran a second time and no money moved again. Absent on a first execution."
              schema:
                type: string
        "400":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: "The at-most-once contract refused the request before any handler ran: no X-Idempotency header (IDEMPOTENCY_KEY_REQUIRED), a key under a spelling this service does not read (IDEMPOTENCY_KEY_HEADER_UNKNOWN), or a request that could not be scoped to a tenant (IDEMPOTENCY_TENANT_REQUIRED). The code is in the problem document's `code` member."
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Prepay loan account
      tags:
        - Loan Accounts
      x-mint:
        href: /en/reference/products/lender/prepay-loan-account
  /api/v1/loan-accounts/{id}/preview-repayment:
    post:
      description: Returns a deterministic repayment allocation preview without recording a transaction. Not idempotency-gated. A malformed UUID yields 422 (schema error). A malformed amount string yields 422. Money dated on a São Paulo civil day after today is refused with 422 (LENDER-0395), and money dated on a day before the contract's disbursement with 422 (LENDER-0985), as the payment would be.
      operationId: previewRepayment
      parameters:
        - description: Loan account identifier (UUID).
          in: path
          name: id
          required: true
          schema:
            description: Loan account identifier (UUID).
            examples:
              - 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RepaymentRequestHumaBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RepaymentPreviewHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Preview repayment allocation
      tags:
        - Loan Accounts
      x-mint:
        href: /en/reference/products/lender/preview-repayment
  /api/v1/loan-accounts/{id}/repayments:
    post:
      description: "Records a repayment allocation for an active loan account. Idempotency is enforced in the use case on the required X-Idempotency key: a reused key with different facts yields 409. A malformed UUID or amount yields 422. Deduplication is by X-Idempotency key ALONE: the same amount, on the same account, on the same effective date, resent under a NEW key books a SECOND payment and answers 201. A borrower may legitimately pay the same amount twice, and no field in the request separates that from an accidental resend, so this route carries no business-fact fence — unlike disbursement, which does. Retry under the ORIGINAL key, which replays the original answer and moves nothing; a double that did book is undone on POST /api/v1/loan-accounts/{id}/transactions/{transactionId}/reverse, newest effective instant first (payments sharing one effective instant reverse in any order). Both figures are enqueued for the ledger in the same transaction, and the ledger posts them through the relay: appliedAmount against the receivable, overpaymentAmount to the product's unapplied cash account (its collection_unapplied rule), so the two always add up to the cash received. A reversal gives back both. Money dated before a payment no reversal undid (a reversed due-day settlement still counts), a prepayment or a reschedule the contract holds, on an earlier São Paulo day or at an earlier instant, is refused with 409 (LENDER-0302) and writes nothing. Money dated on a São Paulo civil day after today is refused with 422 (LENDER-0395) and writes nothing; a later hour of today is accepted. Money dated on a São Paulo civil day before the contract's disbursement is refused with 422 (LENDER-0985) and writes nothing; an earlier hour of that day is accepted."
      operationId: recordRepayment
      parameters:
        - description: Loan account identifier (UUID).
          in: path
          name: id
          required: true
          schema:
            description: Loan account identifier (UUID).
            examples:
              - 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
        - description: "Idempotency key of the payment: 1 to 128 characters of letters, digits and - _ . :. The route refuses a request without it, or with a blank or unusable one (LENDER-0301). X-Request-ID is never read as the key."
          in: header
          name: X-Idempotency
          schema:
            description: "Idempotency key of the payment: 1 to 128 characters of letters, digits and - _ . :. The route refuses a request without it, or with a blank or unusable one (LENDER-0301). X-Request-ID is never read as the key."
            examples:
              - 550e8400-e29b-41d4-a716-446655440011
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RepaymentRequestHumaBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RepaymentRecordHumaBody"
          description: Created
          headers:
            X-Idempotency-Replayed:
              schema:
                description: Set to "true" when this response replays an earlier request with the same idempotency key; absent on a first execution.
                type: string
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Record repayment
      tags:
        - Loan Accounts
      x-mint:
        href: /en/reference/products/lender/record-repayment
  /api/v1/loan-accounts/{id}/reschedules:
    post:
      description: "Appends an immutable rescheduled schedule version and recalculation trigger. Idempotency is enforced by the lib-commons idempotency middleware via the X-Idempotency header; a reused key with different facts yields 422 (IDEMPOTENCY_KEY_REUSE); once the middleware has forgotten the key, an X-Idempotency key or transactionId reused with a different body yields 409 (LENDER-0342). A malformed UUID yields 422. Each modification's 10% test measures its own change. A restructuring (declared, or by default on an overdue contract with a concession) never ends the contract and its 201 carries no substantialRenegotiation block: it settles its art. 22 result against the result account on the effective date, unless the change is within rounding (art. 23 then re-solves the rate and posts nothing); a suspended contract's gain is held under art. 17. When any other request is a renegotiation that art. 22 judges SUBSTANTIAL, the same call ends this contract and mints its replacement: the 201 carries this contract's last ladder, at zero, and a substantialRenegotiation block naming the replacement. Resending the request answers the same block. A restructuring is never put to the 10% test and leaves held cash untouched. For any other modification, cash the borrower holds before it pays the debt first and the 10% test measures what is left, in both directions: a request that is substantial only after that cash pays ends the contract, and one substantial before but not after is refused with 422 (LENDER-0334). A request put to the 10% test while held cash covers the whole debt is refused with 422 (LENDER-0334), the move being the full payoff; a pure re-timing is not put to it and appends whatever is held. A reschedule while a full-settlement quote on the contract is still payable is refused with 409 (LENDER-0375) and writes nothing; liveQuoteId and liveQuoteExpiresAt name that quote."
      operationId: rescheduleLoanAccount
      parameters:
        - description: Loan account identifier (UUID).
          in: path
          name: id
          required: true
          schema:
            description: Loan account identifier (UUID).
            examples:
              - 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
        - description: Canonical idempotency request ID. Enforced by the lib-commons idempotency middleware.
          in: header
          name: X-Idempotency
          required: true
          schema:
            description: Canonical idempotency request ID. Enforced by the lib-commons idempotency middleware.
            examples:
              - 550e8400-e29b-41d4-a716-446655440011
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RescheduleLoanAccountHumaRequest"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ScheduleVersionCommandHumaBody"
          description: Created
          headers:
            X-Idempotency-Replayed:
              description: "\"true\" when this response replays a request already executed under the same X-Idempotency, so nothing ran a second time and no money moved again. Absent on a first execution."
              schema:
                type: string
        "400":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: "The at-most-once contract refused the request before any handler ran: no X-Idempotency header (IDEMPOTENCY_KEY_REQUIRED), a key under a spelling this service does not read (IDEMPOTENCY_KEY_HEADER_UNKNOWN), or a request that could not be scoped to a tenant (IDEMPOTENCY_TENANT_REQUIRED). The code is in the problem document's `code` member."
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Reschedule loan account
      tags:
        - Loan Accounts
      x-mint:
        href: /en/reference/products/lender/reschedule-loan-account
  /api/v1/loan-accounts/{id}/schedule:
    get:
      description: Returns ordered active loan installment schedule entries. A malformed UUID yields 422, distinct from 404.
      operationId: getActiveLoanSchedule
      parameters:
        - description: Loan account identifier (UUID).
          in: path
          name: id
          required: true
          schema:
            description: Loan account identifier (UUID).
            examples:
              - 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ActiveLoanScheduleHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Get active loan schedule
      tags:
        - Loan Accounts
      x-mint:
        href: /en/reference/products/lender/get-active-loan-schedule
  /api/v1/loan-accounts/{id}/transactions:
    get:
      description: Returns every recorded repayment, reversal, prepayment and reschedule of the loan account, oldest first, each with its allocation lines. requestId narrows to the rows recorded under one request id. A malformed UUID yields 422, distinct from 404.
      operationId: listActiveLoanTransactions
      parameters:
        - description: Loan account identifier (UUID).
          in: path
          name: id
          required: true
          schema:
            description: Loan account identifier (UUID).
            examples:
              - 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
        - description: "Narrow to the rows recorded under one request id: the X-Idempotency key a repayment, reversal, prepayment or reschedule was sent under, as each row's requestId shows. An id no row carries answers an empty list. Omit for every row."
          explode: false
          in: query
          name: requestId
          schema:
            description: "Narrow to the rows recorded under one request id: the X-Idempotency key a repayment, reversal, prepayment or reschedule was sent under, as each row's requestId shows. An id no row carries answers an empty list. Omit for every row."
            examples:
              - 550e8400-e29b-41d4-a716-446655440011
            maxLength: 128
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ActiveLoanTransactionsHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: List active loan transactions
      tags:
        - Loan Accounts
      x-mint:
        href: /en/reference/products/lender/list-active-loan-transactions
  /api/v1/loan-accounts/{id}/transactions/{transactionId}/reverse:
    post:
      description: "Creates an immutable compensating transaction and preserves reversal lineage. The reversal's effective date is DERIVED from the payment being reversed and is not accepted in the request; a body carrying `effectiveDate` is refused 422. Idempotency is enforced in the use case on the required X-Idempotency key: a reused key with different facts yields 409. A malformed loan account UUID yields 422; an unknown transaction yields 404; a payment already reversed yields 409. A partial prepayment reverses too: a new transaction brings back the schedule it retired and frees the payments recorded before it. A payoff does not, nor does a partial paid through a collected quote (404). A partial of a month a close decided is REFUSED 422 with LENDER-0356 when the tenant's business date runs ahead of the wall clock. A reversal is REFUSED 422 when the loan account carries a payment whose effective timestamp is strictly later than the reversed payment's, or equal to it and recorded after it, or a schedule version dated strictly later than it or recorded at or after it was recorded. When the payment left held cash the client already refunded the borrower, the contract reopens and the refunded part opens as a returned-payment receivable of the borrower in the same transaction, answered in `returnedPaymentReceivableId`; a product whose chart of accounts declares no returned-payment rules REFUSES it 422 with LENDER-0988, naming how much was refunded: the operator recovers that money outside the Lender. The problem document names which fact blocks, in `errors[0].message`: `REVERSAL_REFUSED_LATER_PAYMENT` (the borrower paid again — use the compensating-adjustment path), `REVERSAL_REFUSED_LATER_SCHEDULE_VERSION` (the schedule was re-agreed — the remedy is a new schedule version, or, when the later version is a partial prepayment, to reverse it first), or `REVERSAL_REFUSED_LATER_FACTS_EXIST` (both). A partial prepayment is REFUSED 422 with LENDER-0629 when the contract changed before it (a tranche, or a reschedule or renegotiation of a contract with fees): the reversal would not restore the books. An automatic prepayment discount is REFUSED 422 on its own: reversing its due day's settlement reverses it too."
      operationId: reverseLoanAccountTransaction
      parameters:
        - description: Loan account identifier (UUID).
          in: path
          name: id
          required: true
          schema:
            description: Loan account identifier (UUID).
            examples:
              - 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
        - description: "Identifier of the payment or partial prepayment to reverse: up to 128 characters, 141 for the arrears payments a prepayment settled first (id + -arrears, id + -arrears-held)."
          in: path
          name: transactionId
          required: true
          schema:
            description: "Identifier of the payment or partial prepayment to reverse: up to 128 characters, 141 for the arrears payments a prepayment settled first (id + -arrears, id + -arrears-held)."
            examples:
              - 550e8400-e29b-41d4-a716-446655440001
            maxLength: 141
            minLength: 1
            type: string
        - description: "Idempotency key of the reversal: 1 to 128 characters of letters, digits and - _ . :. The route refuses a request without it, or with a blank or unusable one (LENDER-0317). X-Request-ID is never read as the key."
          in: header
          name: X-Idempotency
          schema:
            description: "Idempotency key of the reversal: 1 to 128 characters of letters, digits and - _ . :. The route refuses a request without it, or with a blank or unusable one (LENDER-0317). X-Request-ID is never read as the key."
            examples:
              - 550e8400-e29b-41d4-a716-446655440011
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ReverseRepaymentHumaRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ReverseRepaymentHumaBody"
          description: OK
          headers:
            X-Idempotency-Replayed:
              schema:
                description: Set to "true" when this response replays an earlier request with the same idempotency key; absent on a first execution.
                type: string
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Reverse loan account transaction
      tags:
        - Loan Accounts
      x-mint:
        href: /en/reference/products/lender/reverse-loan-account-transaction
  /api/v1/loan-applications:
    get:
      description: Returns a page of loan applications for the caller's tenant, newest first, optionally narrowed by status, loan product version, borrower, assigned officer or origination channel.
      operationId: listLoanApplications
      parameters:
        - description: Narrow to one lifecycle status. Omit to include every status.
          explode: false
          in: query
          name: status
          schema:
            description: Narrow to one lifecycle status. Omit to include every status.
            enum:
              - pending_approval
              - approved
              - rejected
              - withdrawn
              - disbursed
            type: string
        - description: Narrow to applications created against one loan product version.
          explode: false
          in: query
          name: loanProductVersionId
          schema:
            description: Narrow to applications created against one loan product version.
            examples:
              - 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
        - description: Narrow to one borrower. The borrower identifier is a UUID — the same identity the create route stored.
          explode: false
          in: query
          name: borrowerId
          schema:
            description: Narrow to one borrower. The borrower identifier is a UUID — the same identity the create route stored.
            examples:
              - 550e8400-e29b-41d4-a716-446655440002
            format: uuid
            type: string
        - description: Narrow to the officer the application is assigned to. Free-form authenticated identity subject, not necessarily a UUID, at most 255 characters; a system-originated application carries the empty officer.
          explode: false
          in: query
          name: assignedOfficerId
          schema:
            description: Narrow to the officer the application is assigned to. Free-form authenticated identity subject, not necessarily a UUID, at most 255 characters; a system-originated application carries the empty officer.
            examples:
              - officer-xyz
            maxLength: 255
            type: string
        - description: Narrow to the trusted channel that created the application.
          explode: false
          in: query
          name: originationFront
          schema:
            description: Narrow to the trusted channel that created the application.
            enum:
              - gateway_clt
              - lender_direct
              - unknown_legacy
            type: string
        - description: Page size.
          explode: false
          in: query
          name: limit
          schema:
            default: 25
            description: Page size.
            format: int64
            maximum: 100
            minimum: 1
            type: integer
        - description: Page offset.
          explode: false
          in: query
          name: offset
          schema:
            default: 0
            description: Page offset.
            format: int64
            maximum: 10000
            minimum: 0
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LoanApplicationReadListHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: List loan applications
      tags:
        - LoanApplications
      x-mint:
        href: /en/reference/products/lender/list-loan-applications
    post:
      description: Creates a pending approval loan application from an already-previewed schedule snapshot.
      operationId: createLoanApplication
      parameters:
        - description: "Canonical idempotency request ID (lib-commons enforcer reads this). Required: without a key a retry of this request cannot be told apart from a second instruction, and the duplicate it books is undone by hand."
          in: header
          name: X-Idempotency
          required: true
          schema:
            description: "Canonical idempotency request ID (lib-commons enforcer reads this). Required: without a key a retry of this request cannot be told apart from a second instruction, and the duplicate it books is undone by hand."
            examples:
              - 550e8400-e29b-41d4-a716-446655440003
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateLoanApplicationHumaRequest"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LoanApplicationHumaBody"
          description: Created
          headers:
            X-Idempotency-Replayed:
              description: "\"true\" when this response replays a request already executed under the same X-Idempotency, so nothing ran a second time and no money moved again. Absent on a first execution."
              schema:
                type: string
        "400":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: "The at-most-once contract refused the request before any handler ran: no X-Idempotency header (IDEMPOTENCY_KEY_REQUIRED), a key under a spelling this service does not read (IDEMPOTENCY_KEY_HEADER_UNKNOWN), or a request that could not be scoped to a tenant (IDEMPOTENCY_TENANT_REQUIRED). The code is in the problem document's `code` member."
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Create loan application
      tags:
        - LoanApplications
      x-mint:
        href: /en/reference/products/lender/create-loan-application
  /api/v1/loan-applications/preview-schedule:
    post:
      description: Computes a deterministic declining-balance schedule for the supplied loan parameters and records it as the offer, returning the identifier that names it. Re-running an identical preview returns the same identifier and records no second offer.
      operationId: previewLoanSchedule
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SchedulePreviewHumaRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SchedulePreviewHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Preview amortisation schedule
      tags:
        - LoanApplications
      x-mint:
        href: /en/reference/products/lender/preview-loan-schedule
  /api/v1/loan-applications/{applicationId}/credit-instruments:
    get:
      description: Returns the emission history for a loan application, newest first.
      operationId: listCreditInstruments
      parameters:
        - description: Loan application identifier.
          in: path
          name: applicationId
          required: true
          schema:
            description: Loan application identifier.
            format: uuid
            type: string
        - description: Page size.
          explode: false
          in: query
          name: limit
          schema:
            default: 25
            description: Page size.
            format: int64
            maximum: 100
            minimum: 1
            type: integer
        - description: Page offset.
          explode: false
          in: query
          name: offset
          schema:
            default: 0
            description: Page offset.
            format: int64
            maximum: 10000
            minimum: 0
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreditInstrumentListHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: List credit instruments
      tags:
        - CreditInstruments
      x-mint:
        href: /en/reference/products/lender/list-credit-instruments
    post:
      description: Renders and durably custodies a credit-instrument (CCB) PDF for an approved loan application, or for the disbursed new contract of a substantial renegotiation or a consignado refinance, from the product's active document template. Idempotent by caller-supplied key.
      operationId: issueCreditInstrument
      parameters:
        - description: Loan application identifier.
          in: path
          name: applicationId
          required: true
          schema:
            description: Loan application identifier.
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/IssueCreditInstrumentHumaInputBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreditInstrumentHumaBody"
          description: Created
          headers:
            X-Idempotency-Replayed:
              schema:
                description: true when this response replays an instrument already durably created under the same idempotency key, rather than a fresh emission.
                type: boolean
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Issue credit instrument
      tags:
        - CreditInstruments
      x-mint:
        href: /en/reference/products/lender/issue-credit-instrument
  /api/v1/loan-applications/{applicationId}/credit-instruments/{instrumentId}/download:
    get:
      description: "Streams the rendered PDF bytes from the Lender's own custody. Tenant-scoped by construction: an instrument from another tenant, or another application, never resolves."
      operationId: downloadCreditInstrument
      parameters:
        - description: Loan application identifier.
          in: path
          name: applicationId
          required: true
          schema:
            description: Loan application identifier.
            format: uuid
            type: string
        - description: Credit instrument identifier.
          in: path
          name: instrumentId
          required: true
          schema:
            description: Credit instrument identifier.
            format: uuid
            type: string
      responses:
        "200":
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Download credit instrument
      tags:
        - CreditInstruments
      x-mint:
        href: /en/reference/products/lender/download-credit-instrument
  /api/v1/loan-applications/{applicationId}/signed-credit-instrument:
    get:
      description: Returns the loan application's newest signed credit instrument record; replaced records stay as history. A record whose PDF the integrator holds answers with custodian integrator.
      operationId: getSignedCreditInstrument
      parameters:
        - description: Loan application identifier.
          in: path
          name: applicationId
          required: true
          schema:
            description: Loan application identifier.
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SignedCreditInstrumentHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Get signed credit instrument
      tags:
        - CreditInstruments
      x-mint:
        href: /en/reference/products/lender/get-signed-credit-instrument
    post:
      description: "Records the signed CCB the integrator collected: the Lender computes the document's sha-256, custodies the bytes, then records which instrument was signed. The same document as the newest record replays it: the replay is keyed on the document's digest and returns the stored record unchanged, ignoring any metadata that differs in the resend. A different document only enters as a replacement that names the newest record in supersedes and gives a replacementReason; the newest record is the one that counts."
      operationId: recordSignedCreditInstrument
      parameters:
        - description: Loan application identifier.
          in: path
          name: applicationId
          required: true
          schema:
            description: Loan application identifier.
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RecordSignedCreditInstrumentHumaInputBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SignedCreditInstrumentHumaBody"
          description: Created
          headers:
            X-Idempotency-Replayed:
              schema:
                description: true when the same document was already recorded and this response replays that record.
                type: boolean
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Record signed credit instrument
      tags:
        - CreditInstruments
      x-mint:
        href: /en/reference/products/lender/record-signed-credit-instrument
  /api/v1/loan-applications/{applicationId}/signed-credit-instrument/download:
    get:
      description: "Streams the newest signed credit instrument's PDF from the Lender's own custody. A record the integrator holds (custodian integrator) refuses with LENDER-0614: the PDF stays with the integrator."
      operationId: downloadSignedCreditInstrument
      parameters:
        - description: Loan application identifier.
          in: path
          name: applicationId
          required: true
          schema:
            description: Loan application identifier.
            format: uuid
            type: string
      responses:
        "200":
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Download signed credit instrument
      tags:
        - CreditInstruments
      x-mint:
        href: /en/reference/products/lender/download-signed-credit-instrument
  /api/v1/loan-applications/{id}:
    get:
      description: Returns one loan application by identifier. An application belonging to another tenant is reported as not found.
      operationId: getLoanApplication
      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
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LoanApplicationReadHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Get loan application
      tags:
        - LoanApplications
      x-mint:
        href: /en/reference/products/lender/get-loan-application
  /api/v1/loan-applications/{id}/approve:
    post:
      description: Transitions a pending-approval loan application to approved.
      operationId: approveLoanApplication
      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). Required: without a key a retry of this request cannot be told apart from a second instruction, and the duplicate it books is undone by hand."
          in: header
          name: X-Idempotency
          required: true
          schema:
            description: "Canonical idempotency request ID (lib-commons enforcer reads this). Required: without a key a retry of this request cannot be told apart from a second instruction, and the duplicate it books is undone by hand."
            examples:
              - 550e8400-e29b-41d4-a716-446655440003
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ApproveLoanApplicationHumaRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LoanApplicationHumaBody"
          description: OK
          headers:
            X-Idempotency-Replayed:
              description: "\"true\" when this response replays a request already executed under the same X-Idempotency, so nothing ran a second time and no money moved again. Absent on a first execution."
              schema:
                type: string
        "400":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: "The at-most-once contract refused the request before any handler ran: no X-Idempotency header (IDEMPOTENCY_KEY_REQUIRED), a key under a spelling this service does not read (IDEMPOTENCY_KEY_HEADER_UNKNOWN), or a request that could not be scoped to a tenant (IDEMPOTENCY_TENANT_REQUIRED). The code is in the problem document's `code` member."
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Approve loan application
      tags:
        - LoanApplications
      x-mint:
        href: /en/reference/products/lender/approve-loan-application
  /api/v1/loan-applications/{id}/disburse:
    post:
      description: "Validates disbursement eligibility, dispatches the resolving jurisdictional disbursement pipeline inside the parent transaction, and moves an approved application to disbursed. Idempotent: the lib-commons middleware enforces replay detection via 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
          headers:
            X-Idempotency-Replayed:
              description: "\"true\" when this response replays a request already executed under the same X-Idempotency, so nothing ran a second time and no money moved again. Absent on a first execution."
              schema:
                type: string
        "400":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: "The at-most-once contract refused the request before any handler ran: no X-Idempotency header (IDEMPOTENCY_KEY_REQUIRED), a key under a spelling this service does not read (IDEMPOTENCY_KEY_HEADER_UNKNOWN), or a request that could not be scoped to a tenant (IDEMPOTENCY_TENANT_REQUIRED). The code is in the problem document's `code` member."
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Disburse loan application
      tags:
        - LoanApplications
      x-mint:
        href: /en/reference/products/lender/disburse-loan-application
  /api/v1/loan-applications/{id}/reject:
    post:
      description: Transitions a pending-approval loan application to rejected.
      operationId: rejectLoanApplication
      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). Required: without a key a retry of this request cannot be told apart from a second instruction, and the duplicate it books is undone by hand."
          in: header
          name: X-Idempotency
          required: true
          schema:
            description: "Canonical idempotency request ID (lib-commons enforcer reads this). Required: without a key a retry of this request cannot be told apart from a second instruction, and the duplicate it books is undone by hand."
            examples:
              - 550e8400-e29b-41d4-a716-446655440003
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RejectLoanApplicationHumaRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LoanApplicationHumaBody"
          description: OK
          headers:
            X-Idempotency-Replayed:
              description: "\"true\" when this response replays a request already executed under the same X-Idempotency, so nothing ran a second time and no money moved again. Absent on a first execution."
              schema:
                type: string
        "400":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: "The at-most-once contract refused the request before any handler ran: no X-Idempotency header (IDEMPOTENCY_KEY_REQUIRED), a key under a spelling this service does not read (IDEMPOTENCY_KEY_HEADER_UNKNOWN), or a request that could not be scoped to a tenant (IDEMPOTENCY_TENANT_REQUIRED). The code is in the problem document's `code` member."
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Reject loan application
      tags:
        - LoanApplications
      x-mint:
        href: /en/reference/products/lender/reject-loan-application
  /api/v1/loan-applications/{id}/withdraw:
    post:
      description: Transitions a loan application to withdrawn.
      operationId: withdrawLoanApplication
      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). Required: without a key a retry of this request cannot be told apart from a second instruction, and the duplicate it books is undone by hand."
          in: header
          name: X-Idempotency
          required: true
          schema:
            description: "Canonical idempotency request ID (lib-commons enforcer reads this). Required: without a key a retry of this request cannot be told apart from a second instruction, and the duplicate it books is undone by hand."
            examples:
              - 550e8400-e29b-41d4-a716-446655440003
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WithdrawLoanApplicationHumaRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LoanApplicationHumaBody"
          description: OK
          headers:
            X-Idempotency-Replayed:
              description: "\"true\" when this response replays a request already executed under the same X-Idempotency, so nothing ran a second time and no money moved again. Absent on a first execution."
              schema:
                type: string
        "400":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: "The at-most-once contract refused the request before any handler ran: no X-Idempotency header (IDEMPOTENCY_KEY_REQUIRED), a key under a spelling this service does not read (IDEMPOTENCY_KEY_HEADER_UNKNOWN), or a request that could not be scoped to a tenant (IDEMPOTENCY_TENANT_REQUIRED). The code is in the problem document's `code` member."
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Withdraw loan application
      tags:
        - LoanApplications
      x-mint:
        href: /en/reference/products/lender/withdraw-loan-application
  /api/v1/loan-product-versions:
    get:
      description: Returns a page of immutable product version snapshots, newest first, optionally narrowed by product, jurisdiction, pricing mode, currency or accrual basis.
      operationId: listLoanProductVersions
      parameters:
        - description: Narrow to one loan product's versions.
          explode: false
          in: query
          name: productId
          schema:
            description: Narrow to one loan product's versions.
            format: uuid
            type: string
        - description: Narrow to one jurisdiction profile code.
          explode: false
          in: query
          name: jurisdictionCode
          schema:
            description: Narrow to one jurisdiction profile code.
            examples:
              - BR
            maxLength: 2
            minLength: 2
            type: string
        - description: Narrow to one pricing mode.
          explode: false
          in: query
          name: rateMode
          schema:
            description: Narrow to one pricing mode.
            enum:
              - fixed
              - floating
            type: string
        - description: Narrow to one ISO-4217 alpha currency.
          explode: false
          in: query
          name: currency
          schema:
            description: Narrow to one ISO-4217 alpha currency.
            examples:
              - BRL
            pattern: ^[A-Z]{3}$
            type: string
        - description: Narrow to one interest recognition method; linear is accepted for compatibility and matches no version.
          explode: false
          in: query
          name: accrualBasis
          schema:
            description: Narrow to one interest recognition method; linear is accepted for compatibility and matches no version.
            enum:
              - effective_interest
              - linear
            type: string
        - description: Page size.
          explode: false
          in: query
          name: limit
          schema:
            default: 25
            description: Page size.
            format: int64
            maximum: 100
            minimum: 1
            type: integer
        - description: Page offset.
          explode: false
          in: query
          name: offset
          schema:
            default: 0
            description: Page offset.
            format: int64
            maximum: 10000
            minimum: 0
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LoanProductVersionListHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: List loan product versions
      tags:
        - LoanProducts
      x-mint:
        href: /en/reference/products/lender/list-loan-product-versions
  /api/v1/loan-product-versions/{id}:
    get:
      description: Returns one immutable product version snapshot by its own identifier.
      operationId: getLoanProductVersion
      parameters:
        - description: Product version snapshot identifier.
          in: path
          name: id
          required: true
          schema:
            description: Product version snapshot identifier.
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LoanProductVersionHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Get loan product version
      tags:
        - LoanProducts
      x-mint:
        href: /en/reference/products/lender/get-loan-product-version
  /api/v1/loan-product-versions/{id}/charge-templates:
    post:
      description: "Declares one effective-dated revision of a charge model on a product version. Attaching a model to a version that already carries live contracts is allowed and is the point of the table being dated: the revision takes effect from its own date forward and never rewrites a charge already assessed."
      operationId: createChargeTemplate
      parameters:
        - description: Loan product version identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan product version identifier.
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateChargeTemplateHumaInputBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ChargeTemplateHumaBody"
          description: Created
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Declare charge model revision
      tags:
        - LoanProducts
      x-mint:
        href: /en/reference/products/lender/declare-charge-model-revision
  /api/v1/loan-products:
    get:
      description: Returns a paginated list of loan products.
      operationId: listLoanProducts
      parameters:
        - description: Page size.
          explode: false
          in: query
          name: limit
          schema:
            default: 25
            description: Page size.
            format: int64
            maximum: 100
            minimum: 1
            type: integer
        - description: Page offset.
          explode: false
          in: query
          name: offset
          schema:
            default: 0
            description: Page offset.
            format: int64
            maximum: 10000
            minimum: 0
            type: integer
        - description: false lists every product except archived ones; true lists only archived ones.
          explode: false
          in: query
          name: archived
          schema:
            default: false
            description: false lists every product except archived ones; true lists only archived ones.
            type: boolean
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LoanProductListHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: List loan products
      tags:
        - LoanProducts
      x-mint:
        href: /en/reference/products/lender/list-loan-products
    post:
      description: Creates a new loan product definition.
      operationId: createLoanProduct
      parameters:
        - description: "Optional; only this spelling is read. After a success, a resend under the same key and body replays the first answer (X-Idempotency-Replayed: true) instead of creating a second product; while the first is running it gets 409, and after a server error the key is spent. The same key with another body is refused. Without it nothing is deduplicated."
          in: header
          name: X-Idempotency
          schema:
            description: "Optional; only this spelling is read. After a success, a resend under the same key and body replays the first answer (X-Idempotency-Replayed: true) instead of creating a second product; while the first is running it gets 409, and after a server error the key is spent. The same key with another body is refused. Without it nothing is deduplicated."
            examples:
              - 550e8400-e29b-41d4-a716-446655440004
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateLoanProductHumaRequest"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LoanProductHumaBody"
          description: Created
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Create loan product
      tags:
        - LoanProducts
      x-mint:
        href: /en/reference/products/lender/create-loan-product
  /api/v1/loan-products/{id}:
    get:
      description: Returns a loan product by ID.
      operationId: getLoanProduct
      parameters:
        - description: Loan product identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan product identifier.
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LoanProductHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Get loan product
      tags:
        - LoanProducts
      x-mint:
        href: /en/reference/products/lender/get-loan-product
  /api/v1/loan-products/{id}/accounting-profiles:
    post:
      description: Configures the accounting profile for a loan product version that belongs to the path loan product.
      operationId: createLoanProductAccountingProfile
      parameters:
        - description: Loan product identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan product identifier.
            examples:
              - 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ConfigureAccountingProfileHumaInputBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AccountingProfileHumaBody"
          description: Created
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Create loan product accounting profile
      tags:
        - LoanProducts
      x-mint:
        href: /en/reference/products/lender/create-loan-product-accounting-profile
  /api/v1/loan-products/{id}/accounting-profiles/supersessions:
    post:
      description: "Replaces the chart of accounts every configured version of this loan product books against, from a stated month forward. One action, one effective date, every affected version written together or none. A version with no chart is not touched: giving it a first one is the separate configure action, and this route requires its own permission because replacing a live chart moves balances on every live contract."
      operationId: supersedeLoanProductAccountingProfile
      parameters:
        - description: Loan product identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan product identifier.
            examples:
              - 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SupersedeAccountingProfileHumaInputBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SupersedeAccountingProfileHumaBody"
          description: Created
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Supersede loan product chart of accounts
      tags:
        - LoanProducts
      x-mint:
        href: /en/reference/products/lender/supersede-loan-product-chart-of-accounts
  /api/v1/loan-products/{id}/accounting-profiles/supersessions/sweeps:
    post:
      description: "A contract's balances move onto the accounts the product's new chart names inside its first posting after the change, and the close of the effective month moves the contracts with none. This moves the contracts still waiting now, one posting per contract filed on the business day it runs, once the close of the month before the effective day has run: before that it moves nothing and answers LENDER-0450. Safe to rerun at any point: a rerun records nothing the first pass already recorded. It carries the permission of the supersession."
      operationId: sweepLoanProductChartBalanceTransfers
      parameters:
        - description: Loan product identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan product identifier.
            examples:
              - 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
        - description: "Canonical idempotency request ID. Required: this request enqueues a posting per contract, and without a key a retry cannot be told apart from a second instruction."
          in: header
          name: X-Idempotency
          required: true
          schema:
            description: "Canonical idempotency request ID. Required: this request enqueues a posting per contract, and without a key a retry cannot be told apart from a second instruction."
            examples:
              - 550e8400-e29b-41d4-a716-446655440004
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SweepChartBalanceTransfersHumaInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SweepChartBalanceTransfersHumaBody"
          description: OK
          headers:
            X-Idempotency-Replayed:
              description: "\"true\" when this response replays a request already executed under the same X-Idempotency, so nothing ran a second time and no money moved again. Absent on a first execution."
              schema:
                type: string
        "400":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: "The at-most-once contract refused the request before any handler ran: no X-Idempotency header (IDEMPOTENCY_KEY_REQUIRED), a key under a spelling this service does not read (IDEMPOTENCY_KEY_HEADER_UNKNOWN), or a request that could not be scoped to a tenant (IDEMPOTENCY_TENANT_REQUIRED). The code is in the problem document's `code` member."
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Move the contracts still waiting on a chart change now
      tags:
        - LoanProducts
      x-mint:
        href: /en/reference/products/lender/settle-a-chart-change-onto-every-contract-s-balances
  /api/v1/loan-products/{id}/activate:
    post:
      description: Transitions a loan product to active status and pins the active product version.
      operationId: activateLoanProduct
      parameters:
        - description: Loan product identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan product identifier.
            examples:
              - 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ActivateLoanProductHumaInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LoanProductHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Activate loan product
      tags:
        - LoanProducts
      x-mint:
        href: /en/reference/products/lender/activate-loan-product
  /api/v1/loan-products/{id}/archived:
    put:
      description: "A loan product is archived, never deleted. An archived product disappears from the lists (GET /api/v1/loan-products?archived=true lists them) and cannot originate a new contract; contracts already written, their history and their later tranches are untouched. Unarchiving restores the status the product left: active on the same pinned version, or draft when it never had one. Asking for the state the product already has answers 200 and writes nothing. Activating an archived product is refused 409 LENDER-0133."
      operationId: setLoanProductArchived
      parameters:
        - description: Loan product identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan product identifier.
            examples:
              - 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ArchiveLoanProductHumaInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LoanProductHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Archive or unarchive a loan product
      tags:
        - LoanProducts
      x-mint:
        href: /en/reference/products/lender/archive-or-unarchive-a-loan-product
  /api/v1/loan-products/{id}/charges:
    post:
      description: Applies one product-version charge template to a loan account and bills it on the contract's next open instalment, which the response names.
      operationId: createLoanProductCharges
      parameters:
        - description: Loan product identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan product identifier.
            examples:
              - 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
        - description: Canonical idempotency key for safe retries.
          in: header
          name: X-Idempotency
          required: true
          schema:
            description: Canonical idempotency key for safe retries.
            examples:
              - 550e8400-e29b-41d4-a716-446655440004
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ApplyLoanChargeHumaInputBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LoanChargeHumaBody"
          description: Created
          headers:
            X-Idempotency-Replayed:
              description: "\"true\" when this response replays a request already executed under the same X-Idempotency, so nothing ran a second time and no money moved again. Absent on a first execution."
              schema:
                type: string
        "400":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: "The at-most-once contract refused the request before any handler ran: no X-Idempotency header (IDEMPOTENCY_KEY_REQUIRED), a key under a spelling this service does not read (IDEMPOTENCY_KEY_HEADER_UNKNOWN), or a request that could not be scoped to a tenant (IDEMPOTENCY_TENANT_REQUIRED). The code is in the problem document's `code` member."
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Apply inherited loan product charge
      tags:
        - LoanProducts
      x-mint:
        href: /en/reference/products/lender/create-loan-product-charges
  /api/v1/loan-products/{id}/floating-rates:
    get:
      description: Resolves the product-version rate mode and effective floating-rate period for the requested as-of date.
      operationId: listLoanProductFloatingRates
      parameters:
        - description: Loan product identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan product identifier.
            examples:
              - 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
        - description: Loan product version identifier.
          explode: false
          in: query
          name: productVersionId
          required: true
          schema:
            description: Loan product version identifier.
            examples:
              - 550e8400-e29b-41d4-a716-446655440001
            format: uuid
            type: string
        - description: As-of date (YYYY-MM-DD).
          explode: false
          in: query
          name: asOf
          required: true
          schema:
            description: As-of date (YYYY-MM-DD).
            examples:
              - "2026-06-14"
            format: date
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/FloatingRateTableHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Get loan product floating rate table
      tags:
        - LoanProducts
      x-mint:
        href: /en/reference/products/lender/list-loan-product-floating-rates
  /api/v1/loan-products/{id}/promote:
    post:
      description: Repoints a LIVE loan product at another of its versions. New loan applications originate on the promoted version from this moment; every contract and every application already in flight keeps the version it was born on, and its schedule, pricing and charges go on being read from that version. The product must already be active — activation is the door its first version comes through — and the version must be one of this product's own.
      operationId: promoteLoanProductVersion
      parameters:
        - description: Loan product identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan product identifier.
            examples:
              - 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PromoteLoanProductVersionHumaInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LoanProductHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Promote a loan product version to current
      tags:
        - LoanProducts
      x-mint:
        href: /en/reference/products/lender/promote-a-loan-product-version-to-current
  /api/v1/loan-products/{id}/versions:
    post:
      description: Creates a new version snapshot of a loan product with updated regulatory parameters.
      operationId: createLoanProductVersion
      parameters:
        - description: Loan product identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan product identifier.
            format: uuid
            type: string
        - description: "Optional; only this spelling is read. After a success, a resend under the same key and body replays the first answer (X-Idempotency-Replayed: true) instead of creating a second version; while the first is running it gets 409, and after a server error the key is spent. The same key with another body is refused. Without it nothing is deduplicated."
          in: header
          name: X-Idempotency
          schema:
            description: "Optional; only this spelling is read. After a success, a resend under the same key and body replays the first answer (X-Idempotency-Replayed: true) instead of creating a second version; while the first is running it gets 409, and after a server error the key is spent. The same key with another body is refused. Without it nothing is deduplicated."
            examples:
              - 550e8400-e29b-41d4-a716-446655440004
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateLoanProductVersionHumaInputBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LoanProductVersionHumaBody"
          description: Created
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Create loan product version
      tags:
        - LoanProducts
      x-mint:
        href: /en/reference/products/lender/create-loan-product-version
  /api/v1/loan-products/{productId}/document-templates:
    get:
      description: Returns the version history for the given kind, newest first.
      operationId: listDocumentTemplates
      parameters:
        - description: Owning loan product identifier.
          in: path
          name: productId
          required: true
          schema:
            description: Owning loan product identifier.
            format: uuid
            type: string
        - description: Credit-instrument kind.
          explode: false
          in: query
          name: kind
          required: true
          schema:
            description: Credit-instrument kind.
            enum:
              - ccb
              - consignado_quote_ccb
            type: string
        - description: Page size.
          explode: false
          in: query
          name: limit
          schema:
            default: 25
            description: Page size.
            format: int64
            maximum: 100
            minimum: 1
            type: integer
        - description: Page offset.
          explode: false
          in: query
          name: offset
          schema:
            default: 0
            description: Page offset.
            format: int64
            maximum: 10000
            minimum: 0
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DocumentTemplateListHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: List document template versions
      tags:
        - DocumentTemplates
      x-mint:
        href: /en/reference/products/lender/list-document-template-versions
    post:
      description: Creates a new DRAFT credit-instrument document template version for a loan product.
      operationId: createDocumentTemplate
      parameters:
        - description: Owning loan product identifier.
          in: path
          name: productId
          required: true
          schema:
            description: Owning loan product identifier.
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateDocumentTemplateHumaInputBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DocumentTemplateHumaBody"
          description: Created
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Create document template draft
      tags:
        - DocumentTemplates
      x-mint:
        href: /en/reference/products/lender/create-document-template-draft
  /api/v1/loan-products/{productId}/document-templates/active:
    get:
      description: Returns the currently active published template version for the given kind; 404 when the product has none.
      operationId: getActiveDocumentTemplate
      parameters:
        - description: Owning loan product identifier.
          in: path
          name: productId
          required: true
          schema:
            description: Owning loan product identifier.
            format: uuid
            type: string
        - description: Credit-instrument kind.
          explode: false
          in: query
          name: kind
          required: true
          schema:
            description: Credit-instrument kind.
            enum:
              - ccb
              - consignado_quote_ccb
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DocumentTemplateHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Get active document template
      tags:
        - DocumentTemplates
      x-mint:
        href: /en/reference/products/lender/get-active-document-template
  /api/v1/loan-products/{productId}/document-templates/{templateId}:
    get:
      description: Returns one template version by id.
      operationId: getDocumentTemplate
      parameters:
        - description: Owning loan product identifier.
          in: path
          name: productId
          required: true
          schema:
            description: Owning loan product identifier.
            format: uuid
            type: string
        - description: Template version identifier.
          in: path
          name: templateId
          required: true
          schema:
            description: Template version identifier.
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DocumentTemplateHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Get document template version
      tags:
        - DocumentTemplates
      x-mint:
        href: /en/reference/products/lender/get-document-template-version
  /api/v1/loan-products/{productId}/document-templates/{templateId}/publish:
    post:
      description: Publishes a draft version, atomically superseding whatever version was previously active.
      operationId: publishDocumentTemplate
      parameters:
        - description: Owning loan product identifier.
          in: path
          name: productId
          required: true
          schema:
            description: Owning loan product identifier.
            format: uuid
            type: string
        - description: Template version identifier to publish.
          in: path
          name: templateId
          required: true
          schema:
            description: Template version identifier to publish.
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DocumentTemplateHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Publish document template
      tags:
        - DocumentTemplates
      x-mint:
        href: /en/reference/products/lender/publish-document-template
  /api/v1/me:
    get:
      description: Returns the validated subject of the bearer token and the caller's effective permissions in 'resource:action' form.
      operationId: getSession
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SessionBody"
          description: OK
          headers:
            Cache-Control:
              schema:
                description: "Always no-store: the session projection is per-caller and must never be cached by an intermediary."
                type: string
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Error
      summary: Get current session
      tags:
        - Session
      x-mint:
        href: /en/reference/products/lender/get-current-session
  /api/v1/partner/loan-products/{loanProductId}:
    get:
      description: Returns a loan product by ID to a partner credential bound to it; answers as GET /api/v1/loan-products/{id}.
      operationId: getPartnerLoanProduct
      parameters:
        - description: Loan product identifier.
          in: path
          name: loanProductId
          required: true
          schema:
            description: Loan product identifier.
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LoanProductHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Get loan product (partner)
      tags:
        - LoanProducts
      x-mint:
        href: /en/reference/products/lender/get-loan-product-partner
  /api/v1/rate-tables:
    get:
      description: Returns a page of floating-rate table headers, newest first. The effective-dated curve is returned only by the detail endpoint.
      operationId: listRateTables
      parameters:
        - description: Page size.
          explode: false
          in: query
          name: limit
          schema:
            default: 25
            description: Page size.
            format: int64
            maximum: 100
            minimum: 1
            type: integer
        - description: Page offset.
          explode: false
          in: query
          name: offset
          schema:
            default: 0
            description: Page offset.
            format: int64
            maximum: 10000
            minimum: 0
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RateTableListHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: List floating-rate tables
      tags:
        - LoanProducts
      x-mint:
        href: /en/reference/products/lender/list-floating-rate-tables
    post:
      description: Registers a floating-rate curve by name. The curve starts empty; periods are appended to it.
      operationId: createRateTable
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateRateTableHumaInputBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RateTableHumaBody"
          description: Created
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Create floating-rate table
      tags:
        - LoanProducts
      x-mint:
        href: /en/reference/products/lender/create-floating-rate-table
  /api/v1/rate-tables/{id}:
    get:
      description: Returns one floating-rate table with its full effective-dated curve, oldest period first.
      operationId: getRateTable
      parameters:
        - description: Floating-rate table identifier.
          in: path
          name: id
          required: true
          schema:
            description: Floating-rate table identifier.
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RateTableDetailHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Get floating-rate table
      tags:
        - LoanProducts
      x-mint:
        href: /en/reference/products/lender/get-floating-rate-table
  /api/v1/rate-tables/{id}/daily-rates:
    get:
      description: Returns every revision of each day of a daily index series in [from, to], by day then revision. The highest revision of a day is the one in force.
      operationId: listDailyIndexRates
      parameters:
        - description: Daily index rate table identifier.
          in: path
          name: id
          required: true
          schema:
            description: Daily index rate table identifier.
            format: uuid
            type: string
        - description: First civil day of the window (YYYY-MM-DD), inclusive.
          explode: false
          in: query
          name: from
          required: true
          schema:
            description: First civil day of the window (YYYY-MM-DD), inclusive.
            examples:
              - "2026-10-01"
            format: date
            type: string
        - description: Last civil day of the window (YYYY-MM-DD), inclusive. The window holds at most 366 days.
          explode: false
          in: query
          name: to
          required: true
          schema:
            description: Last civil day of the window (YYYY-MM-DD), inclusive. The window holds at most 366 days.
            examples:
              - "2026-10-15"
            format: date
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DailyIndexRateListHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: List daily index rates
      tags:
        - LoanProducts
      x-mint:
        href: /en/reference/products/lender/list-daily-index-rates
  /api/v1/rate-tables/{id}/daily-rates/{date}:
    put:
      description: "Stores the next revision of one day of a daily index series as an operator correction, with the reason and the authenticated subject. No revision is ever rewritten. A holiday is accepted: its rate stays out of the accumulated factor."
      operationId: correctDailyIndexRate
      parameters:
        - description: Daily index rate table identifier.
          in: path
          name: id
          required: true
          schema:
            description: Daily index rate table identifier.
            format: uuid
            type: string
        - description: "Civil day corrected (YYYY-MM-DD): a weekday, today in Brasilia or earlier."
          in: path
          name: date
          required: true
          schema:
            description: "Civil day corrected (YYYY-MM-DD): a weekday, today in Brasilia or earlier."
            examples:
              - "2026-10-14"
            format: date
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CorrectDailyIndexRateHumaInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DailyIndexRateHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Correct daily index rate
      tags:
        - LoanProducts
      x-mint:
        href: /en/reference/products/lender/correct-daily-index-rate
  /api/v1/rate-tables/{id}/periods:
    post:
      description: "Adds the next period to a curve and closes the open one at the instant before this one opens. A curve is append-only in time: the effective date must be strictly after every period already on it, nothing is ever edited, and nothing is ever deleted."
      operationId: appendRateTablePeriod
      parameters:
        - description: Floating-rate table identifier.
          in: path
          name: id
          required: true
          schema:
            description: Floating-rate table identifier.
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AppendRateTablePeriodHumaInputBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RateTablePeriodHumaBody"
          description: Created
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Append floating-rate period
      tags:
        - LoanProducts
      x-mint:
        href: /en/reference/products/lender/append-floating-rate-period
  /api/v1/returned-payment-receivables:
    get:
      description: Lists debts opened when a payment was reversed after the payoff refund desk had already returned its overpayment to the borrower. The reversal reopens the contract, and the refunded amount is the borrower's debt, collected apart from it. Narrow by contract, by borrower or by status.
      operationId: listReturnedPaymentReceivables
      parameters:
        - description: List only what one contract left behind.
          explode: false
          in: query
          name: loanAccountId
          schema:
            description: List only what one contract left behind.
            examples:
              - 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
        - description: List only what one person owes, across contracts.
          explode: false
          in: query
          name: borrowerId
          schema:
            description: List only what one person owes, across contracts.
            examples:
              - 550e8400-e29b-41d4-a716-446655440020
            format: uuid
            type: string
        - description: Narrow to open, collected or written-off debts. All three are returned when absent.
          explode: false
          in: query
          name: status
          schema:
            description: Narrow to open, collected or written-off debts. All three are returned when absent.
            enum:
              - open
              - collected
              - written_off
            type: string
        - description: Page size (1-100, default 25).
          explode: false
          in: query
          name: limit
          schema:
            default: 25
            description: Page size (1-100, default 25).
            format: int64
            maximum: 100
            minimum: 1
            type: integer
        - description: Page offset.
          explode: false
          in: query
          name: offset
          schema:
            default: 0
            description: Page offset.
            format: int64
            maximum: 10000
            minimum: 0
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListReturnedPaymentReceivablesHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: List returned payment receivables
      tags:
        - Returned Payment Receivables
      x-mint:
        href: /en/reference/products/lender/list-returned-payment-receivables
  /api/v1/returned-payment-receivables/{id}:
    get:
      description: Returns one returned-payment receivable. A debt the asking identity may not see answers 404.
      operationId: getReturnedPaymentReceivable
      parameters:
        - description: Returned-payment receivable identifier.
          in: path
          name: id
          required: true
          schema:
            description: Returned-payment receivable identifier.
            examples:
              - 550e8400-e29b-41d4-a716-446655440003
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ReturnedPaymentReceivableHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Get returned payment receivable
      tags:
        - Returned Payment Receivables
      x-mint:
        href: /en/reference/products/lender/get-returned-payment-receivable
  /api/v1/returned-payment-receivables/{id}/collections:
    post:
      description: Records that the borrower paid the whole debt by other means, closing it and booking the mirror of the entry that opened it. Redelivering the same X-Idempotency key answers the collection that already stands; a different request against a collected debt is refused. Money dated on a São Paulo civil day after today is refused with 422 (LENDER-0395) and writes nothing; a later hour of today is accepted.
      operationId: collectReturnedPaymentReceivable
      parameters:
        - description: Returned-payment receivable identifier.
          in: path
          name: id
          required: true
          schema:
            description: Returned-payment receivable identifier.
            examples:
              - 550e8400-e29b-41d4-a716-446655440003
            format: uuid
            type: string
        - description: "Idempotency key of the collection: 1 to 255 bytes of UTF-8. The route refuses a request without it, or with a blank, longer or non-UTF-8 one (LENDER-0326). X-Request-ID is never read as the key."
          in: header
          name: X-Idempotency
          schema:
            description: "Idempotency key of the collection: 1 to 255 bytes of UTF-8. The route refuses a request without it, or with a blank, longer or non-UTF-8 one (LENDER-0326). X-Request-ID is never read as the key."
            examples:
              - 550e8400-e29b-41d4-a716-446655440011
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CollectReturnedPaymentReceivableHumaRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ReturnedPaymentReceivableHumaBody"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Conflict
        "413":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Request Entity Too Large
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Internal Server Error
        "503":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Service Unavailable
        "504":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Gateway Timeout
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Detail"
          description: Any other status this operation may carry, rendered as a problem document — including a refusal produced ahead of the service, such as a gateway or ingress answering on its behalf.
      summary: Record a returned payment receivable collection
      tags:
        - Returned Payment Receivables
      x-mint:
        href: /en/reference/products/lender/record-a-returned-payment-receivable-collection
security:
  - BearerAuth: []
tags:
  - description: "Caller session projection: validated subject and effective permissions for the presented token."
    name: Session
  - description: "Ledger accounting operations: journal entries and accrual postings for loan accounts. Operations under /api/v1/internal are back-office operations for the client's operators: they require a person's login, and a service credential gets 403."
    name: Accounting
  - description: "Loan application intake and lifecycle: submission, decisioning, and status."
    name: LoanApplications
  - description: "Loan product catalog: definition, versioning, and activation of lending products."
    name: LoanProducts
  - description: "Loan account servicing operations: balances, schedules, and account-level actions."
    name: Loan Accounts
  - description: "Portfolio dashboard read operations: aggregated portfolio and performance views."
    name: Dashboard
  - description: "Jurisdiction registry: supported jurisdiction profiles and their capabilities."
    name: Jurisdictions
  - description: Jurisdiction-specific loan application operations (Brazil origination surface).
    name: Loan Applications
  - description: Tax computation operations for jurisdiction-specific lending (e.g. Brazil IOF).
    name: Tax
  - description: "Brazil consignado privado operations: contract lifecycle, exclusion repair, and compensating adjustments. Operations under /api/v1/internal are back-office operations for the client's operators: they require a person's login, and a service credential gets 403."
    name: Consignado
  - description: "Inbound record quarantine. Operations under /api/v1/internal are back-office operations for the client's operators: they require a person's login, and a service credential gets 403."
    name: Streaming
  - description: "Credit-instrument document template registry: versioned drafting and publication of CCB clausulado."
    name: DocumentTemplates
servers:
  - url: https://lender.sandbox.lerian.net
