v1

latestOpenAPI 3.0.12026-08-041753011.2 MB
Time Off

Create a time off request

post/v1/workspaces/{workspaceId}/time-off/policies/{policyId}/requests

Path parameters

workspaceIdstring required

Represents a workspace identifier across the system.

Example:60f91b3ffdaf031696ec61a8

Represents a workspace identifier across the system.

policyIdstring required

Represents a policy identifier across the system.

Example:63034cd0cb0fb876a57e93ad

Represents a policy identifier across the system.

Request body

notestring

Provide the note you would like to use for creating the time off request.

Example request

{
  "note": "Create Time Off Note",
  "timeOffPeriod": {
    "halfDayPeriod": "NOT_DEFINED",
    "period": {
      "days": 3,
      "end": "2021-12-25",
      "start": "2021-12-23"
    }
  }
}

Response

OK

balancenumber double

Represents the time off balance.

balanceDiffnumber double

Represents the balance difference.

createdAtstring date-time

Represents the date when time off request is created. It is in format YYYY-MM-DDTHH:MM:SS.ssssssZ

idstring

Represents time off requester identifier across the system.

notestring

Represents the note of the time off request.

policyIdstring

Represents policy identifier across the system.

policyNamestring

Represents the policy name of the time off request.

requesterUserIdstring

Represents requester user's id.

requesterUserNamestring

Represents requester user's username.

timeUnit'DAYS' | 'HOURS'

Represents the time unit of the time off request.

userEmailstring

Represents user's email

userIdstring

Represents user identifier across the system.

userNamestring

Represents user's username.

userTimeZonestring

Represents user's time zone

workspaceIdstring

Represents workspace identifier across the system.

Example response

{
  "balance": 10,
  "balanceDiff": 1,
  "createdAt": "2022-08-26T08:32:01.640708Z",
  "id": "5b715612b079875110791111",
  "note": "Time Off Request Note",
  "policyId": "5b715612b079875110792333",
  "policyName": "Days",
  "requesterUserId": "5b715612b0798751107925555",
  "requesterUserName": "John",
  "timeUnit": "DAYS",
  "userEmail": "nicholas@clockify.com",
  "userId": "5b715612b079875110794444",
  "userName": "Nicholas",
  "userTimeZone": "Europe/Budapest",
  "workspaceId": "5b715612b079875110792222"
}