更新會員的聯絡方式和個人資訊
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。一個人可以透過稅號識別,或者透過出生日期、出生地和出生國識別;稅號是可選的,可以之後再補充。稅號會經過驗證,並與已儲存的姓名、出生日期和出生地比對——在義大利出生的人比對市鎮(comune),其他所有人則僅比對國家(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
此人的主體識別碼,與識別碼權杖中的相同
僅用於統計
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" } ]}