Method | Path |
---|---|
GET |
https://agora.olery.com/v3/feedback/analytics |
This endpoint is used to get the analytics data.
Query Parameters
The query parameters can be the following:
Field | Data Types | Description |
---|---|---|
survey_id | String | Survey’s ID |
company_ids | Integer | Companies IDs (can be more than one) |
start_date | Date | Defines the starting interval for the registered responses |
end_date | Date | Defines the ending interval for the registered responses |
finished | Boolean | Filter by finished or unfinished responses |
per | String | Grouping by time period, it can be day , day_of_week , month (default), quarter or year |
trends | Boolean | Denotes if the response will have previous values |
An example of a get request would be: https://agora.olery.com/v3/feedback/responses?company_ids[]=1234567&company_ids[]=9376820&finished=true&start_date=2022-03-20&end_date=2022-09-20&auth_token=XXXXXXXXXXXXXXXX
.
Output Format
The aggregated data is returned as a JSON object in the data
field. It has the following fields:
Field | Data Types | Description |
---|---|---|
responses_count | Integer | Number of responses to the survey for the time period |
answers_count | Integer | Number of answers to questions for the time period |
tes | Hash | It has the key value (Float), which gives us the calculation for the Traveller Experience Score for the time period |
numerical | Hash | Hash with responses_count (Integer), numerical answers_count (Integer) and value (Float) for the time period |
sentiment | Hash | Hash with responses_count (Integer), sentiment answers_count (Integer) and value (Float), positive_opinions (Integer), negative_opinions (Integer) and neutral_opinions (Integer) for the time period |
previous | Hash | It has the same structure of the 5 rows above, but for the previous time period |
per_rating | Hash | It has information for sentiment and numerical ratings, for each topic/rating considered, for the time period |
per_period | Array of Hashes | Each hash has information about responses_count , answers_count and value for determined time periods |
per_period_question | Array of Hashes | Same as above but for each question |
questions | Array of Hashes | Same as above but with more information about the answers |
companies | Array of Hashes | Each hash has information about the company (ID and name), the questions with responses and answers counts and previous information for the time period |
Example Output
{
"data": {
"responses_count": 26,
"answers_count": 42,
"tes": {
"value": 88.00000000000001
},
"numerical": {
"responses_count": 26,
"answers_count": 8,
"value": 88.00000000000001
},
"sentiment": {
"answers_count": 0,
"responses_count": 0,
"value": 50.0,
"positive_opinions": 0,
"negative_opinions": 0,
"neutral_opinions": 0
},
"previous": {
"responses_count": 0,
"answers_count": 0,
"tes": {
"value": null
},
"numerical": {
"responses_count": 0,
"answers_count": 0,
"value": null
},
"sentiment": {
"answers_count": 0,
"responses_count": 0,
"value": 50.0,
"positive_opinions": 0,
"negative_opinions": 0,
"neutral_opinions": 0
}
},
"per_rating": {
"numerical": [
{
"topic": "overall",
"label": "Overall",
"rating": null,
"responses_count": 26,
"answers_count": 8,
"value": 88.00000000000001
}
],
"sentiment": [
{
"topic": "overall",
"label": "Overall",
"rating": null,
"responses_count": 26,
"answers_count": 18,
"value": 50.0,
"positive_opinions": 0,
"negative_opinions": 0,
"neutral_opinions": 0
}
]
},
"per_period": [
{
"date": "2022-03-20",
"responses_count": null,
"answers_count": null,
"value": null
},
{
"date": "2022-04-20",
"responses_count": 6,
"answers_count": 26,
"value": 85.00000000000001
}
],
"per_period_question": [
{
"date": "2022-09-20",
"questions": [
{
"question": {
"id": "1230139fu2bdba958aca16980",
"title": "How would you rate Joe's pub?",
"type": "rating",
"options": [
{
"en": "Default answer",
"default": "Default answer"
}
],
"max_value": 5
},
"responses_count": 18,
"answers_count": null,
"value": null
}
]
}
],
"questions": [
{
"question": {
"id": "1230139fu2bdba958aca16980",
"title": "How would you rate Joe's pub?",
"type": "rating",
"options": [
{
"en": "Default answer",
"default": "Default answer"
}
],
"max_value": 5
},
"responses_count": 18,
"answers_count": 18,
"value": null,
"follow_ups": 1,
"previous": {
"responses_count": null,
"answers_count": 0,
"value": null
},
"answers": [
{
"value": null,
"count": 18,
"follow_ups": 1,
"previous": {
"count": null,
"follow_ups": null
}
}
]
}
],
"companies": [
{
"id": 8347788,
"name": "Olery Testing",
"questions": [
{
"question": {
"id": "1230139fu2bdba958aca16980",
"title": "How would you rate Joe's pub?",
"type": "rating",
"options": [
{
"en": "Default answer",
"default": "Default answer"
}
],
"max_value": 5
},
"responses_count": 18,
"answers_count": 18,
"value": null,
"follow_ups": 1,
"previous": {
"responses_count": null,
"answers_count": 0,
"value": null
},
"answers": [
{
"value": null,
"count": 18,
"follow_ups": 1,
"previous": {
"count": null,
"follow_ups": null
}
}
]
}
]
}
]
}
}