调用QueryCardFlowInfo查询物联网卡的流量。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Iccid | String | 是 | 89860617030017300390 |
要查询的物联卡对应的Iccid编码。 |
AccessKeyId | String | 否 | your_accesskey_id |
您的AccessKey ID。 |
Action | String | 否 | QueryCardFlowInfo |
系统规定参数。取值:QueryCardFlowInfo。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
CardFlowInfos |
物联网卡流量的信息列表。 |
||
CardFlowInfo |
物联网卡流量的信息列表。 |
||
ExpireDate | String | 20180504235959 |
资源失效日期。 |
FlowResource | Long | 1048576 |
资源总量 ,流量单位为KB。 |
FlowUsed | Long | 0 |
资源使用量,流量单位为KB。 |
ResName | String | 物联网-联通-Internet-自定义流量包 |
资源名称。 |
ResourceType | String | 6700001 |
资源类型编码。6700001代表流量。 |
RestOfFlow | Long | 1048576 |
资源剩余量,流量单位为KB。 |
SmsUsed | Long | 389 |
短信使用量。以条为单位。 |
ValidDate | String | 20171106174912 |
资源生效日期。 |
VoiceTotal | Long | 60 |
语音套餐总量,以分钟为单位。 |
VoiceUsed | Long | 25 |
语音使用量,以分钟为单位。 |
Code | String | OK |
状态码。 |
Message | String | ServiceUnavailable |
状态码的描述。 |
RequestId | String | 1C63F16F-D376-4065-816E-3E56CDD13FEB |
请求ID。 |
示例
请求示例
http(s)://[Endpoint]/?Action=QueryCardFlowInfo
&Iccid=89860617030017300390
&<公共请求参数>
正常返回示例
XML
格式
<QueryCardFlowInfoResponse>
<RequestId>1C63F16F-D376-4065-816E-3E56CDD13FEB</RequestId>
<Code>OK</Code>
<Message>ServiceUnavailable</Message>
<CardFlowInfos>
<ResourceType>6700001</ResourceType>
<ResName>物联网-联通-Internet-自定义流量包</ResName>
<FlowResource>1048576</FlowResource>
<RestOfFlow>1048576</RestOfFlow>
<FlowUsed>0</FlowUsed>
<ValidDate>20171106174912</ValidDate>
<ExpireDate>20180504235959</ExpireDate>
<SmsUsed>389</SmsUsed>
<VoiceUsed>25</VoiceUsed>
<VoiceTotal>60</VoiceTotal>
</CardFlowInfos>
</QueryCardFlowInfoResponse>
JSON
格式
{
"Message":"ServiceUnavailable",
"CardFlowInfos":[
{
"VoiceTotal":60,
"ExpireDate":"20180504235959",
"ResName":"物联网-联通-Internet-自定义流量包",
"ResourceType":"6700001",
"FlowUsed":0,
"RestOfFlow":1048576,
"SmsUsed":389,
"ValidDate":"20171106174912",
"VoiceUsed":25,
"FlowResource":1048576
}
],
"RequestId":"1C63F16F-D376-4065-816E-3E56CDD13FEB",
"Code":"OK"
}
错误码
访问错误中心查看更多错误码。