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

# Leia o status do empréstimo de um contrato averbado na rede

> Lê o consultar-emprestimo-trabalhador da rede (Manual 005 v1.13 §3.2.1) para um contrato averbado: situação do empréstimo, a proposta que o possui, os termos monetários e o bloco de garantia FGTS. apenas o status REPORTS — não cria ou resolve nenhuma testemunha de proposta durável e não emite nenhum fato de transferência.



## OpenAPI

````yaml pt/openapi/v3-current/consignado.yaml get /v1/consignado/contracts/{numero_contrato}/rail-loan
openapi: 3.1.0
info:
  contact:
    email: contact@lerian.studio
    name: Lerian Studio
    url: https://lerian.studio
  description: >-
    Superfície OpenAPI 3.1 para Lerian Consignado — Dataprev. o API cobre
    credenciais tenant e configuração de rede, margem do trabalhador, leilões e
    licitações de empréstimos, registro e ciclo de vida do contrato, confirmação
    de desembolso, portabilidade, refinanciamento, renegociação, garantias FGTS,
    reconciliação, fundos, atribuições, uso, rendimento e assinaturas de
    eventos. o material secreto é gravado no armazenamento secreto tenant e
    nunca é devolvido por nenhuma operação.
  license:
    name: Lerian Studio General License
  title: Lerian Consignado API
  version: v1.0.0
servers:
  - url: https://consignado.sandbox.lerian.net
security:
  - BearerAuth: []
tags:
  - description: >-
      Custódia de credenciais do Dataprev e configuração pública do rail por
      tenant (upload, status, rotação, revogação, código do solicitante e URL
      base do portal do trabalhador)
    name: Credentials
  - description: >-
      Uso do gateway consignado no escopo do tenant: agregação de unidades
      faturáveis ​​com preço por competência
    name: Consignado Usage
  - description: >-
      Per-tenant plano de controle de assinatura do streaming-hub (listar,
      criar, obter, girar, revogar e testar a entrega)
    name: Subscriptions
  - description: >-
      Superfície folha de pagamento da rail Dataprev: leituras de saldo e
      autorização FGTS, execução de garantias FGTS, suspensão de contrato,
      reativação e alteração de prazo, documentos contratuais próprios da rede e
      leituras sob demanda de transações, escriturações, repasses e rescisões
      trabalhistas
    name: Consignado Rail
  - description: >-
      Superfície de comando da rede síncrona: as operações que um bancarizador
      sem o credor realizam sobre HTTP. cada um compartilha sua implementação de
      comando com o gatilho de evento de credor equivalente.
    name: Consignado Rail Commands
  - description: >-
      Confirmação de desembolso de propriedade do gateway: um banco cliente
      registrando o dinheiro que ALREADY pagou a um trabalhador. ele não cruza
      nenhuma fronteira governamental e não representa nenhuma operação
      Dataprev.
    name: Consignado Disbursement
  - description: >
      Taxa de transferência da rail Dataprev de saída de autoatendimento
      per-tenant: leia e defina o próprio requests-per-second deste tenant,
      incluindo uma pausa deliberada em zero
    name: Consignado Throughput
