Read one averbado contract's loan status on the rail
Reads the rail’s consultar-emprestimo-trabalhador (Manual 005 v1.16 §3.2.1) for one averbado contract: situação do empréstimo, the proposta that owns it, the money terms and the FGTS collateral block. It REPORTS status only — it creates or resolves no durable proposal witness and emits no handoff fact.
Parámetros de ruta
Parámetros de consulta
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.
"12345678901234567890"
Respuesta
OK
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.
true
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.
pending, won, lost "won"
situacaoEmprestimo.codigo, surfaced verbatim. Manual 005 v1.16 §3.2.2 p.19 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.
0
The rail's cnpjEmpregadorCompleto flag, relayed as sent: false means numero_inscricao_empregador is the 8-digit CNPJ raiz, true a 14-digit CNPJ. Absent means the rail sent no flag: the number is then relayed as the rail sent it, and a JSON number is still widened to 14 digits.
true
The employer-inscription TYPE code as decimal digits (Manual 005 v1.16 §3.2.2 p.18: "1" CNPJ, "2" CPF) — the same shape the averbação write carries it in, so it can be persisted or re-sent without reshaping. Empty means the rail published no readable pair; it never means code 0.
"1"
How the contract came to be averbado (Manual 005 v1.16 §3.2.2 p.18: 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, 8 migração automática de contrato per Manual 018 v1.5 txt:581). Code 0 is LIVE: absence is the absent pair, never a zero.
State of the FGTS collateral BLOCK (Manual 005 v1.16 §3.2.2 p.20: 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.

