Get Available Classrooms
POST /aulas-disponibles
Obtains available classrooms for a course at a specific time, applying all system constraints.How It Works
The endpoint performs a multi-step evaluation:- Validates the course exists and is active
- Applies capacity constraint - filters classrooms with sufficient capacity
- Checks compatibility - ensures classroom type matches course requirements (teorica, laboratorio, virtual)
- Verifies availability - checks no conflicting reservations exist for the time slot
- Returns categorized results - available and unavailable classrooms with reasons
Request Body
ID of the course/subject. Must match an existing course in the system.Example:
"A001" for Álgebra LinealStart time in 24-hour format
HH:MM. Must be valid time between 00:00 and 23:59.Example: "07:00"End time in 24-hour format
HH:MM. Must be after hora_inicio.Example: "09:00"Day of the week in Spanish. Must be one of:
Lunes, Martes, Miércoles, Jueves, Viernes, Sábado, Domingo.Example: "Lunes"Number of students. Must be greater than 0.Example:
30Academic semester. Must be between 1 and 10.Example:
1Response Fields
Information about the requested course.
Echo of the requested time slot parameters.
List of classrooms that meet all requirements and are available.
List of classrooms that don’t meet requirements, with reason for each.
Count of available classrooms
Count of unavailable classrooms
Error message if course not found, otherwise
nullCommon Use Cases
Finding Large Classrooms
Checking Weekly Availability
Understanding Constraints
Capacity Constraint
Classrooms must have capacity >= requested students. Example rejection:Compatibility Constraint
Course type must match classroom type:| Course Type | Compatible Classroom Types |
|---|---|
teorica | teorica |
laboratorio | laboratorio |
virtual | virtual |
Availability Constraint
Classroom must not have overlapping reservations. The system checks:- Same day of week
- Overlapping time periods
- Active reservations (status:
reservadoorocupado)