The salones (rooms) resource lets you list all rooms across campus, list rooms within a specific building, and create, update, or delete individual room records. Rooms are typed asDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/luiss811/Backend-Airguide/llms.txt
Use this file to discover all available pages before exploring further.
aula (regular classroom), laboratorio (laboratory), or auditorio (auditorium). Read operations are public; write operations require admin authentication.
TipoSalon enum values
| Value | Meaning |
|---|---|
aula | Standard classroom used for lectures and seminars. |
laboratorio | Laboratory equipped for practical or computer-based work. |
auditorio | Large auditorium for presentations and events. |
List all rooms
GET /api/edificios/salones
Returns every room in the system, ordered by building then by floor. Each room object includes summary information about its parent building.
Response
Room ID.
Parent building ID.
Room name or label.
Floor number where the room is located.
Room type:
aula, laboratorio, or auditorio.Whether the room is active.
Example
List rooms by building
GET /api/edificios/:id/salones
Returns all rooms belonging to a specific building, ordered by floor.
Path parameters
The
id_edificio of the building whose rooms you want to retrieve.Response
Returns an array of room objects (without the nestededificio field). Returns an empty array if the building has no rooms.
Example
Create a room
POST /api/edificios/:id/salones
Creates a new room inside the specified building. Returns 404 if the building does not exist. Requires admin authentication.
Path parameters
The
id_edificio of the building the room belongs to.Request body
Room name or label (e.g.,
"Aula 202", "Lab de Redes").Floor number where the room is located. Use
0 for ground floor.Room type. One of:
aula, laboratorio, auditorio.Set to
false to create the room in an inactive state.Response
Returns the created room with its parent building summary and HTTP201 Created. Returns 404 with { "error": "Edificio no encontrado" } if the building ID is invalid.
Example
Update a room
PUT /api/edificios/salones/:id
Updates an existing room. Send only the fields you want to change. Requires admin authentication.
Path parameters
The
id_salon of the room to update.Request body
All fields are optional for partial updates.Room name.
Floor number.
Room type:
aula, laboratorio, or auditorio.Active status.
Response
Returns the updated room with its parent building summary.Example
Delete a room
DELETE /api/edificios/salones/:id
Permanently deletes a room record. Requires admin authentication.
Path parameters
The
id_salon of the room to delete.