Skip to main content
POST
/
space
/
occupied
Get Occupied Dates
curl --request POST \
  --url https://api.example.com/space/occupied \
  --header 'Content-Type: application/json' \
  --data '
{
  "v_space": "<string>"
}
'
{
  "result": [
    {
      "ID_RESERVATION": "<string>",
      "INIT_DATE": "<string>",
      "END_DATE": "<string>"
    }
  ]
}
Returns all existing reservations for a specific space, including the reservation ID, start date, and end date. This is useful for checking space availability and displaying occupied time slots in a calendar or booking interface.

Request Body

v_space
string
required
Name of the space to queryExample: "SALÓN SOCIAL"

Response

result
array
Array of reservation objects for the requested space

Example Request

curl -X POST https://api.example.com/space/occupied \
  -H "Content-Type: application/json" \
  -d '{
    "v_space": "SALÓN SOCIAL"
  }'

Example Responses

200 Reservations Found
{
  "result": [
    {
      "ID_RESERVATION": "RE001",
      "INIT_DATE": "2025-01-15T10:00:00.000Z",
      "END_DATE": "2025-01-15T18:00:00.000Z"
    },
    {
      "ID_RESERVATION": "RE002",
      "INIT_DATE": "2025-01-20T14:00:00.000Z",
      "END_DATE": "2025-01-20T22:00:00.000Z"
    }
  ]
}
400 No Reservations
{
  "result": "No hay reservas para este Espacio"
}
500 Server Error
{
  "message": "Error interno del servidor"
}

Use Cases

  • Display a calendar showing occupied dates for a space
  • Check space availability before creating a reservation
  • Prevent double-booking by validating against existing reservations
  • Build a booking interface with real-time availability
This endpoint does not require authentication, making it suitable for public-facing booking interfaces where users need to check availability before registering.
The space name must match exactly (case-sensitive) with the registered space name in the system.

Build docs developers (and LLMs) love