Etsi
Voice of the Customer

Answers

The API returns all answers of the survey in JSON format, as specified by unique survey id.

In order to use the API you must have the valid environment-specific username and password. Before any API requests, you need to obtain an API KEY. You will get a valid API KEY by using the VoC authentication API (Please, read how to use API instructions).

The API KEY must be sent in the request authorization header element. If the API KEY value is valid then API request will be successful (http status code 200), otherwise it will fail (http status code 401). All API requests must be made over HTTPS.

API endpoints

  • https://voc.bisnode.com/api/responses/prod/v2 - production environment
  • https://voc.bisnode.com/api/responses/test/v2 - test environment

API request header

Parameter Description  
Authorization x-api-key {APIKEY} M

API request parameters

Parameter Description  
surveyId The unique id of the survey M
startDate Answers from date (max 7 days) M
endDate Answers until date  
details Show additionals (answerValues)  

GET https://voc.bisnode.com/api/responses/test/v2/survey/{surveyId}/answers?startDate={startDate}&endDate={endDate}&details={details}

API response

Element Description
surveyId The survey unique id. Example: 1324. Type: long
surveyName Name of the survey. Example: "Fall campaign 2017". Type: string
answers All answers under the survey. Type: array
answerGroupID The answer group unique id. Example: 123456879. Type: long
responses Type: array
questionId The question unique id. Example: 987654321. Type: long
answerId The answer unique id. Example: 123456789. Type: long
answerDate When the answer is given. Example: 2017-12-03T00:00:00.00Z. Type: date time
answer The answer of the question. Example: "10". Type: string
freeTextAnswer The text answer of the question. Example: "Great!". Type: string
userId Unique id. Example: 123456. Type: long
responder The responder of the answer. Example: "+358". Type: string
answerValues All additionals as specified by answerGroupId. Type: array
answerGroupID This id connects to the answer group unique id. Example: 987654321. Type: long
values All values as under the answerGroupId. Type: array
userId Unique id. Example: 123456. Type: long
description Description of the value e.g. agent or organization. Example: "Agent". Type: string
value Value. Example: "Matti Meikäläinen". Type: string
timestamp When answer value is created. Example: 2017-12-03T00:00:00.00Z. Type: date time

API request and response example

curl -X GET "https://voc.bisnode.com/api/responses/test/v2/survey/3974/answers?startDate=2019-09-09&endDate=2019-09-12&details=true" -H "Authorization: x-api-key ABCDEFG1234567890"

Successful API request returns results in JSON format.

{
  "surveyId":3974,
  "surveyName":"VoC SMS Survey Demo",
  "answers":[
    {
      "answerGroupId":3559834502,
      "responses":[
        {
          "questionId":11445,
          "answerId":3559834502,
          "answerDate":"2019-09-10T09:18:46.794Z",
          "answer":"9",
          "userId":xxxx,
          "responder":"xxxx"
        }]
    }],
  "answerValues":[
    {
      "answerGroupId":3559834502,
      "values":[
        {
          "userId":xxxx,
          "description":"Country",
          "value":"Sweden",
          "timestamp":"2019-09-10T09:18:46.794Z"
        }]
    }]
}