Assemble Developer Portal

Rota (3.0)

Download OpenAPI specification:Download

Assemble’s rotas feature enables managers and volunteers to self-manage their rotas and shifts online. All the information that your organisation needs to manage their team's volunteering is provided, whilst volunteer hours are automatically calculated.

This documentation describes how to retrieve and update rota and shift information for your organisation.

What are rotas?

Rotas are for a regular, scheduled pattern of time when you need volunteers in an organised shift system. They are not used for one-off events like a street collection, cheer-point or fundraising event. Please see events, events with recruitment and one-off opportunities for these situations.

A rota is made up of timeslots. Volunteers and managers can add shifts of any length within a timeslot but cannot go beyond the timeslot start or end times.

Terminology

Term Definition
Rota Multiple regular timeslots on a repeating weekly schedule
Rota Pattern/Shift Pattern Multiple regular timeslots that can be applied to one or more teams to create rotas
Timeslot A period of time during a day when volunteers are required
Min/Ideal/Max The number of volunteers specified for a timeslot.
Shift Period of time within a rota when a user volunteers
Repeating Shift A period of time when a user is booked to volunteer at a regular time each week, fortnight etc.

Rota

Rota period

Retrieve rota information for a date period.

This endpoint can be used to retrieve an aggregated or detailed view of rotas for a date period.

The default list (basic) returns an aggregated view of rotas, this includes the overall status for each requested day allowing you to determine if a specific day is below the minimum number of shifts required for the requested rotas.

The detailed list returns each rota and its status for each requested day. This includes the shift patterns, timeslots and shifts for all days in the date period. This list will allow you to see the exact status of each rota so that you can determine where you require additional shifts and where you have hit the min/ideal/max number of shifts for a given rota.

This endpoint is limited to 25 rotas per request. Requesting more than 25 rotas will result in a truncated response. It is recommended that you utilise the available filters in the query parameters to narrow down the response to the rotas that you require. If you require additional information on a specific day, please use the rota day endpoint.

Authorizations:
JWT
query Parameters
start_date
string <date>
Example: start_date=2023-01-01

The start date of a time period of which to include active rotas (default: start of current month)

end_date
string <date>
Example: end_date=2023-01-11

The end date of a time period of which to include active rotas (default: end of current month)

list
string
Default: "basic"
Enum: "basic" "detailed"

Determine the type of information to include in the response. Basic will only include the status for each day in the period. Detailed will include rota and additional shift information.

user_flags
boolean
Default: false
Example: user_flags=true

Include user flags in the response

teams
string
Example: teams=1324,532,65464

A comma separated string of team ids to limit results to rotas that are associated with particular teams

rotas
string
Example: rotas=6546,6453,1253

A comma separated string of rota ids to limit results to rotas match any of the ids

Responses

Response Schema: application/json
One of
start_date
string <date>

The start date of a time period included in the results

end_date
string <date>

The end date of a time period included in the results

data_ready
boolean

If this is false, the rota is still generating and may not include all available rota information. If this occurs, please try repeating the request later.

truncated
boolean

If the maximum number of rotas have been reached, this will return 'true' and the results will be limited. If this occurs, please repeat the request with a smaller subset of rota or team ids

max_rotas
number
Default: 25

The maximum number of rotas that will be returned by the API

object (Rota permissions)
Array of objects

Array of objects containing information for each day in the period

Response samples

Content type
application/json
Example
{
  • "start_date": "2023-01-01",
  • "end_date": "2023-01-07",
  • "data_ready": true,
  • "truncated": false,
  • "max_rotas": 25,
  • "permissions": {
    • "can_view_rota": true,
    • "can_add_shifts_to_self": true,
    • "can_add_shifts_to_others": true,
    • "can_edit_other_shifts": true,
    • "can_cancel_other_shifts": true,
    • "can_override_rota": true,
    • "allowed_roles": [
      • 7676,
      • 4343,
      • 5353,
      • 6464
      ]
    },
  • "dates": [
    • {
      • "date": "2023-01-01",
      • "below_minimum": true,
      • "status": -2,
      • "closed": false,
      • "own_shift": false,
      • "hours": [
        • {
          • "start_time": "2023-01-01 09:00:00",
          • "end_time": "2023-01-01 17:30:00",
          • "required": 3,
          • "shift_count": 1,
          • "status": -2,
          • "status_text": "below-minimum",
          • "min": 1,
          • "ideal": 3,
          • "max": 5
          }
        ],
      • "shift_patterns": [
        • {
          • "id": 123,
          • "weekday_start": "monday",
          • "start_time": "09:00:00",
          • "weekday_end": "monday",
          • "end_time": "17:30:00",
          • "min": 1,
          • "ideal": 3,
          • "max": 5
          }
        ]
      }
    ]
}

