Callcenter API
业务类接口使用说明
获取用户Token
请求URL
/api/xcc/sessions/auth
参数
dev_key
: 开发者Key,放在body中
通过开发者Key获取Token,即可携带Token访问有权限认证的接口。如:
curl -XPOST -d '{dev_key": "4500ffd8-56b4-4faf-a851-9bd561bf1fb2"}' \
-H "Content-Type: application/json" 192.168.1.100:8081/api/xcc/sessions/auth
返回值为:
{"code":200,"user_id":"4","expires":0,"sip_port":"25060","token":"db232730-8885-42c9-b60a-25072e8f4957"}
获取分机token
该Token用于连接WebSocket及调用WebSocket接口
请求URL
/api/xcc/sessions/getExtnToken
参数
- extn: 分机号,放在body中
- token: 用户Token,放在HTTP请求时的Header上
curl -XPOST -H "token: db232730-8885-42c9-b60a-25072e8f4957" -d '{"extn": "1001"}' \
-H "Content-Type: application/json" 192.168.1.100:8081/api/xcc/sessions/getExtnToken
返回值为:
{
"extn_id":"192",
"token":"e35b168e-80a9-4c2b-97c8-6f0044e7302b",
"domain":"xswitch.cn"
}
分机接口
分机用于SIP或Verto注册认证,该接口主要完成分机的的增删改查
查询
请求URL
/api/xcc/extensions/list
参数
- page:当前页数
- page_size:每页显示的个数
- search_field:搜寻的关键字所在字段
- search_key:所搜寻的关键字
- sort_field:排序的关键字字段
- sort_order:升序或者降序
- token: 用户Token,放在HTTP请求时的Header上
例子
curl -XPOST -H "token: db232730-8885-42c9-b60a-25072e8f4957" -d '{"page_size":"2"}' \
-H "Content-Type: application/json" localhost:8081/api/xcc/extensions/list
返回值
{
"page": 1,
"data": [{
"ha1": "6295cecf17ab7943e802b4d539252d4e",
"ha1b": "cfd07ab9643b1a6afbf5cd0965bdd7c1",
"user_id": "179",
"cid_number": "",
"vm_password": "",
"description": "",
"id": "191",
"display_order": "0",
"context": "default",
"extn": "1000",
"domain": "xswitch.cn",
"deleted_at": "",
"updated_at": "2020-01-17 14:11:55",
"cid_name": "",
"created_at": "2020-01-17 14:11:55",
"name": "Ext_1000",
"type": "SIP",
"weblogin_disabled": "0",
"disabled": "0",
"sync_enabled": "0",
"priority": "99"
}, {
"ha1": "056cba6fb5f991cc9112f592ba5e65e4",
"ha1b": "6238501df8a36fe9ee9cbb4855b651e1",
"user_id": "180",
"cid_number": "",
"vm_password": "",
"description": "",
"id": "192",
"display_order": "0",
"context": "default",
"extn": "1001",
"domain": "xswitch.cn",
"deleted_at": "",
"updated_at": "2020-01-17 14:11:55",
"cid_name": "",
"created_at": "2020-01-17 14:11:55",
"name": "Ext_1001",
"type": "SIP",
"weblogin_disabled": "0",
"disabled": "0",
"sync_enabled": "0",
"priority": "99"
}],
"row_count": 22,
"page_count": 11
}
查询某个分机
请求URL
/api/xcc/extensions/get
参数
- id:分机ID
- token: 用户Token,放在HTTP请求时的Header上
例子
curl -XPOST -H "token: db232730-8885-42c9-b60a-25072e8f4957" -d '{"id":"236"}' \
-H "Content-Type: application/json" localhost:8081/api/xcc/extensions/get
返回值
{
"id": 236,
"domain": "xswitch.cn",
"extn": "1009",
"sync_enabled": 0,
"updated_at": "2020-01-19 15:39:28",
"disabled": 0,
"ha1": "69308ceaa676774f78ba67357de11ebf",
"login": "1009",
"created_at": "2020-01-19 15:39:28",
"name": "Ext_1009",
"user_id": 188,
"weblogin_disabled": 0,
"priority": "99",
"ha1b": "302066ca86ca4b631baf38c056a77275",
"display_order": "0",
"context": "default",
"type": "SIP"
}
删除
请求URL
/api/xcc/extensions/del
参数
- id:分机对应的ID
- token: 用户Token,放在HTTP请求时的Header上
例子
curl -XPOST -H "token: db232730-8885-42c9-b60a-25072e8f4957" -d '{"id":"200"}' \
-H "Content-Type: application/json" localhost:8081/api/xcc/extensions/del
返回值
{"id":"200"}
创建
请求URL
/api/xcc/extensions/add
参数
- name:分机的名称
- extn:分机号
- password:分机密码
- type:分机类型,SIP/VERTO/TEL,默认为SIP
- cid_number:外显号码
- cid_name:外显名称
- context:呼叫时,路由context,默认为default
- domain:域名,默认为xswitch.cn
- token: 用户Token,放在HTTP请求时的Header上
例子
curl -XPOST -H "token: db232730-8885-42c9-b60a-25072e8f4957" \
-H "Content-Type: application/json" \
-d '{"name":"EXT_1030","extn":"1030","password":"$VeryGoodPassw0rd","context":"default","domain":"xswitch.cn"}' \
localhost:8081/api/xcc/extensions/add
返回值
{"id":"226"}
修改
请求URL
/api/xcc/extensions/set
参数
- name:分机的名称
- password:分机密
- type:分机类型,SIP/VERTO/TEL,默认为SIP
- cid_number:外显号码
- cid_name:外显名称
- context:呼叫时,路由context,默认为
context-1
,有的场景下为default
- domain:域名,默认为xswitch.cn
- token: 用户Token,放在HTTP请求时的Header上
例子
curl -XPOST -H "token: db232730-8885-42c9-b60a-25072e8f4957" \
-H "Content-Type: application/json" \
-d '{"id":"227","name":"EXT_1030","password":"$VeryGoodPassw0rd","context":"default","domain":"xswitch.cn"}' \
localhost:8081/api/xcc/extensions/set
返回值
{"id": "227"}
队列接口
处理队列的增删改查
查询
请求URL
/api/xcc/queues/list
参数
- token: 用户Token,放在HTTP请求时的Header上
- name: 根据队列名模糊查询
- page_size:每页显示的队列数
- sort_field:排序字段,默认按照id排序
- sort_order:排序方式,descend/ascend,默认按照递增顺序排列
例子
curl -XPOST -H "token: db232730-8885-42c9-b60a-25072e8f4957" -d '{"page_size":"5", "page":"2"}' \
-H "Content-Type: application/json" localhost:8081/api/xcc/queues/list
返回值
{
"row_count": 6,
"page": 2,
"data": [{
"cti_template": "callcenter",
"strategy": "random",
"id": 17,
"name": "testapi6",
"greeting": "local_stream:\/\/moh",
"server_ip": "172.18.0.5",
"updated_at": "2020-02-27 00:04:57",
"moh_sound": "local_stream:\/\/moh",
"auto_record": 0,
"created_at": "2020-02-27 00:04:57"
}],
"page_count": 2
}
新建
请求URL
/api/xcc/queues/add
坐席分配策略
- ring-all: 所有坐席振铃
- longest-idle-agent: 空闲时长最长振铃
- round-robin: 轮循振铃
- top-down: 顺序振铃
- agent-with-least-talk-time: 通话时长最小振铃
- agent-with-fewest-calls: 接听最少振铃
- sequentially-by-agent-order: 优先级振铃
- random: 随机
- ring-progressively: 顺序振铃,之前已接听的坐席优先分配原客户
参数
- token: 用户Token,放在HTTP请求时的Header上
- name: 队列名,需要保证其唯一性
- server_ip:队列对应的服务器地址
- description:描述信息
- moh_sound:等待音
- greeting:欢迎音乐
- strategy:坐席分配策略,如random
- notify_position:是否播报位置,true/false
- notify_position_interval:播报间隔,配合notify_position使用
- notify_agent_answer:接通时,是否播报坐席工号,true/false
- retain_agent:队列中保留的最少空闲坐席数
- agent_timeout:坐席最大振铃时长,单位为为秒
- wait_timeout:最大等待时长,单位为秒
- wait_timeout_without_agent: 无坐席时最大等待时长,单位为秒
- capacity:队列的最大人数
- overflow_capacity_action:超出队列容量时执行的操作,格式为json
如挂断
{"action":"hangup"}
或转接
{"action":"transfer","type":"queue/number/voicemail","data":"5100"}
- wait_timeout_action:超出最长等待时长时执行的操作
如挂断
{"action":"hangup"}
或转接
{"action":"transfer","type":"queue/number/voicemail","data":"5100"}
- wait_timeout_without_agent_action: 无坐席时,超出最大等待时长执行的操作
如挂断
{"action":"hangup"}
或转接
{"action":"transfer","type":"queue/number/voicemail","data":"5100"}
例子
curl -XPOST -H "token: db232730-8885-42c9-b60a-25072e8f4957" \
-H "Content-Type: application/json" \
-d '{"name":"657894","greeting":"local_stream://moh","strategy":"random","server_ip":"172.18.0.5"}' \
localhost:8081/api/xcc/queues/add
返回值
{"id": "6"}
删除
注意删除队列时,务必谨慎,保证删除的队列中无坐席使用
请求URL
/api/xcc/queues/del
参数
- token: 用户Token,放在HTTP请求时的Header上
- id:队列的ID
例子
curl -XPOST -H "token: db232730-8885-42c9-b60a-25072e8f4957" -d '{"id":"6"}' \
-H "Content-Type: application/json" localhost:8081/api/xcc/queues/del
返回值
{"id":"6"}
修改
请求URL
/api/xcc/queues/set
坐席分配策略
- ring-all: 所有坐席振铃
- longest-idle-agent: 空闲时长最长振铃
- round-robin: 轮循振铃
- top-down: 顺序振铃
- agent-with-least-talk-time: 通话时长最小振铃
- agent-with-fewest-calls: 接听最少振铃
- sequentially-by-agent-order: 优先级振铃
- random: 随机
- ring-progressively: 顺序振铃,之前已接听的坐席优先分配原客户
参数
- token: 用户Token,放在HTTP请求时的Header上
- id:队列ID
- description:描述信息
- moh_sound:等待音
- greeting:欢迎音乐
- strategy:坐席分配策略,如random
- notify_position:是否播报位置,true/false
- notify_position_interval:播报间隔,配合notify_position使用
- notify_agent_answer:接通时,是否播报坐席工号,true/false
- retain_agent:队列中保留的最少空闲坐席数
- agent_timeout:坐席最大振铃时长,单位为为秒
- wait_timeout:最大等待时长,单位为秒
- wait_timeout_without_agent: 无坐席时最大等待时长,单位为秒
- capacity:队列的最大人数
- overflow_capacity_action:超出队列容量时执行的操作,格式为json
如挂断
{"action":"hangup"}
或转接
{"action":"transfer","type":"queue/number/voicemail","data":"5100"}
- wait_timeout_action:超出最长等待时长时执行的操作
如挂断
{"action":"hangup"}
或转接
{"action":"transfer","type":"queue/number/voicemail","data":"5100"}
- wait_timeout_without_agent_action: 无坐席时,超出最大等待时长执行的操作
如挂断
{"action":"hangup"}
或转接
{"action":"transfer","type":"queue/number/voicemail","data":"5100"}
例子
curl -XPOST -H "token: db232730-8885-42c9-b60a-25072e8f4957" \
-H "Content-Type: application/json" \
-d '{"id":"6","greeting":"local_stream://moh","strategy":"agent-with-least-talk-time"}' \
localhost:8081/api/xcc/queues/set
返回值
{"id":"6"}
XSwitch列表接口
在个多个XSwitch的集群状态下使用。
获取XSwitch列表接口
请求URL
/api/xcc/freeswitch/list
参数
- token: 用户Token,放在HTTP请求时的Header上
例子
curl -XPOST -H "token: db232730-8885-42c9-b60a-25072e8f4957" \
-H "Content-Type: application/json" \
-d '{}' \
localhost:8081/api/xcc/freeswitch/list
返回值
[{"ip":"192.168.1.7","name":"fs1"}]
时间定义接口
设置/新建工作日时间
请求URL
/api/xcc/timeDef/add
参数
- token: 用户Token,放在HTTP请求时的Header上
- type:类型,此处固定为work_time
- weekday:1-7,代表周一至周日
- start_time:工作日开始时间,格式为08:00:0
- end_time:工作日结束时间,格式为18:00:00
例子
curl -XPOST -H "token: db232730-8885-42c9-b60a-25072e8f4957" \
-H "Content-Type: application/json" \
-d '{"type":"work_time", "weekday":"5", "start_time":"08:00:00", "end_time":"18:00:00"}' \
localhost:8081/api/xcc/timeDef/add
返回值
{"id":"6"}
修改工作日时间
请求URL
/api/xcc/timeDef/set
参数
- token: 用户Token,放在HTTP请求时的Header上
- type:类型,此处固定为work_time
- id:对应的id
- start_time:工作日开始时间,格式为08:00:00
- end_time:工作日结束时间,格式为18:00:00
例子
curl -XPOST -H "token: db232730-8885-42c9-b60a-25072e8f4957" \
-H "Content-Type: application/json" \
-d '{"type":"work_time", "id":"5", "start_time":"08:00:00", "end_time":"19:00:00"}' \
localhost:8081/api/xcc/timeDef/set
返回值
{"id":"6"}
查询工作日时间
请求URL
/api/xcc/timeDef/list
参数
- token: 用户Token,放在HTTP请求时的Header上
- type:类型,此处固定为work_time
例子
curl -XPOST -H "token: db232730-8885-42c9-b60a-25072e8f4957" \
-H "Content-Type: application/json" \
-d '{"type":"work_time"}' \
localhost:8081/api/xcc/timeDef/list
返回值
[
{
"weekday":"1",
"end_time":"18:00:00",
"id":"1",
"updated_at":"2020-03-03 15:09:15",
"start_time":"08:00:00",
"created_at":"2020-03-03 15:09:15"
},
{
"weekday":"2",
"end_time":"19:00:00",
"id":"4",
"updated_at":"2020-03-03 20:21:35",
"start_time":"08:00:00",
"created_at":"2020-03-03 15:30:55"
},
{
"weekday":"5",
"end_time":"19:00:00",
"id":"6",
"updated_at":"2020-03-03 21:56:51",
"start_time":"08:00:00",
"created_at":"2020-03-03 21:53:33"
}
]
删除工作日时间
请求URL
/api/xcc/timeDef/del
参数
- token: 用户Token,放在HTTP请求时的Header上
- type:类型,此处固定为work_time
- id:所删除信息对应的id
例子
curl -XPOST -H "token: db232730-8885-42c9-b60a-25072e8f4957" \
-H "Content-Type: application/json" \
-d '{"type":"work_time", "id":"4"}' \
localhost:8081/api/xcc/timeDef/del
返回结果
{"id":"6"}
查询休息日列表
请求URL
/api/xcc/timeDef/list
参数
- token: 用户Token,放在HTTP请求时的Header上
- type:类型,此处固定为offday
例子
curl -XPOST -H "token: db232730-8885-42c9-b60a-25072e8f4957" \
-H "Content-Type: application/json" \
-d '{"type":"offday"}' \
localhost:8081/api/xcc/timeDef/list
返回值
[
{
"end_date":"03-03 20:00:00",
"updated_at":"2020-03-03 20:52:16",
"start_date":"03-03 08:00:00",
"created_at":"2020-03-03 20:49:40",
"id":"2"
}
]
增加休息日
请求URL
/api/xcc/timeDef/add
参数
- token: 用户Token,放在HTTP请求时的Header上
- type:类型,此处固定为offday
- name:名称
- start_date:休息日开始时间,格式为03-03 00:00:00
- end_date:休息日结束时间,格式为03-03 23:59:59
例子
curl -XPOST -H "token: db232730-8885-42c9-b60a-25072e8f4957" \
-H "Content-Type: application/json" \
-d '{"type":"offday", "name":"test", "start_date":"03-03 00:00:00", "end_date":"03-03 23:59:59"}' \
localhost:8081/api/xcc/timeDef/add
返回值
{"id":"5"}
修改休息日
请求URL
/api/xcc/timeDef/set
参数
- token: 用户Token,放在HTTP请求时的Header上
- type:类型,此处固定为offday
- id:对应的ID
- name:名称
- start_date:休息日开始时间,格式为03-03 00:00:00
- end_date:休息日结束时间,格式为03-03 23:59:59
例子
curl -XPOST -H "token: db232730-8885-42c9-b60a-25072e8f4957" \
-H "Content-Type: application/json" \
-d '{"type":"offday", "id":"5", "name":"test", "start_date":"03-03 00:00:00", "end_date":"03-04 23:59:59"}' \
localhost:8081/api/xcc/timeDef/set
返回值
{"id":"5"}
删除休息日
请求URL
/api/xcc/timeDef/del
参数
- token: 用户Token,放在HTTP请求时的Header上
- type:类型,此处固定为offwork
- id:所删除信息对应的id
例子
curl -XPOST -H "token: db232730-8885-42c9-b60a-25072e8f4957" \
-H "Content-Type: application/json" \
-d '{"type":"offday", "id":"5"}' \
localhost:8081/api/xcc/timeDef/del
返回结果
{"id":"6"}
IVR接口
处理IVR增删除改查
新建IVR
请求URL
/api/xcc/ivrs/add
参数
- token: 用户Token,放在HTTP请求时的Header上
- name:语音导航名,需要保证其唯一性
- level:层级
- parent_id:父节点ID
- nbr:绑定的号码
- type:IVR类型,transfer/next/prev/top,转接电话/下级菜单/返回上级菜单/返回顶级菜单
- voice_type:语音类型,目前仅有file
- media_file: 语音文件或者彩铃文件
- repeat_timeout:重复提示间隔(秒)
- repeat_prompts:重复提示次
- call_extn_allowed:允许拨打分机
- record:记忆功能,close/miss/all,关闭/呼出未接记录记忆/全部记录记忆
- transfer_time:开始转接时间(秒)
- timeout_enable:启用超时业务
- timeout:超时时间
- business_type:业务类型,order/memory/ringall/queue,顺振、记忆轮循、共振、队列
- numbers:号码列表
- digits:绑定的功能按键
例子
curl -XPOST -H "token: db232730-8885-42c9-b60a-25072e8f4957" \
-H "Content-Type: application/json" \
-d '{"level":0,"name":"总部","nbr":"11111","type":"transfer","voice_type":"file","call_extn_allowed":1
}' \
localhost:8081/api/xcc/ivrs/add
返回值
{
"id": "1"
}
查询IVR
查询所有顶级(level=0)的IVR列表
请求URL
/api/xcc/ivrs/list
参数
- token: 用户Token,放在HTTP请求时的Header上
- name:根据名称模糊查询
- page:当前页数
- page_size:每页显示的热线号码数
- sort_field:排序字段,默认按照id排序
- sort_order:排序方式,descend/ascend,默认按照递增顺序排列
例子
curl -XPOST -H "token: db232730-8885-42c9-b60a-25072e8f4957" \
-H "Content-Type: application/json" \
-d '{"page_size":"5", "page":"2", "name":"2"}' \
localhost:8081/api/xcc/ivr/list
返回值
{
"page_count": 1,
"page": 1,
"row_count": 1,
"data": [
{
"updated_at": "2020-03-03 16:00:53",
"record": "close",
"transfer_time": "",
"created_at": "2020-03-03 16:00:53",
"name": "总部2",
"timeout_enable": "0",
"numbers": "",
"id": "3",
"timeout": "",
"media_file": "",
"parent_id": "",
"level": "0",
"deleted_at": "",
"nbr": "22222",
"digits": "",
"voice_type": "file",
"type": "next",
"business_type": "",
"call_extn_allowed": "1",
"repeat_timeout": "",
"repeat_prompts": ""
}
]
}
查询某个IVR
查询某个IVR及其下级所有IVR
请求URL
/api/xcc/ivrs/get
参数
- token:用户Token,放在HTTP请求时的Header上
- id:语音导航ID
例子
curl -XPOST -H "token: db232730-8885-42c9-b60a-25072e8f4957" \
-d '{"id":"1"}' \
-H "Content-Type: application/json" \
localhost:8081/api/xcc/ivrs/get
返回值
[
{
"digits": "",
"media_file": "",
"ivrs": [
{
"digits": "",
"media_file": "",
"ivrs": [],
"repeat_timeout": "",
"parent_id": "1",
"id": "2",
"repeat_prompts": "",
"deleted_at": "",
"level": "1",
"updated_at": "2020-03-03 16:38:16",
"voice_type": "file",
"call_extn_allowed": "0",
"numbers": "",
"business_type": "",
"timeout": "",
"nbr": "111122222",
"transfer_time": "",
"name": "莱山一",
"timeout_enable": "0",
"created_at": "2020-03-03 16:00:27",
"record": "close",
"type": "top"
},
{
"digits": "",
"media_file": "",
"ivrs": [
{
"digits": "",
"media_file": "",
"ivrs": [],
"repeat_timeout": "",
"parent_id": "8",
"id": "9",
"repeat_prompts": "",
"deleted_at": "",
"level": "2",
"updated_at": "2020-03-03 17:49:20",
"voice_type": "file",
"call_extn_allowed": "1",
"numbers": "",
"business_type": "",
"timeout": "",
"nbr": "111122221111",
"transfer_time": "",
"name": "烟大1",
"timeout_enable": "0",
"created_at": "2020-03-03 17:49:20",
"record": "close",
"type": "transfer"
}
],
"repeat_timeout": "",
"parent_id": "1",
"id": "8",
"repeat_prompts": "",
"deleted_at": "",
"level": "1",
"updated_at": "2020-03-03 17:48:24",
"voice_type": "file",
"call_extn_allowed": "1",
"numbers": "",
"business_type": "",
"timeout": "",
"nbr": "111122221111",
"transfer_time": "",
"name": "莱山2",
"timeout_enable": "0",
"created_at": "2020-03-03 17:42:03",
"record": "close",
"type": "transfer"
}
],
"repeat_timeout": "",
"parent_id": "",
"id": "1",
"repeat_prompts": "",
"deleted_at": "",
"level": "0",
"updated_at": "2020-03-03 15:57:06",
"voice_type": "file",
"call_extn_allowed": "1",
"numbers": "",
"business_type": "",
"timeout": "",
"nbr": "11111",
"transfer_time": "",
"name": "总部",
"timeout_enable": "0",
"created_at": "2020-03-03 15:57:06",
"record": "close",
"type": "transfer"
}
]
删除IVR
请求URL
/api/xcc/ivrs/del
参数
- token:用户Token,放在HTTP请求时的Header上
- id:语音导航ID
例子
curl -XPOST -H "token: db232730-8885-42c9-b60a-25072e8f4957" \
-d '{"id":"1"}' \
-H "Content-Type: application/json" \
localhost:8081/api/xcc/ivrs/del
返回值
{}
修改IVR
请求URL
/api/xcc/ivrs/set
参数
- token: 用户Token,放在HTTP请求时的Header上
- id:语音导航ID
- name:语音导航名,需要保证其唯一性
- nbr:绑定的号码
- type:IVR类型,transfer/next/prev/top,转接电话/下级菜单/返回上级菜单/返回顶级菜单
- voice_type:语音类型,目前仅有file
- media_file: 语音文件或者彩铃文件
- repeat_timeout:重复提示间隔(秒)
- repeat_prompts:重复提示次数
- call_extn_allowed:允许拨打分机
- record:记忆功能,close/miss/all,关闭/呼出未接记录记忆/全部记录记忆
- transfer_time:开始转接时间(秒)
- timeout_enable:启用超时业务
- timeout:超时时间
- business_type:业务类型,order/memory/ringall/queue,顺振、记忆轮循、共振、队列
- numbers:号码列表
- digits:绑定的功能按键
例子
curl -XPOST -H "token: db232730-8885-42c9-b60a-25072e8f4957" \
-H "Content-Type: application/json" \
-d '{"id":1,"name": "山东总部","nbr": "111","type":"transfer","voice_type":"file","call_extn_allowed":0}' \
localhost:8081/api/xcc/ivrs/set
返回值
{}
热线号码接口
处理热线号码增删改查
查询
获取所有热线号码,支持分页,默认200
请求URL
/api/xcc/hotlines/list
参数
- token: 用户Token,放在HTTP请求时的Header上
- nbr:根据号码模糊查询
- page:当前页数
- page_size:每页显示的热线号码数
- sort_field:排序字段,默认按照id排序
- sort_order:排序方式,descend/ascend,默认按照递增顺序排列
例子
curl -XPOST -H "token: db232730-8885-42c9-b60a-25072e8f4957" \
-H "Content-Type: application/json" \
-d '{"page_size":"5", "page":"2"}' \
localhost:8081/api/xcc/hotlines/list
返回值
{
"page_count": 4,
"page": 1,
"row_count": 8,
"data": [
{
"type": "only",
"numbers": "1111,2222,3333,4444",
"updated_at": "2020-02-29 22:19:33",
"id": "1",
"nbr": "12345",
"period_type": "work",
"created_at": "2020-02-29 22:19:33",
"period_enable": "1",
"description": "",
"deleted_at": ""
},
{
"type": "only",
"numbers": "111",
"updated_at": "2020-02-29 22:20:34",
"id": "2",
"nbr": "11111",
"period_type": "work",
"created_at": "2020-02-29 22:20:34",
"period_enable": "0",
"description": "",
"deleted_at": ""
}
]
}
查询某个热线号码
请求URL
/api/xcc/hotlines/get
参数
- token: 用户Token,放在HTTP请求时的Header上
- id:热线号码ID
例子
curl -XPOST -H "token: db232730-8885-42c9-b60a-25072e8f4957" \
-H "Content-Type: application/json" \
-d '{"id":"3"}' \
localhost:8081/api/xcc/hostlines/get
返回值
{
"id": "3",
"numbers": "777",
"created_at": "2020-03-03 21:23:03",
"type": "only",
"updated_at": "2020-03-03 21:23:03",
"deleted_at": "",
"nbr": "1111",
"description": "",
"period_type": "holiday",
"period_enable": "0"
}
新增
请求URL
/api/xcc/hotlines/add
参数
- token: 用户Token,放在HTTP请求时的Header上
- nbr:热线号码
- period_enable:是否启用分时段业务,1/0,启用/不启用
- period_type:分时段业务类型,work/holiday/off,工作时间/节假日/下班时间
- type:业务类型,only/ringall/ivr/queue,一号通/同振/语音导航/队列
- numbers:号码列表,IVR号码,队列号码
- description:备注
例子
curl -XPOST -H "token: db232730-8885-42c9-b60a-25072e8f4957" \
-H "Content-Type: application/json" \
-d '{"nbr":"12345","period_enable":"1","period_type":"work","type":"only","numbers":"1111,2222,3333,4444"}' \
localhost:8081/api/xcc/hostlines/add
返回值
{
"id": "1"
}
修改
请求URL
/api/xcc/hotlines/set
参数
- token: 用户Token,放在HTTP请求时的Header上
- id:热线号码ID
- nbr:热线号码
- period_enable:是否启用分时段业务,1/0,启用/不启用
- period_type:分时段业务类型,work/holiday/off,工作时间/节假日/下班时间
- type:业务类型,only/ringall/ivr/queue,一号通/同振/语音导航/队列
- numbers:号码列表,IVR号码,队列号码
- description:备注
例子
curl -XPOST -H "token: db232730-8885-42c9-b60a-25072e8f4957" \
-H "Content-Type: application/json" \
-d '{"id":"1","nbr":"0000000","period_enable":"true","period_type":"work","type":"only","numbers":"00000"}' \
localhost:8081/api/xcc/hostlines/set
返回值
{}
删除
请求URL
/api/xcc/hotlines/del
参数
- token: 用户Token,放在HTTP请求时的Header上
- id:热线号码ID
例子
curl -XPOST -H "token: db232730-8885-42c9-b60a-25072e8f4957" \
-H "Content-Type: application/json" \
-d '{"id":"2"}' \
localhost:8081/api/xcc/hostlines/del
返回值
{}
获取坐席状态接口
TODO ...