凭扫描到的令牌记录一次入场登记(会员卡或活动报名)
POST
/v1/checkins
const url = 'https://api.vimine.network/v1/checkins';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"token":"example","card":"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/checkins \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "token": "example", "card": "example" }'核验令牌(签名、时间窗口),确认该记录属于您的协会,记录入场登记并返回判定结果。会员卡令牌(kind: card)为会员资格办理入场登记;报名令牌(kind: registration)为活动报名办理入场登记——当报名类型要求有效会员卡时,也同时为该报名所关联的会员资格办理。不含个人数据。
授权方式
章节“授权方式”请求体必填
章节“请求体必填”媒体类型application/json
object
token
扫描到的令牌(vmt_…):会员卡或报名
string
card
token 的别名(会员卡令牌)
string
示例自动生成
{ "token": "example", "card": "example"}响应
章节“响应”201
章节“201”已记录入场登记
媒体类型application/json
object
kind
string
verdict
string
status
string
membership_id
string
valid_until
string 格式: date-time
valid_from
判定为 not_yet_valid 时:会员卡何时可以使用(协会设定的可用间隔)
string 格式: date-time
registration_id
string
event
object
slug
string
title
string
starts_at
string 格式: date-time
registration_type
string
membership_verdict
string
identity_check
仅限会员卡。pending:该会员没有可核实的税号,协会中也还没有人查看过其证件——请把它显示给入口值守人员。它只是一条提示,绝不属于 verdict:不限制任何操作。由协会在管理后台中清除
string
first
boolean
checked_in_at
string 格式: date-time
示例
{ "kind": "card", "verdict": "valid", "identity_check": "pending"}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" } ]}401
章节“401”缺少凭据或凭据无效
媒体类型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" } ]}403
章节“403”无权操作
媒体类型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”该会员卡属于其他协会,或不存在
422
章节“422”令牌格式错误或系伪造,或者报名令牌尚未生效或已超出其时间窗口(invalid_card、reason)。会员卡则不同:真实的会员卡即使超出时间窗口也不会被拒绝,而是以 expired 判定完成入场登记(会员资格已失效时,判定也为失效)
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" } ]}