API 參考Banqi Agent · v16
Banqi Agent API
已登入代理/用戶 API。驅動 agent 介面的所有 endpoint——與儀表板使用的路由相同。所有 endpoint 均接受 application/json ,並回傳 JSON。
取得 API 金鑰,15 分鐘內完成首次呼叫。
方法驗證27 / 27 個 endpoint
§1
概覽
1 個 endpointBanqi Agent 是已登入代理/用戶介面。代理入口、儀表板及公開目錄均透過這些 endpoint 運作。除非標示為公開,所有呼叫均須帶上 `Authorization: Bearer <banqi_jwt>`。
§2
身分驗證
9 個 endpoint商戶/管理員/平台登入。回傳 JWT,於 `Authorization: Bearer …` 中傳送。
§3
用戶資料
9 個 endpoint已登入代理呼叫的 endpoint。全部需要 `Authorization: Bearer <banqi_jwt>`。
§4
P2P 轉帳
6 個 endpointP2P 轉帳路由。內部帳本路由(resolve-recipient + internal-transfer + internal-history)為正式路徑;舊有自託管路徑(resolve + transfer-receipt + history)已凍結,僅供回流用戶使用。
§5
Webhook
1 個 endpoint外發 webhook,以 HMAC-SHA256 簽署,可從管理員審計日誌重播。
§6
錯誤
1 個 endpoint所有錯誤回應均採用一致格式,HTTP 狀態碼亦會正確設定。
認證示例
用戶 JWT
Authorization: Bearer eyJ… # banqi_jwt = base64(<userId>:<merchantId>)
管理員
Authorization: Bearer <jwt>
商戶(KYB)
Authorization: Bearer <jwt> # banqi_jwt = base64(<userId>:<merchantId>)
