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

# Register or update an assignment fund

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



## OpenAPI

````yaml /pt/openapi/v3-current/lender.yaml post /api/v1/assignment/funds
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/assignment/funds:
    post:
      tags:
        - AssignmentFunds
      summary: Register or update an assignment fund
      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
components:
  schemas:
    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
    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
    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
    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
  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.