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 ...