Skip to main content
GET
/
work_schedules
curl -X GET "https://api.clinicavitalis.com/work_schedules?professionalID=5&dayOfWeek=1" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"
{
  "schedules": [
    {
      "id": 1,
      "professionalID": 5,
      "dayOfWeek": 1,
      "startTime": "09:00",
      "endTime": "17:30",
      "Professional": {
        "name": "María",
        "surname": "González",
        "dni": 12345678
      }
    },
    {
      "id": 2,
      "professionalID": 5,
      "dayOfWeek": 3,
      "startTime": "08:00",
      "endTime": "14:00",
      "Professional": {
        "name": "María",
        "surname": "González",
        "dni": 12345678
      }
    }
  ]
}

Authentication

Requires a valid JWT token in the request header.

Query Parameters

professionalID
integer
Filter schedules by professional ID
dayOfWeek
integer
Filter schedules by day of the week
  • 0 = Sunday (Domingo)
  • 1 = Monday (Lunes)
  • 2 = Tuesday (Martes)
  • 3 = Wednesday (Miércoles)
  • 4 = Thursday (Jueves)
  • 5 = Friday (Viernes)
  • 6 = Saturday (Sábado)

Response

schedules
array
Array of work schedule objects
curl -X GET "https://api.clinicavitalis.com/work_schedules?professionalID=5&dayOfWeek=1" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"
{
  "schedules": [
    {
      "id": 1,
      "professionalID": 5,
      "dayOfWeek": 1,
      "startTime": "09:00",
      "endTime": "17:30",
      "Professional": {
        "name": "María",
        "surname": "González",
        "dni": 12345678
      }
    },
    {
      "id": 2,
      "professionalID": 5,
      "dayOfWeek": 3,
      "startTime": "08:00",
      "endTime": "14:00",
      "Professional": {
        "name": "María",
        "surname": "González",
        "dni": 12345678
      }
    }
  ]
}

Notes

  • Results are automatically sorted by dayOfWeek (ascending) and then by startTime (ascending)
  • If no filters are provided, all work schedules in the system are returned
  • Each professional can have only one schedule block per day of the week

Build docs developers (and LLMs) love