Contact Us
Quote Request
  • App Support
    • Knowledge Base
      • API Documentation
      • Classic Portal Documentation
      • App Developer Account Info
      • Video Tutorials – Classic
      • Onboarding Documentation
      • New Portal Documentation
      • Video Tutorials – New
      • App Version Update Notes
    • App Success Tips
      • App Launch Success Guide​
      • Populate Your App For Launch
      • Train Your App Administrators
      • Prepare and Plan Your Marketing Launch Activities
      • Keep Your App Fresh
      • Consistently Remind Your Community about Your App
      • Turn Your App Administrators into Super-Users
      • Ensure Your App Is a Must-Have for Your Community
  • Additional Services
    • Additional Training
    • Content & Design
      • Blog Posts
      • Infographics
      • Content Packages
      • Assessments
      • Editorial Services
      • Whiteboard Video
    • Marketing Support
Menu
  • App Support
    • Knowledge Base
      • API Documentation
      • Classic Portal Documentation
      • App Developer Account Info
      • Video Tutorials – Classic
      • Onboarding Documentation
      • New Portal Documentation
      • Video Tutorials – New
      • App Version Update Notes
    • App Success Tips
      • App Launch Success Guide​
      • Populate Your App For Launch
      • Train Your App Administrators
      • Prepare and Plan Your Marketing Launch Activities
      • Keep Your App Fresh
      • Consistently Remind Your Community about Your App
      • Turn Your App Administrators into Super-Users
      • Ensure Your App Is a Must-Have for Your Community
  • Additional Services
    • Additional Training
    • Content & Design
      • Blog Posts
      • Infographics
      • Content Packages
      • Assessments
      • Editorial Services
      • Whiteboard Video
    • Marketing Support

API Documentation

  • API Documentation
  • Assessments & Quiz API Sample
  • Forms & Reporting API Sample
  • Side Menu API Sample

Classic Portal Documentation

  • Advantages
  • Alerts
  • Assessments and Quizzes
  • Checklists
  • Content Authoring Tool
  • Creating a Quiz
  • eGuide Library
  • Events
  • FAQ Module
  • Form Elements Breakdown
  • How to Create a Scored Assessment
  • Logging In to Your Portal
  • Module Access Codes
  • News
  • PDF Library
  • Reporting and Forms
  • Resources Module
  • Text Module / Welcome Message
  • User Management
  • Videos

App Developer Account Info

  • Apple Developer Program Letter Request
  • Enrolling in the Apple Developer Program
  • Getting Started with Developer Accounts
  • Granting QuickSeries Access to Your App Store Connect
  • Granting QuickSeries Access to Your Google Play Console
  • Register for a Google Play Developer account
  • Transferring Your App: How to Accept the Transfer
  • Transferring Your App: How to Initiate the Transfer

Video Tutorials - Classic

  • FAQ Module
  • Module Access Codes
  • News Module
  • Reports and Forms

Onboarding Documentation

  • 12 Steps of Onboarding
  • Installing Your Test App on Android (Firebase)
  • Installing Your Test App on iOS (TestFlight)

New Portal Documentation

  • Alerts
  • Assessments
  • Checklists
  • eGuide Library / Bundles
  • FAQ
  • Form Elements Breakdown
  • Forms & Reporting
  • Make Your Plan
  • Maps
  • Module Access Codes
  • News
  • NWS / FEMA Alerts
  • PDF Library
  • Privacy Policy and Terms and Conditions editor
  • QuickConnect Workspaces
  • Resources
  • Side Menu Customization
  • User Management
  • User Onboarding
  • Video Library
  • Welcome Message

Video Tutorials - New

  • Access Codes
  • Alerts Module
  • App User Onboarding
  • Assessment & Quiz Module
  • Checklist Module
  • FAQ Module
  • Library Module
  • Make Your Plan Module
  • Maps: How to create zones
  • News Module
  • NWS and FEMA Alerts
  • Privacy Policy and Terms and Conditions editor
  • QuickConnect Workspaces
  • Reporting Module
  • Resources Module
  • Side Menu Customization
  • Video Library Module
  • Welcome Message Module

