Skip to main content
GET
/
patients
/
{cpf}
Get Patient
curl --request GET \
  --url https://api.example.com/patients/{cpf}
{}
Retrieves a patient’s information by their CPF.

Path Parameters

cpf
string
required
The patient’s CPF (11-digit Brazilian tax ID).

Response

cpf
string
The patient’s CPF.
name
string
The patient’s full name.
email
string
The patient’s email address.
dateOfBirth
string
The patient’s date of birth in ISO 8601 format.
address
string
The patient’s address.
medicalHistory
string
The patient’s medical history.

Example Request

cURL
curl -X GET http://localhost:8080/patients/12345678901

Example Response

200 OK
{
  "cpf": "12345678901",
  "name": "Maria Silva",
  "email": "maria.silva@example.com",
  "dateOfBirth": "1990-05-15",
  "address": "Rua das Flores, 123, São Paulo, SP",
  "medicalHistory": "No known allergies. Previous surgery in 2015."
}

Error Responses

{}
{
  "error": "Internal server error",
  "message": "An unexpected error occurred"
}

Notes

  • Returns 404 if no patient exists with the provided CPF
  • The password field is never included in the response for security reasons
  • CPF should be provided without any formatting (no dots or dashes)

Build docs developers (and LLMs) love