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.
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. })
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.
{ "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" } ] }
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.
{ "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" ] }
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": [] }
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" } } ] }
single-choice, multiple-choice
For an assessment:
single-choice, multiple-choice, linear-scale
· Comment
· Hint
· Tip
· Warning
tip
type
is_required
is_answer_shuffle
retries
wrong
correct
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" } ] }