為某人提交入會申請(伺服器端)
const url = 'https://api.vimine.network/v1/enroll';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"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"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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。
授權方式
章節「授權方式」請求本文必填
章節「請求本文必填」object
可選。一個人可以透過稅號識別,或者透過 dob + birthplace + birth_country 識別——兩者不能都沒有(每缺少一項出生資訊,就在該項上傳回 422 required)。提供時會進行驗證,並與姓名、出生日期和出生地(對在國外出生的人則為國家)比對
當事人確認一個與其個人資訊不一致的稅號(422 codicefiscale_mismatch 且 confirmable: true)
對未成年人(依 dob 未滿 18 歲)行使父母責任的人。協會聲明收集此區塊時(aps.collects_guardian_data),未成年人必須提供:否則在 guardian 上傳回 422 required;只在協會作此聲明時才會儲存
object
父母、監護人…,依協會的記錄方式
可選;格式錯誤時拒絕
戶籍地,或(如不同)住所地。要麼向所有會員詢問,要麼一律不詢問:公開資料中說明協會的聲明(member_address:none——忽略,不儲存 · optional · required——缺少時在 address 上傳回 422 required)
object
街道和門牌號
僅限義大利地址(兩個字母);國外地址會捨棄此欄位
ISO 3166-1 alpha-2
僅用於統計:不參與比對
市鎮(在義大利出生)或城市,自由文字(在國外出生)
ISO 3166-1 alpha-2
協會的會員卡類型之一(協會只有一種類型時可省略)
當事人所填寫頁面的語言(平臺支援的語言——it、en…;其他任何標籤都會歸併到平臺自己的語言:en-GB → en,zh-TW → zh-Hant)。它決定後續郵件的語言,並成為新建立帳戶的語言偏好;已存在的帳戶保留其原有偏好。不支援的值會被忽略
當事人在您的網站上接受的現行章程(來自 GET /v1/aps/{slug})
object
當事人在您的網站上閱讀的協會隱私權聲明(GET /v1/aps/{slug} → privacy_notice)。協會發布了隱私權聲明時必須提供;不是現行版本時傳回 422 privacy_notice_outdated
object
所展示的現行隱私權聲明版本(GET /v1/aps/{slug} → privacy_notice)
您所展示的隱私權聲明的語言(即您從中讀取它的那份回應中的 privacy_notice.locale)。每種語言都是一份獨立的文件,有自己的版本:如果您是用 ?locale= 讀取公開資料的,請指明它。預設依次為:請求的 locale、協會的語言
當事人在您的網站上接受的帳戶使用條款(platform_terms)——可選,須指明現行版本
object
所展示的現行版本標籤(GET /v1/legal/{kind})
其範本雜湊值(已發布時)
當事人閱讀的平臺隱私權聲明(platform_privacy)——可選,規則相同
object
所展示的現行版本標籤(GET /v1/legal/{kind})
其範本雜湊值(已發布時)
回應
章節「回應」202
章節「202」已受理
object
範例
{ "status": "accepted"}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」協會不接受入會申請(api_disabled)
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」驗證失敗、會員卡類型未知,或 accept_statuto 指明的不是現行章程
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" } ]}