Rota day

Retrieve rota information for a specific day.

This endpoint can be used to retrieve detailed rota information for a specific day, this includes the shift patterns, timeslots and all shifts that are occurring on this date.

This endpoint is limited to 25 rotas per request. Requesting more than 25 rotas will result in a truncated response. It is recommended that you utilise the available filters in the query parameters to narrow down the response to the rotas that you require.

Authorizations:
JWT
path Parameters
date
required
string <date>
Example: 2023-01-01

Date of the year

query Parameters
user_flags
boolean
Default: false
Example: user_flags=true

Include user flags in the response

teams
string
Example: teams=1324,532,65464

A comma separated string of team ids to limit results to rotas that are associated with particular teams

rotas
string
Example: rotas=6546,6453,1253

A comma separated string of rota ids to limit results to rotas match any of the ids

Responses

Response Schema: application/json
start_time
string

Earliest timeslot on this day

end_time
string

Latest timeslot on this day

truncated
boolean

If the maximum number of rotas have been reached, this will return 'true' and the results will be limited. If this occurs, please repeat the request with a smaller subset of rota or team ids

max_rotas
number
Default: 25

The maximum number of rotas that will be returned by the API

Array of objects

Array of rotas

Response samples

Content type
application/json
{
  • "start_time": "09:00 UTC",
  • "end_time": "17:30 UTC",
  • "truncated": false,
  • "max_rotas": 25,
  • "rotas": [
    • {
      • "id": 3432,
      • "name": "Wimbledon Shop",
      • "team": {
        • "id": "3521",
        • "parent_id": 1424,
        • "name": "Headquarters",
        • "description": "string",
        • "geo_location": "string",
        • "catchment_area_id": "string",
        • "icon": "fa fa-building",
        • "show_on_public_site": false,
        • "ceiling_enabled": false,
        • "public_url": "http://example.com",
        • "hidden": false,
        • "disabled": false
        },
      • "require_full_timeslot": false,
      • "closed": false,
      • "below_minimum": true,
      • "own_shift": true,
      • "own_shifts": [
        • {
          • "id": 987,
          • "user": {
            • "id": 46485,
            • "display_name": "John Smith",
            • "title": "Mr",
            • "profile_photo_url": "http://example.com",
            • "can_manage": true,
            • "role_name": "Volunteer",
            • "team_name": "Kent",
            • "status": {
              • "id": "1",
              • "name": "Active",
              • "contactable": true
              }
            },
          • "date": "2023-01-01",
          • "overnight_shift": false,
          • "start_time": "2023-01-01 09:00",
          • "end_time": "2023-01-01 17:30",
          • "timezone": "Europe/London",
          • "repeating_shift": {
            • "id": 567,
            • "user_id": 5353,
            • "hierarchy_id": 543543,
            • "rota_id": 232,
            • "period": "week",
            • "frequency": 4,
            • "start_date": "2023-01-01 00:00:00",
            • "end_date": null,
            • "mon": 1,
            • "tue": 1,
            • "wed": 1,
            • "thu": 1,
            • "fri": 1,
            • "sat": 0,
            • "sun": 0
            }
          }
        ],
      • "total_users": 1,
      • "shift_patterns": [
        • {
          • "id": 123,
          • "weekday_start": "monday",
          • "start_time": "09:00:00",
          • "weekday_end": "monday",
          • "end_time": "17:30:00",
          • "min": 1,
          • "ideal": 3,
          • "max": 5,
          • "pattern_status": "below-minimum"
          }
        ],
      • "hours": [
        • {
          • "start_time": "2023-01-01 09:00:00",
          • "end_time": "2023-01-01 17:30:00",
          • "required": 3,
          • "shift_count": 1,
          • "status": -2,
          • "status_text": "below-minimum",
          • "min": 1,
          • "ideal": 3,
          • "max": 5
          }
        ],
      • "shifts": [
        • {
          • "id": 987,
          • "user": {
            • "id": 46485,
            • "display_name": "John Smith",
            • "title": "Mr",
            • "profile_photo_url": "http://example.com",
            • "can_manage": true,
            • "role_name": "Volunteer",
            • "team_name": "Kent",
            • "status": {
              • "id": "1",
              • "name": "Active",
              • "contactable": true
              }
            },
          • "date": "2023-01-01",
          • "overnight_shift": false,
          • "start_time": "2023-01-01 09:00",
          • "end_time": "2023-01-01 17:30",
          • "timezone": "Europe/London",
          • "repeating_shift": {
            • "id": 567,
            • "user_id": 5353,
            • "hierarchy_id": 543543,
            • "rota_id": 232,
            • "period": "week",
            • "frequency": 4,
            • "start_date": "2023-01-01 00:00:00",
            • "end_date": null,
            • "mon": 1,
            • "tue": 1,
            • "wed": 1,
            • "thu": 1,
            • "fri": 1,
            • "sat": 0,
            • "sun": 0
            },
          • "permissions": {
            • "can_edit_shift": true,
            • "can_cancel_shift": true,
            • "can_edit_repeating_shift": true
            }
          }
        ],
      • "colour": "#139597",
      • "self_manage": false,
      • "permissions": {
        • "can_view_rota": true,
        • "can_add_shifts_to_self": true,
        • "can_add_shifts_to_others": true,
        • "can_edit_other_shifts": true,
        • "can_cancel_other_shifts": true,
        • "can_override_rota": true,
        • "allowed_roles": [
          • 7676,
          • 4343,
          • 5353,
          • 6464
          ]
        }
      }
    ]
}

