## 一、概述
查詢當前卡池中單卡流量;
## 二、接口
~~~[api]
post:/pool/query/flow
*string:rayOauthServerAppId=默認值#頭部參數,應用的appId,聯系廠商獲取
*string:rayOauthServerTimeStamp=默認值#頭部參數,當前時間戳,參考前述算法
*string:rayOauthServerSignature=默認值#頭部參數,簽名,參考前述算法
*string:userCode=默認值#卡片的用戶碼
<<<
success
{
"status": 200,
"code": 200,
"message": "操作成功",
"bizCode": 0,
"timestamp": "1648035518345",
"result": {
"cardPooledLatestData": {
"cardId": 1,
"flowData": 3358599.0,
"curLogicMonth": "2021-09"
}
}
}
<<<
error
{
"status": 200,
"code": 1006,
"message": "當前請求appId無效,請確認是否存在并啟用",
"infoCode": "log202203221515192df",
"bizCode": 0,
"timestamp": "1647933319987"
}
~~~
## 三、關鍵字段
| 字段名稱 || 說明 |
| --- | --- |---|
|statu||狀態 200:成功|
|code||狀態碼 200:成功|
|message||提示消息|
|bizCode||0|
|timestamp||時間戳|
|result|cardPooledLatestData|返回結果|
|| cardId| 卡片id |
|| flowData| 卡片用量 |
|| curLogicMonth| 當前邏輯月份 |
## 四、參考代碼
```
Log4jV2Util.initLog4jV2TestEnv();
String hostUrl = "http://{hosturl}";
String apiUrl = "/pool/query/flow";
String appId = "ray40c9903c6";
String appSecret = "46bacebf-f63c-41cc-b29c-5812994a5e83";
Map<String, String> paramap = new HashMap();
paramap.put("userCode", "34750");
String result = OauthCaller.call(hostUrl, apiUrl, appId, appSecret, paramap);
Logger logger = LoggerFactory.getLogger(OauthClientTest.class);
logger.warn(result);
```