Chat Server
Chat Server
- Chat Server Manage
GET livechat/agents
GET livechat/agents/{id}
PUT livechat/agents/{id}
GET livechat/visitors
GET livechat/visitors/{id}
PUT livechat/visitors/{id}
Endpoint
Get the list of agents' status
GET livechat/agents
Parameters:
No Parameters
Response:
An array of agents' staus
Name | Type | Description |
---|---|---|
ongoingChats |
int | The ongoing chats number of the agent. |
status |
string | Name of the status. |
id |
guid | Id of the agent. |
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/agents \
-X
'GET'
\
-H
'Authorization: Bearer {access_token}'
\
Response:
HTTP/1.1 200 OK
Get an agent's status
GET livechat/agents/{id}
Parameters:
No Parameters
Response:
Name | Type | Description |
---|---|---|
id |
guid | Id of the agent. |
status |
string | Name of the status. |
ongoingChats |
int | The ongoing chats number of the agent. |
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/agents/c97a2afe-a38f-46f8-a55b-8ac9f873cd09 \
-X
'GET'
\
-H
'Authorization: Bearer {access_token}'
\
Response:
HTTP/1.1 200 OK
Update an agent's status
PUT livechat/agents/{id}
Parameters:
Name | Type | In | Required | Description |
---|---|---|---|---|
status |
string | body | yes | Allowed values are "online","away" and other custom away status if enabled. |
Response:
Name | Type | Description |
---|---|---|
id |
guid | Id of the agent. |
status |
string | Name of the status. |
ongoingChats |
int | The ongoing chats number of the agent. |
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/agents/c97a2afe-a38f-46f8-a55b-8ac9f873cd09 \
-X
'PUT'
\
-H
'Authorization: Bearer {access_token}'
\
-H
'Content-Type: application/json'
\
-D
'{
"id": "c97a2afe-a38f-46f8-a55b-8ac9f873cd09",
"status": "Meeting"
}'
Response:
HTTP/1.1 200 OK
Get the list of visitors'info
GET livechat/visitors
Parameters:
No Parameters
Response:
An array of visitors' info
Name | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
language |
string | Language of the visitor used. | ||||||||
phone |
string | Phone of the visitor. | ||||||||
name |
string | Name of the visitor. | ||||||||
pageViews |
int | Page view count of the visitor. | ||||||||
flashVersion |
string | Flash version of the visitor used. | ||||||||
company |
string | Company of the visitor. | ||||||||
timeZone |
string | Timezone of the visitor. | ||||||||
browser |
string | Browser of the visitor used. | ||||||||
customFields |
FieldAndValue[] | Field and value array.
|
||||||||
referrerUrl |
string | Referrer Url of the visitor. | ||||||||
email |
string | Email of the visitor. | ||||||||
visits |
int | Visit count of the visitor. | ||||||||
landingPage |
string | Landing page of the visit. | ||||||||
operatingSystem |
string | Operating system of the visitor used. | ||||||||
screenResolution |
string | Screen resolution of the visitor used. | ||||||||
searchEngine |
string | Search engine of the visit. | ||||||||
visitTime |
datetime | Visit time of the visitor. | ||||||||
id |
guid | Id of the visitor. | ||||||||
firstVisitTime |
datetime | First visit time of the visitor. | ||||||||
city |
string | City of the visitor. | ||||||||
currentBrowsing |
string | Current browsing of the visitor. | ||||||||
departmentId |
guid | Department id of the visit. | ||||||||
searchKeywords |
string | Search keywords of the visit. | ||||||||
ip |
string | IP of the visitor. | ||||||||
chats |
int | Chat count of the visitor. | ||||||||
status |
string | Allowed values are "waitingForChat", "voiceChatting","chatting","preChat","manuallyInvited","autoInvited","offlineMessage","refusedByOperator","refusedByVisitor","chatEnded","inSite","outOfSite","transferring","manuallyInvitedByWindow","systemProcessing". | ||||||||
customVariableResults |
FieldAndValue[] | Field and value array.
|
||||||||
productService |
string | Product service of the visitor. | ||||||||
country |
string | Country of the visitor. | ||||||||
state |
string | State of the visitor. |
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/visitors \
-X
'GET'
\
-H
'Authorization: Bearer {access_token}'
\
Response:
HTTP/1.1 200 OK
Get a visitor's info
GET livechat/visitors/{id}
Parameters:
No Parameters
Response:
Name | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
browser |
string | Browser of the visitor used. | ||||||||
chats |
int | Chat count of the visitor. | ||||||||
landingPage |
string | Landing page of the visit. | ||||||||
screenResolution |
string | Screen resolution of the visitor used. | ||||||||
searchEngine |
string | Search engine of the visit. | ||||||||
status |
string | Allowed values are "waitingForChat", "voiceChatting","chatting","preChat","manuallyInvited","autoInvited","offlineMessage","refusedByOperator","refusedByVisitor","chatEnded","inSite","outOfSite","transferring","manuallyInvitedByWindow","systemProcessing". | ||||||||
visitTime |
datetime | Visit time of the visitor. | ||||||||
language |
string | Language of the visitor used. | ||||||||
phone |
string | Phone of the visitor. | ||||||||
name |
string | Name of the visitor. | ||||||||
searchKeywords |
string | Search keywords of the visit. | ||||||||
visits |
int | Visit count of the visitor. | ||||||||
referrerUrl |
string | Referrer Url of the visitor. | ||||||||
pageViews |
int | Page view count of the visitor. | ||||||||
flashVersion |
string | Flash version of the visitor used. | ||||||||
departmentId |
guid | Department id of the visit. | ||||||||
customFields |
FieldAndValue[] | Field and value array.
|
||||||||
ip |
string | IP of the visitor. | ||||||||
operatingSystem |
string | Operating system of the visitor used. | ||||||||
city |
string | City of the visitor. | ||||||||
state |
string | State of the visitor. | ||||||||
email |
string | Email of the visitor. | ||||||||
id |
guid | Id of the visitor. | ||||||||
country |
string | Country of the visitor. | ||||||||
productService |
string | Product service of the visitor. | ||||||||
firstVisitTime |
datetime | First visit time of the visitor. | ||||||||
timeZone |
string | Timezone of the visitor. | ||||||||
currentBrowsing |
string | Current browsing of the visitor. | ||||||||
customVariableResults |
FieldAndValue[] | Field and value array.
|
||||||||
company |
string | Company of the visitor. |
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/visitors/3d59f909-24cd-43bc-89cb-00a320617c0a \
-X
'GET'
\
-H
'Authorization: Bearer {access_token}'
\
Response:
HTTP/1.1 200 OK
Put a visitor's info
PUT livechat/visitors/{id}
Parameters:
Name | Type | In | Required | Description |
---|---|---|---|---|
name |
string | body | yes | Name of the custom variable. |
value |
string | body | no | Value of the custom variable. |
url |
string | body | no | URL of the custom variable. |
Response:
Name | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
visits |
int | Visit count of the visitor. | ||||||||
departmentId |
guid | Department id of the visit. | ||||||||
productService |
string | Product service of the visitor. | ||||||||
pageViews |
int | Page view count of the visitor. | ||||||||
company |
string | Company of the visitor. | ||||||||
customFields |
FieldAndValue[] | Field and value array.
|
||||||||
firstVisitTime |
datetime | First visit time of the visitor. | ||||||||
email |
string | Email of the visitor. | ||||||||
state |
string | State of the visitor. | ||||||||
id |
guid | Id of the visitor. | ||||||||
operatingSystem |
string | Operating system of the visitor used. | ||||||||
visitTime |
datetime | Visit time of the visitor. | ||||||||
landingPage |
string | Landing page of the visit. | ||||||||
customVariableResults |
FieldAndValue[] | Field and value array.
|
||||||||
name |
string | Name of the visitor. | ||||||||
city |
string | City of the visitor. | ||||||||
flashVersion |
string | Flash version of the visitor used. | ||||||||
currentBrowsing |
string | Current browsing of the visitor. | ||||||||
timeZone |
string | Timezone of the visitor. | ||||||||
searchKeywords |
string | Search keywords of the visit. | ||||||||
phone |
string | Phone of the visitor. | ||||||||
searchEngine |
string | Search engine of the visit. | ||||||||
chats |
int | Chat count of the visitor. | ||||||||
browser |
string | Browser of the visitor used. | ||||||||
language |
string | Language of the visitor used. | ||||||||
referrerUrl |
string | Referrer Url of the visitor. | ||||||||
ip |
string | IP of the visitor. | ||||||||
country |
string | Country of the visitor. | ||||||||
screenResolution |
string | Screen resolution of the visitor used. | ||||||||
status |
string | Allowed values are "waitingForChat", "voiceChatting","chatting","preChat","manuallyInvited","autoInvited","offlineMessage","refusedByOperator","refusedByVisitor","chatEnded","inSite","outOfSite","transferring","manuallyInvitedByWindow","systemProcessing". |
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/visitors/3d59f909-24cd-43bc-89cb-00a320617c0a \
-X
'PUT'
\
-H
'Authorization: Bearer {access_token}'
\
-H
'Content-Type: application/json'
\
-D
'[
{
"name": "visitor",
"value": "Leo",
"url": ""
},
{
"name": "company",
"value": "Comm100",
"url": ""
}
]
'
Response:
HTTP/1.1 200 OK