API Versions
v1.2.7
Public API - create time-off requests on behalf of employees.
API v1.2.7 New features
POST /api/v1/time-off/requests - create a time-off request
- Creates a time-off or day-off request for
employee_idin the categorycategory_idfor the perioddate_from-date_to, with an optionalcomment. - The request always goes through the organization's approval flow, the same as a request created in the app. The approval flow cannot be bypassed: any extra field in the body, including
is_bypass_approval_flow, returns422. - The leave policy is checked as in the app: balance, overlapping requests, past dates, probation. A request that breaks the policy returns
422with the reason invalidation_errors[].codeand is not saved. - The API user is saved as the author of the request.
- Requires
employee_time_off=editfor the employee orapprove_and_reject_leaves=edit; otherwise403. - Returns the request in the same format as
POST /api/v1/time-off/logs/search. See Time Off.
