为坐席分配外显号码和动态号码组
基本信息
Path: /unified-api/call/openapi/ent/v1/agent/outnumber_group
Method: POST
接口描述:AssignNumbersAndGroupsToAgents 为多个坐席分配外显号码和动态号码组
请求参数
Headers
| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 |
|---|---|---|---|---|
| Content-Type | application/json | 是 |
Body
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
|---|---|---|---|---|---|
| agent_ids | integer [] | 必须 | 坐席ID | item 类型: integer | |
| ├─ | 非必须 | ||||
| group_ids | integer [] | 必须 | 号码组ID | item 类型: integer | |
| ├─ | 非必须 | ||||
| numbers | string [] | 必须 | 号码 | item 类型: string | |
| ├─ | 非必须 |
返回数据
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
|---|
通话记录列表
基本信息
Path: /unified-api/call/openapi/ent/v1/records
Method: POST
接口描述:通话列表
请求参数
Headers
| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 |
|---|---|---|---|---|
| Content-Type | application/json | 是 |
Body
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
|---|---|---|---|---|---|
| agent_id | integer | 非必须 | 客服ID | format: int64 | |
| agent_ids | integer [] | 非必须 | 客服ID数组 | item 类型: integer | |
| ├─ | 非必须 | ||||
| call_types | string [] | 非必须 | 通话类型:外呼|来电 | item 类型: string | |
| ├─ | 非必须 | ||||
| call_uuid | string | 非必须 | 通话id | ||
| customer_phone | string | 非必须 | 顾客号码 | ||
| end_time | string | 非必须 | 通话结束时间筛选 | format: date-time | |
| page_index | integer | 非必须 | 当前页 | format: int64 | |
| page_size | integer | 非必须 | 分页大小 | format: int64 | |
| start_time | string | 非必须 | 通话发起时间筛选 | format: date-time | |
| states | string [] | 非必须 | 通话状态,接通,挂断等 | item 类型: string | |
| ├─ | 非必须 | ||||
| trunk_number | string | 非必须 | 中继号码 |
返回数据
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
|---|---|---|---|---|---|
| data | object [] | 非必须 | 通话记录 | item 类型: object | |
| ├─ agent_evaluated | integer | 非必须 | 客服被评价的分数 | format: int64 | |
| ├─ agent_id | integer | 非必须 | 客服ID | format: int64 | |
| ├─ agent_phone | string | 非必须 | 客服呼叫坐席账号 | ||
| ├─ answer_way | string | 非必须 | 接听方式 | ||
| ├─ call_type | string | 非必须 | 通话类型:外呼|来电 | ||
| ├─ call_uuid | string | 非必须 | 通话ID | ||
| ├─ customer_attribution | string | 非必须 | 顾客归属地 | ||
| ├─ customer_duration | integer | 非必须 | 通话时长 | format: int64 | |
| ├─ customer_phone | string | 非必须 | 顾客号码 | ||
| ├─ duration | integer | 非必须 | 总时长(秒) | format: int64 | |
| ├─ end_time | string | 非必须 | 通话结束时间 | format: date-time | |
| ├─ hangup_disposition | string | 非必须 | 挂机方 | ||
| ├─ queue_wait_time | integer | 非必须 | 队列等待时长 | format: int64 | |
| ├─ record_path | string | 非必须 | 录音文件(请本地保存) | ||
| ├─ start_time | string | 非必须 | 开始呼叫时间 | format: date-time | |
| ├─ states | string | 非必须 | 通话状态:外呼状态:主叫未接|被叫未接|接听;来电状态:ivr|队列放弃|振铃未接|接听 | ||
| ├─ trunk_number | string | 非必须 | 中继号码 | ||
| ├─ trunk_number_name | string | 非必须 | 中继号码别名 | ||
| ├─ wait_time | integer | 非必须 | 等待时长 | format: int64 | |
| ├─ user_data | string | 非必须 | 用户自定义数据 | ||
| total | integer | 非必须 | 通话记录数量 | format: int64 |
外显号码和动态号码组列表
基本信息
Path: /unified-api/call/openapi/ent/v1/rule_outnumber_group
Method: GET
接口描述:RuleNumbersAndGroups 所有的外显号码和动态号码组
请求参数
Headers
| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 |
|---|---|---|---|---|
| Content-Type | application/json | 是 |
返回数据
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
|---|---|---|---|---|---|
| groups | object [] | 非必须 | 号码组 | item 类型: object | |
| ├─ id | integer | 非必须 | 号码组ID | format: int64 | |
| ├─ name | string | 非必须 | 号码组名称 | ||
| ├─ numbers | string [] | 必须 | 号码 | item 类型: string | |
| ├─ | 非必须 | ||||
| ├─ rule_type | integer | 必须 | 号码组规则,1归属地优先,2随机分配 | format: int64 | |
| numbers | object [] | 非必须 | 号码 | item 类型: object | |
| ├─ name | string | 非必须 | 号码别名 | ||
| ├─ number | string | 非必须 | 号码 |
客服与坐席绑定
基本信息
Path: /unified-api/call/openapi/ent/v1/sip_bind_agent
Method: POST
接口描述:SipBindAgent sip绑定坐席
请求参数
Headers
| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 |
|---|---|---|---|---|
| Content-Type | application/json | 是 |
Body
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
|---|---|---|---|---|---|
| agent_id | integer | 必须 | 坐席ID | format: int64 | |
| sip | string | 必须 | sip号 |
返回数据
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
|---|
坐席列表
基本信息
Path: /unified-api/call/openapi/ent/v1/sips
Method: GET
接口描述:Sips 企业所有的sip号
请求参数
Headers
| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 |
|---|---|---|---|---|
| Content-Type | application/json | 是 |
Qurey
| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 |
|---|---|---|---|---|
| agent_id | integer | 否 | | 坐席 id |
| occupied | string | 否 | 占用情况 y:已占用 n:未占用 |
返回数据
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
|---|---|---|---|---|---|
| object [] | 非必须 | item 类型: object | |||
| ├─ agent_id | integer | 非必须 | 坐席ID | format: int64 | |
| ├─ agent_name | string | 非必须 | 坐席名称 | ||
| ├─ expiration_at | string | 非必须 | 过期时间 | format: date-time | |
| ├─ occupied | string | 非必须 | 是否被占用 | y:已占用 n:未占用 | |
| ├─ password | string | 非必须 | sip密码 | ||
| ├─ sip | string | 非必须 | sip号 |
外呼
基本信息
Path:{{host}}/unified-api/call/openapi/ent/v1/callout
Method: POST
接口描述:通过 http 形式外呼
请求参数
Headers
| 参数名称 | 参数值 | 是否必须 | 备注 |
|---|---|---|---|
| Content-Type | application/json | 是 | |
| Authorization | Bearer access_token | 是 | Access Token 需要在美洽公众台【设置 / 开发者 / APIs】中获取,并设置为启用。目前 Token 的有效期是永久,重复获取将导致上次获取的 Token 失效。 |
Body
| 名称 | 类型 | 是否必须 | 备注 |
|---|---|---|---|
| agent_id | Int64 | 必须 | 客服ID |
| callee | string | 必须 | 顾客号码 |
| trunk_number | string | 非必须 | 外显号码 |
| user_data | string | 非必须 | 自定义数据(如BusinessID、UUID之类的,最长100字符) |
返回数据
以HTTP CODE判断请求是否成功
成功示例:HTTP CODE为200
| 名称 | 类型 | 是否必须 | 备注 |
|---|---|---|---|
| uuid | string | 必须 | 话单uuid |
{ "uuid": "2bbf137f-7707-4789-9f71-64cdfa5ddb22"}失败示例:HTTP CODE不等于200,如40X,50X
BODY示例如下,提示error中的message即可
{ "error": {
"code": "Unauthenticated",
"message": "坐席未注册"
}
}