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

# Import a contract already averbado outside this gateway

> Adopts a contract that is ALREADY averbado on the payroll rail — registered on the Dataprev portal by hand, by a previous provider, or carried in from a book you are migrating — so its recurring saldo devedor obligation (Manual 015 §2.2) exists here and its first M015 report is scheduled.

It does NOT averbate anything and it moves no money: the only call it makes to Dataprev is consultar-emprestimo-trabalhador (Manual 005 v1.13 §3.2.1), a read, under your own credential. Everything the obligation needs — the worker's CPF and matrícula, the employer inscription, the instalment count, the instalment amount, the first discount competência, the monthly rate and the first deduction date — is taken from that read. You send the contract number and, optionally, how many competências have already amortized; you never send worker or employer identifiers, and none come back.

Only a LIVE contract can be imported: situação 0 (Ativo), 7 (Contrato suspenso), 8 (Suspenso banco) or 17 (Contrato suspenso por antecipação de parcela). A suspension is not a closure — the deduction is still attached to the worker and the debt is still reportable. Situação 2, 3, 15 and 16 are closed and refused 422 whose detail names the código the registry published (`situacaoEmprestimo 3 não é vigente`) and nothing else — Dataprev's own descrição is never relayed into the body. Importing one would make this gateway file recurring reports about a debt the registry already ended. A read that carries no situação at all, no competência de início de desconto, no monthly rate (valorTaxaMensal) or first deduction date (dataPrimeiroDesconto), or one that answers about a different contract number, is refused 422 the same way rather than guessed at.

The import is not idempotent in the ordinary sense: a contract this tenant already holds an obligation for is answered 409 CONTRACT_ALREADY_REGISTERED, with nothing changed and the parcelas_pagas you sent NOT applied. X-Idempotency is still required, and the transport middleware replays the answer of a duplicate request under the same key.

WITH BOOKING (booking + registration): the contract is also handed to the Lerian lender exactly as an averbação through this gateway would hand it — both documents are retained in this gateway's custody and consignado_contract.registered is published afterwards. booking is the averbação body with its full booking block; registration is the rail acknowledgement you received. First, before the Dataprev read, a booking the lender would refuse to book answers 422 with the codes of the averbação and documentation routes (BOOKING_FIELD_INVALID, DECLARED_TERMS_INCONSISTENT, MARGIN_SNAPSHOT_INCONSISTENT, CONTRACT_NOT_BOOKABLE, DECLARED_DATES_OUT_OF_ORDER, FORMALIZATION_DEADLINE_EXCEEDED), its detail naming the rule, and nothing is read or written; when the refused value is the one Dataprev holds, import the contract without booking. FIRST_DEDUCTION_BEFORE_COMPETENCIA is the averbação's own rule and never refuses an import. Before anything is written the booking is checked against the same Dataprev read: worker, employer and contract must be the published ones; every money term (principal, liberado, parcela, quantidade, taxas, CET, IOF), the first discount competência, the contract dates and the guarantee must equal what the read publishes (a date or guarantee value the rail does not publish is not compared); registration.averbado_at must sit within one minute of the read's aceito_em; and the read must carry every term the registration needs. Otherwise 422. The same request replays with the same answer; a different booking for a contract already in the averbação book is 409 CONTRACT_ALREADY_REGISTERED. In this mode an obligation the contract already holds is NOT a conflict: it is left untouched and saldo_devedor_dispatch_scheduled answers false. Nothing is averbated and the CCB is not attached at Dataprev.



## OpenAPI

````yaml /en/openapi/v3-current/consignado.yaml post /v1/consignado/contracts/{numero_contrato}/import
openapi: 3.1.0
info:
  contact:
    email: contact@lerian.studio
    name: Lerian Studio
    url: https://lerian.studio
  description: >-
    OpenAPI 3.1 surface for Lerian Consignado — Dataprev. The API covers tenant
    credentials and rail configuration, worker margin, loan auctions and bids,
    contract registration and lifecycle, B3 instrument codes, disbursement
    confirmation, portability, refinancing, renegotiation, FGTS guarantees,
    reconciliation, funds, assignments, throughput, and event subscriptions.
  license:
    name: Lerian Studio General License
  title: Lerian Consignado API
  version: v1.0.0
servers:
  - url: https://br-consignado-gw.sandbox.lerian.net
security:
  - BearerAuth: []
tags:
  - description: >-
      Per-tenant Dataprev credential custody and public rail configuration
      (upload, status, rotation, revoke, requester code, and worker portal base
      URL)
    name: Credentials
  - description: >-
      Per-tenant streaming-hub subscription control-plane (list, create, get,
      rotate, revoke, and test delivery)
    name: Subscriptions
  - description: >-
      Dataprev payroll-rail surface: FGTS balance and authorization reads, the
      FGTS guarantee execution, contract suspension, reactivation and term
      changes, the rail's own contract documents, and the on-demand reads of
      leilão solicitações, escriturações, repasses and employment terminations
    name: Consignado Rail
  - description: >-
      Synchronous rail command surface: the operations a bancarizador without
      the lender drives over HTTP.
    name: Consignado Rail Commands
  - description: >-
      Gateway-owned disbursement confirmation: a client bank recording money it
      has ALREADY paid to a worker. It crosses no government boundary and
      proxies no Dataprev operation.
    name: Consignado Disbursement
  - description: >-
      Per-tenant self-service outbound Dataprev rail throughput: read and set
      this tenant's own requests-per-second, including a deliberate pause at
      zero
    name: Consignado Throughput
  - description: >-
      The B3 instrument code (Código IF) of an averbado contract: informed once
      by the bancarizador after B3 registers the CCB, and read back
    name: Consignado Registro B3
