Step
|
Example
|
Response
|
UPDATE a questionnaire record with name different from the current name on record
|
Name mismatch
CALL Type: PATCH
URL Example:
http://<WebApp URL>/restapi/component/questionnaire ('Unique ID of Questionnaire Record')
Note: Existing Questionnaire name before update "Fire Safety"
Payload Example:
{
"name": "7 Point Fire Check",
"json": "{Simplified Questionnaire JSON}"
}
|
HTTP code: 400
{
"error": {
"code": null,
"message": "Questionnaire name in payload does not match existing questionnaire name "
}}
|
UPDATE a questionnaire record inline within an existing inspection record
|
Attempting to PATCH a questionnaire inline (not supported)
CALL Type: PATCH
URL Example:
http://<WebApp URL>/restapi/component/inspections ('Unique ID of Inspection Record')
Payload Example:
"rel_inspection_checklist": {
"name": "Fire Safety",
"json": "{Simplified Questionnaire JSON}"
}
OR
{
"inspection_summary": "7 Point Fire Check",
"inspection_date": "2026-01-20",
"inspection_type": "Safety",
" rel_inspection_checklist”:
"name": "Fire Safety"
}
}
|
HTTP code: 400
{
"error”: {
"code": null,
"message": "Operation to update related components attributes (inline) is not supported "
}
}
|
UPDATE a questionnaire record with name in Json blob different from existing name on record (payload contains only Json)
|
Providing JSON without the correct name
CALL Type: PATCH
URL Example:
http://<WebApp URL>/restapi/component/questionnaire ('Unique ID of Questionnaire Record')
Payload Example:
{
"json": "{Simplified Questionnaire JSON}"
}
|
Note: Existing Questionnaire name before update "Fire Safety"
HTTP code: 400
{
"error": {
"code": null,
"message": "Questionnaire name in payload does not match existing questionnaire name "
}}
|
CREATE a new questionnaire record inline within a new Inspection record (name of Questionnaire Template provided as part of inline payload is not a Questionnaire Template in the system)
|
Invalid template name
CALL Type: POST
URL Example:
http://<WebApp URL>/restapi/component/inspections
Payload Example:
{
"inspection_summary": "7 Point Fire Checks",
"inspection_date": "2026-01-20",
"inspection_type": "Safety",
"rel_inspection_checklist": {
"name": "7 Point Fire Checks",
"json": "{Simplified Questionnaire JSON}"
}
|
HTTP code: 400
{
"error": {
"code": null,
"message": "Cannot set Questionnaire Name: Questionnaire template not found "
}
}
|
CREATE a new Questionnaire record in line with new Inspection record where number of sections available in Questionnaire Template is not equal to number of sections provided in payload
|
Incorrect number of sections or questions
CALL Type: POST
URL Example:
http://<WebApp URL>/restapi/component/inspections
Payload Example:
{
"inspection_summary": " Hazardous Substances Label Assessment",
"inspection_date": "2026-01-20",
"inspection_type": "Safety",
"rel_inspection_checklist": {
"name": " Hazardous Substances Label Assessment",
"json": "{Simplified Questionnaire JSON with incorrect sections}"
}
|
HTTP code: 400
{
"error": {
"code": null,
"message": "Cannot set Questionnaire Name: Questionnaire template not found "
}
}
|
CREATE a new Questionnaire record in line with new Inspection record where number of Questions in any section available in Questionnaire Template is not equal to number of Questions in that section provided in payload
|
Invalid answer/result pair
CALL Type: POST
URL Example:
http://<WebApp URL>/restapi/component/inspections
Payload Example:
{
"inspection_summary": " Hazardous Substances Label Assessment",
"inspection_date": "2026-01-20",
"inspection_type": "Safety",
"rel_inspection_checklist": {
"name": " Hazardous Substances Label Assessment",
"json": "{Simplified Questionnaire JSON with incorrect number of questions in a section}"
}
|
HTTP code: 400
{
"error": {
"code": null,
"message": "Incorrect number of Questions provided. "
}
}
|
CREATE a new questionnaire record in line with new Inspection record with attachment where "allowAttachment" attribute is set as DISALLOW
|
Attachments provided when allowAttachments = DISALLOW
CALL Type: POST
URL Example:
http://<WebApp URL>/restapi/component/inspections
Payload Example:
{
"inspection_summary": " Hazardous Substances Label Assessment",
"inspection_date": "2026-01-20",
"inspection_type": "Safety",
"rel_inspection_checklist": {
"name": " Hazardous Substances Label Assessment",
"json": "{Simplified Questionnaire JSON with attachment in section 1 question 1}"
}
|
HTTP code: 400
{
"error": {
"code": null,
"message": "Attachments are not allowed on Question for Section [number: 1], Question [number: 2]"
}
}
|
CREATE a new questionnaire record in line with new Inspection record with invalid section number
|
CALL Type: POST
URL Example:
http://<WebApp URL>/restapi/component/inspections
Payload Example:
{
"inspection_summary": " Hazardous Substances Label Assessment",
"inspection_date": "2026-01-20",
"inspection_type": "Safety",
"rel_inspection_checklist": {
"name": " Hazardous Substances Label Assessment",
"json": "{Simplified Questionnaire JSON with section number as ‘a’}"
}
|
HTTP code: 400
{
"error": {
"code": null,
"message": "Invalid Section number: a"
}
}
Note: The expected Section number is "2"
|
CREATE a new questionnaire record in line with new Inspection record with invalid question number
|
CALL Type: POST
URL Example:
http://<WebApp URL>/restapi/component/inspections
Payload Example:
{
"inspection_summary": " Hazardous Substances Label Assessment",
"inspection_date": "2026-01-20",
"inspection_type": "Safety",
"rel_inspection_checklist": {
"name": " Hazardous Substances Label Assessment",
"json": "{Simplified Questionnaire JSON with question number as ‘b’}"
}
|
HTTP code: 400
{
"error": {
"code": null,
"message": "Invalid Question number for Section [number: 1], Question [number: b]"
}
}
|
CREATE a new questionnaire record in line with new Inspection record with invalid answer and result pair
|
CALL Type: POST
URL Example:
http://<WebApp URL>/restapi/component/inspections
Payload Example:
{
"inspection_summary": " Hazardous Substances Label Assessment",
"inspection_date": "2026-01-20",
"inspection_type": "Safety",
"rel_inspection_checklist": {
"name": " Hazardous Substances Label Assessment",
"json": "{Simplified Questionnaire JSON with question number as ‘b’}"
}
|
HTTP code: 400
{
"error": {
"code": null,
"message": "Invalid Result and Answer combination for Question for Section [number: 1], Question [number: 1]"
}
}
|
CREATE a new questionnaire record in line with new Inspection record with notApplicable as true
|
CALL Type: POST
URL Example:
http://<WebApp URL>/restapi/component/inspections
Payload Example:
{
"inspection_summary": " 7 Point Fire Checks ",
"inspection_date": "2026-01-20",
"inspection_type": "Safety",
"rel_inspection_checklist": {
"name": " 7 Point Fire Checks ",
"json": "{Simplified Questionnaire JSON with notApplicable as true for Question 1}"
}
|
HTTP code: 400
{
"error": {
"code": null,
"message": "Question does not allow marking as Not Applicable for Section [number: 1], Question [number: 1]"
}
}
|