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

Latest commit

 

History

History
80 lines (70 loc) · 3.07 KB

File metadata and controls

80 lines (70 loc) · 3.07 KB

Autocomplete Department

Autocomplete the department name.

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

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

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

Query Parameters

KeyExample ValueDescription
selector*{ "exceptions" : [], "conditions" : {}}Enter the exceptions or the conditions that you want to search for.
onlyMyDepartmentstrueOnly displays the departments that you are assigned to. The value can be boolean true or false.
showArchivedtrueThe result includes archived departments. The value can be boolean true or false.

Example Call

{% code overflow="wrap" %}

curl --location --request GET 'http://localhost:3000/api/v1/livechat/department.autocomplete?selector={} \
--header 'X-Auth-Token: myauth-token' \
--header 'X-User-Id: myuser-name'

{% endcode %}

Example Response

{
    "departments": [
        {
            "_id": "qajzu7WaBRoQBpq6Z",
            "enabled": true,
            "name": "Brazil",
            "description": "",
            "numAgents": 3,
            "showOnRegistration": false,
            "showOnOfflineForm": true,
            "email": "brazil@rocketchat.com",
            "_updatedAt": "2021-06-23T06:02:02.931Z",
            "chatClosingTags": [],
            "maxNumberSimultaneousChat": "",
            "requestTagBeforeClosingChat": false,
            "type": "d",
            "waitingQueueMessage": "",
            "abandonedRoomsCloseCustomMessage": "",
            "departmentsAllowedToForward": "",
            "offlineMessageChannelName": "",
            "visitorInactivityTimeoutInSeconds": "",
            "ancestors": []
        },
        {
            "_id": "NhnC9dBwFonZqSQ5m",
            "enabled": true,
            "name": "CSM and Support",
            "description": "",
            "showOnRegistration": true,
            "showOnOfflineForm": false,
            "requestTagBeforeClosingChat": false,
            "email": "br@rocketchat.com",
            "chatClosingTags": [],
            "offlineMessageChannelName": "",
            "abandonedRoomsCloseCustomMessage": "",
            "waitingQueueMessage": "",
            "departmentsAllowedToForward": [
                "CAJioQNAvLnYWTy8i",
                "Z2KWYBJQFR7AzfmQL"
            ],
            "_updatedAt": "2021-07-12T18:05:53.257Z",
            "numAgents": 4
        }
    ],
    "count": 2,
    "offset": 0,
    "total": 2,
    "success": true
}