====== 应用详单下载 API ======
通过HTTPS POST方式提交请求,云之讯融合通讯开放平台收到请求后,返回应用详单下载地址及文件下载检验码。
==== 1.1 请求 ====
**请求地址**
/{SoftVersion}/Accounts/{AccountSid}/billList
**请求包头**
详情请查阅统一请求包头,并使用开发者账号进行验证。
**请求包体**
^属性 ^类型 ^约束 ^说明 |
|appId |String |必选 |应用Id|
|date |String |必选 |day 代表前一天的数据,也可以传具体的年月日(yyyyMMdd),获取所传日期的话单|
**XML请求示例**
POST/2014-06-30/Accounts/77df6f3a6d0c7b8e6b2946f48d2f72b0/billList.xml?sig=C17F25D970F28FEF32F689B842799644
Accept:application/xml
Content-Type:application/xml;charset=utf-8
Authorization:NzdkZjZmM2E2ZDBjN2I4ZTZiMjk0NmY0OGQyZjcyYjA6MjAxNDA2MjgxMTMzNTI=
day
0e0ad5c8ba5c4225b9eff2f4c0259196
**JSON请求示例**
POST/2014-06-30/Accounts/77df6f3a6d0c7b8e6b2946f48d2f72b0/billList?sig=B669C48E06219144F639E620AA087C9C
Accept:application/json
Content-Type:application/json;charset=utf-8
Authorization:NzdkZjZmM2E2ZDBjN2I4ZTZiMjk0NmY0OGQyZjcyYjA6MjAxNDA2MjgxMTQ0NTY=
{
"appBill" : {
"appId" : "0e0ad5c8ba5c4225b9eff2f4c0259196",
"date" : "day"
}
}
==== 1.2 响应 ====
**响应包体**
^属性 ^类型 ^约束 ^说明 |
|respCode |String |必选 |请求状态码,取值000000(成功)|
|downUrl |String |必选 |开发者账号详单下载地址|
|token |String |必选 |文件下载检验码|
**XML响应示例**
000000
http://www.ucpaas.com/fileserver/file?fileName=4aRWho%
2Bm8i0jCcNF0UCh5liqkdDUYwbFCZYolrIYX7RG%2FEWSZDWx1CW258AVvdBR%2
FPTj3p5Nv3y5%0AE8%2Bsmff8j0ltqFhrNgxlImRzJMk%2FlqLpFREnbxsDNg%3
D%3D
4302d5deb51110ebe7e8522f5c59412c
**JSON响应示例**
{
"resp" : {
"respCode" : "000000",
"accountBill":{
"downUrl" :"http://www.ucpaas.com/fileserver/file?fileName=4aRWho%2Bm8i0jCcNF0UCh5liqkdDUYwbFCZYolrIYX7RG%2FEWSZDWx1CW258AVvdBR%2FPTj3p5Nv3y5%0AE8%2Bsmff8j0ltqFhrNgxlImRzJMk%2FlqLpFREnbxsDNg%3D%3D",
"token" : "4302d5deb51110ebe7e8522f5c59412c"
}
}
}
**通用详单下载URL**
开发者使用响应回包中的开发者账号详单下载地址和文件下载检验码发起下载请求。
GET {downUrl}&token={token}
**详单格式**
^属性 ^类型 ^约束 ^说明 |
|fromClient |String |必选 |主叫Client|
|to |String |必选 |被叫号码,包括电话号码和Client号码。|
|startTime |String |必选 |开始时间,时间格式为:2014-4-18 13:50:38|
|duration |String |必选 |通话时长,精确到秒。|
|bill |String |必选 |话费|