Add Leave Application

POST/api/leave-applications

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
leave_type_id number Mandatory Leave type ID
applicant_id number Mandatory Applicant user ID
start_date string Mandatory Start date (Y-m-d)
end_date string Mandatory End date (Y-m-d)
reason string Mandatory Leave reason
total_days number optional Optional Total days (auto-calculated if not provided)
curl -X POST "https://yoursite.com/api/leave-applications" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "leave_type_id": "...", "applicant_id": "...", "start_date": "...", "end_date": "...", "reason": "..." }'

Success-Response:

HTTP/1.1 201 Created
{
  "status": 200,
  "messages": {"success": "Leave application add success"},
  "id": 1
}
MethodPOST
Path/api/leave-applications
GroupLeave Applications
Sincev1.0.0
Defined inRestApi/Controllers/LeaveApplicationsController.php