Skip to content

Shift Schedule

ShiftSchedules can be used to describe the recurring pattern for an Employee's availability. They do not trigger availabilities themselves, but can be used to generate availabilities according to this schedule, through the application's user interface.

Providing ShiftSchedules enables planners to do long-term planning using the Employee Overview in the UI, since this allows us to predict when an Employee should be available.

Create Shift Schedule

Request

Endpoint to create a ShiftSchedule. An identifier will be generated by the application. This identifier can be retrieved from the Location header, or response body (if the Prefer header is set to return=representation).

Security
clientCredentials
Path
employee_idstring^[a-zA-Z0-9.~\-_]{1,512}$required

The id of the Employee to create a ShiftSchedule for.

Headers
PreferArray of strings

The RFC7240 Prefer header indicates that a particular server behavior is preferred by the client but is not required for successful completion of the request (see RFC 7240).

The following behavior (see Examples) is supported by this API:

  • return=<minimal|representation> is used to suggest the server to return using 204 without resource (minimal) or using 200 or 201 with resource (representation) in the response body on success.
Examples:
minimal
Indicate no response is needed, can be omitted
["return=minimal"]
representation
Request the result of the operation as response
["return=representation"]
Bodyapplication/json
namestring

An optional name for this ShiftSchedule.

Example:"Standard 38H"
startobject(ShiftScheduleStart)required

The start date and start week number of this shift schedule

templatesArray of objects, non-empty(RecurrencePeriod)required

List of non-null objects describing one calendar week (MON-SUN) worth of shifts.

Payload
{ "name": "Standard 38H", "start": { "start_date": "2014-08-16", "start_week": 1 }, "templates": [ { … } ] }

Responses

Shift Schedule created

Headers
ETagstring

A weak Etag (ex W/"<etag_value>") which contains the current version of the entity

Example:"W/\"25\""
Preference-Appliedstring

Indicates whether a preference has been applied. (ex return=representation)

Locationstring, (URI)

A URI to access the result of the operation.

Bodyapplication/json
idstringread-only

The unique ShiftSchedule ID, generated by the application upon creation.

Example:"f22896d0-ed42-4a14-a935-7a29072bc5ac"
namestring

An optional name for this ShiftSchedule.

Example:"Standard 38H"
startobject(ShiftScheduleStart)required

The start date and start week number of this shift schedule

templatesArray of objects, non-empty(RecurrencePeriod)required

List of non-null objects describing one calendar week (MON-SUN) worth of shifts.

Response
{ "id": "f22896d0-ed42-4a14-a935-7a29072bc5ac", "name": "Standard 38H", "start": { "start_date": "2014-08-16", "start_week": 1 }, "templates": [ { … } ] }