Skip to main content
GET
/
consultas
curl -X GET "https://api.vidaplus.com/consultas/?offset=0&limit=20" \
  -H "Authorization: Bearer <token>"
{
  "consultas": [
    {
      "id": 1,
      "data": "2025-04-28",
      "hora": "14:00:00",
      "paciente_id": 1,
      "profissional_id": 2,
      "status": "Agendada",
      "tipoConsulta": "Teleconsulta",
      "observacao": "Consulta de rotina"
    },
    {
      "id": 2,
      "data": "2025-04-29",
      "hora": "10:30:00",
      "paciente_id": 3,
      "profissional_id": 2,
      "status": "Agendada",
      "tipoConsulta": "Presencial",
      "observacao": "Retorno"
    }
  ]
}

Authentication

This endpoint requires authentication. Include a valid JWT token in the Authorization header.
Authorization: Bearer <token>

Authorization

  • Superusers: Can view all appointments in the system
  • Regular users: Can only view appointments where they are either the patient or the professional

Query Parameters

offset
integer
default:"0"
The number of items to skip before starting to return resultsExample: 0
limit
integer
default:"100"
The maximum number of items to returnExample: 20

Response

consultas
array
An array of appointment objects
curl -X GET "https://api.vidaplus.com/consultas/?offset=0&limit=20" \
  -H "Authorization: Bearer <token>"
{
  "consultas": [
    {
      "id": 1,
      "data": "2025-04-28",
      "hora": "14:00:00",
      "paciente_id": 1,
      "profissional_id": 2,
      "status": "Agendada",
      "tipoConsulta": "Teleconsulta",
      "observacao": "Consulta de rotina"
    },
    {
      "id": 2,
      "data": "2025-04-29",
      "hora": "10:30:00",
      "paciente_id": 3,
      "profissional_id": 2,
      "status": "Agendada",
      "tipoConsulta": "Presencial",
      "observacao": "Retorno"
    }
  ]
}

Error Codes

Status CodeDescription
200Appointments retrieved successfully
401Unauthorized - invalid or missing token

Notes

  • Results are ordered by date in descending order (most recent first)
  • Non-superusers will only see appointments where they are involved as either the patient or the professional
  • The pagination uses offset-based pagination with configurable limit

Build docs developers (and LLMs) love