Skip to content

[EXPERIMENTAL] Upsert Employee Unavailability

Request

Create or update an unavailability for an employee.

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.

unavailability_idstring, (uuid)required

The provided identifier of the Unavailability, or the generated identifier in case of an Unavailability created through the POST endpoint.

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
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 or 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 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" }