Skip to main content
GET
/
leitos
curl -X GET "https://api.vidaplus.com/leitos/?offset=0&limit=10" \
  -H "Authorization: Bearer YOUR_TOKEN"
{
  "leitos": [
    {
      "id": 1,
      "numero_leito": "101-A",
      "paciente_id": null,
      "tipo": "Enfermaria",
      "status": "Livre"
    },
    {
      "id": 2,
      "numero_leito": "201-B",
      "paciente_id": 5,
      "tipo": "UTI",
      "status": "Ocupado"
    },
    {
      "id": 3,
      "numero_leito": "102-A",
      "paciente_id": null,
      "tipo": "Emergência",
      "status": "Reservado"
    }
  ]
}

Authentication

This endpoint requires authentication.
  • Superusers: Can view all beds
  • Regular users: Can only view beds where they are the assigned patient

Query Parameters

offset
integer
default:"0"
Number of records to skip for pagination
limit
integer
default:"100"
Maximum number of records to return

Response

leitos
array
Array of bed objects
curl -X GET "https://api.vidaplus.com/leitos/?offset=0&limit=10" \
  -H "Authorization: Bearer YOUR_TOKEN"
{
  "leitos": [
    {
      "id": 1,
      "numero_leito": "101-A",
      "paciente_id": null,
      "tipo": "Enfermaria",
      "status": "Livre"
    },
    {
      "id": 2,
      "numero_leito": "201-B",
      "paciente_id": 5,
      "tipo": "UTI",
      "status": "Ocupado"
    },
    {
      "id": 3,
      "numero_leito": "102-A",
      "paciente_id": null,
      "tipo": "Emergência",
      "status": "Reservado"
    }
  ]
}

Access Control

  • Superuser accounts: Receive all beds matching the pagination criteria
  • Patient accounts: Results are automatically filtered to show only beds where paciente_id matches the authenticated user’s ID

Build docs developers (and LLMs) love