---
title: "Get all shifts"
method: GET
path: "/api/v1/shifts"
tags: ["Shifts"]
---

# Get all shifts

`GET /api/v1/shifts`

Retrieve shifts for the current user's organization.

## Query parameters

- `start` string, date-time, required — Return shifts from this date eg. 2024-05-09T08:00:00. Can't request more than 1 week at a time.
- `end` string, date-time, required — Return shifts up until this date e.g 2024-05-09T08:00:00. Can't request more than 1 week at a time.
- `person_ids` string, nullable — Filter shifts by person ids (e.g. '4,6,7,8')
- `emails` string, nullable — Filter shifts by e-mail addresses (e.g. 'simon@helloworld.com,susan@hello-world.com').
- `include` string, nullable — Object detail to be included with each shift (e.g. 'activities,teams,roles,people,license_types')
- `exclude_unpublished` boolean, nullable — Whether to exclude unpublished shifts

## Response `200`

Returns a list of shifts.

- ShiftOutExternalAPI[]
  - `actions` ActionReadAPI[], nullable
    - `action_type` string, required — The type of action
    - `activity_type_id` integer, nullable — The ID of the associated activity type
    - `archived` boolean, nullable — Whether action has been archived
    - `auto_generated` boolean, nullable — Whether the timestamp was auto-generated or input by a user
    - `expires` string, date-time, nullable — The time (UTC) when the action expires e.g 2023-07-27 06:30:00+00
    - `external_id` string, nullable — The ID of the associated external action
    - `id` integer, required — The unique ID of the activity
    - `linked_clock_in_id` integer, nullable — ID of earlier clock_in for which a clock_out relates
    - `notes` string, nullable — Notes about the action
    - `organisation_id` integer, nullable — The ID of the organisation
    - `person_id` integer, nullable — The ID of the associated person
    - `request_id` integer, nullable — The ID of the associated request
    - `shift_id` integer, nullable — The ID of the associated shift
    - `timestamp` string, date-time, nullable — Timestamp of the action
    - `value` number, nullable — The value of the action
    - `value_metadata` object, nullable — The metadata of the action
  - `activities` ActivityRead[], nullable
    - `activity_type_id` integer, required — The ID of the activity type
    - `archived` boolean, nullable — Whether activity has been archived
    - `end` string, date-time, required — The end time (UTC) of the activity e.g 2023-07-27 06:30:00+00
    - `id` integer — The unique ID of the activity
    - `notes` string, nullable — Notes for the activity
    - `organisation_id` integer, nullable — The ID of the organisation that the activity belongs to
    - `recurrence_details` RecurrenceNew
      - `byday` string[], nullable — Days of week (MO, TU, WE, etc.)
      - `bymonth` integer[], nullable — Months
      - `bymonthday` integer[], nullable — Days of month
      - `count` integer, nullable — Number of occurrences
      - `exdate` string[], nullable — Exception dates
      - `freq` string, required — Frequency: DAILY, WEEKLY, MONTHLY, etc.
      - `id` integer, nullable — The ID of the recurrence
      - `interval` integer — How often the rule repeats
      - `original_recurrence_id` integer, nullable — The ID of the original recurrence that this recurrence is derived from
      - `reference_activity_id` integer, nullable — The ID of the activity that this recurrence is derived from
      - `reference_shift_id` integer, nullable — The ID of the shift that this recurrence is derived from
      - `tzid` string, nullable — Timezone identifier
      - `until` string, date-time, nullable — End date
    - `recurrence_id` integer, nullable — The recurrence ID for the activity
    - `shift_ids` integer[], nullable — List of shift IDs to which the activity is joined
    - `start` string, date-time, required — The start time (UTC) of the activity e.g 2023-07-27 06:30:00+00
    - `time_created` string, date-time, required — The ti`me (UTC) when the activity was created e.g 2023-07-27 06:30:00+00
    - `time_updated` string, date-time, required — The time (UTC) when the activity was last updated e.g 2023-07-27 06:30:00+00
  - `allow_alternative_times` boolean, nullable — Whether person can request changes to the timing of their shift
  - `approved` boolean, nullable — Whether timesheet associated with the shift has been approved
  - `archived` boolean, nullable — Whether shift has been archived
  - `auto_approve_changes` boolean, nullable — Whether shift change requests should be approved automatically
  - `clients` ClientRead[], nullable
    - `account` string, nullable — The name of the account that this client belongs to
    - `external_id` string, nullable — The client's external ID
    - `id` integer, required — The client's primary ID which is generated when the client is created
    - `name` string, required — The client's name
    - `operating_hours` object, nullable — The client's operating hours
    - `secondary_external_id` string, nullable — The client's secondary external ID
  - `created_at_clock_in` boolean, nullable — Whether shift was created as a result of clocking-in
  - `end` string, date-time, required — The end time (UTC) of the shift e.g 2023-07-27 06:30:00+00
  - `flex_hours` boolean, nullable — Whether the shift has flexible hours
  - `id` integer, required — The unique ID of the shift
  - `is_publishing_calendar` boolean, nullable — Whether the shift is re-syncing to the user's calendar
  - `is_publishing_email` boolean, nullable — Whether the shift is re-sending email to the user
  - `is_publishing_slack` boolean, nullable — Whether the shift is re-publishing on slack
  - `is_publishing_sms` boolean, nullable — Whether the shift is re-sending sms to the user
  - `license_types` LicenseTypeRead[], nullable
    - `id` integer, required — The license type's primary ID which is generated when the license type is created
    - `is_qualification` boolean, nullable — Whether this is a license (True) or a skill (False)
    - `name` string, required — The license type's name. Must be unique
  - `needs_publishing_calendar` boolean, nullable — Whether the shift needs re-syncing to the user's calendar
  - `needs_publishing_email` boolean, nullable — Whether the shift needs re-sending email to the user
  - `needs_publishing_slack` boolean, nullable — Whether the shift needs re-publishing on slack
  - `needs_publishing_sms` boolean, nullable — Whether the shift needs re-sending sms to the user
  - `notes` string, nullable — Any notes about the shift
  - `organisation_id` integer, required — The ID of the organisation the shift belongs to
  - `payment_id` integer, nullable — The ID of the payment associated with the shift
  - `people_required` integer, nullable — The number of people required for the shift if unassigned
  - `person` PersonRead
    - `access_level_name` string, nullable — The person's access level
    - `archived` boolean, nullable — Whether the person is archived
    - `cell` string, nullable — The person's cell phone number
    - `custom_option_ids` integer[], nullable — List of custom option IDs associated with the person
    - `email` string, nullable — The person's email address
    - `employee_id` string, nullable — The person's employee ID
    - `employment_end_date` string, date, nullable — The date when the person's employment ended
    - `employment_type` unknown
    - `enable_login` boolean — Enable login for this person
    - `exempt` boolean, nullable — Whether the person is exempt from overtime
    - `external_id` string, nullable — The person's ID from an external system e.g payroll
    - `first_name` string, required — The person's first name
    - `flex_hours` boolean, nullable — Whether the person's shifts are flexible
    - `id` integer, required — The unique ID of the person
    - `inactive` boolean, nullable — Whether provider is currently active in Planbase
    - `last_archived_at` string, date-time, nullable — The timestamp when the person was archived
    - `last_name` string, required — The person's last name
    - `max_daily_hours` integer, nullable — Maximum contracted daily hours
    - `max_monthly_hours` integer, nullable — Maximum contracted monthly hours
    - `max_weekly_hours` integer, nullable — Maximum contracted weekly hours
    - `min_daily_hours` integer, nullable — Minimum contracted daily hours
    - `min_monthly_hours` integer, nullable — Minimum contracted monthly hours
    - `min_weekly_hours` integer, nullable — Minimum contracted weekly hours
    - `notes` string, nullable — The person's notes
    - `notifications_email` boolean, nullable — Whether person opts in to email communications
    - `notifications_slack` boolean, nullable — Whether person opts in to Slack communications
    - `notifications_text` boolean, nullable — Whether person opts in to SMS communications
    - `pay_cycle_id` integer, nullable — The ID of the person's pay cycle
    - `pay_cycle_name` string, nullable — The name of the person's pay cycle
    - `rate` number, nullable — The person's pay rate
    - `rate_type` unknown
    - `regular_work_hours` object, nullable — The person's regular work hours as a JSON object
    - `saved_filters` object, nullable — The person's saved filters
    - `start_date` string, date, nullable — The start date of the person's employment
    - `submits_availability` boolean, nullable — Whether the person submits their availability
    - `submits_unavailability` boolean, nullable — Whether the person submits unavailability
    - `timezone` string, nullable — The timezone where the person works.
    - `weekends_month` integer, nullable — Minimum contracted weekend days per month
    - `wise_recipient_currency` string, nullable — The person's Recipient Currency from Wise
    - `wise_recipient_id` string, nullable — The person's Recipient ID from Wise
  - `person_id` integer, nullable — The ID of the person assigned to the shift (if any)
  - `recurrence_id` integer, nullable — The recurrence ID for the shift
  - `request_id` integer, nullable — ID of the request that created the shift
  - `role` RoleRead
    - `color` string, nullable — The role's color. HEX format
    - `id` integer, required — The role's primary ID which is generated when the role is created
    - `name` string, required — The role's name. Must be unique
  - `role_id` integer, nullable — The ID of the role the shift belongs to
  - `rrule` string, nullable — The recurrence rule for the shift
  - `shift_type` ShiftTypeRead
    - `color` string, nullable — The color of the activity type
    - `custom_option_ids` integer[], nullable — List of custom option IDs associated with the shift type
    - `enabled` boolean, nullable — Whether this shift type is enabled
    - `id` integer, required — The unique ID of the activity type
    - `name` string, required — The name of the activity type
  - `shift_type_id` integer, nullable — The ID of the shift type
  - `start` string, date-time, required — The start time (UTC) of the shift e.g 2023-07-27 06:30:00+00
  - `status` string, nullable — The status of the shift
  - `team` TeamRead
    - `address` string, nullable — The team's location
    - `color` string, nullable — The teams's color. HEX format
    - `id` integer, required — The team's primary ID which is generated when the team is created
    - `name` string, required — The team's name. Must be unique
  - `team_id` integer, nullable — The ID of the team the shift belongs to
  - `time_published` string, date-time, nullable — When shift was last published

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/joinplanbase/apis/planbase-api.md) · [All operations](https://skmtc.dev/joinplanbase/apis/planbase-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/joinplanbase/planbase-api/revisions/501c09a03cbc/schema)
