Approve a vacation request
Approves a pending vacation request, changing its status from “Pending” to “Approved”.
What this does:
- Updates the vacation request status to “Approved”
- Records who approved the request and when (statusChangedBy, statusChangedAt)
- Sends a notification to the employee who requested the vacation
- The approved vacation will now appear in upcoming vacations and team calendars
How it works:
- The vacation must be in “Pending” status to be approved
- Only managers with “manageAll” or “manageTeams” permission can approve requests
- Managers with “manageTeams” can only approve requests from employees in their teams
- The vacation ID is provided as a URL parameter
- Returns 404 if the vacation request is not found
Use cases:
- Approving vacation requests from a management dashboard
- Bulk approval workflows
- Automated approval based on business rules
Note: After approval, the vacation will be visible in the upcoming vacations endpoint and will affect capacity calculations.
POST
/vacations/{id}/approveAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
idstringrequiredResponses
200Vacation request approved successfully
successboolean401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
404Vacation request not found
Request
curl -X POST "https://leadtime.app/api/public/vacations/string/approve" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"const response = await fetch("https://leadtime.app/api/public/vacations/string/approve", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});import requests
response = requests.post(
"https://leadtime.app/api/public/vacations/string/approve",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
)Response
{
"success": true
}Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions
Vacation request not found