POST or PATCH Call Questionnaire Record

For the answered questionnaire, the following are required, and the values must match the values retrieved for those attributes via the GET call:

  • name: Name of the template.
  • keyword: Keyword of the template.
  • sections: array of sections in the questionnaire with each section containing
    • number: section number
    • name: section name from the questionnaire template
    • questions: Array of questions in the section with each question containing
      • number: The question number within the section starting from
      • question: The question text from the questionnaire template
      • comments: This is optional
      • attachments: Array of attachment unique ids associated with this question if the question allows attachments.
      • answer: The selected answer value from "answerOptions" of questionnaire template
      • result: The selected result value corresponding to the answer value from "answerOptions" of questionnaire template
      • notApplicable: If the question or a section allows being marked as NA, the value of this attribute can be set to true (e.g. "notApplicable": true).

note_awesome

Questionnaire Field Types and JSON Requirements

  • Checkbox: Include both "answer" and "result" fields in the JSON.
  • Radio: Include both "answer" and "result" fields in the JSON.
  • Number: Include both "answer" and "result" fields in the JSON.
  • Dropdown: Include both "answer" and "result" fields in the JSON.
  • Date: Not currently supported.
  • Text: Not currently supported.

Example below

{

"name": "7 Point Fire Check",

"keyword": "Inspection",

"sections": [

{

"number": "1",

"name": "Approval Documents",

"questions": [

{

"number": "1",

"question": "Can all fire exits be opened immediately and easily?",

"answer": "1",

"result": "Checked",

"attachments": ["ABqg4fRP-rXqQAjeWTI0F-N9]"

]

},

{

"number": "2",

"question": "Is both the interior and the exterior of fire doors clear of obstructions?",

"answer": "1",

"result": "Checked"

},

{

"number": "3",

"question": "Are escape routes clear?",

"answer": "0",

"result": "Unchecked"

},

{

"number": "4",

"question": "Are the emergency lighting fixtures and exit signs in good condition and undamaged?",

"answer": "1",

"result": "Checked"

},

{

"number": "5",

"question": "Are all fire extinguishers in their correct position and mounted properly?",

"answer": "0",

"result": "Unchecked"

},

{

"number": "6",

"question": "Are all fire extinguishers clearly visible and unobstructed?",

"answer": "1",

"result": "Checked"

},

{

"number": "7",

"question": "Is emergency lighting and sign lighting working correctly?",

"answer": "1",

"result": "Checked"

}

]

}

]

}

See Also

Simplified Questionnaire JSON Examples

GET Call for Questionnaire Template

GET Call for Questionnaire Record