跳转到内容

更新会员的联系方式和个人信息

PATCH
/v1/me
curl --request PATCH \
--url https://api.vimine.network/v1/me \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "phone": "example", "dob": "2026-04-15", "gender": "M", "birthplace": "example", "birth_country": "example", "codicefiscale": "example", "codicefiscale_confirmed": true, "locale": "it" }'

可写字段:phone、gender、locale,以及身份识别信息——dob、birthplace、birth_country、codicefiscale。识别一个人,可以通过税号,也可以通过出生日期、出生地和出生国;税号是可选的,可以之后再补充。税号会经过校验,并与已保存的姓名、出生日期和出生地比对——在意大利出生的人比对市镇,其他所有人则只比对国家(birth_country);性别不参与比对。不一致的税号返回 422 codicefiscale_mismatch,并带有 mismatches、hints(names_swapped)和 confirmable:当 confirmable 为 true 时,当事人可以确认这就是其医保卡(tessera sanitaria)上的税号——发送 codicefiscale_confirmed: true——此后 codicefiscale_check 变为 mismatch_confirmed。

媒体类型application/json
object
phone
string
可为 null
dob
string 格式: date
可为 null
gender
string
可为 null
允许的值: M F
birthplace

市镇(在意大利出生)或城市,自由文本(在国外出生)

string
可为 null
birth_country

ISO 3166-1 alpha-2

string
可为 null >= 2 个字符 <= 2 个字符
codicefiscale
string
可为 null
codicefiscale_confirmed

只写:当事人确认一个与其个人信息不一致的税号(参见 confirmable)

boolean
locale

当事人的语言;null 清除所选语言。平台未提供的语言返回 422 unsupported

string
可为 null
允许的值: it en zh-Hans zh-Hant fr es de pt-BR

更新后的个人资料

媒体类型application/json
object
sub
必填

此人的主体标识符,与 ID 令牌中的相同

string
email
必填
string 格式: email
email_verified
必填
boolean
first_name
string
可为 null
last_name
string
可为 null
phone
string
可为 null
dob
string 格式: date
可为 null
gender

仅用于统计

string
可为 null
允许的值: M F
birthplace
string
可为 null
birth_country

ISO 3166-1 alpha-2

string
可为 null
codicefiscale

可选:一个人可以没有税号

string
可为 null
codicefiscale_check

当事人的身份识别方式。matched:税号与其个人信息一致;mismatch_confirmed:税号不一致,但已由当事人确认;absent:没有税号——由出生日期、出生地和出生国识别;null:尚未识别(不能申请会员资格)

string
可为 null
允许的值: matched mismatch_confirmed absent
locale

当事人为平台及其邮件选择的语言;null:从未选择——依次采用请求的语言、协会的语言

string
可为 null
允许的值: it en zh-Hans zh-Hant fr es de pt-BR
updated_at
string 格式: date-time
可为 null
示例
{
"gender": "M",
"codicefiscale_check": "matched",
"locale": "it"
}

请求无效

媒体类型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"
}
]
}

校验失败(errors[]:invalid_codicefiscale、codicefiscale_mismatch、invalid、age_below_minimum、not_writable)

已触发速率限制

媒体类型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"
}
]
}