Agents

List all agents data

/api/agents/

curl -i https://api.revechat.com/api/agents/ -u john@example.com:123456
curl -i https://api.revechat.com/api/agents?page_no=2 -u john@example.com:123456

Parameter

Success 200

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: application/json
Transfer-Encoding: chunked
Date: Tue, 02 Jun 2015 07:41:54 GMT
[
{
"agent_id": 463,
"first_name": "John",
"last_name": "Oliver",
"email": "john@example.com",
"phone_no": "-",
"role": "Super Admin",
"status": "Offline",
"last_login_time": 1458635771085,
"concurrent_chat_limit": 1,
"create_time": 2015,
"designation": "-",
"additional_info": "-",
"enabled": 1
},
{
"agent_id": 516,
"first_name": "pappu-admin",
"last_name": "123456",
"email": "pappu-admin@revechat.com",
"phone_no": "12312312",
"role": "Admin",
"status": "Offline",
"last_login_time": 1439717812324,
"concurrent_chat_limit": 1,
"create_time": 2015,
"designation": "admin",
"additional_info": "admin",
"enabled": 1
},
{
"agent_id": 465,
"first_name": "nurnabi",
"last_name": "Siddiquee",
"email": "nurnabi-admin@revechat.com",
"phone_no": "013235566",
"role": "Admin",
"status": "Offline",
"last_login_time": 1443586115181,
"concurrent_chat_limit": 1,
"create_time": 2015,
"designation": "1223",
"additional_info": "12312",
"enabled": 1
},
{
"agent_id": 464,
"first_name": "Arafat",
"last_name": "Mahmud",
"email": "arafat-agent@revechat.com",
"phone_no": "012333333",
"role": "Agent",
"status": "Offline",
"last_login_time": 1436423804033,
"concurrent_chat_limit": 1,
"create_time": 2015,
"designation": "",
"additional_info": "",
"enabled": 1
},
{
"agent_id": 466,
"first_name": "Subrata",
"last_name": "Pappu",
"email": "pappu-agent@revechat.com",
"phone_no": "018333106042",
"role": "Agent",
"status": "Offline",
"last_login_time": 1444631497126,
"concurrent_chat_limit": 1,
"create_time": 2015,
"designation": "",
"additional_info": "test",
"enabled": 1
}
]

Error 4xx

HTTP/1.1 401 Unauthorized
Server: Apache-Coyote/1.1
WWW-Authenticate: Basic realm="revechat"
Content-Type: application/json
Content-Length: 15
Date: Tue, 02 Jun 2015 07:47:13 GMT
Bad credentials

HTTP/1.1 403 Forbidden
Server: Apache-Coyote/1.1
WWW-Authenticate: Basic realm="revechat"
Content-Type: application/json
Content-Length: 73
Date: Tue, 02 Jun 2015 07:50:31 GMT
Access is denied! Only user with Super Admin role can access the REST API

HTTP/1.1 400 Bad Request
Server: Apache-Coyote/1.1
WWW-Authenticate: Basic realm="revechat"
Content-Type: application/json
Content-Length: 98
Date: Tue, 02 Jun 2015 07:50:31 GMT
{
    "error":
    [
{
"code":400,
"message": "Invalid Page Number: -2. Please enter a valid Page Number."
}
    ]
}
Get a single agent details
/api/agents/{id}
curl -i https://api.revechat.com/api/agents/463 -u john@example.com:123456
Parameter

Success 200

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: application/json
Transfer-Encoding: chunked
Date: Tue, 02 Jun 2015 04:12:57 GMT
{
"agent_id": 463,
"first_name": "John",
"last_name": "Oliver",
"email": "john@example.com",
"phone_no": "-",
"role": "Super Admin",
"status": "Offline",
"last_login_time": 1458635771085,
"concurrent_chat_limit": 1,
"create_time": 2015,
"designation": "-",
"additional_info": "-",
"enabled": 1
}

Error 4xx

HTTP/1.1 400 Bad Request
Server: Apache-Coyote/1.1
WWW-Authenticate: Basic realm="revechat"
Content-Type: application/json
Transfer-Encoding: chunked
Date: Tue, 02 Jun 2015 05:28:57 GMT
{
    "error":
    [
{
"code":400,
"message": "Invalid Agent Id: -14. Please enter a Valid Agent Id."
}
    ]
}
Any questions? Please email us at support@revechat.com

 

Any questions? Please email us at support@revechat.com

knowledge-page-arrow-left

Previous

User Profile