Time Off

Get all time off requests on a workspace

Changed on
post/v1/workspaces/{workspaceId}/time-off/requests

Request

  • Base URL: https://api.clockify.me/api
  • URL: https://api.clockify.me/api/v1/workspaces/{workspaceId}/time-off/requests
  • Auth: one of:
    • API key in header x-api-key
    • API key in header x-addon-token

Path parameters

workspaceIdstring required

Represents a workspace identifier across the system.

Example:60f91b3ffdaf031696ec61a8

Request body

endstring date-time

Provide the end of the filtering period. Used with start to filter for time-off requests periods that occur (fully or partially) within this range. Both parameters must be provided for filtering to take effect. Provide end in format YYYY-MM-DDTHH:MM:SS.ssssssZ

pageinteger

Page number.

pageSizeinteger

Page size.

startstring date-time

Provide the beginning of the filtering period. Used with end to filter for time-off requests periods that occur (fully or partially) within this range. Both parameters must be provided for filtering to take effect. Provide start in format YYYY-MM-DDTHH:MM:SS.ssssssZ

statusesstring[]

Filters time off requests by status.

userGroupsstring[]

Provide the user group ids of time off requests.

usersstring[]

Provide the user ids of time off requests. If empty, will return time off requests of all users (with a maximum of 5000 users).

Example request

{
  "end": "2022-08-26T23:55:06.281873Z",
  "page": 1,
  "pageSize": 50,
  "start": "2022-08-26T08:00:06.281873Z",
  "statuses": [
    "APPROVED",
    "PENDING"
  ],
  "userGroups": [
    "5b715612b079875110791342",
    "5b715612b079875110791324",
    "5b715612b079875110793142"
  ],
  "users": [
    "5b715612b079875110791432",
    "b715612b079875110791234"
  ]
}

Response

OK

countinteger

Total count of time off requests.

Example response

{
  "count": 1,
  "requests": [
    {
      "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",
      "status": {
        "statusType": "APPROVED",
        "changedByUserId": "5b715612b079875110794444",
        "changedByUserName": "Nicholas",
        "changedForUserName": "John",
        "changedAt": "2022-08-26T08:32:01.640708Z",
        "changedAtTimeZone": "Europe/Budapest",
        "note": "Approved"
      },
      "timeOffPeriod": {
        "period": {
          "start": "2021-12-23T00:00:00Z",
          "end": "2021-12-23T23:59:59.999999Z"
        },
        "halfDay": false,
        "halfDayPeriod": "NOT_DEFINED",
        "halfDayHours": null
      },
      "timeUnit": "DAYS",
      "userEmail": "nicholas@clockify.com",
      "userId": "5b715612b079875110794444",
      "userName": "Nicholas",
      "userTimeZone": "Europe/Budapest",
      "workspaceId": "5b715612b079875110792222"
    }
  ]
}

Changes

    • info

      added the optional property /// to the response with the status

    • info

      the request property default value was added

    • info

      the request property default value was added

    • info

      the request property default value was added

    • info

      the response's property default value was added for the status

    • info

      the response's property default value was added for the status

    • info

      the response's property default value was added for the status

    • info

      the response's property default value was added for the status

    • info

      the response's property default value was added for the status

    • info

      the response's property default value was added for the status

    • info

      the response's property default value was added for the status

    • info

      the response's property default value was added for the status

    • info

      the response's property default value was added for the status

    • info

      the response's property default value was added for the status

    • info

      the response's property default value was added for the status

    • info

      the response's property default value was added for the status