Rotas by team

Retrieve rotas by their associated team.

This endpoint returns a list of teams and any active rotas associated with the team. This does not include the status of each rota, this can be retrieved using the rota period or rota day endpoints.

The active_on and active_between query parameters can be used to only include rotas that are active within the given period.

Authorizations:
JWT
query Parameters
active_on
string <date>
Example: active_on=2023-01-01

Only include teams that have an active rota on this date

active_between
string
Example: active_between=2023-01-01,2023-01-07

Only include teams that have an active rota within a date period (format: YYYY-MM-DD,YYYY-MM-DD)

Responses

Response Schema: application/json
Array of objects (Rota team)

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "id": 442,
      • "name": "Headquarters",
      • "icon": "fa fa-building",
      • "rotas": [
        • {
          • "id": 245,
          • "name": "Wimbledon Shop",
          • "start": "2023-01-01",
          • "end": null,
          • "colour": "#139597"
          }
        ]
      }
    ]
}

Shifts

List all shifts

Returns a paginated list of shifts.

Authorizations:
JWT
query Parameters
teams
string
Example: teams=1324,532,65464

A comma separated string of team ids to limit results to rotas that are associated with particular teams

Responses

Response Schema: application/json
Array of objects
object

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "id": 987,
      • "user": {
        • "id": 46485,
        • "display_name": "John Smith",
        • "title": "Mr",
        • "profile_photo_url": "http://example.com",
        • "can_manage": true,
        • "role_name": "Volunteer",
        • "team_name": "Kent",
        • "status": {
          • "id": "1",
          • "name": "Active",
          • "contactable": true
          }
        },
      • "date": "2023-01-01",
      • "start_time": "09:00",
      • "start_datetime": "2023-01-01 09:00",
      • "end_time": "17:30",
      • "end_datetime": "2023-01-01 17:30",
      • "team": {
        • "id": "3521",
        • "parent_id": 1424,
        • "name": "Headquarters",
        • "description": "string",
        • "geo_location": "string",
        • "catchment_area_id": "string",
        • "icon": "fa fa-building",
        • "show_on_public_site": false,
        • "ceiling_enabled": false,
        • "public_url": "http://example.com",
        • "hidden": false,
        • "disabled": false
        },
      • "recurrence_pattern": {
        • "id": 567,
        • "recurrence_period": "week",
        • "recurrence_frequency": 4,
        • "end_date": null,
        • "mon": 1,
        • "tue": 1,
        • "wed": 1,
        • "thu": 1,
        • "fri": 1,
        • "sat": 0,
        • "sun": 0
        }
      }
    ],
  • "meta": {
    • "pagination": {
      • "total": "string",
      • "count": "string",
      • "per_page": "string",
      • "current_page": "string",
      • "total_pages": "string",
      • "links": {
        • "next": "string",
        • "previous": "string"
        }
      }
    }
}

Create a shift

Create a new shift.

When a shift is created with a recurrence_pattern, Assemble will automatically create the repeating shifts for the first six months based on the provided pattern. If the repeating shift does not have an end date, Assemble will automatically create shifts each week until the repeating shift is ended.

