跳至主要内容

查詢平台卡狀態

查詢已發送平台卡的當前狀態和流水進度。

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==..."
}
欄位類型必填說明
usernamestring條件會員帳號(與 spinId 組合使用時必填)
spinIdstring條件平台卡唯一識別碼(與 username 組合使用時必填)
itemIdstring條件系統內平台卡 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"
}
欄位類型說明
codenumber響應代碼,0 表示成功
messagestring響應訊息
data.winnumber當前贏得金額
data.usernamestring會員帳號
data.expiredTimestring過期時間
data.itemIdstring系統內平台卡 ID
logUUIDstring請求追蹤 ID,用於問題排查和日誌查詢

錯誤響應

{
"code": 4,
"message": "The transaction doesn`t exist.",
"logUUID": "6589bf8d-fe74-48bd-841a-71bf8f848f86"
}

常見錯誤碼

狀態碼說明
4交易不存在
8會員不存在
11參數錯誤
83認證失敗
84解密失敗

注意事項

  1. 查詢方式:可以使用兩種組合擇一查詢
    • 方式一:username + spinId
    • 方式二:itemId
  2. 參數組合:必須提供完整的參數組合,不可混用
  3. 實時數據:返回當前平台卡的最新使用狀態

相關 API