App Success Tips

  • App Launch Success Guide​
  • Consistently Remind Your Community about Your App
  • Ensure Your App Is a Must-Have for Your Community
  • Keep Your App Fresh
  • Populate Your App For Launch
  • Prepare and Plan Your Marketing Launch Activities
  • Train Your App Administrators
  • Turn Your App Administrators into Super-Users

App Version Update Notes

  • Version 3.11.0
  • Version 3.11.2
  • Version 3.12.2
  • Version 3.13.2
  • Version 3.7.1
  • Version 3.8.0
  • Version 3.9.0
  • Home
  • Knowledge Base
  • API Documentation

Assessments & Quiz API Sample

Table of Contents
  • Full payload example
  • Data’s field payload example
  • info_groups payload example
  • sections payload example
  • questions payload example
  • choices payload example
Print Friendly, PDF & EmailQuickPrint

The assessment and quiz API allows you to create and edit assessments and quizzes as well as submit and export data. Assessments are slightly different from quizzes.

An assessment has no right or wrong answers. It is a series of sections with questions and each answer to each question is assigned a score. At the end of the assessment, you will be presented with content based on the sum of your score. Questions may also contain logic; For example, answer A to question 1 may jump you to question 4, offering the ability to break your assessment into many paths.

On the other hand, a quiz has a right or wrong answers. And each right answer will always give the user 1 point. No jump logic is possible in a quiz.

Assessments and quizzes are created from the admin portal using a drag and drop editor.

If you already have an assessment or quiz building tool (such as Wufoo or Google Forms) and want to automatically generate an equivalent assessment or quiz in your app, you may build a tool to create and publish a QuickSeries compatible form.

Below, you will see payload examples that you must follow in order to successfully create an assessment or quiz in your QuickSeries app.

Note: the current version of our Assessment and Quiz API requires structural UI information to be part of the payload. You must include all schema structures in order to successfully create or update an assessment or quiz.

Full payload example

In order to create a new assessment or quiz, the data has to be sent as a multipart/form-data request as it may contain images. The multipart/form-data must contain at least the field data which is required.

Here is a rudimentary code sample for creating a quiz or assessment using multipart/form-data object in JavaScript:

/**
 * image would be the image data from an HTML <input type="file">.
 * data would be the data defined below this example.
 */
function createMultipartFormData(image, data, sectionImagesObj) {
  const fd = new FormData();
  
  if (data.eid) {
    fd.append('eid', data.eid);
  }
  
  if (image) { // If image is a File, otherwise just set data.image = 'URL';
    fd.append('image', image);
  }
  
  sectionImagesObj.forEach((section) => { // If image is a File, otherwise just set section.image = 'URL';
      fd.append(section.eid, section.image);
  });
  
  fd.append('data', JSON.stringify(data));
  
  return fd;
}

// Once the payload is formated corrected, send the data returned
// by your function above to the API
function createQuiz(data) {
  // An HTTP function returning a promise
}

const quizData = createMultipartFormData(image, quiz);

createQuiz(quizData)
  .then((createdQuiz) => {
    // Handle success
  })
  .catch((error) => {
    // Handle errors.
  })

Data’s field payload example

KeyDescriptionTypeRequiredPossible values
title stringtrueAny string
status stringtruedraft, published
imageImage URLstringfalse 
description stringfalseMust be valid HTML ideally generated by Quill editor to maintain styling compatibility: https://quilljs.com/
type stringtruequiz, assessment
anonymousAssessments and quizzes can be anonymous or not. When any data is collected (see the info_groups key), this must be set to false.booleantruetrue, false
info_groupsAssessments and quizzes can be anonymous or not.

 

You can collect the following information:

·       Name

·       Phone

·       Email

·       Age

·       Race

·       Gender

·       Height

·       Weight

·       Job title

·       Salary range

·       Employee number

·       Department

