Viviot.Api

<back to all web services

CreateTaskListTemplate

Requires Authentication
Requires any of the roles:Admin, TenantAdmin, TaskAdmin
The following routes are available for this service:
POST/tasklist/templateCreates a task list template.
CreateTaskListTemplate Parameters:
NameParameterData TypeRequiredDescription
TaskTemplatesbodyarrayNoTask templates to create as part of the task list template.
CommonTaskListTemplateApi Parameters:
NameParameterData TypeRequiredDescription
PriorityformTaskListPriorityYesTaskListPriority, ranking this tasklist template amid others.

Allowable Values

  • None
  • VeryLow
  • Low
  • Medium
  • High
  • VeryHigh
  • Critical
NameformstringYesThe list template's name.
CategoriesformarrayNoTags under which to categorize the tasklist.
AccessTemplateIdformstringNoAccess template ID.
InstructionsformstringNoInstructions on how to complete the task list.
BaseRequest Parameters:
NameParameterData TypeRequiredDescription
VersionformintegerNoApi version
TaskListPriority Enum:
NameValue
None0
VeryLow10
Low20
Medium30
High40
VeryHigh50
Critical60
Category Enum:
NameValue
Cleaning10
Maintenance20
Disinfection30
Inspection40
Security50
CommonBaseTaskTemplate Parameters:
NameParameterData TypeRequiredDescription
NameformstringYesTask template name.
DescriptionformstringNoTask template description.
CompleteWithTagformbooleanYesFlag indicating whether the task completion must be marked by scanning a NFC tag.
NfcCodeformstringNoNFC code of the tag.
TaskTypeformTaskTypeYesThe type of task template.

Allowable Values

  • Standard
OrderformintegerNoThe position of the task template within its task list template.
TaskListTemplateIdformstringYesThe ID of the tasklist template to which this task template belongs.
TaskType Enum:
NameValue
Standard0
TaskListTemplateCreatedResponse Parameters:
NameParameterData TypeRequiredDescription
IdformGuidNo
BaseResponse Parameters:
NameParameterData TypeRequiredDescription
ResponseStatusformResponseStatusNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /tasklist/template HTTP/1.1 
Host: api.4spaces.io 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	taskTemplates: 
	[
		{
			name: String,
			description: String,
			completeWithTag: False,
			nfcCode: String,
			taskType: 0,
			order: 0,
			taskListTemplateId: 00000000000000000000000000000000,
			version: 0
		}
	],
	priority: 0,
	name: String,
	categories: 
	[
		10
	],
	accessTemplateId: 00000000000000000000000000000000,
	instructions: String,
	version: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	id: 00000000000000000000000000000000,
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}