Use this to upload a historical data (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.


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


You can post information like score, comment, survey completed date and more along with your customer data. Your data will not be processed and emails will not be sent out.


Resource Information

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


Resource URL

Europe Production Server: 

https://api.eu.customergauge.com/v4.1/stream/historical.json


POST Data


Post XML data based on upload mapping.


POST Data Example Values


<?xml version="1.0" encoding="UTF-8"?>
<records>
<record>
<CustomerNumber>6444</CustomerNumber>
<Email>elwin_dimarco@directness.net</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>
<record>




Example Request


cURL Example
curl -X POST “https://api.eu.customergauge.com/v4.1/stream/historical.json?” -d “<?xml version="1.0" encoding="UTF-8"?><records><record><CustomerNumber>6444</CustomerNumber><Email>elwin_dimarco@directness.net</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><record>”



Example Result

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




1




{"Data":true}




Message reported on failed operation:




1




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