curl --request GET \
--url https://api.example.com/api/users/:id/reservations{
"id": 123,
"doctorId": 123,
"patientId": 123,
"timeBlockId": 123,
"reason": "<string>",
"notes": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"error": "<string>"
}Retrieve reservations for a specific user
curl --request GET \
--url https://api.example.com/api/users/:id/reservations{
"id": 123,
"doctorId": 123,
"patientId": 123,
"timeBlockId": 123,
"reason": "<string>",
"notes": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"error": "<string>"
}Authorization: Bearer <token>
| Status Code | Error Message | Description |
|---|---|---|
| 401 | Access Denied, no token provided | No JWT token was provided |
| 403 | Invalid token | The JWT token is invalid or expired |
| 404 | Reserva no encontrada | The reservation was not found |
| 500 | Internal server error | An unexpected error occurred while fetching reservations |
curl -X GET https://api.example.com/api/users/42/reservations \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
{
"id": 201,
"doctorId": 7,
"patientId": 42,
"timeBlockId": 503,
"reason": "Annual checkup",
"notes": "Patient prefers morning appointments",
"createdAt": "2024-03-01T09:30:00.000Z",
"updatedAt": "2024-03-01T09:30:00.000Z"
}