跳到內容

更新會員的聯絡方式和個人資訊

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。一個人可以透過稅號識別,或者透過出生日期、出生地和出生國識別;稅號是可選的,可以之後再補充。稅號會經過驗證,並與已儲存的姓名、出生日期和出生地比對——在義大利出生的人比對市鎮(comune),其他所有人則僅比對國家(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
必填

此人的主體識別碼,與識別碼權杖中的相同

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