Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

Commit

Permalink
Docs for livechat queue endpoint (#1476)
Browse files Browse the repository at this point in the history
* Docs for livechat queue endpoint

* Update livechat queue endpoint docs

* Fix version
  • Loading branch information
MarcosSpessatto authored and MartinSchoeler committed Dec 23, 2019
1 parent 13b8a7c commit 06cfc4f
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
1 change: 1 addition & 0 deletions developer-guides/rest-api/livechat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Manage Livechat related data:
| `/api/v1/livechat/messages.history/:rid` | `GET` | Load Livechat messages history. | [info](message/index.html#load-livechat-messages-history) |
| `/api/v1/livechat/offline.message` | `POST` | Send a new Livechat offline message. | [info](message/index.html#send-a-new-livechat-offline-message) |
| `/api/v1/livechat/rooms` | `GET` | Retrieves a list of livechat rooms. | [info](rooms/) |
| `/api/v1/livechat/queue` | `GET` | Retrieves a list of queued chats. | [info](queue) |
| `/api/v1/livechat/room` | `GET` | Get the Livechat room data or open a new room. | [info](room/index.html) |
| `/api/v1/livechat/room.close` | `POST` | Close a Livechat room. | [info](room/index.html#close-livechat-room) |
| `/api/v1/livechat/room.transfer` | `POST` | Transfer a Livechat room to another agent or department. | [info](room/index.html#transfer-livechat-room) |
Expand Down
68 changes: 68 additions & 0 deletions developer-guides/rest-api/livechat/queue/README.md
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 |

0 comments on commit 06cfc4f

Please sign in to comment.