Check whether an identifier is mistyped
validate_identifierVerify a number when you already know what it is supposed to be. Use this whenever someone gives you a product barcode (GTIN, UPC or EAN), a book number (ISBN-10 or ISBN-13), a vehicle VIN, a US healthcare provider NPI, a security ISIN, or a legal entity LEI, and acting on a wrong one would cost something: a bounced claim, a rejected listing, a record that quietly corrupts a dataset.
Every supported format is a public identifier. Bank accounts, IBANs, routing numbers and payment cards are not supported and must not be sent.
Returns whether the checksum passes and, when it fails, the specific reason. If you do not already know the format, call identify_format first rather than guessing a kind, since a valid identifier checked against the wrong format comes back invalid. A passing checksum proves only that the digits are internally consistent: it does not mean the book, product, vehicle or provider exists, is active, or belongs to any particular person.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | Which identifier format to validate against. | |
| value | Yes | The identifier to check. Spaces and dashes are ignored. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Bounded reason the check failed. Absent when valid. | |
| valid | Yes | Whether the check digit is arithmetically consistent. | |
| width | No | The resolved width of a GTIN. GTIN input only. | |
| reason | No | Human-readable detail on the failure. Absent when valid. | |
| country | No | ISO country code parsed from the identifier. ISIN only. | |
| normalized | No | The input with spaces and dashes removed, upper-cased. | |
| actualCheckDigit | No | The digit the VIN actually carries at position 9. VIN only. | |
| expectedCheckDigit | No | The digit a VIN should carry at position 9. VIN only. |