跳到內容

用掃描到的權杖記錄一次入場登記(會員卡或活動報名)

POST
/v1/checkins
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"
}

已記錄入場登記

媒體類型application/json
object
kind
string
允許的值: card registration
verdict
string
允許的值: valid expired not_yet_valid statuto_required inactive already_checked_in not_confirmed cancelled event_cancelled membership_invalid
status
string
membership_id
string
可為 null
valid_until
string 格式: date-time
可為 null
valid_from

結果為 not_yet_valid 時:會員卡何時可以使用(協會設定的間隔)

string 格式: date-time
可為 null
registration_id
string
可為 null
event
object
slug
string
title
string
starts_at
string 格式: date-time
registration_type
string
可為 null
membership_verdict
string
可為 null
identity_check

僅限會員卡。pending:該會員沒有可核實的稅號,協會中也還沒有人檢視過其證件——請把它顯示給入口值班人員。這只是一條提示,絕不屬於 verdict:不限制任何操作。在協會的管理後臺中清除

string
可為 null
允許的值: pending verified flagged
first
boolean
checked_in_at
string 格式: date-time
可為 null
範例
{
"kind": "card",
"verdict": "valid",
"identity_check": "pending"
}

請求無效

媒體類型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"
}
]
}

會員卡屬於其他協會,或不存在

權杖格式錯誤或為偽造,或者報名權杖尚未生效或已超出其有效時段(invalid_card、reason)。而真實的會員卡即使超出有效時段也不會被拒絕:它會以 expired 判定結果記錄入場登記(若會員資格本身已無效,則判定為無效)

超出速率限制

媒體類型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"
}
]
}