curl --request GET \
--url https://api.example.com/api/reservations \
--header 'Authorization: <authorization>'{
"date": "<string>",
"stats": {
"stats.total_entries": 123,
"stats.total_exits": 123
},
"entries": [
{
"entries[].id_reservation": 123,
"entries[].entry_date": "<string>",
"entries[].exit_date": "<string>",
"entries[].status": "<string>",
"entries[].license_plate": "<string>",
"entries[].brand": "<string>",
"entries[].color": "<string>",
"entries[].customer_name": "<string>",
"entries[].phone": "<string>",
"entries[].service_name": "<string>"
}
],
"exits": [
{}
]
}curl --request GET \
--url https://api.example.com/api/reservations \
--header 'Authorization: <authorization>'{
"date": "<string>",
"stats": {
"stats.total_entries": 123,
"stats.total_exits": 123
},
"entries": [
{
"entries[].id_reservation": 123,
"entries[].entry_date": "<string>",
"entries[].exit_date": "<string>",
"entries[].status": "<string>",
"entries[].license_plate": "<string>",
"entries[].brand": "<string>",
"entries[].color": "<string>",
"entries[].customer_name": "<string>",
"entries[].phone": "<string>",
"entries[].service_name": "<string>"
}
],
"exits": [
{}
]
}isAdmin middleware validates the user’s admin status before allowing access.2026-03-10).If not provided, defaults to the current date.PENDIENTE, EN CURSO, FINALIZADA, CANCELADA).entries array.entry_date matches the requested date (date component only)exit_date matches the requested date (date component only)| Status Code | Description |
|---|---|
| 200 | Success - Returns reservations data |
| 401 | Unauthorized - Missing or invalid authentication token |
| 403 | Forbidden - User is not an admin |
| 500 | Internal Server Error - Database query failed |
curl -X GET "https://paparcapp-azby.onrender.com/api/reservations?date=2026-03-10" \
-H "Authorization: Bearer YOUR_ADMIN_TOKEN"
curl -X GET "https://paparcapp-azby.onrender.com/api/reservations" \
-H "Authorization: Bearer YOUR_ADMIN_TOKEN"
{
"date": "2026-03-10",
"stats": {
"total_entries": 5,
"total_exits": 3
},
"entries": [
{
"id_reservation": 101,
"entry_date": "2026-03-10T10:00:00.000Z",
"exit_date": "2026-03-15T10:00:00.000Z",
"status": "PENDIENTE",
"license_plate": "1234ABC",
"brand": "Toyota",
"color": "Rojo",
"customer_name": "Juan Pérez",
"phone": "+34612345678",
"service_name": "Parking Cubierto"
},
{
"id_reservation": 102,
"entry_date": "2026-03-10T14:30:00.000Z",
"exit_date": "2026-03-12T09:00:00.000Z",
"status": "EN CURSO",
"license_plate": "5678DEF",
"brand": "Honda",
"color": "Azul",
"customer_name": "María García",
"phone": "+34623456789",
"service_name": "Parking Descubierto"
}
],
"exits": [
{
"id_reservation": 95,
"entry_date": "2026-03-05T08:00:00.000Z",
"exit_date": "2026-03-10T11:00:00.000Z",
"status": "FINALIZADA",
"license_plate": "9012GHI",
"brand": "Ford",
"color": "Negro",
"customer_name": "Carlos López",
"phone": "+34634567890",
"service_name": "Parking Premium"
}
]
}
{
"error": "Unauthorized"
}
{
"error": "Forbidden - Admin access required"
}
{
"error": "Error en el servidor, por favor intente más tarde."
}
null exit dates if the customer hasn’t specified when they’ll leave. These won’t appear in the exits array.en-CA locale for date formatting, which uses ISO 8601 format (YYYY-MM-DD).entries and exits arrays.