# Forest Factory API – LEI Resolve

> Forest Factory API – LEI Resolve is a paid API for AI agents from http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-20).

Resolves a Legal Entity Identifier (LEI) to full GLEIF entity data including legal name, jurisdiction, status, and registration details.

## Facts

- Endpoint: POST https://http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/entity/lei-resolve?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/forest-factory-api-lei-resolve-22be7b66
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dIBhLG41Xw_Efp0b0yZ6B

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability forest-factory-api-lei-resolve-22be7b66 -d '<json body>'
```

Example prompt: Can you resolve the LEI '2594007XIACKNMUAW223' and tell me the legal name, jurisdiction, and current registration status of that entity?

## When to prefer this

Use this endpoint when you need to resolve a specific 20-character LEI code to its full GLEIF entity record including legal name, jurisdiction, registration status, and renewal dates. Prefer it over manual GLEIF API integration when you need metered, pay-per-call access via x402 micropayments without managing GLEIF API credentials. Ideal for compliance pipelines, KYC workflows, and trade data enrichment.

## Known failure modes

- Invalid LEI format (not exactly 20 alphanumeric characters) returns a validation error
- LEI not found in GLEIF registry returns ok:true with found:false
- GLEIF upstream unavailable causes delayed or error response
- Missing or unsigned payment header triggers HTTP 402 PAYMENT-REQUIRED with x402 challenge
- Malformed request body returns 400 error

## How this service works

Machine-readable contract for active Forest paid capabilities. Unsigned paid calls return HTTP 402 with a PAYMENT-REQUIRED x402 challenge.

## Output

Returns a JSON object with 'ok' status, a 'data' object containing the resolved entity fields (lei, found flag, legal_name, jurisdiction, managing_lou, entity_status, legal_form_id, registered_as, last_update_date, next_renewal_date, corroboration_level, registration_status, headquarters_country, legal_address_country, initial_registration_date), and a 'meta' object with cache status, provider name, timestamp, and response duration. Data is sourced from the GLEIF API.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "lei": {
   "type": "string",
   "pattern": "^[A-Za-z0-9]{20}$",
   "maxLength": 20,
   "minLength": 20,
   "description": "Public lei value used to scope this lookup."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "data": {
   "lei": "example",
   "found": false,
   "provider": "gleif",
   "legal_name": "example",
   "jurisdiction": "example",
   "managing_lou": "example",
   "entity_status": "example",
   "legal_form_id": "example",
   "registered_as": "example",
   "last_update_date": "example",
   "next_renewal_date": "example",
   "corroboration_level": "example",
   "registration_status": "example",
   "headquarters_country": "example",
   "legal_address_country": "example",
   "initial_registration_date": "example"
  },
  "meta": {
   "cache": "miss",
   "provider": "gleif-api",
   "checked_at": "2026-01-01T00:00:00.000Z",
   "duration_ms": 0
  },
  "version": "1",
  "capability": "entity.lei-resolve"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/forest-factory-api-lei-resolve-22be7b66/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run](https://www.zero.xyz/host/http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/llms.txt)
