跳转到内容

向本协会提交入会申请

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 时,还须指明 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"
}
]
}