跳到內容

向本協會申請入會

POST
/v1/me/membership
curl --request POST \
--url https://api.vimine.network/v1/me/membership \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "membership_type": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "accept_statuto": { "version": 1, "sha256": "example" }, "privacy_notice": { "version": 1, "sha256": "example", "locale": "example" }, "address": { "kind": "residence", "line": "example", "postal_code": "example", "city": "example", "province": "example", "country": "IT" }, "locale": "example" }'

建立入會申請。之後會怎樣,取決於協會如何接納會員(GET /v1/aps/{slug} → admission):採用 board 時,申請保持 PENDING,直到協會的理事會作出決定(pending_reasons:先 approval,再 payment——會費在獲准入會之後繳納,參見 payment_open);採用 provisional 或 automatic 時,免費類型立即以 ACTIVE 狀態生效,收費類型則在記錄會費後生效。已生效的會員資格仍可能帶有一個未來的 valid_from:會員卡從那時起才可以使用。未獲接受的申請最終為 rejected。accept_statuto 必須指明現行章程的版本(若已發布 sha256,也須一併指明)。當協會有一份當事人尚未確認已閱讀的現行隱私權聲明時,privacy_notice 必須以同樣的方式指明它(缺少時在 privacy_notice 上傳回 422 validation_failed,指明的是舊版本時傳回 422 privacy_notice_outdated):由您的頁面展示隱私權聲明(GET /v1/aps/{slug}/privacy-notice),閱讀確認則作為該會員資格的一條證明記錄儲存。要求每位會員提供地址的協會(其公開資料中為 member_address: required)需要 address(否則在 address 上傳回 422 validation_failed)。當事人必須已識別身份——透過稅號,或者出生日期、出生地和出生國:否則傳回 422 identification_required,errors[] 逐項列出缺少的資訊;請用 PATCH /v1/me 補全個人資料後再次申請。

媒體類型application/json
object
membership_type
string 格式: uuid
accept_statuto
必填
object
version
必填
integer
sha256
string
privacy_notice

當事人在您的頁面上閱讀的協會隱私權聲明(來自 GET /v1/aps/{slug};如果您展示的是譯文,請加上 locale)。只要存在一份當事人尚未確認已閱讀的現行隱私權聲明,即為必填(GET /v1/me/acceptances 列出尚待確認的內容);否則會被忽略

object
version
必填

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

integer
sha256
string
locale

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

string
address

戶籍地,或(如不同)住所地——儲存在協會自己的會員記錄中。協會聲明 member_address: required 時為必填,聲明 optional 時會儲存,不收集地址時則忽略

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 個字元
locale

當事人所用頁面的語言(it、en):即其閱讀的是隱私權聲明的哪個語言版本

string
可為 null

成功

請求無效

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

超出速率限制

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