跳到內容

核驗權杖:這張會員卡(或這個活動報名)此刻有效嗎?

GET
/v1/verify/{card_token}
curl --request GET \
--url https://api.vimine.network/v1/verify/example

保護隱私:只傳回狀態,以及有效時的有效期截止時間;絕不傳回會員、協會或章程版本。權杖先以密碼學方式驗證(簽名、有效時段),再與即時的會員資格比對。活動報名權杖(kind: registration)傳回報名狀態以及活動的 slug 和開始時間——不含個人資料。

card_token
必填

從會員卡的 QR Code 中讀取的 vmt_… 權杖

string

核驗結果

媒體類型application/json
object
status
必填
string
允許的值: active inactive
valid_until
string 格式: date-time
valid_from

當 reason: not_yet_valid 時:會員卡真實且有效,從此時起可以使用

string 格式: date-time
reason
string
允許的值: expired invalid not_yet_valid
kind

權杖為報名權杖時提供

string
允許的值: card registration
event
object
slug
string
starts_at
string 格式: date-time
範例
{
"status": "active",
"reason": "expired",
"kind": "card"
}

請求無效

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

內部錯誤

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