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

# Create loan product version (BR alias)

> BR-aliased path for creating a loan product version. Resolves to the same handler as the core endpoint.



## OpenAPI

````yaml /pt/openapi/v3-current/lender.yaml post /api/v1/br/loan-products/{id}/versions
openapi: 3.1.0
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
servers:
  - url: https://lender.sandbox.lerian.net
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
paths:
  /api/v1/br/loan-products/{id}/versions:
    post:
      tags:
        - LoanProducts
      summary: Create loan product version (BR alias)
      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.
components:
  schemas:
    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
    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
    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
    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
    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
    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.'
        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
    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
    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
    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
    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
    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
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.