Get Visitor Details

Description

You can use this API to get the visitors and their details for the given ViewID.

What is a ViewID?

In the Visitor History tab of SalesIQ, you can create a view to filter the type of visitors based on the set criterion(s). The ID given to each view is known as ViewID (which you can avail by clicking on the 'More options' icon right beside the view's name and by choosing the Edit list option. You can find the ViewID right beside the label that says Edit view).

Default Views and their viewIDs

  • *All visitors -> -1
  • *Returning visitors -> -2

HTTP Method - GET

Query Parameters

startkey : The maximum number of visitors that can be present in a response JSON is 100. When the given view contains more visitors in the database, the response will contain a key named "startkey". This startkey should be given as a param in the next request, in order to get the list of the next 100 visitors.

Pre-requisite

A valid OAuth Token is mandatory.

Click to view the list of Sample Response Params

URL


				https://salesiq.zoho.com/api/v1/<screenname>/visitorsview/<viewid>/visitors			

Example


				https://salesiq.zoho.com/api/v1/zylker/visitorsview/51841000001757005/visitors?startkey=3598-101			

Success Response


				{
	"data": {
		"startkey": "3649-101",
		"visitorlist": [
			{
				"lastvisit_source": "Direct",
				"user_uniqueid": "d5fad88e-6b6c-43fd-bb88-3b0dd0eac868",
				"name": "John",
				"lastcontacted_mode": "Email",
				"id": "1310",
				"email": "John@zylker.com",
				"total_timespent": "1271421723",
				"lastvisit_time": "1487091571723",
				"customer_info": {
					"band": "premium",
					"plan": "enterprise"
				},
				"leadscore": "19056"
			},
			{
				"country": "United Kingdom",
				"lastvisit_source": "Referrals",
				"user_uniqueid": "85a809b2-1ad7-4f69-8b2b-989f8d80a5e0",
				"lastcontacted_mode": "Email",
				"name": "Patricia",
				"id": "1761",
				"lastvisit_time": "1474478082951",
				"total_timespent": "467714508",
				"email": "Patricia@zylker.com"
			}
		]
	}
}			

Error Codes

1. General Error

Internal server error while fetching visitors list.code : 2210Error Message : "Unable to fetch Visitors List"

2. No Visitor Error

This error occur when the given viewid has no visitor.code : 2211Error Message : "No Visitor Found"

3. Invalid ViewID error

This error occur when the ViewID is invalid. code : 2212Error Message : "Invalid Viewid"

Error Response - Example


				{
	"error": {
		"message": " Invalid Viewid",
		"code": 2212
	}
}