Task Management Templates
Overview
This resource represents Task Templates - reusable task definitions that can automatically create tasks based on booking events (check-in/check-out) or be used manually. Templates define task properties, checklists, and automation rules.
Parameters
- OAuth Scopes:
- task_management_read
- task_management_write
| Name | Type | Read/Write | Description |
|---|---|---|---|
| account | Integer | Read | Account's ID related to Template |
| task_assignee | Integer | Read | Default assignee's ID (User) for tasks created from this Template |
| attachments | Array | Read | Array of Attachment IDs related to Template |
| rentals | Array | Read | Array of Rental IDs this Template applies to |
| id | UUID | Read | Template's ID |
| name | String | Read | Template's name |
| description | String | Read | Template's description |
| status | String | Read | Template's status, list of Statuses described in enums section |
| task_name | String | Read | Default name for tasks created from this Template |
| task_description | String | Read | Default description for tasks created from this Template |
| task_category | String | Read | Default category for tasks, list of Categories described in enums section |
| task_priority | String | Read | Default priority for tasks, list of Priorities described in enums section |
| task_expected_duration_in_minutes | Integer | Read | Default expected duration for tasks in minutes |
| task_has_issues | Boolean | Read | Default has_issues flag for tasks |
| task_due_at_automation | Object | Read | Automation rules for due date calculation |
| checklist | Array | Read | Array of checklist item names for tasks |
| created_at | Time | Read | Template's create time |
| updated_at | Time | Read | Template's update time |
| canceled_at | Time | Read | Template's cancellation time (null if not canceled) |
| Name | Type | Read/Write | Description | Constraints |
|---|---|---|---|---|
| account | Integer | Read | Account's ID related to Template | |
| task_assignee | Integer | Read | Default assignee's ID (User) for tasks created from this Template | |
| attachments | Array | Read | Array of Attachment IDs related to Template | |
| rentals | Array | Read | Array of Rental IDs this Template applies to | |
| id | UUID | Read | Template's ID | |
| name | String | Read/Write | Template's name | Required on create |
| description | String | Read/Write | Template's description | |
| status | String | Read/Write | Template's status, list of Statuses described in enums section | Required on create, must be one of Statuses |
| task_name | String | Read/Write | Default name for tasks created from this Template | Required on create |
| task_description | String | Read/Write | Default description for tasks created from this Template | Required on create |
| task_category | String | Read/Write | Default category for tasks, list of Categories described in enums section | Required on create, must be one of Categories |
| task_priority | String | Read/Write | Default priority for tasks, list of Priorities described in enums section | Required on create, must be one of Priorities |
| task_expected_duration_in_minutes | Integer | Read/Write | Default expected duration for tasks in minutes | Required on create, must be greater than 0 |
| task_has_issues | Boolean | Read/Write | Default has_issues flag for tasks | Defaults to false |
| task_due_at_automation | Object | Read/Write | Automation rules for due date calculation | Required when status is "active" or "inactive" |
| task_assignee_id | Integer | Write | Default assignee's ID for tasks | |
| rental_ids | Array | Write | Array of Rental IDs to apply this Template to | |
| checklist | Array | Read/Write | Array of checklist item names for tasks | |
| attachments | Array | Write | Array of attachment objects with file data | Available on create |
| apply_to_existing_bookings | Boolean | Write | Whether to create tasks for existing bookings | Available on create, defaults to false |
| created_at | Time | Read | Template's create time | |
| updated_at | Time | Read | Template's update time | |
| canceled_at | Time | Read | Template's cancellation time (null if not canceled) |
task_due_at_automation Object
The task_due_at_automation object defines when tasks should be created and their due dates:
| Name | Type | Description | Constraints |
|---|---|---|---|
| delay_in_minutes | Integer | Minutes before/after the event for the task due date | Required, can be negative (before event) or positive (after event) |
| event | String | The booking event that triggers task creation | Required, one of: check_in, check_out |
| event_source_type | String | Type of event source | Required, must be Booking |
List Templates
GET /task_management/templates
- OAuth Scopes:
- task_management_read / task_management_write
response.json
{
"links": {
"templates.account": "https://www.bookingsync.com/api/v3/accounts/{templates.account}",
"templates.task_assignee": "https://www.bookingsync.com/api/v3/users/{templates.task_assignee}",
"templates.rentals": "https://www.bookingsync.com/api/v3/rentals/{templates.rentals}"
},
"templates": [
{
"links": {
"account": 1,
"task_assignee": 10,
"attachments": [],
"rentals": [
100,
101,
102
]
},
"id": "d4e5f6a7-b8c9-0123-defg-456789012345",
"name": "Checkout Cleaning",
"description": "Standard cleaning template for after guest checkout",
"status": "active",
"task_name": "Clean apartment after checkout",
"task_description": "Full cleaning including bathroom, kitchen, and bedroom",
"task_category": "cleaning",
"task_priority": "high",
"task_expected_duration_in_minutes": 120,
"task_has_issues": false,
"task_due_at_automation": {
"delay_in_minutes": 60,
"event": "check_out",
"event_source_type": "Booking"
},
"checklist": [
"Clean bathroom",
"Clean kitchen",
"Change bedding",
"Take out trash"
],
"created_at": "2024-01-01T10:00:00Z",
"updated_at": "2024-01-01T10:00:00Z",
"canceled_at": null
}
],
"meta": {}
}
Get a single Template
Returns a single template identified by ID.
GET /task_management/templates/:template_id
- OAuth Scopes:
- task_management_read / task_management_write
response.json
{
"links": {
"templates.account": "https://www.bookingsync.com/api/v3/accounts/{templates.account}",
"templates.task_assignee": "https://www.bookingsync.com/api/v3/users/{templates.task_assignee}",
"templates.rentals": "https://www.bookingsync.com/api/v3/rentals/{templates.rentals}"
},
"templates": [
{
"links": {
"account": 1,
"task_assignee": 10,
"attachments": [],
"rentals": [
100,
101,
102
]
},
"id": "d4e5f6a7-b8c9-0123-defg-456789012345",
"name": "Checkout Cleaning",
"description": "Standard cleaning template for after guest checkout",
"status": "active",
"task_name": "Clean apartment after checkout",
"task_description": "Full cleaning including bathroom, kitchen, and bedroom",
"task_category": "cleaning",
"task_priority": "high",
"task_expected_duration_in_minutes": 120,
"task_has_issues": false,
"task_due_at_automation": {
"delay_in_minutes": 60,
"event": "check_out",
"event_source_type": "Booking"
},
"checklist": [
"Clean bathroom",
"Clean kitchen",
"Change bedding",
"Take out trash"
],
"created_at": "2024-01-01T10:00:00Z",
"updated_at": "2024-01-01T10:00:00Z",
"canceled_at": null
}
],
"meta": {}
}
Create a new Template
Creates a Template.
POST /task_management/templates
- OAuth Scopes:
- task_management_write
request.json
{
"templates": [
{
"name": "Checkout Cleaning",
"description": "Standard cleaning template for after guest checkout",
"status": "active",
"task_name": "Clean apartment after checkout",
"task_description": "Full cleaning including bathroom, kitchen, and bedroom",
"task_category": "cleaning",
"task_priority": "high",
"task_expected_duration_in_minutes": 120,
"task_has_issues": false,
"task_assignee_id": 10,
"rental_ids": [
100,
101,
102
],
"task_due_at_automation": {
"delay_in_minutes": 60,
"event": "check_out",
"event_source_type": "Booking"
},
"checklist": [
"Clean bathroom",
"Clean kitchen",
"Change bedding",
"Take out trash"
],
"apply_to_existing_bookings": false
}
]
}
response.json
{
"links": {
"templates.account": "https://www.bookingsync.com/api/v3/accounts/{templates.account}",
"templates.task_assignee": "https://www.bookingsync.com/api/v3/users/{templates.task_assignee}",
"templates.rentals": "https://www.bookingsync.com/api/v3/rentals/{templates.rentals}"
},
"templates": [
{
"links": {
"account": 1,
"task_assignee": 10,
"attachments": [],
"rentals": [
100,
101,
102
]
},
"id": "d4e5f6a7-b8c9-0123-defg-456789012345",
"name": "Checkout Cleaning",
"description": "Standard cleaning template for after guest checkout",
"status": "active",
"task_name": "Clean apartment after checkout",
"task_description": "Full cleaning including bathroom, kitchen, and bedroom",
"task_category": "cleaning",
"task_priority": "high",
"task_expected_duration_in_minutes": 120,
"task_has_issues": false,
"task_due_at_automation": {
"delay_in_minutes": 60,
"event": "check_out",
"event_source_type": "Booking"
},
"checklist": [
"Clean bathroom",
"Clean kitchen",
"Change bedding",
"Take out trash"
],
"created_at": "2024-01-01T10:00:00Z",
"updated_at": "2024-01-01T10:00:00Z",
"canceled_at": null
}
],
"meta": {}
}
Automation Required for Active/Inactive Templates
When creating a Template with status of "active" or "inactive", the task_due_at_automation object is required. Manual templates (status: "manual") do not require automation settings.
Update a Template
Updates a Template.
PUT /task_management/templates/:template_id
- OAuth Scopes:
- task_management_write
request.json
{
"templates": [
{
"name": "Updated Checkout Cleaning",
"task_priority": "medium",
"rental_ids": [
100,
101,
102,
103
],
"checklist": [
"Clean bathroom",
"Clean kitchen",
"Change bedding",
"Take out trash",
"Check supplies"
]
}
]
}
response.json
{
"links": {
"templates.account": "https://www.bookingsync.com/api/v3/accounts/{templates.account}",
"templates.task_assignee": "https://www.bookingsync.com/api/v3/users/{templates.task_assignee}",
"templates.rentals": "https://www.bookingsync.com/api/v3/rentals/{templates.rentals}"
},
"templates": [
{
"links": {
"account": 1,
"task_assignee": 10,
"attachments": [],
"rentals": [
100,
101,
102
]
},
"id": "d4e5f6a7-b8c9-0123-defg-456789012345",
"name": "Checkout Cleaning",
"description": "Standard cleaning template for after guest checkout",
"status": "active",
"task_name": "Clean apartment after checkout",
"task_description": "Full cleaning including bathroom, kitchen, and bedroom",
"task_category": "cleaning",
"task_priority": "high",
"task_expected_duration_in_minutes": 120,
"task_has_issues": false,
"task_due_at_automation": {
"delay_in_minutes": 60,
"event": "check_out",
"event_source_type": "Booking"
},
"checklist": [
"Clean bathroom",
"Clean kitchen",
"Change bedding",
"Take out trash"
],
"created_at": "2024-01-01T10:00:00Z",
"updated_at": "2024-01-01T10:00:00Z",
"canceled_at": null
}
],
"meta": {}
}
Delete a Template
Cancels a Template (soft delete).
DELETE /task_management/templates/:template_id
- OAuth Scopes:
- task_management_write
Returns an empty body with status 204 No Content.