VOC005: GTIN Checksum¶
Severity: Error Category: Vocabulary Validation
Description¶
GTIN (Global Trade Item Number) must have a valid check digit.
Rule Details¶
This rule validates GTIN checksums using the GS1 check digit algorithm. GTINs are found in product IDs, either as plain numbers or embedded in GS1 Digital Links.
Supported formats:
- GTIN-8: 8 digits
- GTIN-12: 12 digits (UPC-A)
- GTIN-13: 13 digits (EAN-13)
- GTIN-14: 14 digits
Example¶
Invalid¶
Message: Invalid GTIN checksum in '12345678901235'
Valid¶
Check Digit Algorithm¶
The GS1 check digit is calculated as:
- Sum digits in odd positions (from right, excluding check digit)
- Sum digits in even positions, multiply by 3
- Add both sums
- Check digit = (10 - (sum mod 10)) mod 10
How to Fix¶
- Verify the GTIN is entered correctly
- Use a GS1 check digit calculator
- Contact your GS1 member organization if issues persist
References¶
- GS1 GTIN Standards
- GS1 Digital Link
- JSON Path:
$.credentialSubject.product.id