Collect the counterparty's legal name, jurisdiction of incorporation, and any available identifiers (LEI, company registration number, VAT/EIN) at contract intake
Query the GLEIF API at https://api.gleif.org/api/v1/lei-records?filter[entity.legalName]={legalName}&filter[entity.jurisdiction]={ISO3166-2-code} to find matching LEI records; check that the entity status is ACTIVE and that the legal jurisdiction matches the counterparty's claimed incorporation country
If a match is found, retrieve the entity's direct and ultimate parent relationships via the relationship endpoints to build the ownership hierarchy; flag any parent entity with an LAPSED LEI for manual review
Cross-reference the entity details from GLEIF (registered address, business registry ID) against the Companies House Public Data API (for UK entities) or the relevant national registry to confirm the data is consistent
Store the verified LEI, legal name, jurisdiction, registration number, and verification timestamp in your contract metadata schema for audit and regulatory reporting purposes
Schedule a periodic LEI status re-check (at minimum annually, preferably quarterly) and trigger a contract manager alert if any counterparty LEI transitions to LAPSED or the entity's registration status changes to dissolved
Known gotchas
LEI registration is voluntary in most jurisdictions outside of MiFID II-regulated financial entities; many counterparties, particularly SMEs, will not have an LEI and the GLEIF lookup will return no results — design a fallback to registry-based verification
Legal name matching across systems is fragile — variations in punctuation, abbreviations (Ltd vs Limited), and transliteration can cause false negatives; use fuzzy matching (the GLEIF API supports it via the filter[entity.legalName] fuzzy search) and always confirm with a human reviewer before rejecting a match
The GLEIF API is free and unauthenticated but is not designed for high-volume concurrent calls; for bulk onboarding pipelines, use the GLEIF concatenated bulk data file and run lookups against a local copy
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp