跳到內容

為某人提交入會申請(伺服器端)

POST
/v1/enroll
curl --request POST \
--url https://api.vimine.network/v1/enroll \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "email": "hello@example.com", "first_name": "example", "last_name": "example", "codicefiscale": "example", "codicefiscale_confirmed": true, "guardian": { "first_name": "example", "last_name": "example", "relation": "example", "codicefiscale": "example", "email": "hello@example.com", "phone": "example" }, "address": { "kind": "residence", "line": "example", "postal_code": "example", "city": "example", "province": "example", "country": "IT" }, "phone": "example", "dob": "2026-04-15", "gender": "M", "birthplace": "example", "birth_country": "example", "membership_type": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "locale": "example", "accept_statuto": { "version": 1, "sha256": "example" }, "privacy_notice": { "version": 1, "sha256": "example", "locale": "example" }, "accept_terms": { "version": "example", "sha256": "example" }, "acknowledge_privacy": { "version": "example", "sha256": "example" } }'

地址為新地址時建立身份,並建立入會申請(免費且無需審核的類型立即以 ACTIVE 狀態生效,否則保持 PENDING,直到協會記錄會費和/或予以批准)。已有 Vimine 帳戶的地址絕不會被悄悄關聯:其所有者會收到一個確認連結,在他使用該連結時才建立申請。始終傳回 202。accept_statuto 必須指明現行章程的版本(若已發布 sha256,也須一併指明)。僅限用戶端權杖(enroll:write);接受 Idempotency-Key。

媒體類型application/json
object
email
必填
string 格式: email
first_name
必填
string
<= 50 個字元
last_name
必填
string
<= 50 個字元
codicefiscale

可選。一個人可以透過稅號識別,或者透過 dob + birthplace + birth_country 識別——兩者不能都沒有(每缺少一項出生資訊,就在該項上傳回 422 required)。提供時會進行驗證,並與姓名、出生日期和出生地(對在國外出生的人則為國家)比對

string
可為 null <= 16 個字元
codicefiscale_confirmed

當事人確認一個與其個人資訊不一致的稅號(422 codicefiscale_mismatch 且 confirmable: true)

boolean
guardian

對未成年人(依 dob 未滿 18 歲)行使父母責任的人。協會聲明收集此區塊時(aps.collects_guardian_data),未成年人必須提供:否則在 guardian 上傳回 422 required;只在協會作此聲明時才會儲存

object
first_name
必填
string
<= 50 個字元
last_name
必填
string
<= 50 個字元
relation
必填

父母、監護人…,依協會的記錄方式

string
<= 20 個字元
codicefiscale

可選;格式錯誤時拒絕

string
可為 null <= 16 個字元
email
string 格式: email
可為 null
phone
string
可為 null <= 20 個字元
address

戶籍地,或(如不同)住所地。要麼向所有會員詢問,要麼一律不詢問:公開資料中說明協會的聲明(member_address:none——忽略,不儲存 · optional · required——缺少時在 address 上傳回 422 required)

object
kind
string
預設值: residence
允許的值: residence domicile
line
必填

街道和門牌號

string
<= 150 個字元
postal_code
string
可為 null <= 12 個字元
city
必填
string
<= 150 個字元
province

僅限義大利地址(兩個字母);國外地址會捨棄此欄位

string
可為 null <= 2 個字元
country

ISO 3166-1 alpha-2

string
預設值: IT >= 2 個字元 <= 2 個字元
phone
string
可為 null <= 20 個字元
dob
string 格式: date
可為 null
gender

僅用於統計:不參與比對

string
可為 null
允許的值: M F
birthplace

市鎮(在義大利出生)或城市,自由文字(在國外出生)

string
可為 null <= 150 個字元
birth_country

ISO 3166-1 alpha-2

string
可為 null >= 2 個字元 <= 2 個字元
membership_type

協會的會員卡類型之一(協會只有一種類型時可省略)

string 格式: uuid
locale

當事人所填寫頁面的語言(平臺支援的語言——it、en…;其他任何標籤都會歸併到平臺自己的語言:en-GB → en,zh-TW → zh-Hant)。它決定後續郵件的語言,並成為新建立帳戶的語言偏好;已存在的帳戶保留其原有偏好。不支援的值會被忽略

string
可為 null
accept_statuto
必填

當事人在您的網站上接受的現行章程(來自 GET /v1/aps/{slug})

object
version
必填
integer
sha256
string
privacy_notice

當事人在您的網站上閱讀的協會隱私權聲明(GET /v1/aps/{slug} → privacy_notice)。協會發布了隱私權聲明時必須提供;不是現行版本時傳回 422 privacy_notice_outdated

object
version
必填

所展示的現行隱私權聲明版本(GET /v1/aps/{slug} → privacy_notice)

integer
sha256
string
locale

您所展示的隱私權聲明的語言(即您從中讀取它的那份回應中的 privacy_notice.locale)。每種語言都是一份獨立的文件,有自己的版本:如果您是用 ?locale= 讀取公開資料的,請指明它。預設依次為:請求的 locale、協會的語言

string
accept_terms

當事人在您的網站上接受的帳戶使用條款(platform_terms)——可選,須指明現行版本

object
version
必填

所展示的現行版本標籤(GET /v1/legal/{kind})

string
sha256

其範本雜湊值(已發布時)

string
acknowledge_privacy

當事人閱讀的平臺隱私權聲明(platform_privacy)——可選,規則相同

object
version
必填

所展示的現行版本標籤(GET /v1/legal/{kind})

string
sha256

其範本雜湊值(已發布時)

string

已受理

媒體類型application/json
object
status
必填
string
允許的值: accepted
範例
{
"status": "accepted"
}

請求無效

媒體類型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"
}
]
}

協會不接受入會申請(api_disabled)

找不到

媒體類型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"
}
]
}

驗證失敗、會員卡類型未知,或 accept_statuto 指明的不是現行章程

超出速率限制

媒體類型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"
}
]
}