查询队列坐席状态
查询指定队列中坐席成员的状态。
请求 URL
GET {base_url}/{api_path}/queue/agent_status?access_token={access_token}
请求参数
| 参数 | 是否必填 | 类型 | 说明 |
|---|---|---|---|
| id | 是 | Integer | 队列的唯一 ID。 注: 可使用 搜索特定队列 接口查询队列的
ID。
|
响应参数
| 参数 | 类型 | 说明 |
|---|---|---|
| errcode | Integer | 返回错误码。
注: 更多错误码和错误信息说明,请参见 错误码 & 错误信息。
|
| errmsg | String | 返回信息。
|
| total_number | Integer | 坐席成员总数。 |
| data | Array<Agent_List> | 每个坐席成员的信息。 |
- Agent_List
-
参数 类型 说明 name String 坐席成员的姓名。 number String 坐席成员的分机号码。 is_login Integer 坐席成员是否已签入队列。 0:未签入。1:已签入。
is_pause Integer 坐席成员是否已暂停服务 (暂停接收队列来电)。 0:未暂停。1:已暂停。
call_status Integer 坐席成员的通话状态。 0:未知。1:空闲。2:通话中。3:响铃中。4:在通话中接收到新来电。5:被保持通话中。注: 当呼叫者执行保持通话时,坐席通话状态返回5(被保持通话中)。若是坐席主动执行保持通话,则坐席通话状态返回2(通话中)。
pause_reason String 坐席成员的暂停原因。 agent_type String 坐席成员的类型。 dynamic:动态坐席。static:静态坐席。
max_threshold_for_pause_time Integer 动态坐席暂停服务的时长 (单位:秒)。 0:保持暂停状态直到有新的请求使坐席恢复服务。10或更大值:指定暂停的时长。超时后,坐席自动恢复服务。
max_threshold_for_logout_time Integer 动态坐席签出队列的时长 (单位:秒)。 0:保持签出状态直到有新的请求使坐席签入队列。10或更大值:指定签出时长。超时后,自动将坐席签入队列。
示例
请求示例
查询 ID 为 3 的队列的坐席成员状态。
GET /openapi/v1.0/queue/agent_status?access_token=9G4E5fCWO5lgx14m0NNwS91VvACHUNmU&id=3 HTTP/1.1
Host: yeastardocs.example.yeastarcloud.com响应示例HTTP/1.1 200 OK { "errcode": 0, "errmsg": "SUCCESS", "total_number": 5, "data": [ { "name": "Leo Ball", "number": "1000", "is_login": 1, "is_pause": 0, "call_status": 1, "pause_reason": "", "agent_type": "dynamic", "max_threshold_for_pause_time": 30, "max_threshold_for_logout_time": 0 }, { "name": "Phillip Huff", "number": "1001", "is_login": 1, "is_pause": 1, "call_status": 1, "pause_reason": "Break", "agent_type": "dynamic", "max_threshold_for_pause_time": 0, "max_threshold_for_logout_time": 60 }, { "name": "Madison Cooper", "number": "1004", "is_login": 1, "is_pause": 0, "call_status": 2, "pause_reason": "", "agent_type": "static", "max_threshold_for_pause_time": 20, "max_threshold_for_logout_time": 0 }, { "name": "Kevin Connor", "number": "1005", "is_login": 1, "is_pause": 0, "call_status": 1, "pause_reason": "", "agent_type": "static", "max_threshold_for_pause_time": 0, "max_threshold_for_logout_time": 0 }, { "name": "Kristin Hale", "number": "1006", "is_login": 1, "is_pause": 0, "call_status": 2, "pause_reason": "", "agent_type": "static", "max_threshold_for_pause_time": 0, "max_threshold_for_logout_time": 0 } ] }