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

Latest commit

 

History

History
102 lines (92 loc) · 3.65 KB

File metadata and controls

102 lines (92 loc) · 3.65 KB

Get Departments by ID

Get a list of departments by department IDs.

HTTP MethodURLRequires Auth
GET/api/v1/livechat/department.listByIdsyes

{% hint style="info" %} Permissions required:

  • view-livechat-departments
  • view-l-room {% endhint %}

Query Parameters

KeyExample ValueDescription
ids*4LCeYmCHHnQ3EDBgfThe department ID.
ids*CAJioQNAvLnYWTy8iThe department ID.
idsmHcx4rbi7htAmCCR5The department ID.

Example Call

{% code overflow="wrap" %}

curl --location --request GET 'http://localhost:3000/api/v1/livechat/department.listByIds?
    ids=4LCeYmCHHnQ3EDBgf
    &ids=CAJioQNAvLnYWTy8i
    &ids=mHcx4rbi7htAmCCR5\
--header 'X-Auth-Token: myauth-token' \
--header 'X-User-Id: myuser-name'

{% endcode %}

Example Response

{
    "departments": [
        {
            "_id": "4LCeYmCHHnQ3EDBgf",
            "enabled": true,
            "name": "Chatbot Sales",
            "description": "",
            "showOnRegistration": false,
            "showOnOfflineForm": false,
            "requestTagBeforeClosingChat": false,
            "email": "chatbotSales@g.c",
            "chatClosingTags": [],
            "offlineMessageChannelName": "",
            "abandonedRoomsCloseCustomMessage": "",
            "waitingQueueMessage": "",
            "departmentsAllowedToForward": "",
            "_updatedAt": "2021-07-15T15:11:16.856Z",
            "numAgents": 4,
            "ancestors": []
        },
        {
            "_id": "CAJioQNAvLnYWTy8i",
            "enabled": true,
            "name": "Support",
            "description": "",
            "showOnRegistration": true,
            "showOnOfflineForm": true,
            "requestTagBeforeClosingChat": false,
            "email": "mary@rocket.chat",
            "maxNumberSimultaneousChat": "",
            "waitingQueueMessage": "",
            "type": "d",
            "numAgents": 28,
            "_updatedAt": "2021-07-21T23:54:35.574Z",
            "ancestors": [
                "sriw2wmP2Zz2pPrre"
            ],
            "chatClosingTags": [],
            "abandonedRoomsCloseCustomMessage": "",
            "departmentsAllowedToForward": "",
            "offlineMessageChannelName": "",
            "visitorInactivityTimeoutInSeconds": "10",
            "parentId": "sriw2wmP2Zz2pPrre"
        },
        {
            "_id": "mHcx4rbi7htAmCCR5",
            "enabled": true,
            "name": "Chatbot Support",
            "description": "",
            "showOnRegistration": false,
            "showOnOfflineForm": false,
            "requestTagBeforeClosingChat": false,
            "email": "chatbotSupport@g.c",
            "chatClosingTags": [],
            "offlineMessageChannelName": "",
            "abandonedRoomsCloseCustomMessage": "",
            "waitingQueueMessage": "",
            "departmentsAllowedToForward": "",
            "_updatedAt": "2021-06-28T22:10:01.371Z",
            "numAgents": 3,
            "ancestors": [
                "sriw2wmP2Zz2pPrre"
            ],
            "parentId": "sriw2wmP2Zz2pPrre"
        }
    ],
    "success": true
}