呼叫中心数据开放
POST https://cvd.xiaoduoai.com/v1/api/open/data_export
请求参数 (Json格式)
type: object
properties:
unit_id:
type: int
description: 企业ID
example: 123
request_name:
type: string
description: 请求的数据的名称,呼叫中心通话记录为 frontend_call_entp_list
example: frontend_call_entp_list
page_num:
type: int
description: 页码
example: 1
page_size:
type: int
description: 单次请求的数据条数
example: 20
begin_ts:
type: int
description: 数据筛选范围,电话拨出的时间, 最早60天前
example: 1604310000
end_ts:
type: int
description: 数据筛选范围,电话拨出的时间, end_ts - begin_ts要小于3天
example: 1604310023
required:
- unit_id
- request_name
- page_num
- page_size
- begin_ts
- end_ts
请求参数
名称 |
位置 |
类型 |
必选 |
说明 |
Authorization |
header |
string |
true |
ts + "." + nonce + "." + sign; sign := strings.ToLower(MD5(ts + "." + secret + "." + nonce + "." + secret));ts为当前时间戳;nonce为自定义字符串;secret为企业的密钥 |
body |
body |
object |
true |
none |
» unit_id |
body |
int |
true |
企业ID |
» request_name |
body |
string |
true |
请求的数据的名称,示例为呼叫中心通话记录 |
» page_num |
body |
int |
true |
页码 |
» page_size |
body |
int |
true |
单次请求的数据条数 |
» begin_ts |
body |
int |
true |
数据筛选范围,电话拨出的时间,最早60天前 |
» end_ts |
body |
int |
true |
数据筛选范围,电话拨出的时间,end_ts - begin_ts要小于3天 |
返回示例
{
"error_code": 0,
"info": "",
"lp": "",
"tmp": "",
"data": {
"total_num": 448,
"num": 1,
"items": [
{
"answer_ts": 0,
"call_id": "C20201105113259AC10009303753953",
"call_type": 2,
"comment": "维修审核",
"count": 15,
"disconnection": 0,
"end_ts": 0,
"grade": 0,
"hangup_reason": 0,
"hide": 0,
"ivr": "",
"ivr_time": 0,
"location": "未知",
"name": "李女士",
"phone": "18028502470",
"queue_time": 0,
"queue_ts": 0,
"record": "",
"result": 3,
"ring_time": 0,
"robot_id": "",
"start_ts": 1604547180,
"sub_task_id": "5fa3726b97958e65e18865cc",
"tag": "产品维修",
"talk_time": 0,
"task_id": "5fa3726b97958e65e18865cd",
"task_name": "",
"uid": 6747
}
]
}
}
{
"error_code": 1500003,
"info": "企业ID错误",
"lp": "ec_1500003",
"tmp": "",
"data": {
"total": 0,
"num": 0,
"frontend_call": []
}
}
返回数据结构
名称 |
类型 |
必选 |
约束 |
说明 |
» error_code |
integer |
true |
none |
错误码 |
» info |
string |
true |
none |
错误说明 |
» data |
object |
true |
none |
none |
»» total_num |
integer |
true |
none |
数据总条数 |
»» num |
integer |
true |
none |
本次返回的数据条数 |
»» items |
[object] |
true |
none |
数据详情 |
»»» phone |
string |
true |
none |
电话号码 |
»»» task_name |
string |
true |
none |
任务名 |
»»» task_id |
string |
true |
none |
任务ID |
»»» sub_task_id |
string |
true |
none |
子任务ID |
»»» ivr |
string |
true |
none |
IVR路径 |
»»» result |
integer |
true |
none |
呼叫结果;1.接通 2.未接通 3.通话中 |
»»» start_ts |
integer |
true |
none |
开始拨打时间(时间戳) |
»»» answer_ts |
integer |
true |
none |
接起时间(时间戳) |
»»» end_ts |
integer |
true |
none |
挂断时间(时间戳) |
»»» disconnection |
integer |
true |
none |
挂断方;0.未接通或通话中 1.客服 2.客户 |
»»» count |
integer |
true |
none |
此电话拨打次数 |
»»» tag |
string |
true |
none |
标签 |
»»» comment |
string |
true |
none |
近期备注 |
»»» name |
string |
true |
none |
客户姓名 |
»»» record |
string |
true |
none |
通话录音链接 |
»»» hide |
integer |
true |
none |
号码隐藏选项;0.未隐藏 1.隐藏中间4位 2.隐藏后4位 |
»»» uid |
integer |
true |
none |
客服ID |
»»» nick |
string |
true |
none |
客服昵称 |
»»» robot_id |
string |
true |
none |
机器人ID |
»»» hangup_reason |
integer |
true |
none |
结束原因;0.通话中 1.ivr放弃 2.排队放弃 3.排队超时 4.客服未接 5.客户未接 6.通话结束 7.无坐席登录 100.其他 |
»»» grade |
integer |
true |
none |
评分;0.不显示 1.满意 2.一般 3.不满意 4.未评价 |
»»» queue_ts |
integer |
true |
none |
排队开始时间(时间戳) |
»»» queue_time |
integer |
true |
none |
排队时长(秒) |
»»» ivr_time |
integer |
true |
none |
IVR停留的时间(秒) |
»»» call_id |
string |
true |
none |
单次呼叫ID |
»»» ring_time |
integer |
true |
none |
振铃时间(秒) |
»»» location |
string |
true |
none |
所属地 |
»»» talk_time |
integer |
true |
none |
通话时间(秒) |
»»» call_type |
integer |
true |
none |
电话类型;1.任务外呼 2.自由外呼 3.呼入 4.转接呼入 5.监听 6.拦截 7.强插 |