1. Configure a tenant
Before a tenant can call the rail, register:- an ICP-Brasil A1 client certificate and private key
- OAuth2 client credentials
- the tenant’s three-digit Dataprev requester code
- the worker portal base URL used in bid proposals
2. Read worker data and margin
The margin endpoint authenticates the tenant, obtains the worker’s Dataprev authorization context, and returns the rail response without turning it into an underwriting decision. The API also exposes new employment links, termination reports, authorized FGTS records, and FGTS balance reads.3. Discover auctions and submit proposals
A scheduled discovery loop lists open loan requests. A client can then submit a bid through the authenticated HTTP API. The gateway retains the durable bid payload needed to prove what the client sent and later publishes the accepted-proposal witness. Portability auctions use a separate response operation and a bounded Dataprev request window.4. Register and fund the contract
The registration flow:- registers the contract with Dataprev
- attaches the CCB document when required
- exposes registration status and rail documents
- records the client’s disbursement confirmation
- publishes immutable booking and payment facts through the outbox
5. Service the contract
The API covers the rail lifecycle after registration: suspension, reactivation, term changes, installment anticipation and reversal, exclusion, refinancing and reversal, renegotiation, portability registration, and legacy-contract operations. Exclusion is a recoverable operation. The initial authenticated command records the intent, and a scheduled recovery loop drives admitted work to a terminal rail state. Repeating the same idempotent command does not create a second exclusion.6. Reconcile payroll and repasse
The reconciliation worker reads two independent Dataprev sources:- bookkeeping records, keyed by the payroll competence and contract context
- CEF repasse records, which represent the settlement movement
7. Operate portfolios and guarantees
Additional API families cover operational calendars, employment terminations, FGTS guarantee execution, funds, assigned credits, assignments, per-tenant throughput, usage, and event-delivery subscriptions.The API reference is generated from the product’s
develop contract. Use the operation page for exact required headers, idempotency rules, validation ranges, and response schemas.
