===== 获取外呼任务列表 =====
**请求地址**
GET /api/v1/callTask.json
**请求参数**
^名称 ^必填 ^类型 ^注释^
|page |否 |number |页码,默认为 1 |
|per_page|否 |number |每页大小,默认为 100|
**调用者权限**
管理员
**调用示例**
curl -X GET -v -u {account}:{password} https://www.bangwo8.com/api/v1/callTask.json?created_start=2020-06-08
**返回参数**
^名称 ^类型 ^注释^
|callTaskId |int |外呼任务ID |
|task_name |string |外呼任务名称 |
|task_start |datetime |任务开始时间 |
|task_end |datetime |任务结束时间 |
|complete |string |外呼任务状态(进行中,已完成,逾期未完成) |
|page |number |页码,默认为 1 |
|per_page |number |每页大小,默认为 100 |
**返回值示例**
Status: 200 OK
{
"callTask": [
{
"callTaskId": "49242970",
"task_name":"外呼任务1",
"task_start": "2022-05-09",
"task_end": "2022-05-10",
"complete": "进行中"
},
{
"callTaskId": "49242971",
"task_name":"外呼任务2",
"task_start": "2022-05-11",
"task_end": "2022-05-12",
"complete": "进行中"
}
],
"count":1024, "next_page":"https://www.bangwo8.com/api/v1/callTask.json?created_start=2020-06-08&per_page=40&page=2",
"previous_page":null
}
===== 获取外呼任务详情 =====
**请求参数**
^名称 ^必填 ^类型 ^注释^
|callTaskId |是 |int |外呼任务ID |
**请求地址**
GET /api/v1/callTask/{callTaskId}.json
**调用者权限**
管理员
**调用示例**
curl https://www.bangwo8.com/api/v1/callTask/4360708.json
-v -u {account}:{password}
**返回参数**
^名称 ^类型 ^注释^
|callTaskId |int |外呼任务ID |
|task_name |string |外呼任务名称 |
|task_start |datetime |任务开始时间 |
|task_end |datetime |任务结束时间 |
|complete |string |外呼任务状态(进行中,已完成,逾期未完成) |
|task_service |int |客服id |
|phoneCount |int |电话总数 |
|completeCount |int |已完成数量 |
|connectCount |int |有效电话数(即接通数) |
**返回值示例**
Status: 200 OK
{
"callTask": {
"callTaskId": "49242970",
"task_name":"外呼任务1",
"startime": "2022-05-09",
"task_end": "2022-05-10",
"complete": "进行中",
"task_service": "567332",
"phoneCount": "2",
"completeCount": "2",
"connectCount": "2"
}
}
===== 创建外呼任务 =====
**请求参数**
^名称 ^必填 ^类型 ^注释^
|task_name |是 |string |外呼任务名称 |
|task_start |是 |datetime |任务开始时间 |
|task_end |是 |datetime |任务结束时间 |
|task_user |是 |array |客户id |
|task_service |是 |array |客服id |
|data_source |是 |string |数据来源(0是公司,1是联系人) |
**请求地址**
POST /api/v1/callTask.json
**调用者权限**
管理员
**调用示例**
curl -v -u {account}:{password} https://www.bangwo8.com/api/v1/CallTask.json \
-H "Content-Type: application/json" -X POST -d '{"callTask":{"task_name":"外呼任务名称1","task_start":"2022-05-20","task_end":"2022-05-23","task_user":[321456,378594,264758],"task_service":[567332,345294,655758],"data_source":"0"}}'
**返回参数**
^名称 ^类型 ^注释^
|task_name |string |外呼任务名称 |
|task_start |datetime |任务开始时间 |
|task_end |datetime |任务结束时间 |
|data_source |datetime |任务结束时间 |
|complete |string |数据来源(0是公司,1是联系人) |
|sumCount |int |总数据条数 |
|legalCount |int |合法数据条数 |
|illegalData |array |非法数据 |
|successCount |int |插入成功数据条数 |
|failureCount |int |插入失败数据条数 |
|data |array |外呼任务详细信息 |
data参数说明:
|callTaskId |int |外呼任务ID |
|task_user |array |客户id |
|task_service |int |客服id |
**返回值示例**
Status: 200 OK
{
"callTask":{
"task_name":"外呼任务1",
"task_start":"2022-05-09",
"task_end":"2022-05-10",
"legalCount":1,
"illegalCount":[
378594,
264758
],
"successCount":1,
"failureCount":"2",
"data":[
{
"callTaskId":"49242970",
"task_user":[
321456,
378594
],
"task_service":"567332"
},
{
"callTaskId":"49242970",
"task_user":[
264758
],
"task_service":"345294"
}
]
}
}
===== 删除外呼任务 =====
**请求参数**
^名称 ^必填 ^类型 ^注释^
|callTaskId |是 |int |外呼任务ID |
**请求地址**
DELETE /api/v1/callTask/{callTaskId}.json
**调用者权限**
管理员
**调用示例**
curl -v -u {account}:{password} https://www.bangwo8.com /api/v1/CallTask/18738405.json \
-H "Content-Type: application/json"
-X DELETE
**返回值示例**
{
"Status": 200 OK,
"callTaskId": "18738405"
}
当任务id不存在时返回参数:
{
"Status": "403",
"message": "callTaskId does not exist"
}
===== 查看外呼任务的客户列表 =====
**请求参数**
^名称 ^必填 ^类型 ^注释^
|callTaskId |是 |int |外呼任务ID |
|page |否 |number |页码,默认为 1 |
|per_page |否 |number |每页大小,默认为 100 |
**请求地址**
GET /api/v1/callTask/userList/{callTaskId}.json
**调用者权限**
管理员
**调用示例**
curl https://www.bangwo8.com/api/v1/callTask/userList/3214556.json
-v -u {account}:{password}
**返回参数**
^名称 ^类型 ^注释^
|callTaskId |int |外呼任务ID |
|userList |string |客户列表 |
客户列表参数说明:
^名称 ^类型 ^注释^
|uId |int |公司id |
|cId |int |联系人id |
|userName |string |联系人名称 |
|companyName |string |公司名称 |
|phone |int |客户手机号 |
|progress |int |-1:待处理 0:未接听 1:已完成 |
**返回值示例**
{
"callTask": [
{
"callTaskid": "16798",
"userList": {
"cId": "9516936",
"uId": "5061778",
"userName": "测试公司联系人1",
"companyName": "测试公司2",
"phone": "13011112228",
"progress": "待处理"
}
},
{
"callTaskid": "16798",
"userList": {
"cId": "9516345",
"uId": "476207",
"userName": "1",
"companyName": "2233",
"phone": "1",
"progress": "待处理"
}
}
],
"count": "2",
"previous_page": "",
"next_page": ""
}