# LEI Structural Validator (Offline ISO 7064 Check)

> LEI Structural Validator (Offline ISO 7064 Check) is a paid API for AI agents from x402-datashop-production.up.railway.app, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Validates a 20-character Legal Entity Identifier (LEI) code offline using regex structure check and ISO 7064 mod 97-10 checksum, returning validity, LOU prefix, entity part, and failure reason.

## Facts

- Endpoint: GET https://x402-datashop-production.up.railway.app/v1/validate/lei
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/lei-structural-validator-offline-iso-7064-check-bd5f57a3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GV1MHXjmpDmvm5wqJz1ht

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 lei-structural-validator-offline-iso-7064-check-bd5f57a3
```

Example prompt: Can you check whether this LEI code is structurally valid before I submit my EMIR report — HWUPKR0MPOU8FGXBT394? I want to know if the checksum passes and which part is the LOU prefix.

## When to prefer this

Use this endpoint when you need a fast, cheap, offline pre-validation of an LEI code before hitting the live GLEIF registry (see /v1/global/lei). Ideal for regulatory pipelines (EMIR, MiFID II) that process many counterparty LEIs and want to filter typos and malformed codes without incurring live API costs. At $0.002 USDC per call it is cost-effective for high-volume screening. Do not use this if you need live entity name, registration status, or other GLEIF record data — use the live endpoint for that.

## Known failure modes

- LEI not exactly 20 characters — returns invalid with reason
- Non-alphanumeric characters in LEI — returns regex failure
- ISO 7064 mod 97-10 checksum mismatch — returns checksum failure with reason
- Missing required query parameter ?lei — likely 400 or error response
- Payment not made or invalid x402 auth — 402 Payment Required

## How this service works

Deterministic Legal Entity Identifier check for regulatory reporting pipelines (EMIR, MiFID II require a valid LEI per counterparty): structure regex and ISO 7064 mod 97-10 checksum over the 20-char code. Query: ?lei=HWUPKR0MPOU8FGXBT394. Returns valid, lou_prefix, entity_part and a failure reason. Filters typos before hitting the GLEIF registry (see /v1/global/lei for the live record). Pure offline, 1y cache.

## Output

Returns a JSON object indicating whether the LEI is valid (boolean), the LOU prefix (first 4 chars), the entity part (chars 5–18), and a failure reason string if the code fails the regex structure check or ISO 7064 mod 97-10 checksum. The check is performed entirely offline with no live registry call.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "lei"
     ],
     "properties": {
      "lei": {
       "type": "string",
       "description": "LEI to validate, 20 characters"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/lei-structural-validator-offline-iso-7064-check-bd5f57a3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-datashop-production.up.railway.app](https://www.zero.xyz/host/x402-datashop-production.up.railway.app/llms.txt)
