Skip to content
Leadtime
English
Esc
navigateopen⌘Jpreview

Decline or cancel a vacation request

Declines a pending vacation request or cancels an approved vacation.

What this does:

  • For pending requests: Changes status from “Pending” to “Rejected”
  • For approved vacations: Changes status from “Approved” to “Cancelled”
  • Records who declined/cancelled the request and when (statusChangedBy, statusChangedAt)
  • Optionally records a reason for the decline/cancellation
  • Sends a notification to the employee who requested the vacation

How it works:

  • The vacation ID is provided as a URL parameter
  • The optional reason can be provided in the request body
  • Only managers with “manageAll” or “manageTeams” permission can decline/cancel requests
  • Managers with “manageTeams” can only decline/cancel requests from employees in their teams
  • Returns 404 if the vacation request is not found
  • After decline/cancellation, the vacation will appear in the vacation history

Request body:

  • reason (optional): Text explanation for why the vacation was declined or cancelled
    • Example: “Insufficient coverage during this period”
    • This reason will be visible in the vacation history

Use cases:

  • Rejecting vacation requests that conflict with business needs
  • Cancelling previously approved vacations due to changed circumstances
  • Providing feedback to employees about why their request was not approved
POST/vacations/{id}/decline
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
idstringrequired
Request body
requiredapplication/json
reasonstring
Optional reason explaining why the vacation request was declined or cancelled. This reason will be stored with the vacation record and visible in the vacation history. Providing a reason helps employees understand the decision and improves transparency in the approval process.
Responses
200Vacation request declined successfully
successboolean
401Unauthorized - 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/decline" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "reason": "Insufficient coverage during this period"
}'
Response
{
  "success": true
}