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 775
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NEW] Docs to Rest livechat inquiries endpoints (#1335)
* Docs to Rest livechat inquiries endpoints * Fix inquiries docs * Update inquiries docs * Remove extra blank line
- Loading branch information
1 parent
6d2e883
commit 6fff83a
Showing
6 changed files
with
131 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
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
56 changes: 56 additions & 0 deletions
56
developer-guides/rest-api/livechat/inquiries-list/README.md
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,56 @@ | ||
# Inquiries List | ||
|
||
Lists all of the open livechat inquiries. It supports the [Offset, Count, and Sort Query Parameters](../../offset-and-count-and-sort-info/). | ||
|
||
| URL | Requires Auth | HTTP Method | | ||
| :--- | :--- | :--- | | ||
| `/api/v1/livechat/inquiries.list` | `yes` | `GET` | | ||
|
||
## Query Parameters | ||
|
||
| Argument | Example | Required | Description | | ||
| :--- | :--- | :--- | :--- | | ||
| `department` | `ByehQjC44FwMeiLbX` | Optional | The department's id or name | | ||
|
||
## Example Call | ||
|
||
```bash | ||
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \ | ||
-H "X-User-Id: aobEdbYhXfu5hkeqG" \ | ||
http://localhost:3000/api/v1/livechat/inquiries.list | ||
``` | ||
|
||
## Example Result | ||
|
||
```json | ||
{ | ||
"inquiries": [ | ||
{ | ||
"_id": "GpxfRo8TaPHfsnnC5", | ||
"rid": "EbQjtCosHJWLQmQYT", | ||
"name": "Marcos Defendi", | ||
"ts": "2019-06-11T19:01:57.424Z", | ||
"department": "jHFgdJyJWstB9M2ik", | ||
"status": "open" | ||
}, | ||
{ | ||
"_id": "9dCi64GkwWE389xCm", | ||
"rid": "ZpjCcbRwPPdnhKWW5", | ||
"name": "Marcos Defendi", | ||
"ts": "2019-06-11T19:00:43.124Z", | ||
"department": "gDDAjeJb7BhHzzEQ8", | ||
"status": "open" | ||
} | ||
], | ||
"offset": 0, | ||
"count": 1, | ||
"total": 1, | ||
"success": true | ||
} | ||
``` | ||
|
||
## Change Log | ||
|
||
| Version | Description | | ||
| :--- | :--- | | ||
| 1.2.0 | Added | |
62 changes: 62 additions & 0 deletions
62
developer-guides/rest-api/livechat/inquiries-take/README.md
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,62 @@ | ||
# Livechat take inquiry | ||
|
||
Takes an open inquiry. | ||
|
||
| URL | Requires Auth | HTTP Method | | ||
| :--- | :--- | :--- | | ||
| `/api/v1/livechat/inquiries.take` | `yes` | `POST` | | ||
|
||
## Payload | ||
|
||
| Argument | Example | Required | Description | | ||
| :--- | :--- | :--- | :--- | | ||
| `inquiryId` | `ByehQjC44FwMeiLbX` | Required | The inquiry's id | | ||
| `userId` | `ByehQjCfsd876sfd` | Optional | The user's (agent) id to take the inquiry. | | ||
|
||
<br> | ||
|
||
**Note: if the user id is provided, the user must have the `view-l-room` permission.** | ||
|
||
## Example Call | ||
|
||
```bash | ||
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \ | ||
-H "X-User-Id: aobEdbYhXfu5hkeqG" \ | ||
-H "Content-type: application/json" \ | ||
http://localhost:3000/api/v1/livechat/inquiries.take \ | ||
-d '{ "inquiryId": "ByehQjC44FwMeiLbX" }' | ||
``` | ||
|
||
## Example Result | ||
|
||
```json | ||
{ | ||
"inquiry": { | ||
"_id": "wbKmn6pAZ8jyJuANG", | ||
"rid": "S4wwL9WNY98uoHgJg", | ||
"message": "test", | ||
"name": "teste", | ||
"ts": "2019-06-10T23:09:06.482Z", | ||
"agents": [ | ||
"hjwGZafNqExtFNmN7", | ||
"26KdXgrQXhddy2MfQ" | ||
], | ||
"status": "open", | ||
"v": { | ||
"_id": "2iZSexGXjW7EJnRwM", | ||
"username": "guest-3", | ||
"token": "RtQzkfQYKG4WpNMEW", | ||
"status": "online" | ||
}, | ||
"t": "l", | ||
"_updatedAt": "2019-06-10T23:09:07.480Z" | ||
}, | ||
"success": true | ||
} | ||
``` | ||
|
||
## Change Log | ||
|
||
| Version | Description | | ||
| :--- | :--- | | ||
| 1.2.0 | Added | |