Get
/api/v1/livechat/inquiries.list
Lists all open inquiries. An incoming chat that has not yet been taken by the agent is called an inquiry. After it's been taken by the agent it is referred to as room.
Permission required: view-livechat-manager
Changelog
| Version | Description |
|---|---|
| 1.2.0 | Added |
Header parameters
X-Auth-Token
stringRequired
The authToken of the authenticated user.
ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired
The userId of the authenticated user.
ExamplerbAXPnMktTFbNpwtJ
Query parameters
department
string
The department ID or name.
offset
integer
Number of items to "skip" in the query, i.e. requests return count items, skipping the first offset items. Refer to the official documentation to learn more.
Example50
Example25
sort
Sort the inquiries in ascending (1) or descending (-1) order. The available options are:
ts: Sort by timestamp.sort={"ts": 1}orsort={"ts": -1}(newest first, default)name: Sort by inquiry name.sort={"name": 1}orsort={"name": -1}priorityWeight: Sort by priority of the inquiry.sort={"priorityWeight": 1}orsort={"priorityWeight": -1}estimatedWaitingTimeQueue: Sort by the estimated waiting time in the queue.sort={"estimatedWaitingTimeQueue": 1}orsort={"estimatedWaitingTimeQueue": -1}status: Sort by inquiry status.sort={"status": 1}orsort={"status": 1}- You can also use multiple options for the sort query. For example,
sort={"estimatedWaitingTimeQueue": 1, "priorityWeight": -1}.
Responses
200
OK
Success Example
{
"inquiries": [
{
"_id": "GpxfRo8TaPHfsnnC5",
"rid": "EbQjtCosHJWLQmQYT",
"name": "Marcos Defendi",
"ts": "2019-06-11T19:01:57.424Z",
"status": "queued"
}
],
"offset": 0,
"count": 1,
"total": 1,
"success": true
}object
inquiries
Array of object
object
_id
string
rid
string
name
string
ts
string
status
string
offset
integer
count
integer
total
integer
success
boolean
401
Unauthorized
Authorization Error
{
"status": "error",
"message": "You must be logged in to do this."
}object
status
string
message
string
403
Forbidden
Permission Error
{
"success": false,
"error": "User does not have the permissions required for this action [error-unauthorized]"
}Unauthorized
{
"success": false,
"error": "unauthorized"
}object
success
boolean
error
string