| Requires any of the roles: | Admin, TenantAdmin, TaskAdmin |
| POST | /tasklists | Creates one or more task lists. |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| AccessTemplateGroupId | body | string | No | Access Template Id. Set a value in case the TaskList is relevant to a specific smartspace. |
| SaveAsTemplate | body | boolean | No | Flag indicating if a template should be saved based on the tasklist being created. |
| Tasks | body | array | No | Tasks to create as part of the task list. |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| AccessTemplateId | form | string | No | Access Template Id. Set a value in case the TaskList is relevant to a specific smartspace. |
| Priority | form | TaskListPriority | Yes | TaskListPriority, ranking this TaskList amid others.Allowable Values
|
| Start | form | string | No | The optional start time of the task list. |
| Deadline | form | string | No | The optional deadline of the task list. |
| Categories | form | array | No | Tags under which to categorize the tasklist. |
| RecurrenceConfiguration | form | string | No | Recurrence configuration in iCalendar format. |
| ShiftId | form | string | No | ID of a shift that this task list is linked to. If no shift is selected, a user or team must be selected. |
| TeamId | form | string | No | ID of a team that this task list is linked to. If no team is selected, a user or shift must be selected. |
| BusinessUserId | form | integer | No | ID of a business user that this task list is directly linked to. If no business user is selected, a team or shift must be selected. |
| Status | form | Status | Yes | The status/progress of the task list.Allowable Values
|
| Name | form | string | Yes | The base name for this (group of) lists. |
| Instructions | form | string | No | Instructions on how to complete the task list. |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Version | form | integer | No | Api version |
| Name | Value |
|---|---|
| None | 0 |
| VeryLow | 10 |
| Low | 20 |
| Medium | 30 |
| High | 40 |
| VeryHigh | 50 |
| Critical | 60 |
| Name | Value |
|---|---|
| Cleaning | 10 |
| Maintenance | 20 |
| Disinfection | 30 |
| Inspection | 40 |
| Security | 50 |
| Name | Value |
|---|---|
| ToDo | 0 |
| InProgress | 10 |
| Incomplete | 30 |
| Done | 40 |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Name | form | string | Yes | Task name. |
| Description | form | string | No | Task description. |
| CompleteWithTag | form | boolean | Yes | Flag indicating whether the task completion must be marked by scanning a NFC tag. |
| NfcCode | form | string | No | NFC code of the tag. |
| TaskType | form | TaskType | Yes | The type of task.Allowable Values
|
| Order | form | integer | No | The position of the task within its task list. |
| TaskStatus | form | TaskStatus | Yes | Current status of the task.Allowable Values
|
| TaskListId | form | string | Yes | The ID of the TaskList to which this Task belongs. |
| Name | Value |
|---|---|
| Standard | 0 |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Ids | form | IEnumerable<Guid> | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ResponseStatus | form | ResponseStatus | No |
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /tasklists HTTP/1.1
Host: api.4spaces.io
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CreateTaskLists xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Viviot.Api.ServiceModel.Api.Business">
<Version xmlns="http://schemas.datacontract.org/2004/07/Viviot.Api.ServiceModel.Api.Base">0</Version>
<AccessTemplateId>00000000-0000-0000-0000-000000000000</AccessTemplateId>
<BusinessUserId>0</BusinessUserId>
<Categories xmlns:d2p1="http://schemas.datacontract.org/2004/07/Viviot.Infrastructure.Enums">
<d2p1:Category>Cleaning</d2p1:Category>
</Categories>
<Deadline>0001-01-01T00:00:00</Deadline>
<Instructions>String</Instructions>
<Name>String</Name>
<Priority>None</Priority>
<RecurrenceConfiguration>String</RecurrenceConfiguration>
<ShiftId>00000000-0000-0000-0000-000000000000</ShiftId>
<Start>0001-01-01T00:00:00</Start>
<Status>ToDo</Status>
<TeamId>00000000-0000-0000-0000-000000000000</TeamId>
<AccessTemplateGroupId>00000000-0000-0000-0000-000000000000</AccessTemplateGroupId>
<SaveAsTemplate>false</SaveAsTemplate>
<Tasks>
<CommonBaseTask>
<Version xmlns="http://schemas.datacontract.org/2004/07/Viviot.Api.ServiceModel.Api.Base">0</Version>
<CompleteWithTag>false</CompleteWithTag>
<Description>String</Description>
<Name>String</Name>
<NfcCode>String</NfcCode>
<Order>0</Order>
<TaskListId>00000000-0000-0000-0000-000000000000</TaskListId>
<TaskStatus>ToDo</TaskStatus>
<TaskType>Standard</TaskType>
</CommonBaseTask>
</Tasks>
</CreateTaskLists>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<TaskListsCreatedResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Viviot.Api.ServiceModel.Api.Business">
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types" xmlns="http://schemas.datacontract.org/2004/07/Viviot.Api.ServiceModel.Api.Base">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<Ids xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
</TaskListsCreatedResponse>