v1

latestOpenAPI 3.1.02026-07-241765501.1 MB
Results

Next question

Retrieve the next question given a list of answers. If no answers are specified, it will return the first question. Use a version_id to retrieve the next question for a specific version of the quiz.

get/v1/quizzes/{id}/next

Path parameters

idstring required

The id of the quiz

Query parameters

keystring required

Index key for the customer's product catalog

sectionstring

The section of the index to use. Defaults to products.

quiz_session_idstring

Specific quiz session id for the quiz. Session id will be automatically assigned if it is not specified.

quiz_version_idstring

Specific version id for the quiz.

version_idstring

Specific version id for the quiz. Deprecated, please use quiz_version_id instead.

astring[]

A list of answers in the format ?a=<option_id>,<option_id>&a=<option_id> where multiple options for a single answer are supplied in the same answer parameter (separated by ",") and options for the next question are supplied in the next answer parameter.

Response

OK - Everything worked as expected.

total_questionsnumber

Gives the total number of questions in the quiz

version_idstring

Version id of this quiz

quiz_version_idstring

Version id of this quiz

quiz_idstring

id of quiz

quiz_session_idstring

Session id of this quiz

Example response

{
  "next_question": {
    "title": "TITLE",
    "description": "DESCRIPTION",
    "images": {
      "primary_url": "https://example.com/image.jpg",
      "primary_alt": "Product image",
      "secondary_url": "https://example.com/image2.jpg",
      "secondary_alt": "Alternative product view"
    },
    "option": [
      {
        "value": "Red",
        "attribute": {
          "color": "red"
        },
        "images": {
          "primary_url": "https://example.com/image.jpg",
          "primary_alt": "Product image",
          "secondary_url": "https://example.com/image2.jpg",
          "secondary_alt": "Alternative product view"
        }
      }
    ]
  },
  "version_id": "11db5ac7-67e1-4000-9000-414d8425cab3",
  "quiz_version_id": "11db5ac7-67e1-4000-9000-414d8425cab3",
  "quiz_id": "11db5ac7-67e1-4000-9000-414d8425cab3",
  "quiz_session_id": "11db5ac7-67e1-4000-9000-414d8425cab3"
}