If you attempt to add a shift to a user that is on-hold, you must provide the ignore_on_hold flag within the request body to override the on-hold validation.

If you attempt to add a shift to a role restricted rota and the user does not have the correct role, you must provide the confirm_role_restriction flag within the request body to override the role restriction validation.

Multiple shifts can be added within one request by providing a shifts array (please see example requests).

Authorizations:
JWT
Request Body schema: application/json
start_datetime
required
string <date-time>

Start date and time of the shift

end_datetime
required
string <date-time>

End date and time of the shift

object or null

Repeating shift

required
object

User

required
object

Rota

ignore_on_hold
boolean
Default: false

Determine if the on hold validation should be ignored

confirm_role_restriction
boolean
Default: false

Determine if the role restriction validation should be ignored

Responses

Response Schema: application/json
object

Request samples

Content type
application/json
Example
{
  • "rota": {
    • "id": 245
    },
  • "user": {
    • "id": 342
    },
  • "start_datetime": "2023-01-01 09:00",
  • "end_datetime": "2023-01-01 17:30"
}

Response samples

Content type
application/json
{
  • "data": {
    • "id": 987,
    • "user": {
      • "id": 46485,
      • "display_name": "John Smith",
      • "title": "Mr",
      • "profile_photo_url": "http://example.com",
      • "can_manage": true,
      • "role_name": "Volunteer",
      • "team_name": "Kent",
      • "status": {
        • "id": "1",
        • "name": "Active",
        • "contactable": true
        }
      },
    • "date": "2023-01-01",
    • "start_time": "09:00",
    • "start_datetime": "2023-01-01 09:00",
    • "end_time": "17:30",
    • "end_datetime": "2023-01-01 17:30",
    • "team": {
      • "id": "3521",
      • "parent_id": 1424,
      • "name": "Headquarters",
      • "description": "string",
      • "geo_location": "string",
      • "catchment_area_id": "string",
      • "icon": "fa fa-building",
      • "show_on_public_site": false,
      • "ceiling_enabled": false,
      • "public_url": "http://example.com",
      • "hidden": false,
      • "disabled": false
      },
    • "recurrence_pattern": {
      • "id": 567,
      • "recurrence_period": "week",
      • "recurrence_frequency": 4,
      • "end_date": null,
      • "mon": 1,
      • "tue": 1,
      • "wed": 1,
      • "thu": 1,
      • "fri": 1,
      • "sat": 0,
      • "sun": 0
      }
    }
}

Retrieve a shift

Retrieves the details of an existing shift.

Authorizations:
JWT
path Parameters
id
required
integer
Example: 65498

Shift ID

Responses

Response Schema: application/json
object

Response samples

Content type
application/json
{
  • "data": {
    • "id": 987,
    • "user": {
      • "id": 46485,
      • "display_name": "John Smith",
      • "title": "Mr",
      • "profile_photo_url": "http://example.com",
      • "can_manage": true,
      • "role_name": "Volunteer",
      • "team_name": "Kent",
      • "status": {
        • "id": "1",
        • "name": "Active",
        • "contactable": true
        }
      },
    • "date": "2023-01-01",
    • "start_time": "09:00",
    • "start_datetime": "2023-01-01 09:00",
    • "end_time": "17:30",
    • "end_datetime": "2023-01-01 17:30",
    • "team": {
      • "id": "3521",
      • "parent_id": 1424,
      • "name": "Headquarters",
      • "description": "string",
      • "geo_location": "string",
      • "catchment_area_id": "string",
      • "icon": "fa fa-building",
      • "show_on_public_site": false,
      • "ceiling_enabled": false,
      • "public_url": "http://example.com",
      • "hidden": false,
      • "disabled": false
      },
    • "recurrence_pattern": {
      • "id": 567,
      • "recurrence_period": "week",
      • "recurrence_frequency": 4,
      • "end_date": null,
      • "mon": 1,
      • "tue": 1,
      • "wed": 1,
      • "thu": 1,
      • "fri": 1,
      • "sat": 0,
      • "sun": 0
      }
    }
}

Update a shift

Update an existing shift.

edit_mode must be provided as single or recurring.

When edit_mode is single, only the shift specified will be updated. If the shift belongs to a repeating shift series, it will be disassociated from the repeating shift.

When edit_mode is recurring, every future shift in the repeating shift series will be updated with the new information. To prevent updating every shift in the repeating shift series, use the single edit mode.