This key contains which personal information should be collected.

array of info_groups. See below for more information.falseSee info_groups section.
sections arraytrueSee sections section.
resultsThis key contains the feedback content displayed to the user at the end of an assessment of quiz based on their score.array of results. See below for more information.falseSee results section.
{
  "title": "This is a sample quiz title",
  "status": "draft",
  "description": "<p>This is a sample quiz description</p>",
  "type": "quiz",
  "image": "https://s3.us-east-2.amazonaws.com/quickseries-prod/qsapi-files/files/98612cfe-5476-4508-b07e-63108365f0ba/assessments/07237335-14d9-4211-b16b-2ef7675e8057/9b12f1e0-ed36-4a35-a065-0e8084c5d84b.png?1648570168002",
  "anonymous": false,
  "info_groups":[
      "87dfea84-f9d2-4058-a542-942187afca09",
      "62e92aa8-aaff-452e-bcac-d13bbd8f915c",
      "db7d3173-98c3-48e6-aa1c-a1d44931a4ce",
      "96b23a62-4cf1-4b88-8c9f-77189f027612",
      "a5aea71d-4d04-4dab-8b57-3fcbe680ef2e",
      "d44c0f3d-f648-4be1-b602-b15af235cd02",
      "f1cfb21b-67b6-48c7-a0ae-745876f7440c",
      "6c4b0b0a-da00-4d11-b351-6fbb03dea3b1",
      "bce2d3a8-b135-4f1e-8148-cb6a8bc844c0",
      "976d892f-df5a-49ef-a869-c30ee23fb896",
      "b9ea371f-681e-4d12-8d5c-4e0ee16e1fe9"
   ],
  "sections": [
    {
      "eid": "e56f09f6-f3bb-4e4a-8594-1321f87a4d9b",
      "title": "This is a sample quiz section title",
      "description": "<p>This is a sample quiz section description</p>",
      "image": "",
      "order": 1,
      "questions": [
        {
          "eid": "d8d21abe-4d4a-4fd2-b27b-749c6e39a363",
          "title": "<p>Single choice sample question</p>",
          "order": 1,
          "type": "single-choice",
          "note": { "text": "Single choice sample tip", "type": "tip" },
          "choices": [
            {
              "eid": "64c3c4dc-daa2-47cb-834d-68e3be4f7c8e",
              "label": "Choice A",
              "sub_label": "",
              "is_correct": true,
              "point": 1,
              "feedback": "",
              "tip": "<p>Sample choice information/tip.</p>",
              "jump_to": "0"
            },
            {
              "eid": "8ea6100b-82c0-406d-b834-70db917282a2",
              "label": "Choice B",
              "sub_label": "",
              "is_correct": false,
              "point": 0,
              "feedback": "",
              "tip": "",
              "jump_to": "0"
            },
            {
              "eid": "8748393b-125d-45a9-a1e8-9b93a958aa0d",
              "label": "Choice C",
              "sub_label": "",
              "is_correct": false,
              "point": 0,
              "feedback": "",
              "tip": "",
              "jump_to": "0"
            }
          ],
          "options": {
            "is_required": true,
            "is_answer_shuffle": true,
            "retries": 2
          },
          "quiz_feedback": {
            "correct": "<p>Sample correct feedback.</p>",
            "wrong": "<p>Sample incorrect feedback.</p>"
          },
          "quiz_logic": { "correct": "0", "wrong": "0" }
        },
        {
          "eid": "575d9de2-41bd-4acf-8acf-7fd1c74ced20",
          "title": "<p>Sample multiple choice question</p>",
          "order": 2,
          "type": "multiple-choice",
          "note": { "text": "Sample warning", "type": "warning" },
          "choices": [
            {
              "eid": "643490a0-ef2e-4496-8222-f6f551ab5d78",
              "label": "Choice A",
              "sub_label": "",
              "is_correct": true,
              "point": 1,
              "feedback": "",
              "tip": "",
              "jump_to": "0"
            },
            {
              "eid": "d632cd1d-a23f-46a4-bca3-a8dfaa7d4d8f",
              "label": "Choice B",
              "sub_label": "",
              "is_correct": false,
              "point": 0,
              "feedback": "",
              "tip": "<p>Sample answer information/tip</p>",
              "jump_to": "0"
            }
          ],
          "options": {
            "is_required": true,
            "is_answer_shuffle": false,
            "retries": 0
          },
          "quiz_feedback": { "correct": "", "wrong": "" },
          "quiz_logic": { "correct": "0", "wrong": "0" }
        }
      ]
    },
    {
      "eid": "6faa2e28-4328-4615-badb-919e4021557f",
      "title": "Sample section 2 title",
      "description": "<p>Sample section 2 description</p>",
      "image": "",
      "_imageFile": null,
      "order": 2,
      "tip": "",
      "questions": [
        {
          "eid": "de6b43e9-dbec-45f0-884e-fb4f10d56759",
          "title": "Untitled question",
          "order": 3,
          "type": "single-choice",
          "note": { "text": "", "type": "tip" },
          "choices": [
            {
              "eid": "68290b95-fa44-4638-a5da-70542145354b",
              "label": "Choice A",
              "sub_label": "",
              "is_correct": true,
              "point": 1,
              "feedback": "",
              "tip": "",
              "jump_to": "0"
            },
            {
              "eid": "a9c065e5-904a-4136-ba67-bd52ecd84344",
              "label": "Choice B",
              "sub_label": "",
              "is_correct": false,
              "point": 0,
              "feedback": "",
              "tip": "",
              "jump_to": "0"
            }
          ],
          "options": {
            "is_required": true,
            "is_answer_shuffle": false,
            "retries": 0
          },
          "quiz_feedback": { "correct": "", "wrong": "" },
          "quiz_logic": { "correct": "0", "wrong": "0" }
        }
      ]
    }
  ],
  "results": [
    {
      "eid": "7b2c2d2b-8320-436a-a347-a85c2e73feed",
      "title": "Sample score and feedback - low",
      "message": "<p>Sample score and feedback - low description</p>",
      "min": 0,
      "max": 1
    },
    {
      "eid": "aaec4c40-adf3-41a1-b79b-c3100a51fb31",
      "title": "Sample score and feedback - High",
      "message": "<p>Sample score and feedback - high description</p>",
      "min": 2,
      "max": 3
    }
  ],
  "user_info": [
    {
      "eid": "96b23a62-4cf1-4b88-8c9f-77189f027612",
      "title": "Name",
      "placeholder": {
        "en": "Enter name",
        "es": "Ingrese su nombre",
        "fr": "Inscrivez votre nom"
      },
      "type": "text-field"
    },
    {
      "eid": "87dfea84-f9d2-4058-a542-942187afca09",
      "title": "Phone",
      "placeholder": "123-456-7890",
      "type": "phone-number"
    }
  ]
}

