API immagine
Genera codici a barre via semplice richiesta GET. Ideale come <img src>. Risposta con cache a lungo termine.
Endpoint
GET /api/barcode
| Parametro | Valori | Default |
|---|---|---|
| type | ean-13, upc-a, code-128, qr-code, data-matrix… | — |
| data | il valore da codificare | — |
| format | svg, png, jpg, gif, webp | svg |
| scale | 1–12 | 2 (1D) / 5 (2D) |
| height | 20–400 (solo 1D) | 60 |
| fg / bg | colore esadecimale (bg=transparent) | #000 / #fff |
| text | 0 / 1 (testo leggibile) | 0 |
| ecc | L, M, Q, H (solo QR) | M |
Esempio
https://barcodegenerator.it/api/barcode?type=ean-13&data=8001234567895&format=svg