TimeOffs
Create a new Time Off
Changed onCreates a new Time Off and returns the created Time Off object.
post/v2/timeoff
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.
Headers
Authorizationstring required
Example:Bearer <token>
Bearer Token
Request body
Example request
{
"techId": "USR-38c1ee5c4efa38a4",
"startDate": "2024-07-25 09:00:00",
"endDate": "2024-07-25 11:00:00",
"status": "pending",
"reason": "Vacation",
"details": "Doctor appointment"
}Response
The created Time Off.
Example response
{
"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