Glucose Readings
Glucose readings are ingested from LibreLinkUp and stored per patient. Retention follows the retention table (paid plans: 5 years auto-delete; demo data: 7 days) — not infinite. A patient with storeReadings: false runs in tunnel mode: readings are forwarded but not persisted.
Reading object
The API returns readings shaped like:
{ "id": "uuid", "patientId": "uuid", "glucose": 132.0, "units": "mg/dL", "eventTime": "2026-10-01T12:00:00.000Z", "glucoseType": "Manual", "eventType": "BG Check", "enteredBy": "api"}| Field | Notes |
|---|---|
glucose | Stored as entered, displayed via the patient’s glucoseUnit (mgdl ↔ mmol/L conversion ×18.0182) |
units | mg/dL or mmol/L |
storeReadings | If false on the patient, reading is forwarded but not persisted (tunnel mode) |
trend | LibreLinkUp trend arrow on ingress readings (see table below) |
Trend values
| Value | Symbol | Description |
|---|---|---|
rapidlyRising | ↑↑ | Rising > 2 mmol/L per 15 min |
rising | ↑ | Rising 1–2 mmol/L per 15 min |
slowlyRising | ↗ | Rising < 1 mmol/L per 15 min |
flat | → | Stable |
slowlyFalling | ↘ | Falling < 1 mmol/L per 15 min |
falling | ↓ | Falling 1–2 mmol/L per 15 min |
rapidlyFalling | ↓↓ | Falling > 2 mmol/L per 15 min |
Query (public API)
# Latest reading for a patientcurl "https://api.levelcast.org/api/v1/public/patients/PATIENT_ID/readings/latest" \ -H "X-API-KEY: lc_your_key_here"
# Paginated history (max 50 per page) with min/max/avg statscurl "https://api.levelcast.org/api/v1/public/patients/PATIENT_ID/readings?page=1&limit=50" \ -H "X-API-KEY: lc_your_key_here"
# 15-minute resampled series for the last 24h (custom startTime/endTime supported)curl "https://api.levelcast.org/api/v1/public/patients/PATIENT_ID/readings/resampled" \ -H "X-API-KEY: lc_your_key_here"
# Cross-patient feedcurl "https://api.levelcast.org/api/v1/public/measurements?page=1&limit=50" \ -H "X-API-KEY: lc_your_key_here"Write (public API)
# Single readingcurl -X POST "https://api.levelcast.org/api/v1/public/readings" \ -H "Content-Type: application/json" \ -H "X-API-KEY: lc_your_key_here" \ -d '{ "patientId": "PATIENT_ID", "glucose": 132, "units": "mg/dL", "eventTime": "2026-10-01T12:00:00.000Z" }'
# Batch of up to 100 (partial success: { "created": […], "errors": […], "total": n })curl -X POST "https://api.levelcast.org/api/v1/public/readings/batch" \ -H "Content-Type: application/json" \ -H "X-API-KEY: lc_your_key_here" \ -d '{ "readings": [ { "patientId": "PATIENT_ID", "glucose": 132, "units": "mg/dL", "eventTime": "2026-10-01T12:00:00.000Z" } ] }'Writes require the write scope and are marked enteredBy: "api".
Exports
See Exports for CSV/JSON/XML exports and PDF reports via Gotenberg.