{"id":"national-id-validate","version":"1.0.0","description":"Validate a personal identity number’s format and, where defined, checksum for one of 14 national schemes.","supported_operations":["validate a national id number","check an israeli teudat zehut check digit","validate an aadhaar number","check a spanish dni or nie letter","validate a dutch bsn with the 11-proof","check digit for a french nir social security number","is this a real polish pesel number","בדיקת תעודת זהות ישראלית"],"unsupported_operations":["a registry or government lookup to confirm the identity actually exists","a national ID scheme not in the 14-value enum (no generic/unknown-country mode)","computing or issuing a new identity number"],"semantics":["value must be a non-empty string of at most 15 UTF-8 bytes (limit_exceeded if longer, checked before anything else); scheme must be one of the 14 enum values. Every other problem is reported as {valid:false, reason} rather than thrown, per family convention for validate-style tools.","Reason precedence per scheme, stopping at the first that applies: (1) wrong_length, (2) invalid_character, (3) invalid_component (a structural sub-field such as date, sex digit, century sign or citizenship digit out of range), (4) checksum_mismatch (only for schemes whose checksum is 'verified').","il-tz: 1-9 digits, left-padded with 0 to 9, standard Luhn; an all-zero normalized value is invalid_component (never issued). in-aadhaar: exactly 12 digits not starting with 0 or 1, Verhoeff. es-dni/es-nie: 9 characters, mod-23 letter table (TRWAGMYFPDXBNJZSQVHLCKE) over 8 digits (NIE’s X/Y/Z leading letter maps to 0/1/2).","uk-nino: 9 characters (2 letters, 6 digits, 1 of A/B/C/D), format only, with HMRC’s excluded prefix letters/combinations enforced as invalid_component. nl-bsn: 9 digits, the elfproef (11-proof) weighted sum must be a true multiple of 11; an all-zero value is invalid_component (never issued, even though it satisfies the arithmetic).","za-id: 13 digits YYMMDD+SSSS+C+A+Z, month/day validated under a leap-permissive rule (century unresolvable from 2 digits), citizenship digit 0 or 1, standard Luhn over all 13 digits.","fr-nir: 15 characters, sex 1/2, month 01-12 or 20, département 01-95, 97 (overseas), 98 (overseas) or 99 (born abroad), or the Corsican codes 2A/2B (substituted 19/18 for the key computation); key = 97 - (13-digit body mod 97) (or 97 when that remainder is 0). be-nn: 11 digits, key = 97 - (9-digit body mod 97), tried both with and without a leading ‘2’ prefix (pre-/post-2000 birth year), either match is accepted.","fi-hetu: 11 characters DDMMYY+sign+NNN+check, sign one of + - A-F U-Y fixing the century (+ 1800s, - and U-Y 1900s, A-F 2000s); DDMMYY must be a real proleptic Gregorian date in that resolved year (29 February only in a real leap year), mod-31 check character over DDMMYY+NNN (alphabet 0-9A-HJ-NP-TUVWXY, omitting look-alikes). no-fnr: 11 digits, double MOD 11 (weights [3,7,6,1,8,9,4,5,2] then [5,4,3,2,7,6,5,4,3,2] over the body plus the first check digit); a remainder of 1 in either pass has no valid check digit and fails outright; D-numbers (day+40), H-numbers (month+40) and synthetic numbers (month+80) fail the same day/month range check as an ordinary fødselsnummer and are reported invalid_component (this tool does not decode or accept them separately).","pl-pesel: 11 digits, month carries a century offset (0/20/40/60/80 for 1900s/2000s/2100s/2200s/1800s) that also resolves the full birth year; the day must be a real day of that real year (29 February only in a real leap year), weighted mod-10 check digit (weights [1,3,7,9,1,3,7,9,1,3]). us-ssn: 9 digits, format-only component ranges (no checksum). ca-sin: 9 digits, first digit not 0 or 8, standard Luhn.","Pure integer and table-lookup arithmetic; no locale, clock, or randomness; identical output across runs for the same input."],"limits":{"max_value_bytes":15},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["value","scheme"],"properties":{"value":{"type":"string","minLength":1,"maxLength":15},"scheme":{"type":"string","enum":["il-tz","in-aadhaar","es-dni","es-nie","uk-nino","nl-bsn","za-id","fr-nir","be-nn","fi-hetu","no-fnr","pl-pesel","us-ssn","ca-sin"]}}},"output_schema":{"type":"object","additionalProperties":false,"required":["valid","reason","scheme","normalized","checksum"],"properties":{"valid":{"type":"boolean"},"reason":{"type":["string","null"],"enum":[null,"wrong_length","invalid_character","invalid_component","checksum_mismatch"]},"scheme":{"type":"string","enum":["il-tz","in-aadhaar","es-dni","es-nie","uk-nino","nl-bsn","za-id","fr-nir","be-nn","fi-hetu","no-fnr","pl-pesel","us-ssn","ca-sin"]},"normalized":{"type":"string","minLength":1,"maxLength":15},"checksum":{"type":"string","enum":["verified","not_defined"]}}},"examples":[{"input":{"value":"12345678Z","scheme":"es-dni"},"output":{"valid":true,"reason":null,"scheme":"es-dni","normalized":"12345678Z","checksum":"verified"}},{"input":{"value":"111222333","scheme":"nl-bsn"},"output":{"valid":true,"reason":null,"scheme":"nl-bsn","normalized":"111222333","checksum":"verified"}},{"input":{"value":"1234567890","scheme":"il-tz"},"output":{"valid":false,"reason":"wrong_length","scheme":"il-tz","normalized":"1234567890","checksum":"verified"}}],"execute_url":"/v1/tools/national-id-validate/versions/1.0.0/execute"}