Use this 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 emails will not be sent out.


IMPORTANT: The File Size Limit for API's is 2MB.


Resource Information

Response formatsJSON (default), XML
HTTP MethodPOST
Response familyfile
Header
Authorization: api_key XXXXX


Resource URL

Europe Production Server: 

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


Uploading Files

Files can be uploaded by posting the file itself.

Upload by File Posting

Upload File Data

Post data as if posted by a form.

Upload File Data Example
KeyDataDescription
fileDocuments/file_name.xmlAutomatically provided when POST-ing a file through HTTP protocol.


Upload File Example Request
cURL Examplecurl -F “file=@LOCAL_LOCATION/file_name.xml” “https://api.eu.customergauge.com/v4.1/file/historical.json”


Example Result

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





1




{"Data":{"id":"2"}}




Message reported on failed operation:





1




{"Error":{"Message":"This upload has already been processed","Code":400103}}






Please note the required field order when uploading historical data is:


NetPromoterScore
Comment
SurveyCompletedDate
EmailSentDate
FollowUpRequired


This is also the naming that should be used if you are using XML.