Fetch NPS data through NotifyVisitors API

NPS RESPONSES

NotifyVisitors API endpoints enable you to fetch NPS data of the users who are coming to your site and filling up NPS surveys. NotifyVisitors tracks the data as soon as the users fill up the NPS and enable you to fetch data from our server to your server.

NotifyVisitors provides the following API endpoint :

GET RESPONSES

  • This endpoint enables you to fetch users’ responses on NPS surveys running on your site. You can call the following API :
    https://www.notifyvisitors.com/api/v1/getUserResponses

  • You are required to pass out the following attributes to fetch the responses :

    a. userID (mandatory)
    b. npsID (mandatory)
    c. tokens (optional)
    d. Start date of the survey (optional)
    e. End date of survey (optional)

API RATE LIMIT

The API rate limit is the number of times the API can be requested per minute.

  • You can make up to 500 API requests per minute on an API.
  • If the limit exceeds, the app will throw an error in Response. All API requests are
    subject to rate limits.

SEND API REQUEST TO FETCH USERS' DATA :

Example Request

curl --request GET \
--url  https://www.notifyvisitors.com/api/v1/getUserResponses\
--header 'accept: application/json' \
--header 'content-type: application/json'\
--header 'x-api-key: YOUR_API_KEY' \
--header 'x-brand-id: YOUR_BRAND_ID' \ 
--data   {
    “npsID” : “123456”,
   “userID” : “675897”
}

Example Response

{ 
	"Data": {
		"npsID": "xxx",
		"UserID": "xxx",
    "count": 1,
		"response" : {[
						"email": "[email protected]",
      			"name": "Respondent name",
						"created_at" : '20-06-2020',
						"nps": "5",
      			"answers": [],
		     		]},
    "lastScore" : "5",
		"npsLink" : "link"
	}, 
   	"ResponseMessage": "Request processed successfully.", 
    "StatusCode": 200,
    "Status": "Success"
}

PARAMETERS

PARAMETERSTYPEDESCRIPTION
npsIDstringUnique identity of NPS
userIDstringUnique identity of the user
email idstringemail id of the respondent
created _atstringdate on which respondent filled the NPS
npsintegerAverage score of all the NPS surveys
lastScoreintegerLast score of the NPS the respondent filled.
npsLinkstringLink of the NPS for which you want to fetch the response
answersstringreviews and feedbacks given by the respondents along with the nps score.

RETURNS

When you call the NV API to fetch users’ responses on NPS surveys, You can receive responses, i.e. status of the request as a success, queued, or error.

CODEDESCRIPTION
200Indicates that the request was successful.
201Indicates that the request was successful and a new resource was created.
202Indicates that the request was accepted but has not been completely processed yet.
401Indicates the API key was invalid.
403Indicates the API feature is not available on your current plan.
406Indicates that the format of the request was not correct. Endpoints only support JSON. You can either pass the Accept: application/JSON header or suffix the request URL with .json.
422Indicates the request was invalid. This usually means some of the required parameters were missing. Information about the specific errors will be returned in the response.
429Indicates the request was rate limited. You may need to reduce the frequency of your requests. The Retry-After response header contains the number of seconds you should wait before retrying. See the “Rate Limits” section below for more details.
500Indicates that we are having trouble on our end.
503Indicates that we are currently down for maintenance.

Below is an example 202 response. This illustrates how errors are provided for specific attributes of the resource (in this case, a Person):

"ResponseMessage": "Request processed successfully.", 
    "StatusCode": 200,
    "Status": "Success"