Decline a leave request

Decline a pending leave request with a reason.

POST https://cotlet.dev/api/v1/deputy/leaves/{leave_id}/request/decline

write Confirm

Declines one leave request. The comment is required, because Deputy requires one to decline, and the employee reads it. The decision reaches the employee, so it waits for you. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: decline_leave_request
NameTypeDescription
leave_id integer required integer Leave ID from list_leave_requests.
comment string required string Reason the employee sees.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/deputy/leaves/1/request/decline \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"comment":"comment"}'
Python
result = client.call("deputy", "decline_leave_request", {"leave_id":1,"comment":"comment"})
Node.js
const result = await cotlet.call('deputy', 'decline_leave_request', {"leave_id":1,"comment":"comment"});
CLI
cotlet call deputy decline_leave_request --data '{"leave_id":1,"comment":"comment"}'

Example response

JSON

{
  "leave_id": 312,
  "employee": "Ana Lopez",
  "status": "declined",
  "comment": "Two others are off on Nov 10. Could you move it by a day?"
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.