TimeOffs

Retrieve future time offs

Changed on

Retrieves a paginated list of future approved time offs based on the current date and pagination.

get/v2/timeoff/future

Request

Query parameters

pageSizenumber
Example:10

Number of records to return per page.

pagenumber
Example:1

The page index.

field'id' | 'techId' | 'startDate' | 'endDate' | 'status' | 'reason' | 'details' | 'isAllDay' | 'updatedAt' | 'createdAt'

The field to sort results by. Must be combined with order.

order'ASC' | 'DESC'

The sort direction. Must be combined with field.

Headers

Authorizationstring required
Example:Bearer <token>

Bearer Token

Response

A paginated list of future approved Time Off.

pageSizenumber

The maximum number of items returned per page.

pagenumber

The current page number.

totalResultsnumber

The total number of results.

hasMoreboolean

Whether there are more results.

Example response

{
  "pageSize": 10,
  "page": 1,
  "totalResults": 50,
  "hasMore": true,
  "data": [
    {
      "id": "TO-de9750285414508f",
      "techId": "USR-38c1ee5c4efa38a4",
      "startDate": "2024-07-25 09:00:00",
      "endDate": "2024-07-25 11:00:00",
      "status": "approved",
      "reason": "Vacation",
      "details": "Doctor appointment",
      "isAllDay": true,
      "updatedAt": "2024-07-25 09:00:00",
      "createdAt": "2024-07-25 09:00:00"
    }
  ]
}

Changes

    • info

      added the media type application/json for the response with the status

    • info

      added the media type application/json for the response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status