paths:
  /v1/consignado/contracts/{numero_contrato}/rail-loan:
    get:
      tags:
        - Consignado Rail
      summary: Leia o status do empréstimo de um contrato averbado na rede
      description: >-
        Lê o consultar-emprestimo-trabalhador da rede (Manual 005 v1.13 §3.2.1)
        para um contrato averbado: situação do empréstimo, a proposta que o
        possui, os termos monetários e o bloco de garantia FGTS. apenas o status
        REPORTS — não cria ou resolve nenhuma testemunha de proposta durável e
        não emite nenhum fato de transferência.
      operationId: getConsignadoRailLoan
      parameters:
        - description: >-
            The averbado contract number to read (rail numeroContrato, Texto
            2..15 alphanumerics — Manual 005 v1.13 §3.2.1 p.13).
          in: path
          name: numero_contrato
          required: true
          schema:
            description: >-
              The averbado contract number to read (rail numeroContrato, Texto
              2..15 alphanumerics — Manual 005 v1.13 §3.2.1 p.13).
            examples:
              - '199971600000'
            type: string
        - description: >-
            OPTIONAL. The proposal identifier this gateway minted for your bid.
            It is NEVER sent to the rail — the published query is
            codigoSolicitante + numeroContrato only. It is the LOCAL comparison
            key for the win classification: supply it and 'outcome' reports
            won/lost/pending for that proposal; omit it and 'outcome' is
            'pending' because the classification has no subject. The rail's own
            verdict is always in 'situacao_emprestimo' and 'situacao_descricao',
            which are relayed verbatim.
          explode: false
          in: query
          name: numero_proposta
          schema:
            description: >-
              OPTIONAL. The proposal identifier this gateway minted for your
              bid. It is NEVER sent to the rail — the published query is
              codigoSolicitante + numeroContrato only. It is the LOCAL
              comparison key for the win classification: supply it and 'outcome'
              reports won/lost/pending for that proposal; omit it and 'outcome'
              is 'pending' because the classification has no subject. The rail's
              own verdict is always in 'situacao_emprestimo' and
              'situacao_descricao', which are relayed verbatim.
            examples:
              - '12345678901234567890'
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataprevConsultarEmprestimoResponse'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Error
      security:
        - BearerAuth: []
