Validate barcode number
validate_barcode_numberRead-onlyIdempotent
Use this when the user asks whether a UPC, EAN, GTIN-8/12/13/14, SSCC, ISBN-10/13 or ISSN number is valid, what its check digit should be, or wants to convert ISBN-10 to ISBN-13, UPC-E to UPC-A, or UPC-A to EAN-13/GTIN-14. Explains the check-digit arithmetic, gives the corrected number and the GS1 prefix meaning. Does not tell who owns a number, whether it is registered with GS1, or what product it is; does not look anything up online.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Number type, e.g. auto (default: detected from the length). gtin8, gtin12 (UPC-A), gtin13 (EAN-13), gtin14, sscc, upce, isbn10, isbn13, issn. Use upce or issn for 8-digit numbers that are not EAN-8. | |
| number | Yes | The number to check, e.g. 5901234123457, 036000291452, 0-306-40615-2 (ISBN-10), 0317-8471 (ISSN) or 106141412345678908 (SSCC). Spaces and hyphens are ignored. Without its check digit (e.g. 03600029145) the check digit is computed. |
Output Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| type | Yes | ||
| input | Yes | ||
| notes | Yes | ||
| valid | Yes | ||
| barcode | Yes | ||
| corrected | Yes | ||
| gs1_prefix | Yes | ||
| type_label | Yes | ||
| check_given | Yes | ||
| equivalents | Yes | ||
| explanation | Yes | ||
| check_expected | Yes |