info_groups payload example

The info_groups key defined above is an array that contains the information that must be collected when a user starts an assessment or quiz. Below you will find the details about each of the info_groups keys.

In the example below, you can see all available identifiers. There are 11 identifiers, each one represents specific information that can be collected. These values are predefined, you just need to send the identifiers for the options that you want to collect.

  • Name: 96b23a62-4cf1-4b88-8c9f-77189f027612
  • Age: 3aa17021-f855-44c1-b6b0-c61c33811a07
  • Phone: 87dfea84-f9d2-4058-a542-942187afca09
  • Email: 62e92aa8-aaff-452e-bcac-d13bbd8f915c
  • Department: bce2d3a8-b135-4f1e-8148-cb6a8bc844c0
  • Employee number: 6c4b0b0a-da00-4d11-b351-6fbb03dea3b1
  • Race: a5aea71d-4d04-4dab-8b57-3fcbe680ef2e
  • Gender: d44c0f3d-f648-4be1-b602-b15af235cd02
  • Height: f1cfb21b-67b6-48c7-a0ae-745876f7440c
  • Weight: db7d3173-98c3-48e6-aa1c-a1d44931a4ce
  • Job title: b9ea371f-681e-4d12-8d5c-4e0ee16e1fe9
  • Salary range: 976d892f-df5a-49ef-a869-c30ee23fb896
{
  "info_groups":[
      "87dfea84-f9d2-4058-a542-942187afca09",
      "62e92aa8-aaff-452e-bcac-d13bbd8f915c",
      "db7d3173-98c3-48e6-aa1c-a1d44931a4ce",
      "96b23a62-4cf1-4b88-8c9f-77189f027612",
      "a5aea71d-4d04-4dab-8b57-3fcbe680ef2e",
      "d44c0f3d-f648-4be1-b602-b15af235cd02",
      "f1cfb21b-67b6-48c7-a0ae-745876f7440c",
      "6c4b0b0a-da00-4d11-b351-6fbb03dea3b1",
      "bce2d3a8-b135-4f1e-8148-cb6a8bc844c0",
      "976d892f-df5a-49ef-a869-c30ee23fb896",
      "b9ea371f-681e-4d12-8d5c-4e0ee16e1fe9"
   ]
}

