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

# Replace lender criteria

> Full replace. `criteria` overwrites every structured key (omitted keys are cleared; blank and `false` values are dropped); `extra_rules` replaces all extra rules (omit or send `[]` to clear); `products` only changes when sent. Read the current block first if you want to change one key. The change is written to the lender’s activity log.



## OpenAPI

````yaml /openapi/public-v1.json put /v1/lenders/{id}/criteria
openapi: 3.0.0
info:
  title: NextLevel MCA Public API
  description: >-
    REST API for the NextLevel MCA deal platform. Objects flow Businesses →
    People → Deals → Submissions → Offers → Advances.


    **Authentication.** Send `Authorization: Bearer <key>` with an API key
    (`nlmca_live_…`, created in Settings → Developers) or an OAuth access token.
    Keys are scoped to one location.


    **Conventions.** JSON only. Cursor pagination (`limit` ≤ 100, `cursor` from
    `meta.next_cursor`). Every success is `{ data, meta }`; every error is `{
    error: { type, message, code, param, request_id } }`. POST endpoints accept
    `Idempotency-Key` (24h replay). Rate limit 300 requests/min per credential
    (`X-RateLimit-*` headers).


    **Scopes.** Keys with no scopes have all of them. Otherwise:

    - `businesses:read` — Read businesses and their notes, tasks and activity

    - `businesses:write` — Create and update businesses, notes and tasks

    - `people:read` — Read people (contacts and owners)

    - `people:write` — Create and update people

    - `deals:read` — Read deals, submissions and the pipeline

    - `deals:write` — Create and update deals, move stages

    - `documents:read` — Read documents and statement analysis

    - `documents:write` — Upload documents and request documents from merchants

    - `lenders:read` — Read lenders, criteria and lender matches

    - `lenders:write` — Create and update lenders and criteria

    - `submissions:write` — Submit deals to lenders and withdraw submissions

    - `offers:read` — Read offers

    - `offers:write` — Log and update offers, set the primary offer

    - `advances:read` — Read funded advances and renewal flags

    - `advances:write` — Update advances

    - `portal:send` — Generate and send merchant portal links

    - `webhooks:manage` — Manage webhook subscriptions
  version: '1.0'
  contact: {}
servers:
  - url: https://api.nextlevelmca.com
    description: Production
security:
  - bearer: []
tags:
  - name: Businesses
    description: Merchant businesses and their notes, tasks and activity
  - name: People
    description: Contacts and owners. Phone lookups normalise to E.164.
  - name: Deals
    description: Deals, stage moves, renewals and the pipeline
  - name: Documents
    description: Documents, presigned uploads, document requests and statement analysis
  - name: Lenders
    description: Lenders and their criteria
  - name: Lender matches
    description: Criteria-driven lender matching for a deal
  - name: Submissions
    description: Sending deals to lenders
  - name: Offers
    description: Lender offers and the primary offer
  - name: Advances
    description: Funded advances and renewal readiness
  - name: Merchant portal
    description: Magic links for the merchant portal
  - name: Webhooks
    description: Outbound event subscriptions
paths:
  /v1/lenders/{id}/criteria:
    put:
      tags:
        - Lenders
      summary: Replace lender criteria
      description: >-
        Full replace. `criteria` overwrites every structured key (omitted keys
        are cleared; blank and `false` values are dropped); `extra_rules`
        replaces all extra rules (omit or send `[]` to clear); `products` only
        changes when sent. Read the current block first if you want to change
        one key. The change is written to the lender’s activity log.
      operationId: lenders_putCriteria
      parameters:
        - name: id
          required: true
          in: path
          description: Lender id
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateLenderCriteriaDto'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - meta
                properties:
                  data:
                    $ref: '#/components/schemas/LenderCriteriaDto'
                  meta:
                    $ref: '#/components/schemas/EmptyMetaDto'
        '400':
          description: Validation failed. `error.param` names the field.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelopeDto'
        '401':
          description: Missing, invalid, expired or revoked credential.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelopeDto'
        '403':
          description: Credential lacks the scope, or the role lacks the permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelopeDto'
        '404':
          description: Resource not found in this location.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelopeDto'
        '429':
          description: Rate limit exceeded. See `X-RateLimit-*` and `Retry-After`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelopeDto'
      security:
        - bearer: []
