Skip to main content
Lerian Consignado combines synchronous HTTP commands with asynchronous facts and scheduled Dataprev reads. The HTTP API admits work and answers queries. The outbox publishes business facts. Background workers discover or recover state that Dataprev exposes as feeds rather than callbacks.

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
Credential status returns presence, certificate fingerprint, and expiry metadata. It never returns the certificate, private key, or OAuth secret.

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:
  1. registers the contract with Dataprev
  2. attaches the CCB document when required
  3. exposes registration status and rail documents
  4. records the client’s disbursement confirmation
  5. publishes immutable booking and payment facts through the outbox
A downstream lender or ledger decides what those facts mean for its own books. The gateway does not post directly to the ledger.

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
The gateway emits one reconciliation fact per source record and tracks expected repasses. A repasse can become overdue, later resolve, or become unobservable when the gateway cannot establish a current rail view. Consumers must not treat silence as settlement.

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.