sections payload example

The sections key defined above is an array that contains each assessment/quiz section information. There must always be at least one section in an assessment/quiz. Each section must contain at least one question, and each question must contain at least 2 answers.

In the example below, you can see the section payload structure with the questions removed to make it easier to understand.

{
  "eid": "e56f09f6-f3bb-4e4a-8594-1321f87a4d9b",
  "title": "This is a sample quiz section title",
  "description": "<p>This is a sample quiz section description</p>",
  "image": "",
  "order": 1,
  "tip": "",
  "questions": []
},
{
  "eid": "6faa2e28-4328-4615-badb-919e4021557f",
  "title": "Sample section 2 title",
  "description": "<p>Sample section 2 description</p>",
  "image": "",
  "order": 2,
  "questions": []
}
KeyDescriptionTypeRequiredPossible values
eidThe EID must be generated by the user of the API using the UUID v4 algorithm.stringtrueUUID v4 string
title stringtrueAny string
description stringfalseMust be valid HTML ideally generated by Quill editor to maintain styling compatibility: https://quilljs.com/
image stringfalseif you are creating the item or the file URL that was returned to you if you are updating the item.
orderThe order in which the sections should be, starting at 1.numbertrueAny number greater or equal to 1.
questions array of questions. See below for more information.trueSee below for the questions definition.

questions payload example

The questions key is an array of questions within a given section. Each section must contain at least one question, and each question must contain at least 2 answers.

{
  "questions": [
    {
      "eid": "de6b43e9-dbec-45f0-884e-fb4f10d56759",
      "title": "Untitled question",
      "order": 1,
      "type": "single-choice",
      "note": { "text": "", "type": "tip" },
      "choices": [
        {
          "eid": "68290b95-fa44-4638-a5da-70542145354b",
          "label": "Choice A",
          "sub_label": "",
          "is_correct": true,
          "point": 1,
          "feedback": "",
          "tip": "",
          "jump_to": "0"
        },
        {
          "eid": "a9c065e5-904a-4136-ba67-bd52ecd84344",
          "label": "Choice B",
          "sub_label": "",
          "is_correct": false,
          "point": 0,
          "feedback": "",
          "tip": "",
          "jump_to": "0"
        }
      ],
      "options": {
        "is_required": true,
        "is_answer_shuffle": false,
        "retries": 0
      },
      "quiz_feedback": { "correct": "", "wrong": "" },
      "quiz_logic": { "correct": "0", "wrong": "0" }
    }
  ]
}
KeyDescriptionTypeRequiredPossible values
eidThe EID must be generated by the user of the API using the UUID v4 algorithm.stringtrueUUID v4 string
title stringtrueAny string
orderThe order in which the question should be, starting at 1.numbertrueAny number greater or equal to 1.
typeThe type of question.stringtrueFor a quiz:

 

