用掃描到的權杖記錄一次入場登記(會員卡或活動報名)
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" } ]}