components:
  schemas:
    UpdateLenderCriteriaDto:
      type: object
      properties:
        criteria:
          description: >-
            Full replacement of the structured criteria. Keys you omit are
            cleared. Send `{}` to clear everything.
          allOf:
            - $ref: '#/components/schemas/LenderCriteriaFieldsDto'
        products:
          description: Products the lender writes. Unchanged when omitted.
          allOf:
            - $ref: '#/components/schemas/LenderProductsDto'
        extra_rules:
          description: >-
            Full replacement of the extra rules. Omit or send `[]` to remove
            them all.
          type: array
          items:
            $ref: '#/components/schemas/LenderExtraRuleDto'
      required:
        - criteria
    LenderCriteriaDto:
      type: object
      properties:
        criteria:
          description: Structured criteria. Only keys that are set are returned.
          allOf:
            - $ref: '#/components/schemas/LenderCriteriaFieldsDto'
        products:
          description: Products the lender writes.
          allOf:
            - $ref: '#/components/schemas/LenderProductsDto'
        extra_rules:
          description: Rules outside the structured schema.
          type: array
          items:
            $ref: '#/components/schemas/LenderExtraRuleDto'
        updated_at:
          type: string
          nullable: true
          description: When criteria were last changed (ISO 8601).
      required:
        - criteria
        - products
        - extra_rules
        - updated_at
    EmptyMetaDto:
      type: object
      properties: {}
    ErrorEnvelopeDto:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/PublicErrorDto'
      required:
        - error
    LenderCriteriaFieldsDto:
      type: object
      properties:
        min_tib:
          type: number
          description: Minimum time in business, months.
        min_monthly_revenue:
          type: number
          description: Minimum average monthly gross deposits, USD.
        min_deposits:
          type: number
          description: Minimum deposit count per month.
        min_avg_balance:
          type: number
          description: Minimum average daily balance, USD.
        industries:
          description: >-
            Industry allow-list. Empty = all industries except
            `prohibited_industries`.
          type: array
          items:
            type: string
        prohibited_industries:
          description: Industries that are never eligible.
          type: array
          items:
            type: string
        prohibited_states:
          description: Two-letter state codes that are never eligible.
          type: array
          items:
            type: string
        min_credit_score:
          type: number
          description: Minimum primary guarantor FICO.
        credit_score_range:
          type: string
          enum:
            - any
            - 500-579
            - 580-669
            - 670-739
            - 740+
          description: Credit score band used for paper-grade routing.
        min_positions:
          type: number
          description: Minimum number of existing positions.
        max_positions:
          type: number
          description: Maximum number of existing positions.
        max_nsf_days:
          type: number
          description: Maximum NSF occurrences in the statement period.
        max_negative_days:
          type: number
          description: Maximum negative-balance days in the statement period.
        funds_defaults:
          type: boolean
          description: Considers merchants with a prior MCA default.
        funds_reversals:
          type: boolean
          description: Considers merchants with recent ACH reversals.
        no_recovery_activity:
          type: boolean
          description: Requires no recovery / collection activity on statements.
        min_funding_amount:
          type: number
          description: Minimum funding amount, USD.
        max_funding_amount:
          type: number
          description: Maximum funding amount, USD.
        term:
          type: number
          description: Typical term, months.
        lowest_days:
          type: number
          description: Shortest payback window, days.
        highest_days:
          type: number
          description: Longest payback window, days.
        pay_daily:
          type: boolean
          description: Offers daily payments.
        pay_weekly:
          type: boolean
          description: Offers weekly payments.
        pay_biweekly:
          type: boolean
          description: Offers bi-weekly payments.
        pay_monthly:
          type: boolean
          description: Offers monthly payments.
    LenderProductsDto:
      type: object
      properties:
        mca:
          type: boolean
          description: Writes merchant cash advances.
        term_loan:
          type: boolean
          description: Writes term loans.
        loc:
          type: boolean
          description: Writes lines of credit.
        equipment:
          type: boolean
          description: Writes equipment financing.
        factoring:
          type: boolean
          description: Writes invoice factoring.
    LenderExtraRuleDto:
      type: object
      properties:
        field:
          type: string
          description: >-
            Deal field the rule checks, e.g. `min_franchise_years`,
            `sole_prop_allowed`, `bankruptcy_lookback`, `requires_pg`,
            `seasonal_ok`.
          maxLength: 100
        operator:
          type: string
          enum:
            - gte
            - lte
            - eq
            - neq
            - in
            - not_in
          description: Comparison operator.
        value:
          type: string
          description: >-
            Value as text. Numbers and `true`/`false` are typed automatically;
            use comma-separated values with `in` / `not_in`.
          maxLength: 1000
        display_label:
          type: string
          description: Label shown in match explanations.
          maxLength: 255
      required:
        - field
        - operator
        - value
    PublicErrorDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - validation_error
            - authentication_error
            - permission_error
            - not_found
            - conflict
            - rate_limit_error
            - api_error
        message:
          type: string
          description: Human-readable explanation, safe to show to an operator or an agent.
        code:
          type: string
          description: >-
            Stable machine-readable code, e.g. `missing_scope`,
            `duplicate_business`.
        param:
          type: string
          description: Request field the error refers to, when applicable.
        request_id:
          type: string
          description: Echo of the `X-Request-Id` header. Quote it when contacting support.
      required:
        - type
        - message
        - request_id
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: API key or JWT
      type: http
      description: API key (`nlmca_live_…`) or OAuth access token

````

## Related topics

- [Get lender criteria](/api-reference/lenders/get-lender-criteria.md)
- [Update a lender](/api-reference/lenders/update-a-lender.md)
- [Create a lender](/api-reference/lenders/create-a-lender.md)
