Enhanced Timeoff API with User-Specific date range conflict checking
J
Josh
Summary
Currently, the timeoff API has limited filtering capabilities that make it difficult to efficiently check if a user has existing PTO requests that overlap with a specified date range. This feature request proposes adding a new endpoint or enhancing existing endpoints to provide direct user-specific date range conflict checking.
Current Limitations
The existing timeoff API endpoints (/api/timeoff and /v0/time_off/requests) have these limitations:
- No direct user_id filtering: The API doesn't support filtering by specific user IDs
- Basic date filtering: Only supports broad date range filtering (created_at or requested_for)
- No overlap detection: No built-in functionality to check for date conflicts
- Limited query capabilities: Cannot efficiently check for conflicts when creating new timeoff
Use Cases
- Timeoff Request Creation: Check for conflicts before allowing users to submit new requests
- Automated Approval Workflows: Validate request feasibility based on existing commitments
- Integration with External Systems: Allow third-party systems to check availability
- Manager Approval Process: Quickly identify scheduling conflicts during approval