Authentication
All endpoints require authentication via JWT token. The token should be included in the request headers:req.empleado.
Request Types
The API supports the following request types:Vacation
Request time off with automatic vacation day balance checking
Profile Update
Request changes to phone number, address, or profile image
Absence
Report justified absences with date ranges
Permission
Request special permissions for specific dates
Remote Work
Request to work from external locations
Request States
Requests can be in one of four states:- Pending (1): Request submitted, awaiting approval
- Approved (2): Request approved by administrator
- Rejected (3): Request rejected by administrator
- Canceled (4): Request canceled by the employee
Role-Based Access
The API implements role-based access control:Employee
Can view own requests, create new requests, and cancel pending requests
Admin
Can view all requests (excluding canceled), approve/reject requests, and access calendar
Super Admin
Can view all requests including canceled, with full administrative privileges
Available Endpoints
Get Requests
Retrieve requests with pagination and filters
Create Request
Create general requests (absence, permission, remote work)
Vacation Request
Create vacation requests with balance validation
Profile Update
Request profile data changes
Approve/Reject
Approve or reject requests (Admin only)
Calendar View
View approved requests in calendar format (Admin only)