This repository has been archived by the owner on Mar 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 763
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docs for livechat queue endpoint (#1476)
* Docs for livechat queue endpoint * Update livechat queue endpoint docs * Fix version
- Loading branch information
1 parent
13b8a7c
commit 06cfc4f
Showing
2 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Livechat Queue | ||
|
||
## List queued chats | ||
|
||
Get the queued chats. It supports the [Offset, Count, and Sort Query Parameters](../../offset-and-count-and-sort-info/). | ||
|
||
| URL | Requires Auth | HTTP Method | | ||
| :--- | :--- | :--- | | ||
| `/api/v1/livechat/queue` | `yes` | `GET` | | ||
|
||
## Query params | ||
|
||
| Argument | Example | Required | Description | | ||
| :--- | :--- | :--- | :--- | | ||
| `includeOfflineAgents` | `true` | Optional | Whether include offline agents or not. | | ||
| `agentId` | `aobEdbYhXfu5dsd9` | Optional | The agent's id. | | ||
| `departmentId` | `3n2kj3n2j3fu5hkeqG` | Optional | The department's id. | | ||
|
||
## Example Call | ||
|
||
```bash | ||
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \ | ||
-H "X-User-Id: aobEdbYhXfu5hkeqG" \ | ||
http://localhost:3000/api/v1/livechat/queue?includeOfflineAgents=true | ||
``` | ||
|
||
## Example Result | ||
|
||
```json | ||
{ | ||
"queue": [ | ||
{ | ||
"chats": 1, | ||
"user": { | ||
"_id": "CaevAPDbXN252kyXa", | ||
"username": "marcos.defendi", | ||
"status": "online" | ||
}, | ||
"department": { | ||
"_id": "457diLwcQMmdpaTjo", | ||
"name": "Department 1" | ||
} | ||
}, | ||
{ | ||
"chats": 2, | ||
"user": { | ||
"_id": "CaevAPDbXN252kyXa", | ||
"username": "marcos.defendi", | ||
"status": "online" | ||
}, | ||
"department": { | ||
"_id": "5mt9oEtQxuMMH23Co", | ||
"name": "Department 2" | ||
} | ||
} | ||
], | ||
"count": 2, | ||
"offset": 0, | ||
"total": 2, | ||
"success": true | ||
} | ||
``` | ||
|
||
## Change Log | ||
|
||
| Version | Description | | ||
| :--- | :--- | | ||
| 2.4.0 | Added | |