latestOpenAPI 3.0.02026-08-1284111344.5 KB

14666f4db0f8

TimeOffs

Retrieve a single Time Off

Retrieves a single Time Off by its ID.

get/v2/timeoff/{id}

Path parameters

idstring required
Example:TO-de9750285414508f

The time off ID (prefix TO-).

Headers

Authorizationstring required
Example:Bearer <token>

Bearer Token

Response

The requested Time Off.

idstring

The ID of the time off.

techIdstring

The assigned tech ID (prefix USR-). Use -1 to assign to all company techs.

startDatestring date-time

The time & date when the time off starts.

endDatestring date-time

The time & date when the time off ends.

status'approved' | 'pending' | 'declined'

The status of the time off.

reason'Vacation' | 'Sick day' | 'Personal' | 'Company Added' | 'Other'

The reason for the time off.

detailsstring

Details about the time off.

isAllDayboolean

Whether the time off is for the entire day.

updatedAtstring date-time

The date and time the time off was updated.

createdAtstring date-time

The date and time the time off was created.

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"
}