Use this API to upload a historical data file (data from a previous Net Promoter Score® campaign conducted outside of CustomerGauge) to the system.

This file can contain both respondents’ and non respondents’ information.

You can post information like score, comment, survey completed date, and more, along with your customer data.

Your data will not be processed and survey invitations will not be sent out.

Good to know

Maximum size:

Please do not upload data larger than 2MB.

Maximum number of records:

Please do not upload more than 2,000 records.

Call interval / frequency:

Multiple upload calls made in quick succession will get queued, and periodically retried, but to obtain optimum performance we recommend allowing the previous upload to finish before attempting the next one. (Uploads can take anywhere between a few seconds and several minutes depending on the size and complexity of data.)

API response format:

Our APIs return data in either JSON or XML format (depending on request by .json or .xml).

Data format:

Our Stream API accepts XML data only.

Response or Non-response:

If you upload a 'survey completed date' the record will be saved as a survey response. If you do not upload a 'survey completed date' the record will be saved as a non-response.

Comment Translation and Text Analytics is not applied:

We do not automatically translate the provided comment, and do not run Text Analytics on Historical Data imports (including APIs).

About this API

Resource Information

Response formats
JSON (default), XML
HTTP Method
Response family
Authorization: api_key XXXXX

Resource URL

Europe Production Server:

US Production Server:

Australia Production Server:

How to call

You can call the Stream API by passing your XML data through an HTTP POST request.

POST Data Example Values

Please follow this structure to generate your XML data:

<?xml version='1.0' encoding='UTF-8'?>
    <LastName>Di Marco</LastName>
    <OrderDate>2017-02-01 21:00:00</OrderDate>
    <Comment>Hello, world!</Comment>
    <SurveyCompletedDate>2017-02-02 16:19:49</SurveyCompletedDate>
    <EmailSentDate>2017-02-02 16:19:49</EmailSentDate>

Sample File

As many clients have different data fields, you can pick up a sample copy from your system, containing all possible fields.

1. Go to Data → Imports and click the link to go the legacy import screen.

2. Click on "Upload File"

3. Click on "Download Data Structure", followed by Historical Data (XML).

4. Use the same structure as this sample file when calling our POST Stream/Historical API.

Example Request

curl -H "Authorization: api_key XXXXX" -X POST "" -d "<?xml version='1.0' encoding='UTF-8'?><records><record><CustomerNumber>6444</CustomerNumber><Email></Email><SMS_Telephone>6072846202</SMS_Telephone><FirstName>Elwin</FirstName><LastName>Di Marco</LastName><Country>U.S.</Country><OrderDate>2017-02-01 21:00:00</OrderDate><NetPromoterScore>10</NetPromoterScore><Comment>Hello, world!</Comment><SurveyCompletedDate>2017-02-02 16:19:49</SurveyCompletedDate><EmailSentDate>2017-02-02 16:19:49</EmailSentDate><FollowUpRequired>Y</FollowUpRequired></record></records>"

Example Result

Data states if successful or not. Message reported on successful operation:

  "Data": true

Message reported on failed operation:

  "Error": {
    "Message": "No data provided",
    "Code": 400700

Not the API you're looking for?

APIs of the same family:

Similar API families:

Or view: