查詢平台卡狀態
查詢已發送平台卡的當前狀態和流水進度。
API 信息
- 端點:
POST /v2/items/state - 認證:Bearer Token
- 加密:請求使用 AES-256-GCM 加密,響應為明文 JSON
請求
請求標頭
POST /v2/items/state HTTP/1.1
Host: api.example.com
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
x-agentid: integratorNBTest04
x-timestamp: 1769746894501
x-nonce: 56ffd5ecd8a3a4457863a0bd7c298fb2
x-signature: 904e97bee2589b93e9747eed0346c68b23d8ff8b568dabaf4b94a5e89093df67
請求參數
加密前的參數
{
"username": "testaccount001",
"spinId": "VPItemTestTrans1015_ghjklhtombg",
"itemId": "testuser"
}
加密後的請求體
{
"cipherText": "G0ZMDELeJwx+7JcIfIFOLJjkSzANPu6krGM2uw==..."
}
| 欄位 | 類型 | 必填 | 說明 |
|---|---|---|---|
username | string | 條件 | 會員帳號(與 spinId 組合使用時必填) |
spinId | string | 條件 | 平台卡唯一識別碼(與 username 組合使用時必填) |
itemId | string | 條件 | 系統內平台卡 ID(單獨使用時必填) |
響應
成功響應
{
"code": 0,
"message": "No error.",
"data": {
"win": 2.64,
"username": "integratorNBTest04_VPSysDevTest002",
"expiredTime": "2025-10-25T17:03:20.000Z",
"itemId": "e60926515661dac5bbb611e042dfed2b_VPItemTestTrans1036_ghjklhtombg"
},
"logUUID": "24cdc3b9-9fe8-44de-8391-a96863e46954"
}
| 欄位 | 類型 | 說明 |
|---|---|---|
code | number | 響應代碼,0 表示成功 |
message | string | 響應訊息 |
data.win | number | 當前贏得金額 |
data.username | string | 會員帳號 |
data.expiredTime | string | 過期時間 |
data.itemId | string | 系統內平台卡 ID |
logUUID | string | 請求追蹤 ID,用於問題排查和日誌查詢 |
錯誤響應
{
"code": 4,
"message": "The transaction doesn`t exist.",
"logUUID": "6589bf8d-fe74-48bd-841a-71bf8f848f86"
}
常見錯誤碼
| 狀態碼 | 說明 |
|---|---|
| 4 | 交易不存在 |
| 8 | 會員不存在 |
| 11 | 參數錯誤 |
| 83 | 認證失敗 |
| 84 | 解密失敗 |
注意事項
- 查詢方式:可以使用兩種組合擇一查詢
- 方式一:
username+spinId - 方式二:
itemId
- 方式一:
- 參數組合:必須提供完整的參數組合,不可混用
- 實時數據:返回當前平台卡的最新使用狀態