Create Form Template

/form_templates

Create Form Template [POST]

Create a new form template.

Authorization: Admin

Request

Body
{
	"rowStatus": "0",
	"defaultReportId": 60,
	"isVisible": true,
	"defaultReport": {
		"displayName": "Standard Report"
	},
	"categoryId": "17",
	"classificationId": "185",
	"name": "Hearing Protection Assessment V2",
	"instructions": "Here are some instructions for the user.",
	"requiresAsset": false,
	"allowMultipleInFolder": false,
	"teamIds": ["23"]
}

Response 200

Body
{
	"item": {
		"teamIds": [23],
		"defaultReport": {
			"id": 60,
			"name": "ItemEventReport_DynamicStyled",
			"displayName": "Standard Report"
		},
		"allowMultipleInFolder": false,
		"requiresAsset": false,
		"rowStatus": 0,
		"instructions": "Here are some instructions for the user.",
		"name": "Hearing Protection Assessment V2",
		"classificationId": 185,
		"id": 13391,
		"categoryId": 17,
		"referenceQuestions": [{
			"id": 1,
			"title": null,
			"resolution": false,
			"rowStatus": 0,
			"type": {
				"id": 3,
				"name": "shortText",
				"displayName": "Short Text (<50 chars)"
			}
		}, {
			"id": 2,
			"title": null,
			"resolution": false,
			"rowStatus": 0,
			"type": {
				"id": 3,
				"name": "shortText",
				"displayName": "Short Text (<50 chars)"
			}
		}, {
			"id": 3,
			"title": null,
			"resolution": false,
			"rowStatus": 0,
			"type": {
				"id": 3,
				"name": "shortText",
				"displayName": "Short Text (<50 chars)"
			}
		}, {
			"id": 4,
			"title": null,
			"resolution": false,
			"rowStatus": 0,
			"type": {
				"id": 3,
				"name": "shortText",
				"displayName": "Short Text (<50 chars)"
			}
		}],
		"categoryName": "PPE",
		"className": "Hearing Protection"
	}
}

Response 422

Body
{
	"errors": {
		"name": ["Name is required."],
		"teamIds": ["At least one valid Team is required."]
	}
}

Still need help? Contact Us Contact Us