paths:
  /v1/consignado/contracts/{numero_contrato}/import:
    post:
      tags:
        - Consignado Rail Commands
      summary: Import a contract already averbado outside this gateway
      description: >-
        Adopts a contract that is ALREADY averbado on the payroll rail —
        registered on the Dataprev portal by hand, by a previous provider, or
        carried in from a book you are migrating — so its recurring saldo
        devedor obligation (Manual 015 §2.2) exists here and its first M015
        report is scheduled.


        It does NOT averbate anything and it moves no money: the only call it
        makes to Dataprev is consultar-emprestimo-trabalhador (Manual 005 v1.13
        §3.2.1), a read, under your own credential. Everything the obligation
        needs — the worker's CPF and matrícula, the employer inscription, the
        instalment count, the instalment amount, the first discount competência,
        the monthly rate and the first deduction date — is taken from that read.
        You send the contract number and, optionally, how many competências have
        already amortized; you never send worker or employer identifiers, and
        none come back.


        Only a LIVE contract can be imported: situação 0 (Ativo), 7 (Contrato
        suspenso), 8 (Suspenso banco) or 17 (Contrato suspenso por antecipação
        de parcela). A suspension is not a closure — the deduction is still
        attached to the worker and the debt is still reportable. Situação 2, 3,
        15 and 16 are closed and refused 422 whose detail names the código the
        registry published (`situacaoEmprestimo 3 não é vigente`) and nothing
        else — Dataprev's own descrição is never relayed into the body.
        Importing one would make this gateway file recurring reports about a
        debt the registry already ended. A read that carries no situação at all,
        no competência de início de desconto, no monthly rate (valorTaxaMensal)
        or first deduction date (dataPrimeiroDesconto), or one that answers
        about a different contract number, is refused 422 the same way rather
        than guessed at.


        The import is not idempotent in the ordinary sense: a contract this
        tenant already holds an obligation for is answered 409
        CONTRACT_ALREADY_REGISTERED, with nothing changed and the parcelas_pagas
        you sent NOT applied. X-Idempotency is still required, and the transport
        middleware replays the answer of a duplicate request under the same key.


        WITH BOOKING (booking + registration): the contract is also handed to
        the Lerian lender exactly as an averbação through this gateway would
        hand it — both documents are retained in this gateway's custody and
        consignado_contract.registered is published afterwards. booking is the
        averbação body with its full booking block; registration is the rail
        acknowledgement you received. First, before the Dataprev read, a booking
        the lender would refuse to book answers 422 with the codes of the
        averbação and documentation routes (BOOKING_FIELD_INVALID,
        DECLARED_TERMS_INCONSISTENT, MARGIN_SNAPSHOT_INCONSISTENT,
        CONTRACT_NOT_BOOKABLE, DECLARED_DATES_OUT_OF_ORDER,
        FORMALIZATION_DEADLINE_EXCEEDED), its detail naming the rule, and
        nothing is read or written; when the refused value is the one Dataprev
        holds, import the contract without booking.
        FIRST_DEDUCTION_BEFORE_COMPETENCIA is the averbação's own rule and never
        refuses an import. Before anything is written the booking is checked
        against the same Dataprev read: worker, employer and contract must be
        the published ones; every money term (principal, liberado, parcela,
        quantidade, taxas, CET, IOF), the first discount competência, the
        contract dates and the guarantee must equal what the read publishes (a
        date or guarantee value the rail does not publish is not compared);
        registration.averbado_at must sit within one minute of the read's
        aceito_em; and the read must carry every term the registration needs.
        Otherwise 422. The same request replays with the same answer; a
        different booking for a contract already in the averbação book is 409
        CONTRACT_ALREADY_REGISTERED. In this mode an obligation the contract
        already holds is NOT a conflict: it is left untouched and
        saldo_devedor_dispatch_scheduled answers false. Nothing is averbated and
        the CCB is not attached at Dataprev.
      operationId: importConsignadoContract
      parameters:
        - description: >-
            The contract number as the RAIL holds it (Manual 005 v1.13 §3.2.1
            p.13, 2..15 alphanumerics). It is the only identifier the import
            takes: everything else about the contract is read back from
            Dataprev.
          in: path
          name: numero_contrato
          required: true
          schema:
            description: >-
              The contract number as the RAIL holds it (Manual 005 v1.13 §3.2.1
              p.13, 2..15 alphanumerics). It is the only identifier the import
              takes: everything else about the contract is read back from
              Dataprev.
            examples:
              - '199971600000'
            maxLength: 15
            minLength: 2
            pattern: ^[A-Za-z0-9]+$
            type: string
        - description: Required idempotency key. Absent is 422, never a generated default.
          in: header
          name: X-Idempotency
          required: true
          schema:
            description: >-
              Required idempotency key. Absent is 422, never a generated
              default.
            examples:
              - idem-import-1
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContractImportRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractImportResponse'
          description: Created
        '409':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: >-
            A conflict with an obligation this contract already holds.
            CONTRACT_ALREADY_REGISTERED means this tenant's saldo devedor book
            already carries this contract, whether it was averbado through this
            gateway or imported earlier. It is definitive: nothing about the
            existing obligation was changed, and the parcelas_pagas sent with
            this request was not applied. Read the contract's saldo devedor
            instead of importing it again. With a booking, the same code also
            means the contract is already in this tenant's averbação book —
            averbado through this gateway, or imported with a different booking
            — and nothing was written; the original request replays.
            DATAPREV_CREDENTIAL_REQUIRED means this tenant has no Dataprev
            credential in custody, so the gateway cannot act for it on the rail
            at all; it is definitive until the credential is provisioned, and
            retrying before that never succeeds. DATAPREV_CREDENTIAL_REVOKED
            means the tenant's credentials were revoked; it holds until a
            complete upload (PUT /v1/credentials/dataprev with the certificate
            and the OAuth client together) opens a new custody.
            DATAPREV_CREDENTIAL_REJECTED means Dataprev refused its OAuth client
            credentials, so correct them in custody before retrying.
        '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
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Error
      security:
        - BearerAuth: []
