v1

latestOpenAPI 3.0.22026-07-24154101.1 MB
Shifts

Update Shift

put/v2/company/{company_id}/shifts/{shift_id}

Path parameters

company_idinteger required

Company ID

shift_idinteger required

Shift ID

Headers

x-api-versionstring

An API version

Example:2022-05-01

7shifts API version

x-company-guidstring uuid

Company GUID

Request body

location_idinteger nullable

Location ID

user_idinteger nullable

User ID

department_idinteger nullable

Department ID. Required if the location uses departments

role_idinteger nullable

Role ID. Required if the location uses roles

station_idinteger nullable

The station assigned to the shift

startstring date-time nullable

Start date time of the shift. UTC in ISO8601 format

endstring date-time nullable

End date time of the shift. UTC in ISO8601 format

closeboolean nullable

Set to true if the shift ends at closing time. If set end is not used.

business_declineboolean nullable

Set to true if the shift ends at business decline.

notesstring nullable

Notes displayed on a shift

draftboolean nullable

If true the shift is not published.

openboolean nullable

Set to true if the shift is not assigned to any user. Open shifts can be requested by users.

open_offer_type0 | 1 | 2 | 3 nullable

Set when open is true. Set to 0 when everyone at a location can request an open shift; set to 1 if only offered to specified role.

unassignedboolean nullable

When true the shift is unassigned. Internal use only.

unassigned_skill_level1 | 2 | 3 nullable

The skill level required for this shift.

  • 1: Beginner
  • 2: Intermediate
  • 3: Experienced
status-1 | 0 | 1 | 2 | 3 | 4 | 5 nullable

Shift status type.

  • -1: Custom (requires custom_flag_id)
  • 0: None
  • 1: Sick
  • 2: No Show
  • 3: Late
  • 4: Call Out
  • 5: Left Late
custom_flag_idinteger nullable

Custom shift flag ID. Required when status is -1. Must match a company custom shift flag.

late_minutesinteger nullable

Number of minutes a user can clock in late after the shift starts.

Example request

{
  "start": "2021-01-01T00:00:00.000Z",
  "end": "2021-01-01T00:00:00.000Z"
}

Response

OK

object'shift' required