Parameters
Filter agents by location ID. If provided, only agents working at this location will be returned
Filter agents by service ID. If provided, only agents who can provide this service will be returned
Date to check availability for in Y-m-d format (e.g., “2024-01-15”). Only used if start_time is also provided
Start time to check availability for. Can be in HH:MM format (e.g., “14:30”) or minutes since midnight (e.g., “870”). Only used if date is also provided
Duration of the appointment in minutes. If not provided and service_id is given, uses the service’s default duration. Otherwise defaults to 60 minutes
Maximum number of agents to return. Useful for pagination
Response
Indicates if the request was successful
The main response data containing agents information
Example Requests
1. Get all agents (no filters)
2. Get agents by location only
3. Get agents by location and service
4. Check availability for specific date and time
Example Response
Use Cases
- Find Multiple Available Agents: When you need to show customers multiple agent options for the same time slot
- Count Available Agents: Check how many agents are available without needing their full details
- Load Balancing: Distribute bookings across available agents
- Capacity Planning: Understand availability patterns for better scheduling
- Group Bookings: Find multiple agents for simultaneous appointments
Error Responses
Notes
- The endpoint checks for both existing bookings and agent working hours
- Only active agents are considered for availability
- The
limit
parameter is useful for performance when you only need a specific number of agents - Time can be provided in either HH:MM format or as minutes since midnight
- If duration is not provided, the service’s default duration is used
- The endpoint considers both approved and pending bookings as conflicts