Get Chat
Description
You can get information about a specific chat in your department by providing the chat_id.
HTTP Method - GET
chat_id - A Unique ID provided to each chat.
Pre-requisite
A valid OAuth Token is mandatory.
URL
Copiedhttps://salesiq.zoho.com/api/v1/<screenname>/chats/<chat_id>
Example
Copiedhttps://salesiq.zoho.com/api/v1/zylker/chats/150
Success Response
Copied{
"data": {
"department_id": "4489000000002013",
"chatinitiated_time": "1459171743914",
"attender_name": "Patricia",
"attender_email": "patricia@zylker.com",
"attender_id": "4489000000002001",
"country_code": "US",
"participants": [
"5000000000007"
],
"embed_id": "4489000000002043",
"supervisor":[
"5000000000005"
],
"chat_duration": "120000",
"end_time": "1459171979283",
"chat_id": "282",
"visitor_ip": "192.168.141.236",
"visitor_email": "tom@zylker.com",
"visitor_name": "Tom",
"question": "Running a test chat !",
"department_name": "sales",
"embed_name": "zylker",
"pickup_time": "1459171840646",
"waited_duration": "25000",
"chat_title" : "Zylker"
}
}
Error Codes
1. General Error
Internal server error while retrieving chat info.code : 2020Error Message : "Unable to retrieve Chat info for the given chat_id"
2. Invalid chat_id
This error is sent when the chat_id given is wrong.code : 2021Error Message : "Invalid chat_id"
3. Requested Non-Department Chat Info
This error is sent when the chat corresponding to the given chat_id does not belong to user's department code : 2022Error Message : "This chat belongs to a department you do not belong to"
Error Response - Example
Copied{
"error" :{
"message": "Invalid chat_id",
"code": 2021
}
}