Skip to content

Validate an Italian codice fiscale and cross-check it against personal data

POST
/v1/validate/fiscal-code
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" }'

Structure + check digit; with first_name / last_name / date / place or country also the anagraphic consistency — and what the code itself encodes. The enrolment form runs the same check, without the sex (it is not cross-checked there).

Media typeapplication/json
object
code
required

Codice fiscale (16 characters)

string
first_name
string
last_name
string
gender
string
Allowed values: M F
date

Date of birth

string format: date
place

Birthplace: the comune, for a person born in Italy

string
country

Birth country, ISO 3166-1 alpha-2. A code encodes the comune for people born in Italy and only the STATE for everybody else: anything but IT is compared with that state and place is ignored

string
>= 2 characters <= 2 characters

Validation result

Media typeapplication/json
object
valid
boolean
error
string
nullable
Allowed values: invalid mismatch
mismatches

What disagrees with the code, when error is mismatch

Array<string>
Allowed values: lastName firstName gender date place
hints

names_swapped: the code matches once surname and given name are exchanged

Array<string>
Allowed values: names_swapped
birth_date

The date of birth the code itself encodes

string format: date
nullable
birth_country

The birth country the code itself encodes, ISO 3166-1 alpha-2 (IT for a comune)

string
nullable
Example
{
"error": "invalid",
"mismatches": [
"lastName"
],
"hints": [
"names_swapped"
]
}

Invalid request

Media typeapplication/problem+json
object
type
required
string format: uri
title
required
string
status
required
integer
detail
string
code
required
string
request_id
string
errors
Array<object>
object
field
string
code
string
message
string
Examplegenerated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"field": "example",
"code": "example",
"message": "example"
}
]
}

Not found

Media typeapplication/problem+json
object
type
required
string format: uri
title
required
string
status
required
integer
detail
string
code
required
string
request_id
string
errors
Array<object>
object
field
string
code
string
message
string
Examplegenerated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"field": "example",
"code": "example",
"message": "example"
}
]
}

Rate limited

Media typeapplication/problem+json
object
type
required
string format: uri
title
required
string
status
required
integer
detail
string
code
required
string
request_id
string
errors
Array<object>
object
field
string
code
string
message
string
Examplegenerated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"field": "example",
"code": "example",
"message": "example"
}
]
}

Internal error

Media typeapplication/problem+json
object
type
required
string format: uri
title
required
string
status
required
integer
detail
string
code
required
string
request_id
string
errors
Array<object>
object
field
string
code
string
message
string
Examplegenerated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"field": "example",
"code": "example",
"message": "example"
}
]
}