Olery Developer Portal logo Olery Developer Portal

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

This endpoint is used to create a response.

Input Parameters

The request’s body can have the following fields:

Field Required Data Types Description
key true String Survey’s key
info false Hash Client additional info
client_identifier true String Client identifier Token
language false Hash Language used to answer the survey, it has code (String) and name

Info Field

The info field is a hash where each key is a info about the client:

Field Data Types Description
name String Client name
email String Client email
language String Language used by the client

Output Format

The aggregated data is returned as an Array of JSON objects in the data field. It has the following fields:

Field Data Types Description
company Hash Company linked to the distribution, it has id (Integer) and name (String) fields
completed Boolean Denotes if the response is completed
created_at Date Date of creation of the response
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
published Boolean Denotes if the response is published or not
survey Hash Object containing all survey data

Example Input

{
  "key": "40pRs9"
}

Example Output

{
  "data": {
    "id": "489548",
    "company": { "id": 1234567, "name": "Hotel Company" },
    "language": null,
    "completed": false,
    "published": false,
    "created_at": "2022-08-21T14:26:07.487Z",
    "finished_at": null,
    "duration": null,
    "survey": {
      "id": "acca563caf73763bc9a018fc9",
      "name": "Demo Survey",
      "title": "Give us feedback",
      "published": true,
      "instructions": null,
      "languages": ["en", "es"],
      "default_locale": "en",
      "translations": {
        "en": {
          "title": "Give us feedbacks",
          "thankyou": "Thank you for giving us your opinion!",
          "instructions": "We are very interested to hear what you think. We would appreciate if you could spare a few moments to complete this survey."
        },
        "es": {
          "title": "Danos su opinión",
          "thankyou": "¡Gracias por darnos tu opinión!",
          "instructions": "Estamos muy interesados ​​en escuchar lo que piensas. Le agradeceríamos que nos dedicara unos minutos a completar esta encuesta."
        }
      },
      "redirect_message": "Thank you for answering the survey. You will be redirected to a Google Form.",
      "redirect_url": "https://docs.google.com/forms",
      "questions": [
        {
          "id": "959d32ab8cbfi4b70bff1324e",
          "question": "Example question",
          "type": "multiple_select",
          "descriptions": [
            {
              "_id": "en",
              "locale": "en",
              "translation": "Example description"
            },
            {
              "_id": "es",
              "locale": "es",
              "translation": "Ejemplo de descripción"
            }
          ],
          "translations": [
            {
              "_id": "en",
              "locale": "en",
              "translation": "Example question"
            },
            {
              "_id": "es",
              "locale": "es",
              "translation": "Ejemplo de pregunta"
            }
          ],
          "max": null,
          "min": null,
          "max_value": null,
          "required": true,
          "enabled_followup": false,
          "links": [
            {
              "en": {
                "url": "https://example.com/terms",
                "title": "Terms and Conditions"
              }
            }
          ],
          "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"]
        }
      ],
      "settings": null,
      "conditions": [
        {
          "level": "question",
          "source": {
            "id": "959d32ab8cbfi4b70bffjdnbv7",
            "type": "contains",
            "value": "certain value",
            "action": "show"
          },
          "target": {
            "id": "493nmv7lb8cbfi4b70bff1324e"
          },
          "published": true
        }
      ],
      "company_ids": ["8347788"],
      "items": [
        {
          "type": "question",
          "object": {
            "id": "959d32ab8cbfi4b70bff1324e",
            "question": "Example question",
            "type": "multiple_select",
            "descriptions": [
              {
                "_id": "en",
                "locale": "en",
                "translation": "Example description"
              },
              {
                "_id": "es",
                "locale": "es",
                "translation": "Ejemplo de descripción"
              }
            ],
            "translations": [
              {
                "_id": "en",
                "locale": "en",
                "translation": "Example question"
              },
              {
                "_id": "es",
                "locale": "es",
                "translation": "Ejemplo de pregunta"
              }
            ],
            "max": null,
            "min": null,
            "max_value": null,
            "required": true,
            "enabled_followup": false,
            "links": [
              {
                "en": {
                  "url": "https://example.com/terms",
                  "title": "Terms and Conditions"
                }
              }
            ],
            "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"]
          }
        }
      ],
      "question_ids": ["959d32ab8cbfi4b70bff1324e"],
      "logo_url": "https://dzm1xrrk9dqdf.cloudfront.net/uploads/company/logo/8347788/37805b128f.png",
      "bg_url": "https://dzm1xrrk9dqdf.cloudfront.net/uploads/company/background/582681/cd274696b7a8cf72be60.jpg",
      "color_hex": "#55C5CC"
    }
  }
}