Patients
A Patient is the core entity. Each patient belongs to a user (patient.userId) and has glucose readings, custom thresholds, LibreLinkUp connections and treatments.
Dashboard vs public API: patient management (
POST/PUT/DELETE /api/v1/patients) requires a session cookie. Programmatic access with an API key uses the public equivalents below — see the API reference.
Public API (API key)
curl "https://api.levelcast.org/api/v1/public/patients" -H "X-API-KEY: lc_your_key_here"# → [{ "id": "…", "name": "…", "surname": "…" }]
curl "https://api.levelcast.org/api/v1/public/patients/summary" -H "X-API-KEY: lc_your_key_here"# → per-patient latest glucose + units, paginatedDeeper per-patient data: …/readings, …/readings/latest, …/readings/resampled, …/treatments, …/custom-levels, …/insights, …/stats, …/events, …/daily/:date, plus …/connections and …/shared-links. All are GET (read scope) under /api/v1/public/patients/:patientId/.
Patient object
{ "id": "uuid", "name": "John", "surname": "Doe", "diabetesType": "type1", "unit": "mmol/L", "storeReadings": true, "treatments": [ { "startDate": "2024-01-01", "endDate": null, "medications": [{ "name": "Metformin", "activePrinciples": [{ "name": "Metformin", "dose": "500", "unit": "mg" }] }] } ], "createdAt": "2024-01-01T00:00:00Z"}| Field | Notes |
|---|---|
diabetesType | type1 / type2 / gestational / other / LADA |
storeReadings | true = persist to glucose_reading, false = tunnel mode (forward only) |
treatments | Sorted newest first, endDate:null = active |
Limits
patients: 4 (Free), 20 (Pro), ∞ (Clinic/Founder). Enforced at POST /api/v1/patients (canCreatePatient → 402). UI shows ApiStatCard X/4 + PremiumUpsellModal.
Related
- Treatments — see
Treatmentsconcept forpatientTreatment+patientMedicationtables andMedicationAnalytics. - Organizations — patients can be assigned to orgs via
patientAssignmentand appear inViewOrganizationPatientswith TIR sparkline.