Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Latest commit

 

History

History
73 lines (64 loc) · 2.37 KB

File metadata and controls

73 lines (64 loc) · 2.37 KB

Get Agent Departments

Returns the departments associated with an agent.

HTTP MethodURLRequires Auth
GET/api/v1/livechat/agents/:agentId/departmentsyes

{% hint style="info" %} Permission required: view-l-room {% endhint %}

Path Variables

KeyExample ValueDescription
agentId*XycfA5CetCPuEjqxwThe agent ID.

Example Call

{% code overflow="wrap" %}

curl --location --request GET 'http://localhost:3000/api/v1/livechat/agents/:agentId/departments \
--header 'X-Auth-Token: myauth-token' \
--header 'X-User-Id: myuser-name'

{% endcode %}

Example Response

{
    "departments": [
        {
            "_id": "R34ZLL6wxDuk4S29G",
            "agentId": "XycfA5CetCPuEjqxw",
            "departmentId": "CAJioQNAvLnYWTy8i",
            "_updatedAt": "2021-06-29T16:09:12.897Z",
            "count": 0,
            "departmentEnabled": true,
            "order": 0,
            "username": "kim.baek"
        },
        {
            "_id": "4TnnwbRsBY2upkzjp",
            "agentId": "XycfA5CetCPuEjqxw",
            "departmentId": "GgYvrkAF63aeQmsh4",
            "_updatedAt": "2021-06-29T16:09:12.918Z",
            "count": 0,
            "departmentEnabled": true,
            "order": 0,
            "username": "kim.baek"
        },
        {
            "_id": "wJTwJsAxRcZ8nc9sB",
            "agentId": "XycfA5CetCPuEjqxw",
            "departmentId": "Yi87Ju7eTHiZQ7CJt",
            "_updatedAt": "2021-06-29T16:09:12.937Z",
            "count": 0,
            "departmentEnabled": false,
            "order": 0,
            "username": "kim.baek"
        },
        {
            "_id": "ccjbvLEREZ6vwjBFk",
            "agentId": "XycfA5CetCPuEjqxw",
            "departmentId": "sLYp3ry7CRizaP3rJ",
            "_updatedAt": "2021-06-29T16:09:12.956Z",
            "count": 0,
            "departmentEnabled": false,
            "order": 0,
            "username": "kim.baek"
        }
    ],
    "success": true
}