外呼任务详情
服务描述
本接口可根据任务编码获取任务详情。
开发须知
调用本接口前,请先获取appId
服务地址
GET/POST https://{您的专属域名}/outbound/openapi/v2/task/{taskCode}
请求参数
| 参数 | 位置 | 类型 | 是否必填 | 说明 |
|---|---|---|---|---|
| appId | header | String | Y | 应用ID |
| timestamp | header | String | Y | 时间戳,毫秒 |
| sign | header | String | Y | 签名 |
| encrypted | header | String | N | 是否需要加密,需要加密传值(加密方式):AES/REQBODY/RESP,不需要加密不用传该字段 |
| Content-Type | header | String | Y | application/json |
| taskCode | url地址栏 | String(32) | Y | 任务编码,长度32位 |
post请求
taskCode不需要加密POST https://{您的专属域名}/outbound/openapi/v2/task/e9a0edb5e839eada14624f83df4c4dd0
数据示例:
GET https://{您的专属域名}/outbound/openapi/v2/task/e9a0edb5e839eada14624f83df4c4dd0
返回结果加密
加密方式
header中的encrypted传值,表示需要对返回结果进行加密,拿到加密后的返回结果, 使用私钥加解密工具进行解密
返回结果
- 需要加密,以下是返回结果加密前的json
- 不需要加密则直接直接返回不加密的结果
| 参数 | 类型 | 说明 |
|---|---|---|
| code | String | 结果码 |
| message | String | 结果描述 |
| data | OpenCallTaskResponse | 任务信息 |
OpenCallTaskResponse
| 参数 | 类型 | 说明 |
|---|---|---|
| taskCode | String(32) | 任务编码,长度32位 |
| taskName | String(50) | 任务名称 |
| taskStatus | int | 任务状态(1-未开始,2-进行中,3-已完成,4-已终止、5-排队中、6-手动暂停、7-自动暂停、8-已过期) |
| taskType | int | 任务启动方式,1手动 2定时 |
| tenantId | String(32) | 租户id |
| robotId | String(32) | 机器人id |
| robotName | String(32) | 机器人名称 |
| outboundNo | String | 外呼号码 |
| outboundTotal | int | 外呼数量 |
| outboundProgress | int | 外呼进度 |
| outboundCircleType | int | 外呼周期,默认1,weekday,目前只支持weekday=1 |
| outboundCircleValue | String(128) | 与outboundCircleType联动,值为:1,2,3,4,5,6,7 |
| outboundTimeInterval | String(128) | 外呼时段:[\"09:00-11:30\",\"13:30-14:00\",\"16:30-18:00\"] |
| aiSeatsNum | int | ai座席数 |
| aiSeatsFlag | int | ai资源不够是否允许拨打,默认允许 1,0不允许 |
| recallStatus | String(64) | 允许重呼状态 15:关机 14:停机 9:占线 12:无法接通 5:未接 10:用户挂断 6:拨打失败 16:呼损 3:正在通话中 |
| maxRecallTimes | int | 重呼次数,默认0 |
| recallPeriodMin | int | 重呼间隔(分钟),最小5分钟 |
| blacklistGroupIds | int | 黑名单组id |
| dialogTaskId | int | 任务流程id |
| dialogTaskName | int | 任务流程名称 |
| recallModel | int | 0-关闭,1-高级模式,2-普通模式 |
| recallStrategy | String | 重呼策略,JSON串,格式如下: [{"status":1,"time":4,"period":10}] |
返回结果示例:
{
"code": "10000",
"message": "请求成功",
"data": {
"taskCode": "e9a0edb5e839eada14624f83df4c4dd0",
"taskName": "外呼测试3",
"taskStatus": 3,
"taskType": 1,
"tenantId": "msxf1524664727417005e005f",
"robotId": "2f50535d41a44ec0afe9727a7a43a770",
"robotName": "朱平测试机器人",
"outboundNo": "1070678044124068",
"outboundTotal": 5,
"outboundProgress": 5,
"outboundCircleType": 1,
"outboundCircleValue": "1,2,3,4,5,6,7",
"outboundTimeInterval": "[\"09:00-21:00\"]",
"aiSeatsNum": 5,
"aiSeatsFlag": 1,
"recallStatus": "",
"maxRecallTimes": 0,
"recallPeriodMin": null,
"blacklistGroupIds": null,
"dialogTaskId": null,
"dialogTaskName": null,
"recallModel": 1,
"recallStrategy": "[{\"time\":2,\"period\":10,\"status\":12},{\"time\":2,\"period\":10,\"status\":5}]"
}
}
结果码说明
| 结果码 | 说明 |
|---|---|
| 10000 | 请求成功 |
| 20001 | 请求失败 |
| 21002 | 认证失败,请重新登录 |