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

Latest commit

 

History

History
64 lines (50 loc) · 2.27 KB

File metadata and controls

64 lines (50 loc) · 2.27 KB

Get Department Information

Get information about a specific department using the department ID.

HTTP MethodURLRequires Auth
GET/api/v1/livechat/department/:_idyes

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

Path Variables

KeyExample ValueDescription
_id*SQafHvoFPuB57NmBDThe department _id.

Query Parameters

KeyExample ValueDescription
includeAgentstrueIf agents should be included in the result. This parameter is optional. By default, the value is true and the list of agents is returned.

{% hint style="info" %} The agents field will only be returned if the user has the view-livechat-departments permission. {% endhint %}

Example Call

curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
     -H "X-User-Id: aobEdbYhXfu5hkeqG" \
     http://localhost:3000/api/v1/livechat/department/iTfLCX3qqwKgf5uqg

Example Response

{
  "department": {
    "_id": "iTfLCX3qqwKgf5uqg",
    "enabled": false,
    "name": "new from api",
    "description": null,
    "numAgents": 1,
    "showOnRegistration": true,
    "_updatedAt": "2016-12-13T17:22:19.109Z"
  },
  "agents": [
    {
      "_id": "DDjZbhTF74n3NBuWK",
      "agentId": "SQafHvoFPuB57NmBD",
      "departmentId": "iTfLCX3qqwKgf5uqg",
      "username": "john.doe",
      "count": 0,
      "order": 0,
      "_updatedAt": "2016-12-13T17:22:19.169Z"
    }
  ],
  "success": true
}

Change Log

Version Description
2.2.0 Added includeAgents query parameter
0.42.0 Added