The SafetyCulture API gives you access to create, update and delete schedule items.
Schedule item format
List schedule item format
This section describes the complete schedule item response format.
{
"id": "87894eeb-ee76-4551-b3ab-0c60c675d820",
"description": "Workplace Reopening Checklist - Every day",
"must_complete": "ONE",
"can_late_submit": true,
"recurrence": "INTERVAL=1;FREQ=DAILY;DTSTART=20210803T210000Z",
"start_time": {
"hour": 9,
"minute": 0
},
"duration": "PT8H",
"timezone": "Pacific/Auckland",
"from_date": "2021-08-02T21:00:00Z",
"to_date": null,
"reminders": [
{
"event": "START",
"duration": "P0D"
}
],
"modified_at": "2021-08-10T00:09:50.488Z",
"created_at": "2021-08-10T00:09:50.488Z",
"status": "ACTIVE",
"assignees": [
{
"id": "87894eeb-ee76-4551-b3ab-0c60c675d820",
"type": "ROLE",
"name": "Joe's Team"
}
],
"creator": {
"id": "83224e56-ad58-4e19-b633-fde5271ac8e4",
"type": "USER",
"name": "Joe Bloggs"
},
"document": {
"id": "dfa57152-4164-4534-90b4-4992f65630a0",
"type": "TEMPLATE",
"name": "Workplace Reopening Checklist"
},
"location_id": null,
"next_occurrence": {
"start": "2021-08-09T21:00:00Z",
"due": "2021-08-10T05:00:00Z"
}
}
Key | Type | Description |
---|---|---|
id | String | The ID of the schedule item. |
description | String | The description of the schedule item. |
must_complete | String | Whom must complete a given schedule, either ONE assignee or ALL assignees. |
can_late_submit | Boolean | Can the inspections be started after the due date. |
recurrence | String (RRule) | RRule formatted recurrence string. |
start_time | Object | The time the schedule item starts on each occurrence e.g. {"hour": 15, "minute": 15} for 3:15 PM. |
duration | String | ISO8601 duration string, e.g. PT1H. How long inspection can be started after the start_date . |
timezone | String | Timezone the schedule item will appear in. |
from_date | String (ISO8601) | The starting datetime of the schedule item. |
to_date | String (ISO8601) | The end datetime of the schedule item. |
reminders | []Object | The reminders that will be sent to assignees. |
modified_at | String (ISO8601) | The datetime when the schedule item was last modified. |
created_at | String (ISO8601) | The datetime when the schedule item was created. |
status | String | The current status of the schedule item. |
assignees | []Object | The assignees of this schedule item. |
creator | Object | The creator of this schedule item. |
document | Object | The document/inspection assigned to this schedule item. |
location_id | String | The location assigned to this schedule item. |
next_occurrence | Object | When this schedule item will next occur. |
Update Schedule Item Format
This section describes the complete create/update schedule item format
{
"id": "87894eeb-ee76-4551-b3ab-0c60c675d820",
"description": "Workplace Reopening Checklist - Every day",
"must_complete": "ONE",
"can_late_submit": true,
"recurrence": "INTERVAL=1;FREQ=DAILY;DTSTART=20210803T210000Z",
"start_time": {
"hour": 9,
"minute": 0
},
"duration": "PT8H",
"timezone": "Pacific/Auckland",
"from_date": "2021-08-02T21:00:00Z",
"to_date": "2022-08-02T21:00:00Z",
"reminders": [
{
"event": "START",
"duration": "P0D"
}
],
"assignees": [
{
"id": "87894eeb-ee76-4551-b3ab-0c60c675d820",
"type": "ROLE"
}
],
"document": {
"id": "dfa57152-4164-4534-90b4-4992f65630a0",
"type": "TEMPLATE"
},
"location_id": "dfa57152-4164-4534-90b4-4992f65630a0"
}
Key | Type | Description |
---|---|---|
description | String | The description of a schedule item. |
must_complete | String | Whom must complete a given schedule, either ONE assignee or ALL assignees. |
can_late_submit | Boolean | Can the inspections be started after the due date. |
recurrence | String (RRule) | RRule formatted recurrence string. |
start_time | Object | The time the schedule item starts on each occurrence e.g. {"hour": 15, "minute": 15} for 3:15 PM. |
duration | String (ISO8601) | ISO8601 duration string, e.g. PT1H. How long inspection can be started after the start_date . |
timezone | String | Timezone the schedule item will appear in. |
from_date | String (ISO8601) | The starting datetime of the schedule item. |
to_date | String (ISO8601) | The end datetime of the schedule item. |
reminders | []Object | The reminders that will be sent to assignees. |
assignees | []Object | The assignees of this schedule item. |
document | Object | The document/inspection assigned to this schedule item. |
location_id | String | The new UUID formatted ID of the location assigned to this schedule item. |
Schedule Item Entity
Contains information that relates to a user, group or organization.
{
"id": "31d302e2-6f49-435f-944e-be8276f284b6",
"type": "USER",
"name": "Joe Bloggs"
}
Key | Type | Description |
---|---|---|
id | String | The new UUID formatted ID of the entity. |
type | String | Type of entity either USER or ROLE (group/organization). |
name | String | Name of the entity. |
Schedule Item Document
Contains information that relates to the document a schedule is assigned to.
{
"id": "31d302e2-6f49-435f-944e-be8276f284b6",
"type": "TEMPLATE",
"name": "Joe's Daily Site walk through"
}
Key | Type | Description |
---|---|---|
id | String | The new UUID formatted ID of the document. |
type | String | Type of document TEMPLATE is the only accepted option. |
name | String | Name of the document. |
Schedule Item Reminder
Contains information that relates to a schedule reminder.
{
"event": "START",
"duration": "P0D"
}
Key | Type | Description |
---|---|---|
event | String | The event that this reminder should be triggered on either START or DUE . |
duration | String | ISO8601 duration string, e.g. PT1H. How long before the event to remind the assignees. |
Schedule Item Statuses
The current status of a schedule item, the current values are:
Value | Description |
---|---|
ACTIVE | Default value - schedule item is still active. |
PAUSED | Schedule has been paused e.g. manually paused/org frozen. |
NO_TEMPLATE | The template used for this schedule item has been deleted/archived. |
NO_ASSIGNEE | No valid assignees exist for this schedule item anymore. |
FINISHED | The schedule item has hit its end date or count limit and is now complete. |