components:
  schemas:
    DataprevConsultarEmprestimoResponse:
      additionalProperties: false
      properties:
        aceito_em:
          description: >-
            dataHoraInclusaoEmprestimo — the instant the rail recorded the loan,
            RFC 3339 UTC. The rail publishes it as a ddMMyyyyHHmmss Texto (the
            Manual 005 example sends "18022026152224").
          examples:
            - '2026-02-18T15:22:24Z'
          format: date-time
          type: string
        atualizado_em:
          description: >-
            dataHoraAtualizacao — when the rail last changed this contract (RFC
            3339 UTC).
          examples:
            - '2026-02-18T15:22:24Z'
          format: date-time
          type: string
        cetAnual:
          description: >-
            valorCetAnual — Custo Efetivo Total as a PERCENT-per-year decimal
            string (the effective compounding of cet_mensal).
          examples:
            - '25.34'
          type: string
        cet_mensal:
          description: >-
            valorCetMensal — Custo Efetivo Total as a PERCENT-per-month decimal
            string. NOTE the rail's casing: the RESPONSE spells it
            valorCetMensal while the inclusão REQUEST spells it valorCETMensal.
          examples:
            - '1.90'
          type: string
        cnpj_empregador_completo:
          description: >-
            The rail's cnpjEmpregadorCompleto flag, relayed verbatim.
            UNVERIFIABLE-UNTIL-HOMOLOG: the source pins its form (Booleano) and
            not its meaning, so it is passed through and NOT interpreted. Absent
            means the rail sent no flag — never read absence as false.
          examples:
            - true
          type: boolean
        cnpj_operador:
          description: >-
            The operator CNPJ the rail holds for this contract (Texto 14; the
            Manual 005 example sends "31061847000100").
          examples:
            - '31061847000100'
          type: string
        competencia_fim_desconto:
          description: >-
            Last payroll competência the discount runs in, as the rail's
            verbatim AAAAMM literal.
          examples:
            - '202609'
          type: string
        competencia_inicio_desconto:
          description: >-
            First payroll competência the discount runs in, as the rail's
            verbatim AAAAMM literal — never reparsed into a date.
          examples:
            - '202601'
          type: string
        contrato:
          description: >-
            The contract number the loan was averbado under (rail field
            contrato, Texto).
          examples:
            - '199971600000'
          type: string
        cpf:
          description: >-
            The worker the contract belongs to, 11 digits. The rail publishes it
            as a Número (the Manual 005 example sends 99971699990), so the
            adapter restores any digit JSON dropped.
          examples:
            - '99971699990'
          type: string
        data_fim_contrato:
          description: >-
            Last day of the contract (RFC 3339 UTC). Absent when the rail
            omitted it.
          examples:
            - '2027-01-20T00:00:00Z'
          format: date-time
          type: string
        data_inicio_contrato:
          description: >-
            First day of the contract (RFC 3339 UTC). Absent when the rail
            omitted it.
          examples:
            - '2026-02-20T00:00:00Z'
          format: date-time
          type: string
        data_primeiro_desconto:
          description: >-
            Date of the first payroll discount (RFC 3339 UTC). Absent when the
            rail omitted it.
          examples:
            - '2026-01-20T00:00:00Z'
          format: date-time
          type: string
        excluido_em:
          description: >-
            dataHoraExclusao — when the contract was excluded (RFC 3339 UTC).
            Absent on a contract that was not excluded.
          examples:
            - '2026-03-01T09:00:00Z'
          format: date-time
          type: string
        garantia:
          $ref: '#/components/schemas/DataprevSolicitacaoGarantia'
        garantia_present:
          description: >-
            Whether the 2xx actually carried a garantia block, under EITHER the
            singular or plural rail key. Gate on THIS, never on
            garantia.tem_garantias: temGarantias=false is an authoritative "this
            averbado contract has NO collateral" and is indistinguishable from
            the zero value of an absent block.
          examples:
            - true
          type: boolean
        if_concessora:
          $ref: '#/components/schemas/DataprevCodigoDescricao'
          description: >-
            The institution that granted the loan, code and the rail's own
            label. Absent when the rail sent no pair.
        info_contrato_enviada_em:
          description: >-
            dataHoraEnvioInfoContrato — when the contract information was sent
            to the rail (RFC 3339 UTC).
          examples:
            - '2026-02-19T08:30:00Z'
          format: date-time
          type: string
        inscricao_empregador:
          $ref: '#/components/schemas/DataprevCodigoDescricao'
          description: >-
            Which kind of identity numero_inscricao_empregador is (Manual 005
            §3.2.2 p.16: 1 CNPJ, 2 CPF), code and the rail's own label. Absent
            when the rail sent no pair.
        matricula:
          description: >-
            The worker's payroll registration at the employer (Texto). The rail
            DOES publish it on this read — row 1 of the Manual 005 p.15 field
            table, and the §3.2.3.2 example sends "MATCEN716".
          examples:
            - MATCEN716
          type: string
        motivo_exclusao:
          $ref: '#/components/schemas/DataprevCodigoDescricao'
          description: >-
            Why the contract was excluded (Manual 005 §3.2.2 p.17: 1 desistência
            do empréstimo, 2 falecimento, 3 liquidação antecipada, 7 ação
            judicial, 8 exclusão por fraude, 9 outros). Absent on a contract
            that was not excluded.
        nome_empregador:
          description: The employer's name as the rail holds it (Texto).
          examples:
            - EMPREGADOR TESTE LTDA
          type: string
        nome_trabalhador:
          description: The worker's name as the rail holds it (Texto).
          examples:
            - Teste Homo_716999
          type: string
        numero_inscricao_empregador:
          description: >-
            The employer inscription the contract belongs to (Texto — CNPJ, CEI
            or CAEPF).
          examples:
            - '42422253000101'
          type: string
        numero_proposta:
          description: >-
            The read's numeroProposta (Manual 005 §3.2.2 p.15, Texto): the
            proposta that owns this contract. The win classification compares it
            against the one you minted.
          examples:
            - '12345678901234567890'
          type: string
        origem_averbacao:
          $ref: '#/components/schemas/DataprevCodigoDescricao'
          description: >-
            How the contract came to be averbado (Manual 005 §3.2.2 p.16: 0
            Averbação banco, 1 troca de titularidade, 2 portabilidade, 3
            refinanciamento, 4 reversão de refinanciamento, 5 renegociação, 6
            renegociação de legado, 7 tombamento compulsório). Code 0 is LIVE:
            absence is the absent pair, never a zero.
        origem_exclusao:
          $ref: '#/components/schemas/DataprevCodigoDescricao'
          description: >-
            Who excluded the contract (Manual 005 §3.2.2 p.16: 1 APS, 2 Banco, 3
            Sistema, 4 troca de titularidade, 5 portabilidade, 6 reversão de
            refinanciamento, 7 refinanciamento). Absent on a contract that was
            not excluded.
        outcome:
          description: >-
            The adapter-derived win classification, never a fabricated win. It
            compares numero_proposta against the proposal you supplied: won
            means the rail's contract belongs to YOUR proposta, lost means it
            belongs to another, pending means the classification has no subject
            (you omitted numero_proposta) or the rail's situação was absent. The
            rail's own verdict is always in situacao_emprestimo /
            situacao_descricao.
          enum:
            - pending
            - won
            - lost
          examples:
            - won
          type: string
        portabilidade_codigo_origem:
          description: >-
            informacoesPortabilidade.codigoOrigem — the institution the contract
            was ported FROM, as the rail's verbatim literal. Never re-parsed as
            a number: an institution code with a leading zero does not survive
            that.
          examples:
            - '237'
          type: string
        portabilidade_codigo_proponente:
          description: >-
            informacoesPortabilidade.codigoProponente — the institution that
            proposed the portability, verbatim.
          examples:
            - '999'
          type: string
        portabilidade_numero_unico_averbacao:
          description: >-
            informacoesPortabilidade.numeroUnicoAverbacao — the rail-minted
            identifier of the portability averbação. Relayed, never parsed.
          examples:
            - '20260731000000123'
          type: string
        portabilidade_numero_unico_exclusao:
          description: >-
            informacoesPortabilidade.numeroUnicoExclusao — the rail-minted
            identifier of the exclusion that closed the origin contract.
            Relayed, never parsed.
          examples:
            - '20260731000000456'
          type: string
        portabilidade_situacao:
          $ref: '#/components/schemas/DataprevCodigoDescricao'
          description: >-
            informacoesPortabilidade.situacao — the state of the portability
            itself, code and label verbatim from the rail. Absent when the
            contract has no portability history; the code is never synthesised.
        portabilidade_valor_pago:
          description: >-
            informacoesPortabilidade.valorPago — the amount paid to settle the
            origin contract (decimal string, BRL). Empty means the rail sent
            nothing; it never means zero.
          examples:
            - '12500.00'
          type: string
        proposal_ref:
          description: >-
            The handoff's dedupe key, sourced from the read's numeroProposta —
            the identifier THIS gateway minted and the rail echoes. There is no
            propostaRef key on this rail.
          examples:
            - '12345678901234567890'
          type: string
        qtd_escrituracoes:
          description: >-
            The rail's count of escriturações on this contract, verbatim. The
            escrituração DETAIL is not duplicated here — it reaches you as
            consignado.reconciliation.received — so this count is how you detect
            a short feed. "0" is a live count; empty means the rail sent none.
          examples:
            - '0'
          type: string
        qtd_pagamentos:
          description: >-
            The rail's count of repasse payments on this contract, verbatim.
            Same purpose as qtd_escrituracoes: the detail arrives as
            consignado.reconciliation.received.
          examples:
            - '0'
          type: string
        quantidade_parcelas:
          description: totalParcelas — the number of instalments.
          examples:
            - 24
          format: int64
          type: integer
        situacao_bloqueio_garantia:
          $ref: '#/components/schemas/DataprevCodigoDescricao'
          description: >-
            State of the FGTS collateral BLOCK (Manual 005 §3.2.2 p.17: 0
            Pendente de bloqueio, 1 Bloqueio Realizado, 2 Falha de bloqueio, 3
            Bloqueio em reprocessamento, 4 Bloqueio rejeitado). A contract
            quoting FGTS collateral whose block failed or was rejected is
            effectively unsecured. Code 0 is LIVE: absence is the absent pair,
            never a zero.
        situacao_descricao:
          description: >-
            situacaoEmprestimo.descricao — the rail's own label for the code
            above, relayed verbatim so an unmapped code is still diagnosable.
          examples:
            - Ativo
          type: string
        situacao_emprestimo:
          description: >-
            situacaoEmprestimo.codigo, surfaced verbatim. Manual 005 §3.2.2 p.17
            publishes the full table: 0 Ativo, 2 Excluído, 3 Encerrado, 7
            Contrato suspenso, 8 Suspenso banco, 15 Encerrado por término do
            vínculo, 16 Encerrado com renegociação, 17 Contrato suspenso por
            antecipação de parcela. Meaningful ONLY when situacao_present is
            true.
          examples:
            - 0
          format: int64
          type: integer
        situacao_present:
          description: >-
            Whether the 2xx actually carried situacaoEmprestimo.codigo. false on
            a 2xx is a malformed or unexpected read: the outcome is forced to
            pending rather than guessed.
          examples:
            - true
          type: boolean
        taxaAnual:
          description: >-
            valorTaxaAnual as a PERCENT-per-year decimal string. "23.87" is
            23.87 %/year, NOT the fraction 0.2387.
          examples:
            - '23.87'
          type: string
        taxa_mensal:
          description: >-
            valorTaxaMensal as a PERCENT-per-month decimal string. "1.80" is
            1.80 %/month, NOT the fraction 0.018.
          examples:
            - '1.80'
          type: string
        valor_iof:
          description: >-
            valorIOF — the IOF charged (decimal string, BRL). Unlike the CET
            pair, this key is spelled identically on both the request and the
            response.
          examples:
            - '100.00'
          type: string
        valor_liberado:
          description: >-
            valorLiberado — the net amount released to the worker (decimal
            string, BRL). The rail DOES publish it on this read (Manual 005 p.17
            field table, example 20000). It is NOT derivable from
            valor_principal minus valor_iof.
          examples:
            - '20000.00'
          type: string
        valor_parcela:
          description: The instalment amount (decimal string, BRL).
          examples:
            - '1116.31'
          type: string
        valor_principal:
          description: valorEmprestimo — the amount actually lent (decimal string, BRL).
          examples:
            - '21600.00'
          type: string
        valor_troco:
          description: >-
            valorTroco — the change returned to the worker (decimal string,
            BRL).
          examples:
            - '100.00'
          type: string
      required:
        - outcome
        - situacao_emprestimo
        - situacao_present
        - situacao_descricao
        - proposal_ref
        - numero_proposta
        - contrato
        - matricula
        - numero_inscricao_empregador
        - cpf
        - valor_principal
        - valor_liberado
        - valor_parcela
        - quantidade_parcelas
        - taxaAnual
        - taxa_mensal
        - cet_mensal
        - cetAnual
        - valor_iof
        - garantia
        - garantia_present
        - aceito_em
      type: object
    Detail:
      additionalProperties: false
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          examples:
            - ERR-0001
          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
    DataprevSolicitacaoGarantia:
      additionalProperties: false
      properties:
        perc_verba_rescisoria_garantia:
          description: >-
            Percentage of the rescission verbas pledged as collateral (decimal
            string, PERCENT). It rides the SEPARATE employer verba-rescisória
            track, not the FGTS-guarantee execution API.
          examples:
            - '10.00'
          type: string
        tem_garantias:
          description: >-
            Whether the worker has FGTS guarantees available. CAUTION: false is
            an authoritative rail statement of "no collateral" and is
            INDISTINGUISHABLE from the zero value of an absent block — on the
            contract read, gate on garantia_present instead, never on this flag
            alone.
          examples:
            - true
          type: boolean
        valor_multa_rescisoria_garantia_fgts:
          description: >-
            The rescission-penalty portion available as collateral (decimal
            string, BRL).
          examples:
            - '400.25'
          type: string
        valor_saldo_disponivel_garantia_fgts:
          description: The FGTS balance available as collateral (decimal string, BRL).
          examples:
            - '1000.50'
          type: string
      required:
        - tem_garantias
      type: object
    DataprevCodigoDescricao:
      additionalProperties: false
      properties:
        codigo:
          description: The rail's code, relayed verbatim.
          examples:
            - 1
          format: int64
          type: integer
        descricao:
          description: >-
            The rail's own label for the code, relayed verbatim so an unmapped
            code stays diagnosable.
          examples:
            - CNPJ
          type: string
      required:
        - codigo
        - descricao
      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

````