呼叫API

为坐席分配外显号码和动态号码组

基本信息

Path: /unified-api/call/openapi/ent/v1/agent/outnumber_group

Method: POST

接口描述:AssignNumbersAndGroupsToAgents 为多个坐席分配外显号码和动态号码组

请求参数

Headers

参数名称参数值是否必须示例备注
Content-Typeapplication/json

Body

名称类型是否必须默认值备注其他信息
agent_idsinteger []必须坐席IDitem 类型: integer
├─非必须
group_idsinteger []必须号码组IDitem 类型: integer
├─非必须
numbersstring []必须号码item 类型: string
├─非必须

返回数据

名称类型是否必须默认值备注其他信息

通话记录列表

基本信息

Path: /unified-api/call/openapi/ent/v1/records

Method: POST

接口描述:通话列表

请求参数

Headers

参数名称参数值是否必须示例备注
Content-Typeapplication/json

Body

名称类型是否必须默认值备注其他信息
agent_idinteger非必须客服IDformat: int64
agent_idsinteger []非必须客服ID数组item 类型: integer
├─非必须
call_typesstring []非必须通话类型:外呼|来电item 类型: string
├─非必须
call_uuidstring非必须通话uuid
customer_phonestring非必须顾客号码
end_timestring非必须通话发起时间筛选format: date-time
page_indexinteger非必须当前页format: int64
page_sizeinteger非必须分页大小format: int64
start_timestring非必须通话发起时间筛选format: date-time
statesstring []非必须通话状态,接通,挂断等item 类型: string
├─非必须
trunk_numberstring非必须中继号码

返回数据

名称类型是否必须默认值备注其他信息
dataobject []非必须通话记录item 类型: object
├─ agent_evaluatedinteger非必须客服被评价的分数format: int64
├─ agent_idinteger非必须客服IDformat: int64
├─ agent_phonestring非必须客服呼叫坐席账号
├─ answer_waystring非必须接听方式
├─ call_typestring非必须通话类型:外呼|来电
├─ call_uuidstring非必须通话唯一标识ID
├─ customer_attributionstring非必须顾客归属地
├─ customer_durationinteger非必须通话时长format: int64
├─ customer_phonestring非必须顾客号码
├─ durationinteger非必须总时长(秒)format: int64
├─ end_timestring非必须通话结束时间format: date-time
├─ hangup_dispositionstring非必须挂机方
├─ queue_wait_timeinteger非必须队列等待时长format: int64
├─ record_pathstring非必须录音文件(请本地保存)
├─ start_timestring非必须开始呼叫时间format: date-time
├─ statesstring非必须通话状态:外呼状态:主叫未接|被叫未接|接听;来电状态:ivr|队列放弃|振铃未接|接听
├─ trunk_numberstring非必须中继号码
├─ trunk_number_namestring非必须中继号码别名
├─ wait_timeinteger非必须等待时长format: int64
├─ user_datastring非必须用户自定义数据
totalinteger非必须通话记录数量format: int64

外显号码和动态号码组列表

基本信息

Path: /unified-api/call/openapi/ent/v1/rule_outnumber_group

Method: GET

接口描述:RuleNumbersAndGroups 所有的外显号码和动态号码组

请求参数

Headers

参数名称参数值是否必须示例备注
Content-Typeapplication/json

返回数据

名称类型是否必须默认值备注其他信息
groupsobject []非必须号码组item 类型: object
├─ idinteger非必须号码组IDformat: int64
├─ namestring非必须号码组名称
├─ numbersstring []必须号码item 类型: string
├─非必须
├─ rule_typeinteger必须号码组规则,1归属地优先,2随机分配format: int64
numbersobject []非必须号码item 类型: object
├─ namestring非必须号码别名
├─ numberstring非必须号码

客服与坐席绑定

基本信息

Path: /unified-api/call/openapi/ent/v1/sip_bind_agent

Method: POST

接口描述:SipBindAgent sip绑定坐席

请求参数

Headers

参数名称参数值是否必须示例备注
Content-Typeapplication/json

Body

名称类型是否必须默认值备注其他信息
agent_idinteger必须坐席IDformat: int64
sipstring必须sip号

返回数据

名称类型是否必须默认值备注其他信息

坐席列表

基本信息

Path: /unified-api/call/openapi/ent/v1/sips

Method: GET

接口描述:Sips 企业所有的sip号

请求参数

Headers

参数名称参数值是否必须示例备注
Content-Typeapplication/json

Qurey

参数名称参数值是否必须示例备注
agent_idinteger坐席 id
occupiedstring占用情况
y:已占用
n:未占用

返回数据

名称类型是否必须默认值备注其他信息
object []非必须item 类型: object
├─ agent_idinteger非必须坐席IDformat: int64
├─ agent_namestring非必须坐席名称
├─ expiration_atstring非必须过期时间format: date-time
├─ occupiedstring非必须是否被占用y:已占用
n:未占用
├─ passwordstring非必须sip密码
├─ sipstring非必须sip号

外呼

基本信息

Path:{{host}}/unified-api/call/openapi/ent/v1/callout

Method: POST

接口描述:通过 http 形式外呼

请求参数

Headers

参数名称参数值是否必须备注
Content-Typeapplication/json 
AuthorizationBearer access_tokenAccess Token 需要在美洽公众台【设置 / 开发者 / APIs】中获取,并设置为启用。目前 Token 的有效期是永久,重复获取将导致上次获取的 Token 失效。

Body

名称类型是否必须备注
agent_idInt64必须客服ID
calleestring必须顾客号码
trunk_numberstring非必须外显号码
user_datastring非必须自定义数据(如BusinessID、UUID之类的,最长100字符)

返回数据

以HTTP CODE判断请求是否成功

成功示例:HTTP CODE为200

名称类型是否必须备注
uuidstring必须话单uuid
{ "uuid": "2bbf137f-7707-4789-9f71-64cdfa5ddb22"}

失败示例:HTTP CODE不等于200,如40X,50X

BODY示例如下,提示error中的message即可

{    "error": {
        "code": "Unauthenticated",
        "message": "坐席未注册"    
              }
}
Updated on 2023年9月7日

本文是否有帮助?

您可能想了解