Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/FerchoSG/healthcare-web/llms.txt

Use this file to discover all available pages before exploring further.

The patients API provides access to the clinic’s patient registry. You can search for patients by name or national ID, retrieve individual profiles, view a patient’s full appointment history, and register new patients. All endpoints require a valid Authorization bearer token and x-clinic-id header scoped to the active clinic.

GET /patients

Fetch a paginated list of patients, with optional search filtering. Query parameters
Search term matched against patient name and national ID (identification).
page
number
default:"1"
Page number (1-indexed).
limit
number
default:"20"
Number of results per page.
ResponsePaginatedResponse<Patient>
data
Patient[]
required
Array of patient objects for the current page.
meta
object
required
Pagination metadata.
# Search patients by name
curl --request GET \
  --url "http://localhost:3001/patients?search=María&page=1&limit=20" \
  --header "Authorization: Bearer <token>" \
  --header "x-clinic-id: <clinic_id>"
{
  "data": [
    {
      "id": "p_abc123",
      "clinic_id": "7f3a1b2c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
      "first_name": "María",
      "last_name": "Jiménez",
      "identification": "112345678",
      "birth_date": "1985-03-22",
      "gender": "F",
      "whatsapp_phone": "+50688887777",
      "emergency_contact": null,
      "createdAt": "2026-01-10T14:00:00Z",
      "updatedAt": "2026-01-10T14:00:00Z"
    }
  ],
  "meta": {
    "total": 1,
    "page": 1,
    "limit": 20,
    "totalPages": 1
  }
}

GET /patients/:id

Retrieve a single patient by UUID. Path parameters
id
string
required
UUID of the patient.
ResponsePatient Returns the full patient object. See field definitions in the GET /patients section above.
curl --request GET \
  --url http://localhost:3001/patients/p_abc123 \
  --header "Authorization: Bearer <token>" \
  --header "x-clinic-id: <clinic_id>"

GET /patients/:id/appointments

Retrieve all appointments for a specific patient. Path parameters
id
string
required
UUID of the patient.
ResponseAppointment[] Returns an array of appointment objects belonging to the patient. See the appointments page for the full field list.
curl --request GET \
  --url http://localhost:3001/patients/p_abc123/appointments \
  --header "Authorization: Bearer <token>" \
  --header "x-clinic-id: <clinic_id>"

POST /patients

Register a new patient in the clinic. Request body
first_name
string
required
Patient’s first name.
last_name
string
required
Patient’s last name.
identification
string
required
National ID number (cédula). Must be unique within the clinic.
birth_date
string
required
Date of birth in YYYY-MM-DD format.
gender
string
required
Gender. One of M, F, or OTHER.
whatsapp_phone
string
WhatsApp phone number in international format (e.g., +50688887777).
emergency_contact
object
Free-form object containing emergency contact information (e.g., name, relationship, phone number).
ResponsePatient The newly created patient object.
curl --request POST \
  --url http://localhost:3001/patients \
  --header "Authorization: Bearer <token>" \
  --header "x-clinic-id: <clinic_id>" \
  --header "Content-Type: application/json" \
  --data '{
    "first_name": "Carlos",
    "last_name": "Mora",
    "identification": "209876543",
    "birth_date": "1990-07-15",
    "gender": "M",
    "whatsapp_phone": "+50688001122",
    "emergency_contact": {
      "name": "Laura Mora",
      "relationship": "Esposa",
      "phone": "+50688334455"
    }
  }'

Build docs developers (and LLMs) love