呼叫中心数据接口
消费明细
按时间范围和 DID 号码分页查询通话消费明细;数据为 T+1,最大查询跨度 95 天,不传时间时默认查询近一个月,频率限制每分钟 100 次。
请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 |
|---|---|---|---|---|
| appKey | string | 是 | 应用 AppKey | |
| time | int64 | 是 | 请求时间戳,单位秒 | |
| checksum | string | 是 | 请求签名校验和 | |
| checksumAlgorithm | int32 | 否 | 签名算法:0=SHA1,1=SHA256 |
请求体
| 名称 | 类型 | 必填 | 描述 | 示例值 |
|---|---|---|---|---|
| didNumbers | string[] | 否 | DID 号码列表 | |
| pageSize | int32 | 是 | 每页条数,支持 50 到 100 | 50 |
| startTime | int64 | 否 | 查询开始日期,毫秒时间戳 | 1719763200000 |
| endTime | int64 | 否 | 查询结束日期,毫秒时间戳;最大跨度 95 天 | 1719849599000 |
| pageNum | int32 | 是 | 页码,从 1 开始 | 1 |
返回参数
| 名称 | 类型 | 描述 | 示例值 |
|---|---|---|---|
| code | int32 | 业务状态码,200 表示业务成功 | 200 |
| data | object | ||
| └totalPages | int32 | 总页数 | 3 |
| └pageSize | int32 | 每页条数 | 50 |
| └list | object[] | 消费明细列表 | |
| └duration | int64 | 通话时长,单位秒 | 120 |
| └caller | string | 主叫号码 | 057112345678 |
| └billingCharge | number | 号码单价,单位元/分钟 | 0.1 |
| └billingModeName | string | 计费模式名称 | 国内固话 |
| └callee | string | 被叫号码;企业开启号码加密时可能返回密文 | 13800000000 |
| └costMoney | number | 消耗话费,单位元 | 0.2 |
| └sessionId | int64 | 呼叫会话 ID | 10000001 |
| └initTime | int64 | 呼叫开始时间,毫秒时间戳 | 1719763200000 |
| └direction | int32 | 呼叫方向 | 2 |
| └pageNum | int32 | 当前页码 | 1 |
| └totalElements | int64 | 总条数 | 128 |
| message | string | 响应消息;业务失败时为失败原因 | success |
错误码
| 状态码 | 描述 |
|---|---|
| 14001 | AppKey 不存在 |
| 14002 | checksum 校验失败 |
| 14003 | 请求时间戳与服务器时间误差超过 10 分钟 |
| 14004 | 请求参数或内容不合法 |
| 14009 | 请求过于频繁 |
| 14500 | 系统异常或处理超时 |
postEndpoint
/openapi/ipcc/cost/session/detailcurl -X POST "https://qiyukf.com/openapi/ipcc/cost/session/detail?appKey=string&time=0&checksum=string" \ -H "Content-Type: application/json" \ -d '{ "pageSize": 50, "didNumbers": [ "057112345678" ], "startTime": 1719763200000, "endTime": 1719849599000, "pageNum": 1 }'{
"code": 200,
"data": {
"totalPages": 3,
"pageSize": 50,
"list": [
{
"duration": 120,
"caller": "057112345678",
"billingCharge": 0.1,
"billingModeName": "国内固话",
"callee": "13800000000",
"costMoney": 0.2,
"sessionId": 10000001,
"initTime": 1719763200000,
"direction": 2
}
],
"pageNum": 1,
"totalElements": 128
},
"message": "success"
}{
"code": 14001,
"message": "AppKey 不存在"
}{
"code": 14002,
"message": "checksum 校验失败"
}{
"code": 14003,
"message": "请求时间戳与服务器时间误差超过 10 分钟"
}{
"code": 14004,
"message": "请求参数或内容不合法"
}{
"code": 14009,
"message": "请求过于频繁"
}{
"code": 14500,
"message": "系统异常或处理超时"
}这篇文档有帮助吗?