Authorizations:
JWT
path Parameters
id
required
integer
Example: 65498

Shift ID

Request Body schema: application/json
start_datetime
required
string <date-time>

Start date and time of the shift

end_datetime
required
string <date-time>

End date and time of the shift

object or null

Repeating shift

edit_mode
required
string
Enum: "single" "recurring"

Determine the edit mode (single shift or the repeating series)

Responses

Response Schema: application/json
object

Request samples

Content type
application/json
[
  • {
    • "start_datetime": "2023-01-01 09:00",
    • "end_datetime": "2023-01-01 17:30",
    • "edit_mode": "single"
    }
]

Response samples

Content type
application/json
{
  • "data": {
    • "id": 987,
    • "user": {
      • "id": 46485,
      • "display_name": "John Smith",
      • "title": "Mr",
      • "profile_photo_url": "http://example.com",
      • "can_manage": true,
      • "role_name": "Volunteer",
      • "team_name": "Kent",
      • "status": {
        • "id": "1",
        • "name": "Active",
        • "contactable": true
        }
      },
    • "date": "2023-01-01",
    • "start_time": "09:00",
    • "start_datetime": "2023-01-01 09:00",
    • "end_time": "17:30",
    • "end_datetime": "2023-01-01 17:30",
    • "team": {
      • "id": "3521",
      • "parent_id": 1424,
      • "name": "Headquarters",
      • "description": "string",
      • "geo_location": "string",
      • "catchment_area_id": "string",
      • "icon": "fa fa-building",
      • "show_on_public_site": false,
      • "ceiling_enabled": false,
      • "public_url": "http://example.com",
      • "hidden": false,
      • "disabled": false
      },
    • "recurrence_pattern": {
      • "id": 567,
      • "recurrence_period": "week",
      • "recurrence_frequency": 4,
      • "end_date": null,
      • "mon": 1,
      • "tue": 1,
      • "wed": 1,
      • "thu": 1,
      • "fri": 1,
      • "sat": 0,
      • "sun": 0
      }
    }
}

Cancel a shift

Cancel an existing shift.

If the shift is within a repeating shift series, you must cancel the repeating shift if you are cancelling all future shifts within the series.

Authorizations:
JWT
path Parameters
id
required
integer
Example: 65498

Shift ID

Responses

Response Schema: application/json
object (204)

No content

Response samples

Content type
application/json
{ }

Cancel a repeating shift

Cancel an existing repeating shift series.

This will also cancel all future shifts that are associated with the repeating shift.

To cancel an individual shift, please see the cancel shift endpoint.

Authorizations:
JWT
path Parameters
id
required
integer
Example: 2374

Repeating Shift ID

Responses

Response Schema: application/json
object (204)

No content

Response samples

Content type
application/json
{ }

Manage Rota

Update rota details

Update an existing rota details and settings.

Using this endpoint, you can update a rotas:

  • Name
  • Colour
  • Restricted role profiles
  • Self manage setting
    • This functionality is feature restricted

To update a rotas timeslots, please see the update timeslots endpoint.

If you need to end a rota by updating the rotas end_date, please use the bulk actions endpoint.

Authorizations:
JWT
path Parameters
id
required
integer
Example: 2324

Rota ID

Request Body schema: application/json
name
string or null

Rota name

colour
string or null

Rota colour

self_manage
boolean or null

Determine if this rota allows users to self manage their own shifts

Array of objects or null

Role profiles that this rota is restricted to

Responses

Response Schema: application/json
id
integer

Rota ID

name
string or null
start
string <date>

Rota start date

end
string or null <date>

Rota end date

colour
string or null

Rota colour

Request samples

Content type
application/json
{
  • "name": "Wimbledon Shop",
  • "colour": "#139597",
  • "self_manage": true,
  • "role_profiles": [
    • {
      • "id": 1242
      }
    ]
}

Response samples

Content type
application/json
{
  • "id": 245,
  • "name": "Wimbledon Shop",
  • "start": "2023-01-01",
  • "end": null,
  • "colour": "#139597"
}

Update timeslots

Update a rotas timeslots for a single day, date period or all future dates.

This endpoint accepts a from and to date in addition to an weekdays object that contains the timeslots for each weekday within the period. If a weekday is omitted or does not contain any timeslots, the rota will be closed for that day of the week.

If a to date is not provided, all future timeslots will overridden to use the new timeslot pattern provided.

