TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/devdavco/backend_1/llms.txt
Use this file to discover all available pages before exploring further.
POST /espacios/create endpoint registers a brand-new coworking space in the system. You supply the space’s name, functional type, maximum occupancy, and the number of post-booking cleaning minutes in a JSON body. The service validates every field, persists the new entity, and returns the complete Espacio object — including the database-assigned id — with an HTTP 201 Created status.
Request body
Send a JSON object with the following fields. All four fields are required; the service will throw an exception if any are missing, null, blank, or zero.Human-readable name of the space. Maximum 50 characters. Cannot be null or blank. Example:
"Sala de Reuniones A".Functional category of the space. Maximum 30 characters. Cannot be null or blank. Common values include
sala_reunion, auditorio, and oficina_privada.Maximum number of people that can occupy the space at one time. Must be a positive non-zero integer. Example:
10.Number of minutes to block after every booking ends so the space can be cleaned before the next booking starts. Must be a positive non-zero integer. Example:
15.The
id field is auto-generated by the database and must not be included in the request body. Any id value sent will be ignored.Example request
Response
201 Created
On success the endpoint returns HTTP 201 Created with the newly persisted Espacio object as the response body. Theid field will be populated with the value assigned by the database.
Response fields
Auto-generated unique identifier assigned by the database. Store this value to reference the space in future requests (e.g.,
GET /espacios/{id}, DELETE /espacios/eliminar/{id}, or when creating a Reserva).The name of the newly created space, echoed back from the request.
The functional category of the newly created space, echoed back from the request.
The maximum occupancy of the newly created space, echoed back from the request.
The cleaning buffer (in minutes) of the newly created space, echoed back from the request.
Validation errors
The service performs the following checks before persisting the entity. If any check fails, the exception is re-thrown and Spring Boot returns HTTP 500 Internal Server Error:| Condition | Error message |
|---|---|
Request body is null | "El objeto no puede ser nulo." |
nombre is null or blank | "El nombre no puede ser nulo." |
tipo is null or blank | "El tipo no puede ser nulo." |
capacidad is null or 0 | "El capacidad no puede ser cero/nulo." |
minutos_limpieza is null or 0 | "Minutos limpieza no puede ser cero/nulo." |