Skip to content

Update Shift Schedule

Request

Update an existing ShiftSchedule for an Employee.

The generated_id is determined by the application and was returned on creation. A list of existing ShiftSchedules can be retrieved by using the getShiftSchedulesByEmployeeId endpoint.

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

The id of the Employee to update this ShiftSchedule for.

generated_idstring, (uuid)required

The generated_id of the ShiftSchedule to update.

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"]
If-Matchstring

Weak Etag used for optimistic locking.

Example:W/"24"
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 updated

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": [ { … } ] }