HomeGuidesSamplesAPI
API

Schedules

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"
    }
}
KeyTypeDescription
idStringThe ID of the schedule item.
descriptionStringThe description of the schedule item.
must_completeStringWhom must complete a given schedule, either ONE assignee or ALL assignees.
can_late_submitBooleanCan the inspections be started after the due date.
recurrenceString (RRule)RRule formatted recurrence string.
start_timeObjectThe time the schedule item starts on each occurrence e.g. {"hour": 15, "minute": 15} for 3:15 PM.
durationStringISO8601 duration string, e.g. PT1H. How long inspection can be started after the start_date.
timezoneStringTimezone the schedule item will appear in.
from_dateString (ISO8601)The starting datetime of the schedule item.
to_dateString (ISO8601)The end datetime of the schedule item.
reminders[]ObjectThe reminders that will be sent to assignees.
modified_atString (ISO8601)The datetime when the schedule item was last modified.
created_atString (ISO8601)The datetime when the schedule item was created.
statusStringThe current status of the schedule item.
assignees[]ObjectThe assignees of this schedule item.
creatorObjectThe creator of this schedule item.
documentObjectThe document/inspection assigned to this schedule item.
location_idStringThe location assigned to this schedule item.
next_occurrenceObjectWhen 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"
}
KeyTypeDescription
descriptionStringThe description of a schedule item.
must_completeStringWhom must complete a given schedule, either ONE assignee or ALL assignees.
can_late_submitBooleanCan the inspections be started after the due date.
recurrenceString (RRule)RRule formatted recurrence string.
start_timeObjectThe time the schedule item starts on each occurrence e.g. {"hour": 15, "minute": 15} for 3:15 PM.
durationString (ISO8601)ISO8601 duration string, e.g. PT1H. How long inspection can be started after the start_date.
timezoneStringTimezone the schedule item will appear in.
from_dateString (ISO8601)The starting datetime of the schedule item.
to_dateString (ISO8601)The end datetime of the schedule item.
reminders[]ObjectThe reminders that will be sent to assignees.
assignees[]ObjectThe assignees of this schedule item.
documentObjectThe document/inspection assigned to this schedule item.
location_idStringThe 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"
}
KeyTypeDescription
idStringThe new UUID formatted ID of the entity.
typeStringType of entity either USER or ROLE (group/organization).
nameStringName 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"
}
KeyTypeDescription
idStringThe new UUID formatted ID of the document.
typeStringType of document TEMPLATE is the only accepted option.
nameStringName of the document.

Schedule Item Reminder

Contains information that relates to a schedule reminder.

{
  "event": "START",
  "duration": "P0D"
}
KeyTypeDescription
eventStringThe event that this reminder should be triggered on either START or DUE.
durationStringISO8601 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:

ValueDescription
ACTIVEDefault value - schedule item is still active.
PAUSEDSchedule has been paused e.g. manually paused/org frozen.
NO_TEMPLATEThe template used for this schedule item has been deleted/archived.
NO_ASSIGNEENo valid assignees exist for this schedule item anymore.
FINISHEDThe schedule item has hit its end date or count limit and is now complete.