who-working

shifts resource

Base endpoint:

{server_url}/shifts

Contains information about the shifts saved to the Who’s Working service. In Version 1, only registered store managers can create a shift.

Resource properties

Sample shifts resource.

{
    "id": "81a2",
    "date": "2024-06-11",
    "start_time": "0900",
    "shift_length": "6",
    "warning": "opening",
    "location_detail": "Eatons Centre",
    "status": "closed"
}
Property name Type Description
id number The unique ID assigned to the shift.
date string The date (YYYY-MM-DD) of the work shift. Use the ISO 8601 format.
start_time integer The shift’s start time. Use 24 clock time with no colon.
shift_length decimal The shift length is measured in hours. Use numbers with one decimal place (e.g. 4.5).
warning number The number of hours and minutes relative to the date to alert workers of the shift. This is normally a negative number to alert the user before the date.
location_detail string A short description of the restaurant’s location.
status string The shift is Open (waiting to fill the position) or Closed (the position is no longer available).

Operations

The shifts resource supports these operations. Resources with an Endpoint description provide the endpoint but do not have a full set of instructions.

READ (GET)

Resource Description
Get shifts by status Complete
Get all shifts Endpoint
Get a shift by ID Endpoint
Get shifts by date Endpoint
Get all shifts by duration Endpoint
Get a shift by ID Endpoint
Get all shifts by date Endpoint

CREATE (POST)

Resource Description
Create a shift Complete

UPDATE (PATCH)

Resource Description
Change the status of a shift Complete
Change a shift property by ID Endpoint

DELETE

Resource Description
Delete a shift by ID Complete