Updating timeslots may automatically cancel or update shifts if they fall outside of the new timeslot pattern.

If you need to mass close rotas for one or more dates, please see the bulk actions endpoint.

Authorizations:
JWT
path Parameters
id
required
integer
Example: 2324

Rota ID

Request Body schema: application/json
from
required
string <date>

Start date for the new timeslot(s)

to
string or null <date>

End date for the new timeslot(s)

required
object

Days of week

Responses

Response Schema: application/json
object (204)

No content

Request samples

Content type
application/json
Example
{
  • "from": "2023-01-02",
  • "to": "2023-01-08",
  • "weekdays": {
    • "monday": [
      • {
        • "start_time": "09:00",
        • "end_time": "12:00",
        • "min": 1,
        • "ideal": 3,
        • "max": 5
        },
      • {
        • "start_time": "13:00",
        • "end_time": "15:00",
        • "min": 1,
        • "ideal": 3,
        • "max": 5
        }
      ],
    • "tuesday": [
      • {
        • "start_time": "09:00",
        • "end_time": "17:30",
        • "min": 1,
        • "ideal": 3,
        • "max": 5
        }
      ],
    • "wednesday": [
      • {
        • "start_time": "09:00",
        • "end_time": "17:30",
        • "min": 1,
        • "ideal": 3,
        • "max": 5
        }
      ],
    • "thursday": [
      • {
        • "start_time": "09:00",
        • "end_time": "17:30",
        • "min": 1,
        • "ideal": 3,
        • "max": 5
        }
      ],
    • "friday": [
      • {
        • "start_time": "09:00",
        • "end_time": "17:30",
        • "min": 1,
        • "ideal": 3,
        • "max": 5
        }
      ],
    • "saturday": [
      • {
        • "start_time": "09:00",
        • "end_time": "17:30",
        • "min": 1,
        • "ideal": 3,
        • "max": 5
        }
      ],
    • "sunday": [
      • {
        • "start_time": "09:00",
        • "end_time": "17:30",
        • "min": 1,
        • "ideal": 3,
        • "max": 5
        }
      ]
    }
}

Response samples

Content type
application/json
{ }

List all rotas

Returns a list of all rotas.

This endpoint only includes the rota settings and does not include the status or shift information.

To retrieve status and shift information, please see the rotas and shifts endpoints.

By default, archived rotas are not included in the response.

Authorizations:
JWT
query Parameters
include
string
Enum: "team" "permissions"
Example: include=team,permissions

Available rota admin resource includes (comma separated list)

archived
boolean
Default: false
Example: archived=false

Include archived rotas

teams
string
Example: teams=1324,532,65464

A comma separated string of team ids to limit results to rotas that are associated with particular teams

s
string
Default: "team_name"
Enum: "rota_title" "start_date" "end_date" "team_name"
Example: s=rota_title

Sort the results

o
string
Default: "desc"
Enum: "asc" "desc"
Example: o=desc

Order the results

Responses

Response Schema: application/json
Array of objects (Rota)

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "id": 245,
      • "name": "Wimbledon Shop",
      • "start": "2023-01-01",
      • "end": null,
      • "team_id": 534,
      • "team_name": "Headquarters",
      • "archived": false,
      • "colour": "#139597",
      • "team": {
        • "id": "3521",
        • "parent_id": 1424,
        • "name": "Headquarters",
        • "description": "string",
        • "geo_location": "string",
        • "catchment_area_id": "string",
        • "icon": "fa fa-building",
        • "show_on_public_site": false,
        • "ceiling_enabled": false,
        • "public_url": "http://example.com",
        • "hidden": false,
        • "disabled": false
        },
      • "permissions": {
        • "can_view_rota": true,
        • "can_add_shifts_to_self": true,
        • "can_add_shifts_to_others": true,
        • "can_edit_other_shifts": true,
        • "can_cancel_other_shifts": true,
        • "can_override_rota": true,
        • "allowed_roles": [
          • 7676,
          • 4343,
          • 5353,
          • 6464
          ]
        }
      }
    ]
}

Create rota

Create a new rota

Authorizations:
JWT
Request Body schema: application/json
name
required
string

Rota name

start_date
required
string <date>

Rota start date

end_date
string or null <date>

Rota end date

pattern_id
required
integer

Shift Pattern ID

required
Array of objects

Team IDs to add the rota to

self_manage
boolean or null
Default: false

Determine if this rota allows users to self manage their own shifts

restricted_by_role
boolean
Default: false

