Skip to content

Unavailability [EXPERIMENTAL]

Unavailabilities define a specific time range during which an Employee is unavailable to execute tasks. This can be due to sickness, holiday, or other temporary absences. During its duration, the employee can not be matched with a transport resource and used as part of the planning.

[EXPERIMENTAL] Create Employee Unavailability

Request

Create an unavailability for an employee, without providing an identifier. The generated identifier will be available in the response's Location header, and/or response body if the appropriate Prefer-header is provided with the request.

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

A unique identifier of an Employee. Should only contain characters which do not need URL encoding.

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
fromstring, (date-time)required
Example:"2021-01-01T06:00:00Z"
tostring, (date-time)required
Example:"2021-01-10T06:00:00Z"
descriptionstring
Example:"holiday"
Payload
{ "from": "2021-01-01T06:00:00Z", "to": "2021-01-10T06:00:00Z", "description": "holiday" }

Responses

Employee Unavailability 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 Unavailability ID.

Example:"f22896d0-ed42-4a14-a935-7a29072bc5ac"
employee_idstring(EmployeeId)^[a-zA-Z0-9.~\-_]+$read-only

The unique Employee ID.

Example:"employee-42"
fromstring, (date-time)required
Example:"2021-01-01T06:00:00Z"
tostring, (date-time)required
Example:"2021-01-10T06:00:00Z"
descriptionstring
Example:"holiday"
Response
{ "id": "f22896d0-ed42-4a14-a935-7a29072bc5ac", "employee_id": "employee-42", "from": "2021-01-01T06:00:00Z", "to": "2021-01-10T06:00:00Z", "description": "holiday" }