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. Start date of the survey (optional)
    d. 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

PARAMETERS

TYPE

DESCRIPTION

npsID

string

Unique identity of NPS

userID

string

Unique identity of the user

email id

string

email id of the respondent

created _at

string

date on which respondent filled the NPS

nps

integer

Average score of all the NPS surveys

lastScore

integer

Last score of the NPS the respondent filled.

npsLink

string

Link of the NPS for which you want to fetch the response

answers

string

reviews 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.

CODE

DESCRIPTION

200

Indicates that the request was successful.

201

Indicates that the request was successful and a new resource was created.

202

Indicates that the request was accepted but has not been completely processed yet.

401

Indicates the API key was invalid.

403

Indicates the API feature is not available on your current plan.

406

Indicates 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.

422

Indicates 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.

429

Indicates 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.

500

Indicates that we are having trouble on our end.

503

Indicates 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"