Determine if this rota should be restricted by role profile

role_profiles
Array of arrays or null or null

Array of Role Profile IDs that this rota is restricted to

Responses

Response Schema: application/json
Array of objects (Rota)

Request samples

Content type
application/json
{
  • "name": "Wimbledon Shop",
  • "start_date": "2023-01-01",
  • "end_date": null,
  • "pattern_id": 1324,
  • "team": [
    • {
      • "id": 1242
      }
    ],
  • "self_manage": true,
  • "restricted_by_role": true,
  • "role_profiles": [
    • 3425,
    • 6544,
    • 6565,
    • 3422
    ]
}

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "id": 245,
      • "name": "Wimbledon Shop",
      • "start": "2023-01-01",
      • "end": null,
      • "team_id": 534,
      • "team_name": "Headquarters",
      • "archived": false,
      • "colour": "#139597",
      • "team": {
        • "id": "3521",
        • "parent_id": 1424,
        • "name": "Headquarters",
        • "description": "string",
        • "geo_location": "string",
        • "catchment_area_id": "string",
        • "icon": "fa fa-building",
        • "show_on_public_site": false,
        • "ceiling_enabled": false,
        • "public_url": "http://example.com",
        • "hidden": false,
        • "disabled": false
        },
      • "permissions": {
        • "can_view_rota": true,
        • "can_add_shifts_to_self": true,
        • "can_add_shifts_to_others": true,
        • "can_edit_other_shifts": true,
        • "can_cancel_other_shifts": true,
        • "can_override_rota": true,
        • "allowed_roles": [
          • 7676,
          • 4343,
          • 5353,
          • 6464
          ]
        }
      }
    ]
}

Manage Shift Patterns

List all shift patterns

Returns a paginated list of all shift patterns

By default, archived patterns are not included in the response.

Authorizations:
JWT
query Parameters
include
string
Enum: "pattern" "category" "teams" "rotas"
Example: include=pattern,category

Available shift pattern includes (comma separated list)

q
string
Example: q=Shop

Search shift patterns by name

archived
boolean
Default: false
Example: archived=false

Include archived shift patterns

teams
string
Example: teams=1324,532,65464

A comma separated string of team ids to limit results to shift patterns that are associated with particular teams

s
string
Default: "created_at"
Enum: "name" "teams"
Example: s=name

Sort the results

o
string
Default: "desc"
Enum: "asc" "desc"
Example: o=desc

Order the results

Responses

Response Schema: application/json
Array of objects (Shift Pattern)
object

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "id": 765,
      • "name": "Shop working hours",
      • "min": 1,
      • "ideal": 3,
      • "max": 5,
      • "pattern": [
        • {
          • "id": 123,
          • "weekday_start": "monday",
          • "start_time": "09:00:00",
          • "weekday_end": "monday",
          • "end_time": "17:30:00",
          • "min": 1,
          • "ideal": 3,
          • "max": 5
          }
        ],
      • "category": { },
      • "teams": [ ],
      • "rotas": [ ],
      • "created_at": "2023-01-01 09:00:00",
      • "updated_at": "2023-01-01 09:00:00",
      • "deleted_at": null
      }
    ],
  • "meta": {
    • "pagination": {
      • "total": "string",
      • "count": "string",
      • "per_page": "string",
      • "current_page": "string",
      • "total_pages": "string",
      • "links": {
        • "next": "string",
        • "previous": "string"
        }
      }
    }
}

Create shift pattern

Create a new shift pattern

Authorizations:
JWT
Request Body schema: application/json
name
required
string

Rota name

min
integer

The minimum amount of users for this timeslot

ideal
integer

The ideal amount of users for this timeslot

max
integer

The maximum amount of users for this timeslot

object

Activity Category

Array of objects (Shift pattern timeslot)

Pattern timeslots

Responses

Response Schema: application/json
object (Shift Pattern)

Request samples

