Skip to main content

Time Off Tools

View and action staff time-off requests. List pending or approved requests, then approve or reject them.

Required scope: staff:read for list_time_off, staff:write for approve_time_off and reject_time_off.

Tools Overviewโ€‹

ToolDescriptionRead-only?
list_time_offList staff time-off requests with optional filtersYes
approve_time_offApprove a pending time-off requestNo
reject_time_offReject a pending time-off requestNo

list_time_offโ€‹

List staff time-off requests. Filter by staff member, status, or date range. Returns up to 50 results ordered by start date descending.

Parametersโ€‹

NameTypeRequiredDescription
staff_idintegerNoFilter by staff member
statusstringNoFilter by status: pending, approved, rejected, cancelled
start_datestringNoOnly return requests overlapping on or after this date (YYYY-MM-DD)
end_datestringNoOnly return requests overlapping on or before this date (YYYY-MM-DD)

Response Fieldsโ€‹

Returns a time_off array. Each entry includes the request ID, staff_id, staff name, start_date, end_date, status, reason, and timestamps.


approve_time_offโ€‹

Approve a pending staff time-off request. Records the approving user automatically.

Parametersโ€‹

NameTypeRequiredDescription
time_off_idintegerYesTime-off request ID

Response Fieldsโ€‹

Returns success: true and the updated status value (approved), or an error if the request was not found.


reject_time_offโ€‹

Reject a pending staff time-off request. Records the rejecting user automatically.

Parametersโ€‹

NameTypeRequiredDescription
time_off_idintegerYesTime-off request ID

Response Fieldsโ€‹

Returns success: true and the updated status value (rejected), or an error if the request was not found.