Olery Developer Portal logo Olery Developer Portal

Method Path
GET https://agora.olery.com/v3/feedback/responses

This endpoint is used to list the responses to a survey through some query parameters as filters.

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
limit Integer Defines the maximum number of responses send in the HTTP response body
page Integer Indicates the page number
finished Boolean Filter by finished or unfinished responses
any_rating_below Number Missing

An example of a get request would be: https://agora.olery.com/v3/feedback/responses?company_ids[]=1234567&company_ids[]=9376820&finished=true&page=1&start_date=2022-03-20&end_date=2022-09-20&limit=20&auth_token=XXXXXXXXXXXXXXXX.

Output Format

The response is a hash with the following fields:

Field Data Types Description
count Integer Number of responses
next_url String URL for the next page
previous_url String URL for the previous page
data Array of hashes Each hash is a response. See this section

Response

Each response has the following fields:

Field Data Types Description
answers Array The answers for the survey. Each element has the same fields listed here
company Hash Company linked to the distribution, it has id (Integer) and name (String) fields
completed Boolean Indicates if the response has been finished or not
created_at Date Response’s creation date
duration Integer How much time (in seconds) the user took to answer the survey
finished_at Date When the user submitted the response
id String Response’s ID
language Hash Language used to answer the survey, it has code (String) and name (String) fields
overall_rating Float Average rating
published Boolean Denotes if the response is published or not
survey_id String Survey’s ID

Answer Fields

Each answer has the following fields:

Field Data Types Description
id Integer Answer’s ID
question_id String Question’s ID
answer String The registered answer will be in this field if the questions is a enum, open_answer, or open_answer_long
follow_up String Used for questions of the rating type
type String Denotes the question type
rating Integer The registered answer will be in this field if the questions is a rating
yes_no Boolean The registered answer will be in this field if the questions is a yes_no. It will be true if the answer represents a yes
date Date The registered answer will be in this field if the questions is a date or past_date
selection Array The registered answer will be in this field if the questions is a drop_down or multiple_select
question Hash The question corresponding to the answer. See this page to see the structure in the input format section

Example Output

{
  "count": 1,
  "data": [
    {
      "answers": [
        {
          "id": 4535452,
          "type": "multiple_select",
          "answer": null,
          "rating": null,
          "yes_no": null,
          "selection": ["translated answer 2"],
          "follow_up": null,
          "question": {...},
        }
      ],
      "company": { "id": 1234567, "name": "Hotel Company" },
      "completed": true,
      "created_at": "2022-09-20T20:03:29.679Z",
      "duration": 30,
      "finished_at": "2022-09-20T20:03:59.562Z",
      "id": "123960",
      "language": { "code": "en", "name": "English" },
      "overall_rating": null,
      "published": true,
      "survey_id": "e008jvi2900f759cafd4ab5271"
    }
  ],
  "next_url": null,
  "previous_url": null
}