Method | Path |
---|---|
GET |
https://agora.olery.com/v3/feedback/questions/global |
This endpoint is used to list the questions created inside the customer’s subscription and the global ones. The global questions are available as a source of predefined common questions and cannot be changed. Instead, they should be duplicated.
Output Format
The aggregated data is returned as an array of objects in the data
field. Each object represents a question and has the following fields:
Field | Data Types | Description |
---|---|---|
id | String | Question’s ID |
question | String | Question itself, in the default language |
type | String | Question’s type |
descriptions | Array | Array of hashes with translation for the question’s description field. See Descriptions Fields |
translations | Array | Used to store question’s translations. See Translations Fields |
max | Integer | Denotes the maximum characters allowed for an answer. Used when the question type is an open answer (normal or long) |
min | Integer | Denotes the minimum characters allowed for an answer. Used when the question type is an open answer (normal or long) |
max_value | Integer | Denotes the maximum rating. Used when the question type is a rating |
required | Boolean | Indicates if the question is required |
enabled_followup | Boolean | Indicates if the question has a follow up. Only for rating questions |
links | Array | See Links Fields section |
options | Array | See Options Fields section |
config | Hash | See Config Fields section |
topics | Array | Array of strings where each string represents a rating for the question |
Each question can be one of the following types: date
, drop_down
, enum
, multiple_select
, open_answer
, open_answer_long
, past_date
, rating
or yes_no
.
Descriptions Fields
The descriptions field is a hash where each key is a languages code. Each key has a hash with the following fields:
Field | Data Types | Description |
---|---|---|
_id | String | Language code |
locale | String | Language code |
description | String | Description in that language |
Links Fields
The links field is and array of hashes. Every hash has a language code key and it value is another hash with the following fields:
Field | Data Types | Description |
---|---|---|
title | String | The link’s text to be displayed |
url | String | The link itself |
Translations Field
The translation field is a hash where each key is a languages code. Each key has a hash with the following fields:
Field | Data Types | Description |
---|---|---|
_id | String | Language code |
locale | String | Language code |
translation | String | Question in that language |
Options Fields
The option field inside the question is an array of hashes used to store the option ID and its translations. This field is used when the question has one of the following types: multiple_select
, enum
or drop_down
. Each hash in the array has the following fields:
Field | Data Types | Description |
---|---|---|
id | String | Option’s ID. |
default | String | Option in the default language |
language code |
String | Option in a specific language. There can be multiple fields like this, usually for all the survey’s available languages |
Config Fields
This field is used to configure rating labels for questions of the the rating
. It is a hash with another hash inside with a key named edge_labels
with the following fields:
Field | Data Types | Description |
---|---|---|
best | Hash | It contains bey-value pairs, where the key is a language code and the value is the label in that language |
worst | Hash | It contains bey-value pairs, where the key is a language code and the value is the label in that language |
Each of this fields has also a default key-value pair, which represents the label in the default language. It follows an example for the config field:
"config": {
"edge_labels": {
"best": {
"en": "Best",
"es": "Mejor",
"default": "Best"
},
"worst": {
"en": "Worst",
"es": "Peor",
"default": "Worst"
}
}
}
Example Output
{
"data": [
{
"id": "959d32ab8cbfi4b70bff1324e",
"question": "Example question 1",
"type": "multiple_select",
"descriptions": [
{
"_id": "en",
"locale": "en",
"translation": "Example description 1"
},
{
"_id": "es",
"locale": "es",
"translation": "Ejemplo de descripción 1"
}
],
"translations": [
{
"_id": "en",
"locale": "en",
"translation": "Example question 1"
},
{
"_id": "es",
"locale": "es",
"translation": "Ejemplo de pregunta 1"
},
],
"max": null,
"min": null,
"max_value": null,
"required": true,
"enabled_followup": false,
"links": [],
"options": [
{
"en": "English option 1",
"es": "Opción española 1",
"id": "english option 1",
"default": "English option 1"
},
{
"en": "English option 2",
"es": "Opción española 2",
"id": "english option 2",
"default": "English option 2"
},
],
"config": {},
"topics": ["bar", "sanitary_safety"]
},
{
"id": "1bdd04e829vk96cdd30b681f7",
"question": "How have you experienced the ambiance inside the restaurant?",
"type": "rating",
"descriptions": [
{
"_id": "en",
"locale": "en",
"translation": "Example description 2"
},
{
"_id": "es",
"locale": "es",
"translation": "Ejemplo de descripción 2"
}
],
"translations": [
{
"_id": "en",
"locale": "en",
"translation": "How have you experienced the ambiance inside the restaurant?"
},
{
"_id": "es",
"locale": "es",
"translation": "¿Qué le pareció el ambiente dentro del restaurante #location#?"
},
],
"max": null,
"min": null,
"max_value": 5,
"required": false,
"enabled_followup": false,
"links": [],
"options": [],
"config": {},
"topics": ["atmosphere"]
}
]
}