Validar EAN/UPC/GTIN
gtin-validateValida códigos de barras EAN-8, UPC-A, EAN-13 y GTIN-14 (dígito GS1) e identifica tipo y prefijo (p. ej. 770 = Colombia). Cuándo: hay que verificar sin conexión el formato y el dígito de control de un identificador antes de usarlo. No para: calcular el dígito de control GS1 (gtin-check-digit). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.
EN: Validates GTIN-8 (EAN-8), GTIN-12 (UPC-A), GTIN-13 (EAN-13) and GTIN-14 barcodes with the GS1 mod-10 check digit and identifies the type and GS1 prefix hints (e.g. 770 = Colombia). When: an identifier's format and check digit have to be verified offline before it is used. Not for: computing the GS1 mod-10 check digit for a GTIN/EAN/UPC/SSCC body of 7-17 digits and returning the full code (gtin-check-digit). [EN completo / full EN: inputSchema.description]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Barcode digits (string; required; up to 64 chars). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | ||
| valid | No | ||
| check_digit | No | ||
| gs1_prefix_hint | No | ||
| expected_check_digit | No |