curl -X GET "https://api.companyflow.com/leave-requests?page=1&pageSize=20&status=pending" \ -H "Authorization: Bearer YOUR_TOKEN"
{ "success": true, "data": { "items": [ { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "employeeId": "987e6543-e21b-12d3-a456-426614174000", "leaveTypeId": "123e4567-e89b-12d3-a456-426614174000", "startDate": "2025-03-15T00:00:00Z", "endDate": "2025-03-19T00:00:00Z", "daysRequested": 5, "reason": "Family vacation", "attachmentUrl": null, "status": "pending", "currentStep": 1, "approvedBy": null, "approvedAt": null, "rejectionReason": "", "createdAt": "2025-03-03T10:30:00Z", "updatedAt": "2025-03-03T10:30:00Z" }, { "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901", "employeeId": "987e6543-e21b-12d3-a456-426614174000", "leaveTypeId": "234f5678-f90c-23e4-b567-537725285111", "startDate": "2025-02-10T00:00:00Z", "endDate": "2025-02-12T00:00:00Z", "daysRequested": 3, "reason": "Medical appointment", "attachmentUrl": "https://storage.example.com/medical-cert.pdf", "status": "approved", "currentStep": 2, "approvedBy": "345a6789-a01d-34f5-c678-648836396222", "approvedAt": "2025-02-08T14:20:00Z", "rejectionReason": "", "createdAt": "2025-02-05T09:15:00Z", "updatedAt": "2025-02-08T14:20:00Z" } ], "total": 42, "page": 1, "pageSize": 20, "totalPages": 3 } }
Retrieve a paginated list of leave requests with filtering options
pending
approved
rejected
cancelled
withdrawn
Show Pagination data
Show LeaveRequest properties
curl -X GET "https://api.companyflow.com/leave-requests?employeeId=987e6543-e21b-12d3-a456-426614174000" \ -H "Authorization: Bearer YOUR_TOKEN"