核验令牌:这张会员卡(或这项活动报名)此刻是否有效?
GET
/v1/verify/{card_token}
const url = 'https://api.vimine.network/v1/verify/example';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.vimine.network/v1/verify/example保护隐私:只返回状态,以及有效时的有效期截止时间。绝不返回会员、协会或章程版本。先对令牌进行密码学核验(签名、有效时间窗口),再对照实时的会员资格进行核验。活动报名令牌(kind: registration)返回报名状态以及活动的 slug 和开始时间——不含任何人的信息。
参数
章节“参数”路径参数
章节“路径参数”card_token
必填
从会员卡二维码中读取的 vmt_… 令牌
string
响应
章节“响应”200
章节“200”核验结果
媒体类型application/json
object
status
必填
string
valid_until
string 格式: date-time
valid_from
当 reason: not_yet_valid 时:会员卡真实且有效,并将从此时刻起可以使用
string 格式: date-time
reason
string
kind
报名令牌的响应中提供
string
event
object
slug
string
starts_at
string 格式: date-time
示例
{ "status": "active", "reason": "expired", "kind": "card"}400
章节“400”请求无效
媒体类型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" } ]}404
章节“404”未找到
媒体类型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" } ]}429
章节“429”已触发速率限制
媒体类型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" } ]}500
章节“500”内部错误
媒体类型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" } ]}