Here's an example of the basic workflow of exporting data from the REST API.
You can use for example Postman to test requests to the API.
1. Create a survey and launch it on a touchpoint
2. Collect some responses with the survey
3. Create an API token to authenticate calls with REST
4. Fire a GET call to the /responses endpoint
On a successful call you will receive a JSON object containing the following fields:
data: An array containing 0-100 response objects
paging: An object containing next and previous -fields to navigate between your queries. Any query parameters passed in the url will be also present in the next-field.
You can also query responses individually with the /responses/:id endpoint if you know the id of the response or by full response chains if you need to know all the responses to questions a person responded to in a survey. However, we recommend using the /responses endpoint for the least amount of nested properties and arrays.
You can query the responses with a number of query parameters. Arrays are denoted in the query parameters with a "" after the parameter name like so:
Note on the preferredLanguage parameter
In cases where a survey has multiple languages, the preferredLanguage parameter determines the language you want the question titles and response choices to be printed with. If the specified translation is not found in the survey, it will first fall back to English and if not found, then fall back on the first available language.
Note on question types and their data
There are 7 question types currently in Feedbackly. The responses are mapped to a multi-purpose "answer"-field and type-safe valueNum/Array/String field depending on the type. The responses are mapped as follows:
||Smileys / Satisfaction
The values are in the scale of 0-1.
5 buttons: 0, 0.25, 0.5,0.75,1
4 buttons: 0, 0.33, 0.66, 1
||Category / Selection / Multiselect
Answer will either be a string value if the question is single select or an array of strings if the question is a multi-select.
valueArray will contain the unique id's of the choice(s) selected while answer contains the string representations of the choice in the language chosen.
answer: string | string
valueArray: ["sdnsdn2", "assfiw1"]
answer: ["Apples", "Oranges"]
||Category / Selection by image
Same as above
|Same as above
||Same as above, outputs Image labels
||Open text field
|valueString: "Thanks for the service"
answer: "Thanks for the service"
||Slider question. These questions contain multiple responses depending on the field responded to. In order to connect these answers together, you look at the responseChainId and the questionId
Each field contains a fieldId and a fieldName to distinguish the responses apart.
||Contact form question. Like Slider question, this question might have multiple responses per question.