Skip to main content
GET
/
patients
/
:id
Get patient by ID
curl --request GET \
  --url https://api.example.com/patients/:id \
  --header 'Authorization: <authorization>'
{
  "patient": {
    "id": 123,
    "name": "<string>",
    "surname": "<string>",
    "dni": 123,
    "birthdate": "<string>",
    "gender": "<string>",
    "address": "<string>",
    "phone": "<string>",
    "email": "<string>",
    "socialWorkId": 123,
    "state": "<string>"
  }
}

Authentication

This endpoint requires a valid JWT token.
Authorization
string
required
Bearer token for authentication. Include as Bearer <token>.

Path Parameters

id
number
required
The unique identifier of the patient to retrieve.

Response

patient
object
The patient object.

Example Request

curl -X GET https://api.clinica-vitalis.com/patients/1 \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Example Response

{
  "patient": {
    "id": 1,
    "name": "María",
    "surname": "González",
    "dni": 12345678,
    "birthdate": "1985-03-15T00:00:00.000Z",
    "gender": "Femenino",
    "address": "Av. Corrientes 1234, CABA",
    "phone": "11-4567-8901",
    "email": "maria.gonzalez@email.com",
    "socialWorkId": 1,
    "state": "Activo/a"
  }
}

Error Responses

401 Unauthorized

Returned when the JWT token is missing or invalid.
{
  "msg": "Token inválido"
}

404 Not Found

Returned when the patient with the specified ID is not found.
{
  "msg": "No hay paciente cargado en el sistema"
}

500 Internal Server Error

Returned when a server error occurs.
{
  "msg": "Error del servidor"
}

Build docs developers (and LLMs) love