更新会员的联系方式和个人信息
const url = 'https://api.vimine.network/v1/me';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"phone":"example","dob":"2026-04-15","gender":"M","birthplace":"example","birth_country":"example","codicefiscale":"example","codicefiscale_confirmed":true,"locale":"it"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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。
授权方式
章节“授权方式”请求体必填
章节“请求体必填”object
市镇(在意大利出生)或城市,自由文本(在国外出生)
ISO 3166-1 alpha-2
只写:当事人确认一个与其个人信息不一致的税号(参见 confirmable)
当事人的语言;null 清除所选语言。平台未提供的语言返回 422 unsupported
响应
章节“响应”200
章节“200”更新后的个人资料
object
此人的主体标识符,与 ID 令牌中的相同
仅用于统计
ISO 3166-1 alpha-2
可选:一个人可以没有税号
当事人的身份识别方式。matched:税号与其个人信息一致;mismatch_confirmed:税号不一致,但已由当事人确认;absent:没有税号——由出生日期、出生地和出生国识别;null:尚未识别(不能申请会员资格)
当事人为平台及其邮件选择的语言;null:从未选择——依次采用请求的语言、协会的语言
示例
{ "gender": "M", "codicefiscale_check": "matched", "locale": "it"}400
章节“400”请求无效
object
object
示例自动生成
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "code": "example", "request_id": "example", "errors": [ { "field": "example", "code": "example", "message": "example" } ]}401
章节“401”缺少凭据或凭据无效
object
object
示例自动生成
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "code": "example", "request_id": "example", "errors": [ { "field": "example", "code": "example", "message": "example" } ]}403
章节“403”无权操作
object
object
示例自动生成
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "code": "example", "request_id": "example", "errors": [ { "field": "example", "code": "example", "message": "example" } ]}404
章节“404”未找到
object
object
示例自动生成
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "code": "example", "request_id": "example", "errors": [ { "field": "example", "code": "example", "message": "example" } ]}422
章节“422”校验失败(errors[]:invalid_codicefiscale、codicefiscale_mismatch、invalid、age_below_minimum、not_writable)
429
章节“429”已触发速率限制
object
object
示例自动生成
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "code": "example", "request_id": "example", "errors": [ { "field": "example", "code": "example", "message": "example" } ]}500
章节“500”内部错误
object
object
示例自动生成
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "code": "example", "request_id": "example", "errors": [ { "field": "example", "code": "example", "message": "example" } ]}