The cubicles resource (Documentation 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.
/api/edificios/cubiculos) lets you list, create, update, and delete professor cubicles. Each cubicle belongs to a building and is assigned to a professor. The response always includes the parent building summary and the professor’s linked user account details. Read operations are public; write operations require admin authentication.
List all cubicles
GET /api/edificios/cubiculos
Returns all cubicles in the system ordered by building. Each record includes the building name and the assigned professor’s user account information.
Response
Cubicle ID.
Assigned professor’s ID.
Parent building ID.
Cubicle number or label (e.g.,
"C-05").Floor number where the cubicle is located.
Optional free-text description of the cubicle’s location.
Whether the cubicle is active.
Example
Create a cubicle
POST /api/edificios/cubiculos
Creates a new cubicle and assigns it to a professor in a building. Requires admin authentication.
Request body
ID of the professor to assign to this cubicle.
ID of the building where the cubicle is located.
Cubicle number or label (e.g.,
"C-12", "Oficina 3B").Floor number. Use
0 for ground floor.Optional location reference to help visitors find the cubicle (e.g.,
"Al fondo del pasillo, frente a las escaleras").Set to
false to create the cubicle in an inactive state.Response
Returns the created cubicle with building and professor details, and HTTP201 Created.
Example
Update a cubicle
PUT /api/edificios/cubiculos/:id
Replaces the full set of fields on an existing cubicle. All fields are required for this operation. Requires admin authentication.
This endpoint performs a full replacement, not a partial update. You must supply all fields — including those you do not intend to change — to avoid overwriting them with empty values.
Path parameters
The
id_cubiculo of the cubicle to update.Request body
Assigned professor ID. To reassign the cubicle, provide the new professor’s ID.
Building ID. To move the cubicle to another building, provide the new building’s ID.
Cubicle number or label.
Floor number.
Location reference description. Pass an empty string if not applicable.
Active status.
Response
Returns the updated cubicle with building and professor details.Example
Delete a cubicle
DELETE /api/edificios/cubiculos/:id
Permanently deletes a cubicle record. The associated professor and building records are not affected. Requires admin authentication.
Path parameters
The
id_cubiculo of the cubicle to delete.