latestOpenAPI 3.0.02026-08-1284111344.5 KB

14666f4db0f8

TimeOffs

Retrieve a list of Time Off

Retrieves a paginated list of Time Off based on the applied filters and pagination.

get/v2/timeoff

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.

order'ASC' | 'DESC'

The sort direction.

techIdstring[]

Filter by tech ID (prefix USR-). Can be passed multiple times.

baseDatestring date-time
Example:2025-01-13 13:36:46

The time off start-date boundary for the filter. Must be combined with timeline. Expected format: YYYY-MM-DD HH:MM:SS.

timeline'prev' | 'next'

Comparison direction for the date filter. Must be combined with baseDate. prev shows time offs starting before baseDate; next shows time offs starting on or after baseDate.

Headers

Authorizationstring required
Example:Bearer <token>

Bearer Token

Response

A paginated list of 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"
    }
  ]
}