Documentazione
API QuarCode
Integra la generazione di QR code nelle tue applicazioni tramite le API QuarCode.
Endpoint
POST /api/qrcodemanager/create_qr_code
Genera un QR code da qualsiasi stringa. Restituisce PNG binario o stringa Base64.
Parametri (JSON body)
| Parametro | Tipo | Obbl. | Descrizione |
|---|---|---|---|
| data | string | Sì | Il contenuto da codificare (URL, testo, vCard, WiFi, ecc.) |
| size | integer | No | Dimensione in pixel (default: 512, min: 64, max: 4096) |
| outputFormat | string | No | Image (default) = PNG binario | Base64 = stringa Base64 |
| qrCodeVersion | integer | No | Versione QR 1–40. -1 = automatica (default) |
| borderSize | integer | No | Bordo silenzioso in moduli (default: 0) |
| lightColor | string | No | Colore sfondo hex (default: #FFFFFF) |
| darkColor | string | No | Colore moduli hex (default: #000000) |
Esempio richiesta
POST https://api.quarcode.it/api/qrcodemanager/create_qr_code
Content-Type: application/json
{
"data": "https://www.esempio.it",
"size": 1024,
"outputFormat": "Base64"
}
Risposta (outputFormat: Base64)
"iVBORw0KGgoAAAANSUhEUgAA..." // stringa Base64 del PNG
Formati
Formati dati supportati
| Tipo | Formato stringa |
|---|---|
| URL | https://www.esempio.it |
| Testo libero | hQualsiasi testo |
| Telefono | htel:+393331234567 |
| hmailto:email@esempio.it?subject=Oggetto&body=Testo | |
| WiFi | hWIFI:T:WPA;S:NomeRete;P:password;; |
| vCard 3.0 | hBEGIN:VCARD\nVERSION:3.0\nFN:Mario Rossi\n...\nEND:VCARD |