Retrieve a list of Time Off
Changed onRetrieves a paginated list of Time Off based on the applied filters and pagination.
Request
- Base URLhttps://api.workiz.com/crm/api
- Authnone declared. Required headers: Authorization
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
Number of records to return per page.
The page index.
The field to sort results by. Must be combined with order.
The sort direction. Must be combined with field.
Filter by tech ID (prefix USR-). Can be passed multiple times.
The time off start-date boundary for the filter. Must be combined with timeline. Expected format: YYYY-MM-DD HH:MM:SS.
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
Bearer Token
Response
A paginated list of Time Off.
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/jsonfor the response with the status - info
added the media type
application/jsonfor the response with the status - info
added the non-success response with the status
- info
added the non-success response with the status
- info