向本协会提交入会申请
const url = 'https://api.vimine.network/v1/me/membership';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"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"}'};
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/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 补全个人资料,然后重新申请。
授权方式
章节“授权方式”请求体必填
章节“请求体必填”object
object
当事人在您的页面上阅读的协会隐私声明(来自 GET /v1/aps/{slug};如果您展示的是译文,请加上 locale)。只要存在当事人尚未确认阅读的现行隐私声明,即为必填(GET /v1/me/acceptances 列出尚待处理的内容);否则会被忽略
object
所展示的隐私声明现行版本(GET /v1/aps/{slug} → privacy_notice)
您所展示的隐私声明的语言(即您从中读取它的那个响应里的 privacy_notice.locale)。每种语言都是一份独立的文件,有自己的版本:如果您用 ?locale= 读取资料,请指明该语言。默认依次为:请求的 locale、协会的语言
户籍地,或与之不同时的住所地——保存在协会自己的会员记录中。协会声明为 member_address: required 时必填,声明为 optional 时会保存,不收集地址时则忽略
object
街道和门牌号
仅限意大利地址(两个字母);国外地址则舍弃
ISO 3166-1 alpha-2
当事人所用页面的语言(it、en):即其阅读的是隐私声明的哪种译文
响应
章节“响应”200
章节“200”成功
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”无权操作
object
object
示例自动生成
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "code": "example", "request_id": "example", "errors": [ { "field": "example", "code": "example", "message": "example" } ]}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" } ]}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" } ]}