components:
  schemas:
    ContractImportRequest:
      additionalProperties: false
      properties:
        booking:
          $ref: '#/components/schemas/ContractImportBooking'
          description: >-
            OPTIONAL. The lender booking of this contract: the body the
            averbação route takes, with the FULL booking block and an EMPTY
            numero_proposta, plus the documentation the CCB-attachment route
            takes — both documents, signature_evidence_ref, data_hora_assinatura
            and the signature evidence — in one object. Its numero_contrato must
            equal the path, and its cpf, matricula, codigo_inscricao_empregador
            and numero_inscricao_empregador must equal what Dataprev publishes
            for the contract (an employer published as its 8-digit CNPJ root is
            sent as that root). Its money terms, first_deduction_competencia,
            contract dates and guarantee must equal the rail read wherever the
            read publishes them. Nothing in it reaches Dataprev. Requires
            registration.
        parcelas_pagas:
          default: 0
          description: >-
            How many monthly competências of this contract have ALREADY
            amortized under whoever averbou it. It must lie between 0 and the
            contract's own total de parcelas as the rail reports it; anything
            outside that is refused 422. Leave it at 0 only for a contract that
            has genuinely not been discounted yet. The saldo devedor treats as
            paid only the parcelas already due on the import day; this count
            decides when the contract reaches quitado — a value higher than
            reality ends the reports early, a lower one never reaches quitado,
            and the full count reports 0.00.
          examples:
            - 7
          format: int64
          minimum: 0
          type: integer
        registration:
          $ref: '#/components/schemas/ContractImportRegistration'
          description: >-
            OPTIONAL. The rail's acknowledgement of the averbação somebody else
            performed, as you received it. Requires booking.
      type: object
    ContractImportResponse:
      additionalProperties: false
      properties:
        competencia_inicio_desconto:
          description: >-
            The first payroll competência the discount runs in, as the rail's
            verbatim AAAAMM literal.
          examples:
            - '202601'
          type: string
        numero_contrato:
          description: The contract that was imported.
          examples:
            - '199971600000'
          type: string
        numero_parcelas:
          description: >-
            The contract's total de parcelas, as the rail reports it. Read back,
            never supplied.
          examples:
            - 24
          format: int64
          type: integer
        origem:
          description: >-
            Always "importado" on this route — the provenance stamped on the
            obligation, distinguishing it forever from one this gateway averbou.
          enum:
            - importado
          examples:
            - importado
          type: string
        parcelas_pagas:
          description: >-
            The amortized count recorded on the obligation — the value sent with
            the request.
          examples:
            - 7
          format: int64
          type: integer
        saldo_devedor_dispatch_scheduled:
          description: >-
            True when this request minted the obligation and scheduled its first
            M015 saldo devedor report durably alongside it; it does NOT mean the
            report has been delivered to Dataprev — the outbox does that
            afterwards. False only on an import with booking whose contract
            already held an obligation: that obligation was left untouched and
            parcelas_pagas was not applied.
          examples:
            - true
          type: boolean
        situacao_emprestimo:
          description: >-
            The rail's own situação código for the contract at the moment it was
            imported (Manual 005 §3.2.2 p.17). Only 0, 7, 8 and 17 are
            importable.
          examples:
            - 0
          format: int64
          type: integer
        valor_parcela:
          description: >-
            The instalment, as the rail reports it, verbatim (BRL decimal
            string).
          examples:
            - '1116.31'
          type: string
      required:
        - numero_contrato
        - origem
        - numero_parcelas
        - valor_parcela
        - competencia_inicio_desconto
        - parcelas_pagas
        - situacao_emprestimo
        - saldo_devedor_dispatch_scheduled
      type: object
    Detail:
      additionalProperties: true
      properties:
        code:
          description: >-
            Stable, machine-readable product error code. One of the enumerated
            values: the CLT-NNNN catalog codes for the general refusal classes;
            the named command conflicts, which a client branches on to tell one
            conflict from another; the four terminal refusals
            IDEMPOTENCY_STATE_UNRECOGNISED, IDEMPOTENCY_RECORD_UNREADABLE,
            IDEMPOTENCY_OUTCOME_UNRECORDED and IDEMPOTENCY_REPLAY_UNAVAILABLE
            (422), which tell the client to reconcile the original request and
            never retry under a new key; IDEMPOTENCY_KEY_REUSE (422): the key is
            spent on a different request, so send a new key; the codes a single
            surface answers, named after it (FUNDO_*, CESSAO_*, REGISTRO_B3_*,
            ...); and the 5xx codes naming an upstream (DATAPREV_*,
            STREAMING_HUB_*, TENANT_MANAGER_*, the Access Manager's AUT-0033 and
            AUT-1021) or an unknown outcome, whose detail is client-readable.
          enum:
            - AUT-0033
            - AUT-1021
            - AVERBACAO_ARTIFACT_CONFLICT
            - AVERBACAO_CLAIM_CONFLICT
            - AVERBACAO_DOCUMENTATION_CONFLICT
            - AVERBACAO_EXCLUDED
            - AVERBACAO_HELD_BY_ANOTHER_SENDER
            - AVERBACAO_NOT_ACCEPTED
            - AVERBACAO_OPERATIONS_INTERNAL
            - AVERBACAO_OPERATIONS_INVALID_CURSOR
            - AVERBACAO_OPERATIONS_INVALID_QUERY
            - AVERBACAO_OPERATIONS_UNKNOWN_STATUS
            - AVERBACAO_OPERATION_NOT_FOUND
            - BID_NO_PROPOSTA_LEFT
            - BID_ORIGINADOR_INACTIVE
            - BID_ORIGINADOR_UNKNOWN
            - BID_PROPOSAL_SLOT_TAKEN
            - BID_SOLICITACAO_TAKEN
            - BID_SOLICITACAO_UNKNOWN
            - BID_SUBMISSIONS_INTERNAL
            - BID_SUBMISSIONS_INVALID_CURSOR
            - BID_SUBMISSIONS_UNKNOWN_SITUATION
            - BOOKING_FIELD_INVALID
            - CEDED_CREDIT_INTERNAL
            - CEDED_CREDIT_NO_FUND_ENTITLEMENT
            - CEDED_CREDIT_UNAVAILABLE
            - CESSAO_CEDED_TO_OTHER_FUND
            - CESSAO_CREDIT_NOT_ACCEPTED
            - CESSAO_CREDIT_NOT_FOUND
            - CESSAO_CREDIT_NOT_WITNESSED
            - CESSAO_CREDIT_PENDING
            - CESSAO_FUNDO_NOT_ATTRIBUTED
            - CESSAO_INTERNAL
            - CESSAO_INVALID_INPUT
            - CESSAO_UNAVAILABLE
            - CESSAO_UNWIRED
            - CLT-0001
            - CLT-0002
            - CLT-0003
            - CLT-0004
            - CLT-0005
            - CLT-0006
            - CLT-0007
            - CLT-0008
            - CLT-0009
            - CLT-0010
            - CLT-0011
            - CONTRACT_ALREADY_REGISTERED
            - CONTRACT_NOT_BOOKABLE
            - CURSOR_EXPIRED
            - CURSOR_FENCE_MISMATCH
            - DATAPREV_CREDENTIAL_REJECTED
            - DATAPREV_CREDENTIAL_REQUIRED
            - DATAPREV_CREDENTIAL_REVOKED
            - DATAPREV_INVALID_RESPONSE
            - DATAPREV_TIMEOUT
            - DATAPREV_UNAVAILABLE
            - DECLARED_DATES_OUT_OF_ORDER
            - DECLARED_TERMS_INCONSISTENT
            - DISBURSEMENT_CONFIRMATIONS_INTERNAL
            - DISBURSEMENT_CONFIRMATIONS_INVALID_CURSOR
            - DISBURSEMENT_PAYMENT_CONFLICT
            - EVENT_DELIVERY_INTERNAL
            - EXCLUSION_AUTHORITY_CONFLICT
            - EXCLUSION_BOOKING_IDENTITY_INCOMPLETE
            - EXCLUSION_DOCUMENTATION_UNDERWAY
            - EXCLUSION_OPERATIONS_INTERNAL
            - EXCLUSION_OPERATIONS_INVALID_CURSOR
            - EXCLUSION_OPERATIONS_INVALID_QUERY
            - EXCLUSION_OPERATIONS_UNKNOWN_STATUS
            - EXCLUSION_OPERATION_NOT_FOUND
            - FGTS_EXECUTION_ALREADY_REFUSED
            - FGTS_EXECUTION_CONTRACT_TAKEN
            - FGTS_EXECUTION_OUTCOME_UNRESOLVED
            - FGTS_EXECUTION_PAYLOAD_MISMATCH
            - FIRST_DEDUCTION_BEFORE_COMPETENCIA
            - FORMALIZATION_DEADLINE_EXCEEDED
            - FUNDO_CNPJ_CONFLICT
            - FUNDO_DEACTIVATED
            - FUNDO_INTERNAL
            - FUNDO_INVALID_ID
            - FUNDO_INVALID_INPUT
            - FUNDO_NOT_FOUND
            - FUNDO_NOT_REGISTERED
            - FUNDO_REF_CONFLICT
            - FUNDO_UNAVAILABLE
            - IDEMPOTENCY_KEY_REUSE
            - IDEMPOTENCY_OUTCOME_UNRECORDED
            - IDEMPOTENCY_RECORD_UNREADABLE
            - IDEMPOTENCY_REPLAY_UNAVAILABLE
            - IDEMPOTENCY_STATE_UNRECOGNISED
            - INVALID_CONTRACT_NUMBER
            - INVALID_CURSOR
            - INVALID_EVENTS_INVALID_CURSOR
            - INVALID_EVENT_NOT_FOUND
            - INVALID_EVENT_NOT_REQUEUEABLE
            - INVALID_PAGE_LIMIT
            - INVENTORY_UNAVAILABLE
            - MARGIN_SNAPSHOT_INCONSISTENT
            - ORIGINADOR_INTERNAL
            - ORIGINADOR_INVALID_ID
            - ORIGINADOR_INVALID_INPUT
            - ORIGINADOR_NOT_FOUND
            - ORIGINADOR_REF_CONFLICT
            - ORIGINADOR_UNAVAILABLE
            - OUTCOME_UNKNOWN
            - PORTABILIDADE_WINDOW_EXPIRED
            - RAIL_COMMANDS_INTERNAL
            - RAIL_COMMANDS_INVALID_CURSOR
            - RAIL_COMMANDS_TENANT_REQUIRED
            - RAIL_COMMANDS_UNKNOWN_FILTER
            - RAIL_COMMAND_ALREADY_REFUSED
            - RAIL_COMMAND_ANSWER_NOT_RETAINED
            - RAIL_COMMAND_CLAIM_CONFLICT
            - RAIL_COMMAND_OUTCOME_UNRESOLVED
            - RAIL_COMMAND_PAYLOAD_MISMATCH
            - RATE_OUTSIDE_PRODUCT_RANGE
            - REGISTRATION_NOT_FOUND
            - REGISTRO_B3_AVERBACAO_NAO_CONFIRMADA
            - REGISTRO_B3_CONTRATO_NAO_ENCONTRADO
            - REGISTRO_B3_DATA_REGISTRO_INVALIDA
            - REGISTRO_B3_INTERNAL
            - REGISTRO_B3_JA_INFORMADO
            - REGISTRO_B3_NAO_INFORMADO
            - REGISTRO_B3_UNAVAILABLE
            - REGISTRO_B3_UNWIRED
            - REPASSE_EXPECTATIONS_INTERNAL
            - REPASSE_EXPECTATIONS_INVALID_CURSOR
            - REPASSE_EXPECTATIONS_UNKNOWN_SITUATION
            - REVERSAO_WINDOW_EXPIRED
            - SALDO_DEVEDOR_INTERNAL
            - SALDO_DEVEDOR_INVALID_CURSOR
            - SALDO_DEVEDOR_NOT_FOUND
            - SALDO_DEVEDOR_TENANT_REQUIRED
            - SALDO_DEVEDOR_UNAVAILABLE
            - STREAMING_HUB_TIMEOUT
            - STREAMING_HUB_UNAVAILABLE
            - TENANT_MANAGER_TIMEOUT
            - TENANT_MANAGER_UNAVAILABLE
            - THROUGHPUT_HISTORY_INTERNAL
            - THROUGHPUT_HISTORY_INVALID_CURSOR
            - THROUGHPUT_HISTORY_TENANT_REQUIRED
            - THROUGHPUT_HISTORY_UNAVAILABLE
            - THROUGH_REQUIRED
            - UNKNOWN_QUERY_PARAMETER
          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
    ContractImportBooking:
      additionalProperties: false
      properties:
        annual_rate:
          description: >-
            valorTaxaAnual as a PERCENT-per-year decimal string. "23.87" is
            23.87 %/year — the effective compounding of monthly_rate 1.80.
          examples:
            - '23.87'
          type: string
        artifacts:
          $ref: '#/components/schemas/AverbacaoSignedArtifacts'
        base_biometrica:
          description: >-
            Identifier of the government biometric base the facial record was
            matched against. Required together with score when
            indicador_validacao_com_doc_oficial is false (§2.1.1, error BK).
            Manual 004 publishes no enumeration for it, so the value is relayed
            verbatim.
          examples:
            - SERPRO
          type: string
        cet_annual:
          description: >-
            valorCETAnual — Custo Efetivo Total as a PERCENT-per-year decimal
            string (the effective compounding of cet_monthly).
          examples:
            - '25.34'
          type: string
        cet_monthly:
          description: >-
            valorCETMensal — Custo Efetivo Total as a PERCENT-per-month decimal
            string. Sits above monthly_rate because it absorbs IOF and fees.
          examples:
            - '1.90'
          type: string
        cnpj_operador:
          description: >-
            CNPJ of the operator responsible for the operation — banking
            correspondent, cooperado or similar (Manual 003 §3.1.1 p.9,
            Obrigatório NÃO). An absent value is a legitimate "no intermediary
            operator": the adapter drops the field rather than sending an empty
            string.
          examples:
            - '98765432000188'
          type: string
        codigo_inscricao_empregador:
          description: >-
            Employer inscription TYPE code. Manual 003 §3.1.1 p.10 publishes
            exactly two: 1 = CNPJ, 2 = CPF. REQUIRED on the wire (Obrigatório
            Sim, error SG); a value outside the enumeration is refused 422
            before the rail is called.
          enum:
            - '1'
            - '2'
          examples:
            - '1'
          type: string
        contract_id:
          description: >-
            The CLIENT's own contract identity, echoed back on the response and
            used to correlate the emitted confirmed/rejected fact. Never minted
            here. 1..128 bytes of UTF-8 without leading or trailing spaces. With
            the booking block, one with control characters is refused 422
            BOOKING_FIELD_INVALID before the rail is called, and so is one
            outside those bounds on a contract import.
          examples:
            - contract-1
          type: string
        cpf:
          description: >-
            Worker CPF, exactly 11 digits — a CPF is eleven digits by definition
            (Manual 002 v1.15 §3.1.1 p.8 types the request field Número, 11
            algarismos). In the BODY, never a path or query parameter.
          examples:
            - '12345678901'
          pattern: ^[0-9]{11}$
          type: string
        dados_cadastrais:
          $ref: '#/components/schemas/DadosCadastrais'
          description: >-
            Optional worker, employer, origination and disbursement-account
            record. Part of the semantic digest. Rendered once at averbação and
            stored with nome_trabalhador; that rendering, not the request bytes,
            is what the dados-cadastrais route serves and the digest covers.
            Provisional until the contract confirms: a documentation that sends
            its own dados_cadastrais replaces this block whole. Never sent to
            Dataprev. contract.registered carries only the SHA-256 of the final
            cadastro.
        data_fim_contrato:
          description: >-
            Contract end date, RFC 3339 UTC. A value other than
            data_primeiro_desconto plus (installment_count - 1) months does not
            block the averbação.
          examples:
            - '2027-07-30T00:00:00Z'
          format: date-time
          type: string
        data_hora_assinatura:
          description: >-
            Instant the worker signed the CCB, RFC 3339 UTC (Manual 004 §2.1.2,
            Obrigatório S, error GA). It may be days after the averbação. With
            the averbação's booking block, an instant after its
            formalization_deadline is refused 422
            FORMALIZATION_DEADLINE_EXCEEDED and one more than five minutes ahead
            of the gateway's clock 422 DECLARED_DATES_OUT_OF_ORDER, compared to
            the second, before Dataprev is called. Rendered to the rail's
            ddMMyyyyHHmmss by the adapter.
          examples:
            - '2026-07-30T12:00:00Z'
          format: date-time
          type: string
        data_inicio_contrato:
          description: >-
            Contract start date, RFC 3339 UTC. With the booking block,
            data_fim_contrato, data_primeiro_desconto and
            expected_disbursement_date must not fall before it, and
            expected_disbursement_date must be before data_primeiro_desconto,
            compared as UTC calendar dates: the averbação route refuses that
            order 422 DECLARED_DATES_OUT_OF_ORDER before the rail is called.
          examples:
            - '2026-07-30T00:00:00Z'
          format: date-time
          type: string
        data_primeiro_desconto:
          description: >-
            Date of the first payroll deduction, RFC 3339 UTC; its UTC calendar
            date is what the rail and the Lerian lender receive. With the
            booking block, a date that is not a banking business day rolls to
            the next one, or back to the month's last one when the next falls in
            another month; the rolled date must be after
            expected_disbursement_date, or the averbação route refuses it 422
            DECLARED_DATES_OUT_OF_ORDER before the rail is called.
          examples:
            - '2026-08-30T00:00:00Z'
          format: date-time
          type: string
        dispositivo:
          description: >-
            Free-text description of the signing device, Texto 1..100 since
            Manual 004 v1.4 (§2.1.2, Obrigatório N).
          examples:
            - iPhone 15 Pro; iOS 18.4
          type: string
        documento_oficial_com_foto_frente_b64:
          description: >-
            Front face of the official photo ID, base64 JPEG. Required together
            with the verso when indicador_validacao_com_doc_oficial is true;
            each must decode to a JPEG of at least 250×250 px (§2.1.1, error
            PY). THE EXAMPLE IS TRUNCATED.
          examples:
            - /9j/4AAQSkZJRgABAQAAAQABAAD/2Q==
          type: string
        documento_oficial_com_foto_verso_b64:
          description: >-
            Back face of the official photo ID, base64 JPEG. Same requiredness
            and same 250×250 px floor as the frente (error PY). THE EXAMPLE IS
            TRUNCATED.
          examples:
            - /9j/4AAQSkZJRgABAQAAAQABAAD/2Q==
          type: string
        expected_disbursement_date:
          description: >-
            Expected loan disbursement date in YYYY-MM-DD. Required for every
            booking, including originations without numero_proposta. A date
            outside 2026 to 2099 is refused 422 CONTRACT_NOT_BOOKABLE by the
            averbação route before the rail is called.
          examples:
            - '2026-08-01'
          maxLength: 10
          type: string
        first_deduction_competencia:
          description: >-
            Payroll competência of the first deduction, yyyyMM. With the booking
            block, data_primeiro_desconto must fall in this month or a later
            one: an earlier month is refused 422
            FIRST_DEDUCTION_BEFORE_COMPETENCIA by the averbação route before the
            rail is called.
          examples:
            - '202608'
          type: string
        formalization_deadline:
          description: >-
            UTC deadline by which the accepted contract must complete
            formalization. The documentation's data_hora_assinatura must not be
            after it, compared to the second: POST .../ccb-attachment refuses
            that 422 FORMALIZATION_DEADLINE_EXCEEDED before Dataprev is called.
          examples:
            - '2026-08-02T12:00:00Z'
          format: date-time
          type: string
        fundo_ref:
          description: >-
            OPTIONAL opaque UTF-8 fund reference, bounded to 128 bytes. It is
            preserved byte-for-byte without trimming, case folding,
            normalization, parsing, or a local character whitelist. NOT a rail
            field — the fund has no relationship with the rail, so it never
            crosses the wire; it is persisted and published unchanged. With the
            booking block, a value of only spaces is refused 422
            BOOKING_FIELD_INVALID by the averbação route before the rail is
            called.


            VERIFIED against your credential. A fund, or a third party acting
            for one, may only name the fund its own credential carries: a
            different value is refused before the rail is called, and an omitted
            value is filled in from the credential. The comparison is exact
            bytes, so padding, letter case and accent composition are part of
            the fund's identity — send the reference exactly as it was issued to
            you. A bancarizador carries no fund of its own and may name one
            here; its value is taken as given, unchanged, and a present value
            must name a fund that still accepts new credit: one the tenant
            registered in this gateway, or one of the tenant's Lender fund
            registry, named by its Lender id (the lowercase UUID text of
            assignment_fund_id).


            OMIT it entirely and the contract is simply not attributed to any
            fund: nothing is looked up, nothing is refused, and the operation
            persists no fund at all. Which fund bought the credit is YOUR
            bookkeeping, not the rail's - the fund has no relationship with
            Dataprev.
          examples:
            - '  Fundo: Árvore/Classe A — série № 7  '
          maxLength: 128
          type: string
        indicador_analfabetismo:
          description: >-
            Whether the worker is illiterate (Obrigatório S, error GA). true is
            the second §2.1.1 biometric exemption.
          examples:
            - false
          type: boolean
        indicador_assinatura_cert_digital_icp_brasil:
          description: >-
            Whether the CCB was signed with a qualified ICP-Brasil certificate
            (Obrigatório S, error GA). true is one of the three §2.1.1 biometric
            EXEMPTIONS — §6.5 states the qualified signature "substitui a
            necessidade de biometria facial" — so the biometric fields below may
            then be omitted.
          examples:
            - true
          type: boolean
        indicador_validacao_com_doc_oficial:
          description: >-
            Selects which §2.1.1 evidence branch applies: false demands the
            base_biometrica + score pair, true demands both photo-ID faces.
            false is a DECISION the rail must see and is distinguishable from
            absent, so send it explicitly rather than omitting it.
          examples:
            - false
          type: boolean
        installment_amount:
          description: valorParcela — the instalment amount (decimal string, BRL).
          examples:
            - '201.75'
          type: string
        installment_count:
          description: >-
            totalParcelas — the number of instalments. With the booking block,
            more than 96 is refused 422 CONTRACT_NOT_BOOKABLE by the averbação
            route before the rail is called.
          examples:
            - 12
          format: int64
          type: integer
        iof_amount:
          description: valorIOF — the IOF charged (decimal string, BRL).
          examples:
            - '10.00'
          type: string
        ip:
          description: >-
            The IP the worker signed from, IPv4 or IPv6 (Manual 004 §2.1.2,
            Obrigatório S, errors GA/GB). The example uses the RFC 5737
            documentation range.
          examples:
            - 203.0.113.7
          type: string
        latitude:
          description: >-
            Signing latitude as an exact decimal string (§2.1.2, Obrigatório N).
            Crosses the rail as an unquoted Numérico and never passes through a
            float.
          examples:
            - '-23.5505'
          type: string
        liberated_amount:
          description: >-
            valorLiberado — "o valor líquido repassado ao trabalhador após
            descontos" (Manual 003 §3.1.1 p.9, Obrigatório Sim, errors BL/BQ),
            also required on the winning proposta (Manual 001 §3.1.2 p.10).
            DISTINCT from principal_amount and NOT derivable from it: the Manual
            001 p.13 example quotes valorEmprestimo 2160.00 / valorIOF 10.00
            with valorLiberado 2000.00. Never computed here.
          examples:
            - '2000.00'
          type: string
        loan_product_version:
          description: >-
            Immutable version of the loan product whose terms governed this
            contract, as a UUID. A value that is not a UUID, or the nil UUID, is
            refused 422 BOOKING_FIELD_INVALID by the averbação route before the
            rail is called. The averbação route also refuses, 422
            RATE_OUTSIDE_PRODUCT_RANGE before the rail is called, a monthly_rate
            that times 12 falls outside the annual rate range the Lender
            published for this version; a version this gateway has not seen is
            not checked.
          examples:
            - 0f9d1a7c-3b52-4c8e-9a1d-2f6b8c4e5d70
          maxLength: 128
          type: string
        longitude:
          description: >-
            Signing longitude as an exact decimal string (§2.1.2, Obrigatório
            N).
          examples:
            - '-46.6333'
          type: string
        margin_snapshot:
          $ref: '#/components/schemas/AverbacaoMarginSnapshot'
        matricula:
          description: >-
            The worker's payroll registration at the employer (Texto 1..30,
            errors OT/SI). REQUIRED on the wire: Manual 004 v1.6 §2.1.2 marks it
            Obrigatório S on the CCB attach and the attach reuses this one
            value.
          examples:
            - M-1
          maxLength: 30
          pattern: ^[^\x00-\x1F\x7F-\x9F]*$
          patternDescription: free of control characters
          type: string
        monthly_rate:
          description: >-
            valorTaxaMensal as a PERCENT-per-month decimal string. "1.80" is
            1.80 %/month, NOT the fraction 0.018. With the booking block, the
            four rates must be greater than zero, annual_rate above
            monthly_rate, cet_annual above cet_monthly, each CET at least its
            interest rate, and monthly_rate times 12 at most 1000: the averbação
            route refuses otherwise 422 DECLARED_TERMS_INCONSISTENT before the
            rail is called.
          examples:
            - '1.80'
          type: string
        nome_trabalhador:
          description: >-
            The worker's full name as it appears on the contract (Texto 1..90,
            errors AO/OT). REQUIRED: Manual 003 §3.1.1 marks nomeTrabalhador
            Obrigatório Sim, so a blank name is refused 422 before the rail is
            called.
          examples:
            - MARIA DA SILVA
          maxLength: 90
          pattern: ^[^\x00-\x1F\x7F-\x9F]*$
          patternDescription: free of control characters
          type: string
        nsu_contrato:
          description: >-
            Número Sequencial Único of a contract closed through the IF's own
            attendance network (Manual 004 §2.1.2: Numérico, Tamanho 18,
            Obrigatório N, error OT). Up to 18 digits — the column is a maximum,
            and the manual's own example for this field is 98765. Kept as digits
            end to end. PRESENT means biometrics are exempt AND
            tipo_autenticacao becomes mandatory (error NS).
          examples:
            - '1234567890'
          pattern: ^([0-9]{1,18})?$
          type: string
        numero_contrato:
          description: >-
            The rail contract number, minted by the CLIENT: 2 to 15 letters or
            digits, without spaces, accents or symbols. It MUST equal the
            numero_contrato path parameter — a mismatch is refused 422 so a
            caller cannot address one contract and averbar another.
          examples:
            - 99999999999AN1
          maxLength: 15
          minLength: 2
          pattern: ^[A-Za-z0-9]+$
          type: string
        numero_inscricao_empregador:
          description: >-
            Employer inscription NUMBER matching codigo_inscricao_empregador
            (Texto 14 since Manual 004 v1.6, error SH). REQUIRED on the wire.
          examples:
            - '12345678000199'
          type: string
        numero_proposta:
          description: >-
            The optional proposal identifier this gateway minted for the winning
            bid. Absent means the origination did not pass through this
            gateway's auction. Present values are matched exactly: leading or
            trailing whitespace is refused, never normalized into another
            identity.
          examples:
            - '12345678901234567890'
          maxLength: 20
          pattern: ^[^\x00-\x1F\x7F-\x9F]*$
          patternDescription: free of control characters
          type: string
        origination_fee_amount:
          description: >-
            OPTIONAL origination fee the client charges on this contract, in BRL
            as a canonical decimal with exactly two places ("10.00", "0.00").
            Omitted means zero. It must be below principal_amount and is sent
            only with the booking block. It is the client's definitive
            declaration: the gateway never derives it from the other terms and
            it is carried unchanged on consignado.contract.registered. NOT a
            rail field: it never reaches Dataprev.
          examples:
            - '10.00'
          maxLength: 20
          type: string
        perc_verba_rescisoria_garantia:
          description: >-
            Percentage of the rescission verbas pledged as collateral (decimal
            string, PERCENT). This rides the SEPARATE employer verba-rescisória
            track, not the FGTS-guarantee execution API.
          examples:
            - '10.00'
          type: string
        preparation:
          $ref: '#/components/schemas/AverbacaoPreparation'
          description: >-
            OPTIONAL references to a preparation the client obtained from the
            Lerian lender before averbação: the quote, the CCB instrument issued
            from it and the SHA-256 of that original CCB. All three are required
            when the object is sent, and it is sent only with the booking block.
            They are the client's declarations: the gateway checks their shape,
            never looks them up, and carries them unchanged on
            consignado.contract.registered. NOT a rail field: it never reaches
            Dataprev.
        principal_amount:
          description: >-
            valorEmprestimo — the amount lent (decimal string, BRL). DISTINCT
            from liberated_amount and not derivable from it: the Manual 001
            §3.1.2 p.13 example quotes valorEmprestimo 2160.00 / valorIOF 10.00
            with valorLiberado 2000.00. With the booking block,
            principal_amount, liberated_amount and installment_amount must be
            greater than zero, and neither liberated_amount nor iof_amount may
            exceed principal_amount: the averbação route refuses otherwise 422
            DECLARED_TERMS_INCONSISTENT before the rail is called.
          examples:
            - '2160.00'
          type: string
        registro_biometrico_facial_b64:
          description: >-
            The 2D facial-biometric record, base64 (Obrigatório N at the rail,
            but demanded by §2.1.1 for every flow that is NOT
            biometrics-exempt). THE EXAMPLE IS TRUNCATED — it shows a JPEG's
            base64 encoding, not a usable record.
          examples:
            - /9j/4AAQSkZJRgABAQAAAQABAAD/2Q==
          type: string
        score:
          description: >-
            The biometric match score as an EXACT decimal string, required
            together with base_biometrica (§2.1.1, error BK). It crosses the
            rail as an unquoted Numérico published to seven decimals and never
            passes through a float.
          examples:
            - '0.9999986'
          type: string
        signature_evidence_ref:
          description: >-
            Opaque provider evidence reference for the worker signature.
            Required when the averbação was sent with the booking block, refused
            422 when it was sent without it.
          examples:
            - signature-evidence-1
          maxLength: 128
          type: string
        tem_garantias:
          description: >-
            Whether the contract pledges FGTS collateral. REQUIRED — it is the
            gate the three collateral values below are conditional on, and false
            is an authoritative "no collateral" rather than an absence. False
            with any of them, or true with none, is refused 422 by the averbação
            route before the rail is called (Dataprev rule FI).
          examples:
            - true
          type: boolean
        tipo_autenticacao:
          description: >-
            Authentication channel used, one of the published codes 1..6 (Manual
            004 §2.1.2, error GE). Mandatory whenever nsu_contrato is informed;
            omit it, or send an empty string, when it is not.
          examples:
            - '1'
          pattern: ^([1-6])?$
          type: string
        valor_multa_rescisoria_garantia_fgts:
          description: >-
            Rescission-penalty portion pledged as collateral (decimal string,
            BRL). Conditional on tem_garantias; omit rather than send 0.
          examples:
            - '400.25'
          type: string
        valor_saldo_disponivel_garantia_fgts:
          description: >-
            Consignable FGTS balance pledged as collateral (decimal string,
            BRL). Conditional on tem_garantias. OMIT it when there is no FGTS
            collateral: the rail reads a sent 0 as an invalid guarantee value.
          examples:
            - '1000.50'
          type: string
      required:
        - contract_id
        - numero_contrato
        - cpf
        - principal_amount
        - installment_amount
        - installment_count
        - annual_rate
        - cet_monthly
        - cet_annual
        - iof_amount
        - first_deduction_competencia
        - matricula
        - nome_trabalhador
        - codigo_inscricao_empregador
        - numero_inscricao_empregador
        - data_inicio_contrato
        - data_fim_contrato
        - data_primeiro_desconto
        - monthly_rate
        - liberated_amount
        - tem_garantias
        - data_hora_assinatura
        - artifacts
        - ip
        - indicador_assinatura_cert_digital_icp_brasil
        - indicador_analfabetismo
      type: object
    ContractImportRegistration:
      additionalProperties: false
      properties:
        averbado_at:
          description: >-
            When the rail accepted the averbação, RFC 3339. Must sit within one
            minute of the contract's aceito_em (dataHoraInclusaoEmprestimo) as
            the rail read publishes it.
          examples:
            - '2026-09-04T22:34:00Z'
          format: date-time
          type: string
        hash_operacao:
          description: The rail's hashOperacao for the CCB attachment (Manual 004 §2.1).
          examples:
            - '28884503139'
          pattern: ^[0-9]{1,64}$
          type: string
        response_code:
          description: The rail's response code for the averbação.
          examples:
            - BD
          pattern: ^[A-Z0-9]{2,8}$
          type: string
      required:
        - averbado_at
        - response_code
        - hash_operacao
      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
    AverbacaoSignedArtifacts:
      additionalProperties: false
      properties:
        biometrics_documents_pack:
          $ref: '#/components/schemas/AverbacaoSignedArtifact'
        signed_ccb:
          $ref: '#/components/schemas/AverbacaoSignedArtifact'
      required:
        - signed_ccb
      type: object
    DadosCadastrais:
      additionalProperties: false
      properties:
        dados_bancarios:
          $ref: '#/components/schemas/DadosCadastraisBancarios'
          description: >-
            The worker's own disbursement account. When present it carries at
            least one complete set: banco + agencia + conta, or chave_pix +
            tipo_chave_pix.
        empregador:
          $ref: '#/components/schemas/DadosCadastraisEmpregador'
          description: >-
            Employer record. Required when the averbação's
            codigo_inscricao_empregador is 1 (CNPJ), refused when it is 2 (a
            person employer). The CNPJ is numero_inscricao_empregador and is not
            repeated here.
        originacao:
          $ref: '#/components/schemas/DadosCadastraisOriginacao'
        trabalhador:
          $ref: '#/components/schemas/DadosCadastraisTrabalhador'
      required:
        - trabalhador
        - originacao
      type: object
    AverbacaoMarginSnapshot:
      additionalProperties: false
      properties:
        as_of:
          description: UTC instant at which the margin snapshot was observed.
          examples:
            - '2026-07-30T11:55:00Z'
          format: date-time
          type: string
        available_margin:
          description: >-
            Available payroll margin observed for this booking, as a
            non-negative decimal string with at most two places; anything else
            is refused 422 BOOKING_FIELD_INVALID by the averbação route before
            the rail is called. It must hold installment_amount and not exceed
            remuneracao_disponivel, else 422 MARGIN_SNAPSHOT_INCONSISTENT.
          examples:
            - '1000.00'
          maxLength: 64
          type: string
        remuneracao_disponivel:
          description: >-
            Available remuneration observed with the margin, as a non-negative
            decimal string with at most two places; anything else is refused 422
            BOOKING_FIELD_INVALID by the averbação route before the rail is
            called. It must be greater than zero, else 422
            MARGIN_SNAPSHOT_INCONSISTENT.
          examples:
            - '5000.00'
          maxLength: 64
          type: string
      required:
        - available_margin
        - remuneracao_disponivel
        - as_of
      type: object
    AverbacaoPreparation:
      additionalProperties: false
      properties:
        credit_instrument_id:
          description: >-
            The CCB instrument the lender issued from that quote, as a canonical
            lowercase UUID.
          examples:
            - 7d2e4f6a-8b0c-4e1d-a3f5-6b7c8d9e0f1a
          maxLength: 36
          type: string
        original_ccb_digest_sha256:
          description: >-
            Lowercase hex SHA-256 of the original CCB document the lender issued
            from the quote, as the lender reported it. It is not the signed CCB.
          examples:
            - 3a1e0c5f9b2d4e6a8c7b1f0e2d3c4b5a69788796a5b4c3d2e1f0a9b8c7d6e5f4
          maxLength: 64
          type: string
        quote_id:
          description: >-
            The lender quote the contract was prepared from, as a canonical
            lowercase UUID.
          examples:
            - 0b6b7c1e-2f4a-4d6e-9a1b-3c5d7e9f1a2b
          maxLength: 36
          type: string
      required:
        - quote_id
        - credit_instrument_id
        - original_ccb_digest_sha256
      type: object
    AverbacaoSignedArtifact:
      additionalProperties: false
      properties:
        bytes_base64:
          description: >-
            Canonical base64 artifact bytes. The two artifacts remain distinct
            inputs.
          examples:
            - UEsDBEFDS1BBQ0s=
          maxLength: 8388608
          type: string
        content_type:
          description: Artifact media type.
          examples:
            - application/pdf
          maxLength: 128
          type: string
        file_name:
          description: Original artifact file name.
          examples:
            - contract.pdf
          maxLength: 255
          type: string
      required:
        - file_name
        - content_type
        - bytes_base64
      type: object
    DadosCadastraisBancarios:
      additionalProperties: false
      properties:
        agencia:
          description: Branch, without check digit.
          examples:
            - '1234'
          pattern: ^[0-9]{1,5}$
          type: string
        banco:
          description: COMPE bank code.
          examples:
            - '341'
          pattern: ^[0-9]{3}$
          type: string
        chave_pix:
          description: >-
            Pix key. A CPF key must equal the averbação's cpf; a TELEFONE key is
            E.164.
          examples:
            - '12345678901'
          maxLength: 77
          minLength: 1
          pattern: ^[^\x00-\x1F\x7F-\x9F]*$
          patternDescription: free of control characters
          type: string
        conta:
          description: Account, without check digit.
          examples:
            - '56789'
          pattern: ^[0-9]{1,20}$
          type: string
        conta_digito:
          description: Account check digit.
          examples:
            - '0'
          pattern: ^[0-9X]{1,2}$
          type: string
        tipo_chave_pix:
          description: Pix key kind.
          enum:
            - CPF
            - EMAIL
            - TELEFONE
            - EVP
          examples:
            - CPF
          type: string
        tipo_conta:
          description: Account kind; absent means CORRENTE to the destination.
          enum:
            - CORRENTE
            - POUPANCA
            - PAGAMENTO
          examples:
            - CORRENTE
          type: string
      type: object
    DadosCadastraisEmpregador:
      additionalProperties: false
      properties:
        cnae_principal:
          description: Main CNAE code.
          examples:
            - '4743100'
          pattern: ^[0-9]{7}$
          type: string
        cnae_principal_descricao:
          description: Official CNAE description.
          examples:
            - Comércio varejista de vidros
          maxLength: 178
          minLength: 1
          pattern: ^[^\x00-\x1F\x7F-\x9F]*$
          patternDescription: free of control characters
          type: string
        data_inicio_atividade:
          description: Activity start date, YYYY-MM-DD.
          examples:
            - '2013-04-01'
          format: date
          type: string
        endereco:
          $ref: '#/components/schemas/DadosCadastraisEnderecoEmpregador'
        natureza_juridica:
          description: CONCLA legal-nature code.
          examples:
            - '2062'
          pattern: ^[0-9]{4}$
          type: string
        natureza_juridica_descricao:
          description: Official CONCLA description.
          examples:
            - Sociedade Empresária Limitada
          maxLength: 150
          minLength: 1
          pattern: ^[^\x00-\x1F\x7F-\x9F]*$
          patternDescription: free of control characters
          type: string
        nome_fantasia:
          description: >-
            Trade name; when Receita has none, repeat razao_social and set
            nome_fantasia_ausente.
          examples:
            - Vidraçaria Exemplo
          maxLength: 150
          minLength: 1
          pattern: ^[^\x00-\x1F\x7F-\x9F]*$
          patternDescription: free of control characters
          type: string
        nome_fantasia_ausente:
          description: >-
            True when nome_fantasia repeats razao_social because Receita has no
            trade name.
          examples:
            - false
          type: boolean
        opcao_mei:
          description: Whether the employer opted into MEI.
          examples:
            - false
          type: boolean
        porte_receita:
          description: Receita company-size code.
          enum:
            - '00'
            - '01'
            - '03'
            - '05'
          examples:
            - '01'
          type: string
        qtd_empregados_clt:
          description: CLT headcount.
          examples:
            - 187
          format: int64
          minimum: 0
          type: integer
        razao_social:
          description: Legal name.
          examples:
            - VIDRACARIA EXEMPLO LTDA
          maxLength: 150
          minLength: 1
          pattern: ^[^\x00-\x1F\x7F-\x9F]*$
          patternDescription: free of control characters
          type: string
      required:
        - razao_social
        - nome_fantasia
        - data_inicio_atividade
        - natureza_juridica
        - natureza_juridica_descricao
      type: object
    DadosCadastraisOriginacao:
      additionalProperties: false
      properties:
        autorizacao_consulta_scr:
          description: >-
            Whether the worker authorized an SCR (BACEN credit registry)
            inquiry.
          examples:
            - true
          type: boolean
        data_solicitacao:
          description: Request date, YYYY-MM-DD.
          examples:
            - '2026-09-04'
          format: date
          type: string
        id_contrato_interno:
          description: The client's internal contract identifier.
          examples:
            - WNG-2026-31892162
          maxLength: 64
          minLength: 1
          pattern: ^[^\x00-\x1F\x7F-\x9F]*$
          patternDescription: free of control characters
          type: string
        id_decisao_credito:
          description: Stable identifier of the credit decision that approved the contract.
          examples:
            - CAI-DEC-2026-09-04-7f3a19
          maxLength: 64
          minLength: 1
          pattern: ^[^\x00-\x1F\x7F-\x9F]*$
          patternDescription: free of control characters
          type: string
        lote_id:
          description: Stable batch identifier, unique per batch.
          examples:
            - CAI-2026-09-17-001
          pattern: ^[A-Za-z0-9_.-]{1,64}$
          type: string
        numero_ccb:
          description: CCB number; absent means equal to numero_contrato.
          examples:
            - DIDI2090
          maxLength: 30
          minLength: 1
          pattern: ^[^\x00-\x1F\x7F-\x9F]*$
          patternDescription: free of control characters
          type: string
        referencias_externas:
          description: Identifiers owned by third-party systems.
          items:
            $ref: '#/components/schemas/DadosCadastraisReferenciaExterna'
          maxItems: 10
          type:
            - array
            - 'null'
      required:
        - lote_id
        - id_contrato_interno
        - id_decisao_credito
      type: object
    DadosCadastraisTrabalhador:
      additionalProperties: false
      properties:
        categoria_esocial:
          description: eSocial worker category.
          examples:
            - '101'
          pattern: ^[0-9]{3}$
          type: string
        cbo:
          description: CBO occupation code.
          examples:
            - '354815'
          pattern: ^[0-9]{6}$
          type: string
        cbo_descricao:
          description: Official CBO description.
          examples:
            - Agente de viagem
          maxLength: 150
          minLength: 1
          pattern: ^[^\x00-\x1F\x7F-\x9F]*$
          patternDescription: free of control characters
          type: string
        data_admissao:
          description: Admission date, YYYY-MM-DD.
          examples:
            - '2024-06-10'
          format: date
          type: string
        data_nascimento:
          description: Birth date, YYYY-MM-DD.
          examples:
            - '1970-09-04'
          format: date
          type: string
        email:
          description: E-mail address.
          examples:
            - fulano.de.tal@example.com
          format: email
          maxLength: 254
          type: string
        endereco:
          $ref: '#/components/schemas/DadosCadastraisEndereco'
        estado_civil:
          description: Marital status.
          enum:
            - SOLTEIRO
            - CASADO
            - DIVORCIADO
            - VIUVO
            - UNIAO_ESTAVEL
            - SEPARADO
          examples:
            - SOLTEIRO
          type: string
        nome_mae:
          description: Mother's name.
          examples:
            - Beltrana de Tal
          maxLength: 150
          minLength: 1
          pattern: ^[^\x00-\x1F\x7F-\x9F]*$
          patternDescription: free of control characters
          type: string
        renda_base:
          description: Base income, BRL decimal string with at most two places.
          examples:
            - '2201.17'
          pattern: ^[0-9]+(\.[0-9]{1,2})?$
          type: string
        rg:
          $ref: '#/components/schemas/DadosCadastraisRG'
        sexo:
          description: Sex.
          enum:
            - M
            - F
          examples:
            - M
          type: string
        telefone_celular:
          description: Mobile phone with area code, digits only.
          examples:
            - '21900000000'
          pattern: ^[0-9]{10,11}$
          type: string
        vinculo_ativo:
          description: Whether the employment relationship is active.
          examples:
            - true
          type: boolean
      required:
        - data_nascimento
        - nome_mae
        - sexo
        - estado_civil
        - renda_base
        - cbo
        - vinculo_ativo
        - endereco
      type: object
    DadosCadastraisEnderecoEmpregador:
      additionalProperties: false
      properties:
        bairro:
          description: District.
          examples:
            - Centro
          maxLength: 100
          minLength: 1
          pattern: ^[^\x00-\x1F\x7F-\x9F]*$
          patternDescription: free of control characters
          type: string
        cep:
          description: Postal code, eight digits, no hyphen.
          examples:
            - '20040020'
          pattern: ^[0-9]{8}$
          type: string
        complemento:
          description: Address complement.
          examples:
            - sala 5
          maxLength: 100
          pattern: ^[^\x00-\x1F\x7F-\x9F]*$
          patternDescription: free of control characters
          type: string
        logradouro:
          description: Street.
          examples:
            - Avenida Rio Branco
          maxLength: 150
          minLength: 1
          pattern: ^[^\x00-\x1F\x7F-\x9F]*$
          patternDescription: free of control characters
          type: string
        municipio:
          description: Official municipality name.
          examples:
            - Rio de Janeiro
          maxLength: 100
          minLength: 1
          pattern: ^[^\x00-\x1F\x7F-\x9F]*$
          patternDescription: free of control characters
          type: string
        municipio_ibge:
          description: IBGE municipality code.
          examples:
            - '3304557'
          pattern: ^[0-9]{7}$
          type: string
        numero:
          description: Street number.
          examples:
            - '1'
          maxLength: 20
          minLength: 1
          pattern: ^[^\x00-\x1F\x7F-\x9F]*$
          patternDescription: free of control characters
          type: string
        uf:
          description: State.
          examples:
            - RJ
          pattern: ^[A-Z]{2}$
          type: string
      required:
        - cep
        - logradouro
        - numero
        - bairro
        - municipio_ibge
        - municipio
        - uf
      type: object
    DadosCadastraisReferenciaExterna:
      additionalProperties: false
      properties:
        sistema:
          description: Owning system.
          examples:
            - REGISTRADORA_X
          pattern: ^[A-Z0-9_]{1,32}$
          type: string
        tipo:
          description: Identifier kind.
          examples:
            - ipoc
          maxLength: 64
          minLength: 1
          pattern: ^[^\x00-\x1F\x7F-\x9F]*$
          patternDescription: free of control characters
          type: string
        valor:
          description: Identifier value.
          examples:
            - IPOC-000123
          maxLength: 128
          minLength: 1
          pattern: ^[^\x00-\x1F\x7F-\x9F]*$
          patternDescription: free of control characters
          type: string
      required:
        - sistema
        - tipo
        - valor
      type: object
    DadosCadastraisEndereco:
      additionalProperties: false
      properties:
        bairro:
          description: District.
          examples:
            - Laranjeiras
          maxLength: 100
          minLength: 1
          pattern: ^[^\x00-\x1F\x7F-\x9F]*$
          patternDescription: free of control characters
          type: string
        cep:
          description: Postal code, eight digits, no hyphen.
          examples:
            - '22240003'
          pattern: ^[0-9]{8}$
          type: string
        cidade:
          description: City.
          examples:
            - Rio de Janeiro
          maxLength: 100
          minLength: 1
          pattern: ^[^\x00-\x1F\x7F-\x9F]*$
          patternDescription: free of control characters
          type: string
        complemento:
          description: Address complement.
          examples:
            - apto 41
          maxLength: 100
          pattern: ^[^\x00-\x1F\x7F-\x9F]*$
          patternDescription: free of control characters
          type: string
        logradouro:
          description: Street.
          examples:
            - Rua das Laranjeiras
          maxLength: 150
          minLength: 1
          pattern: ^[^\x00-\x1F\x7F-\x9F]*$
          patternDescription: free of control characters
          type: string
        numero:
          description: Street number; S/N is valid.
          examples:
            - '120'
          maxLength: 20
          minLength: 1
          pattern: ^[^\x00-\x1F\x7F-\x9F]*$
          patternDescription: free of control characters
          type: string
        uf:
          description: State.
          examples:
            - RJ
          pattern: ^[A-Z]{2}$
          type: string
      required:
        - logradouro
        - numero
        - bairro
        - cidade
        - uf
        - cep
      type: object
    DadosCadastraisRG:
      additionalProperties: false
      properties:
        data_emissao:
          description: Issue date, YYYY-MM-DD.
          examples:
            - '2010-03-15'
          format: date
          type: string
        numero:
          description: RG number.
          examples:
            - '12345678'
          maxLength: 20
          minLength: 1
          pattern: ^[^\x00-\x1F\x7F-\x9F]*$
          patternDescription: free of control characters
          type: string
        orgao_emissor:
          description: Issuing body.
          examples:
            - DETRAN
          maxLength: 20
          minLength: 1
          pattern: ^[^\x00-\x1F\x7F-\x9F]*$
          patternDescription: free of control characters
          type: string
        uf_emissor:
          description: Issuing state.
          examples:
            - RJ
          pattern: ^[A-Z]{2}$
          type: string
      required:
        - numero
        - orgao_emissor
        - uf_emissor
      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.