Content type
application/json
{
  • "name": "Wimbledon Shop",
  • "min": 1,
  • "ideal": 3,
  • "max": 5,
  • "category": {
    • "id": 435
    },
  • "pattern": [
    • {
      • "weekday_start": "monday",
      • "start_time": "11:00",
      • "weekday_end": "monday",
      • "end_time": "13:00",
      • "min": 1,
      • "ideal": 2,
      • "max": 3
      },
    • {
      • "weekday_start": "tuesday",
      • "start_time": "11:00",
      • "weekday_end": "tuesday",
      • "end_time": "13:00",
      • "min": 1,
      • "ideal": 2,
      • "max": 3
      },
    • {
      • "weekday_start": "wednesday",
      • "start_time": "11:00",
      • "weekday_end": "wednesday",
      • "end_time": "13:00",
      • "min": 1,
      • "ideal": 2,
      • "max": 3
      },
    • {
      • "weekday_start": "thursday",
      • "start_time": "11:00",
      • "weekday_end": "thursday",
      • "end_time": "13:00",
      • "min": 1,
      • "ideal": 2,
      • "max": 3
      },
    • {
      • "weekday_start": "friday",
      • "start_time": "11:00",
      • "weekday_end": "friday",
      • "end_time": "13:00",
      • "min": 1,
      • "ideal": 2,
      • "max": 3
      }
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    • "id": 765,
    • "name": "Shop working hours",
    • "min": 1,
    • "ideal": 3,
    • "max": 5,
    • "pattern": [
      • {
        • "id": 123,
        • "weekday_start": "monday",
        • "start_time": "09:00:00",
        • "weekday_end": "monday",
        • "end_time": "17:30:00",
        • "min": 1,
        • "ideal": 3,
        • "max": 5
        }
      ],
    • "category": { },
    • "teams": [ ],
    • "rotas": [ ],
    • "created_at": "2023-01-01 09:00:00",
    • "updated_at": "2023-01-01 09:00:00",
    • "deleted_at": null
    }
}

Retrieve a shift pattern

Retrieves the details of an existing shift pattern.

Authorizations:
JWT
path Parameters
id
required
integer
Example: 2324

Shift Pattern ID

query Parameters
include
string
Enum: "pattern" "category" "teams" "rotas"
Example: include=pattern,category

Available shift pattern includes (comma separated list)

Responses

Response Schema: application/json
object (Shift Pattern)

Response samples

Content type
application/json
{
  • "data": {
    • "id": 765,
    • "name": "Shop working hours",
    • "min": 1,
    • "ideal": 3,
    • "max": 5,
    • "pattern": [
      • {
        • "id": 123,
        • "weekday_start": "monday",
        • "start_time": "09:00:00",
        • "weekday_end": "monday",
        • "end_time": "17:30:00",
        • "min": 1,
        • "ideal": 3,
        • "max": 5
        }
      ],
    • "category": { },
    • "teams": [ ],
    • "rotas": [ ],
    • "created_at": "2023-01-01 09:00:00",
    • "updated_at": "2023-01-01 09:00:00",
    • "deleted_at": null
    }
}

Bulk Rota Actions

Perform bulk action

Perform a bulk action against a set of rotas.

The following actions can be performed using this endpoint:

  • end_date: Update the end date for a set of rotas
  • name: Update the rota name for a set of rotas
  • close: Close a set of rotas for a day or date period
  • archive_rotas: Archive a set of rotas
Authorizations:
JWT
Request Body schema: application/json
action
required
string
Enum: "end_date" "name" "close" "archive_rotas"

Bulk action

rota_ids
required
Array of arrays

Rota IDs to perform the action against

object

Data to sent for the bulk action. Data depends on the type of action you are performing.

Responses

Response Schema: application/json
object (204)

No content

Request samples

Content type
application/json
Example
{
  • "action": "end_date",
  • "rota_ids": [
    • 2345,
    • 6543,
    • 3567,
    • 8764
    ],
  • "data": {
    • "date": "2023-01-01"
    }
}

Response samples

Content type
application/json
{ }

Replace rotas

Replace rotas with another shift pattern.

If end_date is not provided, the shift pattern will override any future pattern/timeslot set up against the rotas.

Replacing patterns may automatically cancel or update shifts if they fall outside of the new shift pattern.

Authorizations:
JWT
Request Body schema: application/json
name
string

New rota name

start_date
required
string <date>

Start date of the Shift Pattern

end_date
string or null <date>

End date of the Shift Pattern

pattern_id
required
integer

Shift Pattern ID

replace_rotas
required
Array of arrays

Array of Rota IDs to replace the Shift Pattern

Responses

Response Schema: application/json
object (204)

No content

Request samples

Content type
application/json
{
  • "name": "Shop Floor",
  • "start_date": "2023-01-01",
  • "end_date": "2023-01-07",
  • "pattern_id": 1324,
  • "replace_rotas": [
    • 2326,
    • 8565,
    • 7557,
    • 3223
    ]
}

Response samples

Content type
application/json
{ }