跳转到内容

校验意大利税号(codice fiscale),并与个人信息比对

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" }'

检查结构 + 校验码;提供 first_name / last_name / date / place 或 country 时,还检查个人信息是否一致——并说明税号本身包含什么。入会表单执行相同的检查,但不含性别(那里不比对性别)。

媒体类型application/json
object
code
必填

税号(codice fiscale,16 个字符)

string
first_name
string
last_name
string
gender
string
允许的值: M F
date

出生日期

string 格式: date
place

出生地:在意大利出生的人填市镇(comune)

string
country

出生国,ISO 3166-1 alpha-2。在意大利出生的人,税号中包含的是市镇;其他所有人的税号则只包含国家:IT 以外的任何值都与该国家比对,并忽略 place

string
>= 2 个字符 <= 2 个字符

校验结果

媒体类型application/json
object
valid
boolean
error
string
可为 null
允许的值: invalid mismatch
mismatches

当 error 为 mismatch 时,与税号不一致的项

Array<string>
允许的值: lastName firstName gender date place
hints

names_swapped:姓和名互换后,税号即可对上

Array<string>
允许的值: names_swapped
birth_date

税号本身包含的出生日期

string 格式: date
可为 null
birth_country

税号本身包含的出生国,ISO 3166-1 alpha-2(出生于意大利市镇则为 IT)

string
可为 null
示例
{
"error": "invalid",
"mismatches": [
"lastName"
],
"hints": [
"names_swapped"
]
}

请求无效

媒体类型application/problem+json
object
type
必填
string 格式: uri
title
必填
string
status
必填
integer
detail
string
code
必填
string
request_id
string
errors
Array<object>
object
field
string
code
string
message
string
示例自动生成
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"field": "example",
"code": "example",
"message": "example"
}
]
}

未找到

媒体类型application/problem+json
object
type
必填
string 格式: uri
title
必填
string
status
必填
integer
detail
string
code
必填
string
request_id
string
errors
Array<object>
object
field
string
code
string
message
string
示例自动生成
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"field": "example",
"code": "example",
"message": "example"
}
]
}

已触发速率限制

媒体类型application/problem+json
object
type
必填
string 格式: uri
title
必填
string
status
必填
integer
detail
string
code
必填
string
request_id
string
errors
Array<object>
object
field
string
code
string
message
string
示例自动生成
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"field": "example",
"code": "example",
"message": "example"
}
]
}

内部错误

媒体类型application/problem+json
object
type
必填
string 格式: uri
title
必填
string
status
必填
integer
detail
string
code
必填
string
request_id
string
errors
Array<object>
object
field
string
code
string
message
string
示例自动生成
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"field": "example",
"code": "example",
"message": "example"
}
]
}