Visitor

Visitors
- Visitors Manage
GET global/visitors
GET global/visitors/{id}
POST global/visitors
Model
Visitor JSON Format

Visitor is represented as simple flat JSON objects with the following keys:

Name Type Description
id guid Id of the visitor.
name string Name of the visitor.
email string Email of the visitor.
numberOfVisits integer Total number of web pages the visitor has viewed on your website.
numberOfChats integer Total number chats visitor has initiated on your website to date.
Endpoint
Get the list of Visitors

GET global/visitors

Parameters:
No Parameters
Response:

An array of   Visitor

Example

Sample Request:

curl https://api15.comm100.io/v4/global/visitors \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \

Response:

 HTTP/1.1 200 OK

{"visitors":[{"id":"342fa346-9c32-481f-941a-15cedd21429d","name":"Vincent","email":"Vincent@gmail.com","numberOfVisits":2,"numberOfChats":1}],"nextPage":null,"previousPage":null,"total":1}
Get a single Visitor

GET global/visitors/{id}

Parameters:
No Parameters
Response:
Example

Sample Request:

curl https://api15.comm100.io/v4/global/visitors/342fa346-9c32-481f-941a-15cedd21429d \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \

Response:

 HTTP/1.1 200 OK

{"id":"342fa346-9c32-481f-941a-15cedd21429d","name":"Vincent","email":"Vincent@gmail.com","numberOfVisits":2,"numberOfChats":1}
Create a new Visitor

POST global/visitors

Parameters:
Name Type In Required Description
name string body no Name of the visitor.
email string body no Email of the visitor.
numberOfVisits integer body no Total number of web pages the visitor has viewed on your website.
numberOfChats integer body no Total number chats visitor has initiated on your website to date.
Response:
Example

Sample Request:

curl https://api15.comm100.io/v4/global/visitors \
-X 'POST' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"name":"Vincent","email":"Vincent@gmail.com","numberOfVisits":2,"numberOfChats":1}'

Response:

 HTTP/1.1 201 Created

{"id":"342fa346-9c32-481f-941a-15cedd21429d","name":"Vincent","email":"Vincent@gmail.com","numberOfVisits":2,"numberOfChats":1}