{"id":"lei-validate","version":"1.0.0","description":"Validate a 20-character LEI's ISO/IEC 7064 MOD 97-10 check digits and parse its LOU prefix and entity part.","supported_operations":["validate a legal entity identifier","check lei check digits","is this lei number valid","lei checksum validator","parse lei lou prefix and entity part","verify iso 17442 identifier","does this lei pass mod 97"],"unsupported_operations":["looking up which entity an LEI actually identifies (no GLEIF lookup)","checking an LEI is currently active, lapsed or duplicated in the GLEIF database","validating a bare Modulus 97-10 string with no LEI structure (see checkdigit-validate)"],"semantics":["lei must be exactly 20 characters: no case folding, no trimming. Any other length is reason wrong_length, checked first.","lou_prefix (characters 1-4), entity_part (5-18) and check_digits (19-20) are the raw positional substrings whenever lei is exactly 20 characters, regardless of charset or check-digit validity; all three are null only when length already failed.","Characters 1-18 must each be a digit or an uppercase letter; characters 19-20 must each be a digit, else reason invalid_character.","Check: expand all 20 characters to decimal digits (A=10...Z=35), concatenate, and take the remainder modulo 97 one digit at a time; the LEI is valid only when the remainder equals 1 (the ISO/IEC 7064 MOD 97-10 self-check property). Any other remainder is reason check_digit_mismatch.","valid is true only when length, charset and the MOD 97-10 remainder all pass, in that order; only one reason is ever returned."],"limits":{"max_lei_bytes":20},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["lei"],"properties":{"lei":{"type":"string","minLength":1,"maxLength":20}}},"output_schema":{"type":"object","additionalProperties":false,"required":["valid","reason","lou_prefix","entity_part","check_digits"],"properties":{"valid":{"type":"boolean"},"reason":{"type":["string","null"],"enum":[null,"wrong_length","invalid_character","check_digit_mismatch"]},"lou_prefix":{"type":["string","null"],"minLength":4,"maxLength":4},"entity_part":{"type":["string","null"],"minLength":14,"maxLength":14},"check_digits":{"type":["string","null"],"minLength":2,"maxLength":2}}},"examples":[{"input":{"lei":"HWUPKR0MPOU8FGXBT394"},"output":{"valid":true,"reason":null,"lou_prefix":"HWUP","entity_part":"KR0MPOU8FGXBT3","check_digits":"94"}},{"input":{"lei":"HWUPKR0MPOU8FGXBT39"},"output":{"valid":false,"reason":"wrong_length","lou_prefix":null,"entity_part":null,"check_digits":null}}],"execute_url":"/v1/tools/lei-validate/versions/1.0.0/execute"}