Valida un codice fiscale italiano e lo confronta con i dati anagrafici
const url = 'https://api.vimine.network/v1/validate/fiscal-code';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"code":"example","first_name":"example","last_name":"example","gender":"M","date":"2026-04-15","place":"example","country":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.vimine.network/v1/validate/fiscal-code \ --header 'Content-Type: application/json' \ --data '{ "code": "example", "first_name": "example", "last_name": "example", "gender": "M", "date": "2026-04-15", "place": "example", "country": "example" }'Struttura + carattere di controllo; con first_name / last_name / date / place o country anche la coerenza anagrafica — e ciò che il codice stesso contiene. Il modulo di iscrizione fa lo stesso controllo, senza il sesso (lì non viene confrontato).
Corpo della richiestaobbligatorio
Sezione intitolata “Corpo della richiestaobbligatorio”object
Codice fiscale (16 caratteri)
Data di nascita
Luogo di nascita: il comune, per chi è nato in Italia
Stato di nascita, ISO 3166-1 alpha-2. Un codice contiene il comune per chi è nato in Italia e solo lo STATO per tutti gli altri: qualsiasi valore diverso da IT viene confrontato con quello Stato e place viene ignorato
Risposte
Sezione intitolata “Risposte”Esito della validazione
object
Cosa non concorda con il codice, quando error è mismatch
names_swapped: il codice torna scambiando cognome e nome
La data di nascita che il codice stesso contiene
Lo Stato di nascita che il codice stesso contiene, ISO 3166-1 alpha-2 (IT per un comune)
Esempio
{ "error": "invalid", "mismatches": [ "lastName" ], "hints": [ "names_swapped" ]}Richiesta non valida
object
object
Esempiogenerato
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "code": "example", "request_id": "example", "errors": [ { "field": "example", "code": "example", "message": "example" } ]}Non trovato
object
object
Esempiogenerato
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "code": "example", "request_id": "example", "errors": [ { "field": "example", "code": "example", "message": "example" } ]}Troppe richieste
object
object
Esempiogenerato
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "code": "example", "request_id": "example", "errors": [ { "field": "example", "code": "example", "message": "example" } ]}Errore interno
object
object
Esempiogenerato
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "code": "example", "request_id": "example", "errors": [ { "field": "example", "code": "example", "message": "example" } ]}