single-choice, multiple-choice

For an assessment:

single-choice, multiple-choice, linear-scale

noteIn your app, a note will appear below the question title. There are 4 types of notes:

 

·       Comment

·       Hint

·       Tip

·       Warning

note objectfalse {
“text”: “This is a sample tip”,
“type”: “tip”
}

 

tip

  • Type: string

type

  • Type: string
  • Possible values: tip, comment, hint, warning.
choicesA question must have at least 2 choices.array of choices. See below for more information.trueSee below for the choices definition.
optionsEach question can be configured to behave in a certain way using this options object.options objecttrue {
“is_required”: true,
“is_answer_shuffle”: false,
“retries”: 0
}

 

is_required

  • Type: boolean

is_answer_shuffle

  • Type: boolean

retries

  • Type: number
  • Possible values: The retries value must be lower or equal to the
quiz_feedbackYou can add some feedback based on choosing the right or the wrong answer. This feedback will appear on the mobile app after submitting an answer.quiz_feedback objectfalse {
“wrong”: “This is a sample feedback”,
“correct”: “This is a sample feedback”
}

 

wrong

  • Type: string
  • Value: The feedback if the wrong answer is chosen.

correct

  • Type: string
  • Value: The feedback if the correct answer is chosen.
quiz_logicDefines to which question the users must “jump to” in case of right or wrong answer (Only for quiz type).quiz_logic objectfalse {
“wrong”: “4”,
“correct”: “3”
}

 

wrong

  • Type: string
  • Value: A number string representing the question to which the user will be sent in case a wrong answer is chosen; it must start from 1.

correct

  •  Type: string
  • Value: A number string representing the question to which the user will be sent in case the correct answer is chosen; it must start from 1.

choices payload example

The choices key is an array of choices within a given question. Each question must contain at least two choices.

{
  "choices": [
    {
      "eid": "68290b95-fa44-4638-a5da-70542145354b",
      "label": "Choice A",
      "sub_label": "",
      "is_correct": true,
      "point": 1,
      "feedback": "",
      "tip": "",
      "jump_to": "0"
    },
    {
      "eid": "a9c065e5-904a-4136-ba67-bd52ecd84344",
      "label": "Choice B",
      "sub_label": "",
      "is_correct": false,
      "point": 0,
      "feedback": "",
      "tip": "",
      "jump_to": "0"
    }
  ]
}
KeyDescriptionTypeRequiredPossible values
eidThe EID must be generated by the user of the API using the UUID v4 algorithm.stringtrueUUID v4 string
label stringtrueAny string
sub_labelOnly used for linear-scale type to store lowest and highest value.numberfalseAny number greater or equal to 0.
is_correctSets this question as correct, by default it is false.booleanfalsetrue
pointThe number of points for this question, for quiz type, is always one for a correct answer and zero if it is wrong. Default to zero.numberfalse1
feedbackYou can add some feedback based on choosing this choice. This feedback will appear on the mobile app after submitting an answer.stringfalse
  • Type: string
  • Value: The feedback if the user selects this option.
tipIn your app, a note will appear below the choice’s title.stringfalseMust be valid HTML ideally generated by Quill editor to maintain styling compatibility: https://quilljs.com/
jump_toDefines to which question the users must “jump to” in case this choice is selected.stringfalse
  • Value: A number string representing the question to which the user will be sent in case this choice is selected; it must start from 1.

Still stuck? How can we help?

How can we help?

Table of Contents
  • Full payload example
  • Data’s field payload example
  • info_groups payload example
  • sections payload example
  • questions payload example
  • choices payload example

|

Reliable Content.
Innovative Delivery.

App Support

  • Knowledge Base
  • App Success Tips

Additional Services

  • Additional Training
  • Content & Design
  • Marketing Support

Legal

  • Legal Policies
  • SLA Agreement

This website and its contents is copyright of QuickSeries Inc.
© QuickSeries 2021.

All rights reserved. Any redistribution or reproduction of part or all of the contents in any form is prohibited.