Health tracker API
Store steps, heart rate, HRV, sleep and SpO₂ from any wearable as LOINC-coded FHIR Observations: which devices reach which health store, why there is no web API, and working requests.
A health tracker API lets an application send and read the data that watches, rings, bands and scales collect — steps, heart rate, heart rate variability, sleep, oxygen saturation, weight — as structured data on a server. Most devices do not offer one shared API: their data reaches the phone's health store (Apple HealthKit or Android Health Connect), and your app reads it from there. Anpheros is the server side: your app writes the readings as LOINC-coded FHIR R4 Observations, and every other app, clinic or AI agent with the person's consent reads the same data through one API.
From a watch to your backend Watch, ring, scale Apple Watch, Galaxy Watch, Fitbit, Garmin, Oura, Withings Health store on the phone Apple HealthKit or Android Health Connect Your app Reads with the person's permission, per local day FHIR Observations LOINC-coded steps, heart rate, sleep, SpO₂, weight Your backend One API for every device, with history and consent
Which devices reach which health store
Device
Reaches
Read it with
Apple Watch, iPhone, many iOS apps
Apple HealthKit
Swift on the iPhone (Apple Health to FHIR )
Galaxy Watch, Wear OS, Fitbit, Garmin, Oura, Withings (Android apps)
Android Health Connect
Kotlin or Flutter on the phone (Health Connect to FHIR )
Galaxy Watch details not in Health Connect
Samsung Health
Samsung Health Data SDK (Samsung Health to FHIR )
Neither HealthKit nor Health Connect has a web or REST API: the data lives on the phone, and only an app the person installed and allowed can read it. A health tracker API on a server therefore always starts with a small mobile app.
What a health tracker API should store, coded Steps LOINC 41950-7 · daily total, effectivePeriod = the day
Resting heart rate LOINC 40443-4 · beats per minute
Heart rate variability LOINC 80404-7 · RMSSD in ms
Oxygen saturation LOINC 59408-5 · percent
Sleep LOINC 93832-4 duration; 93831-6 / 93830-8 stages
Active energy LOINC 41981-2 · kcal
Write one day of steps
curl -X POST https://platform.anpheros.com/fhir/R4/Observation \
-H "Authorization: Bearer $KEY" -H "Content-Type: application/fhir+json" \
-H "Idempotency-Key: steps-$PID-2026-10-15" \
-d '{
"resourceType": "Observation",
"status": "final",
"category": [{"coding": [{"system": "http://terminology.hl7.org/CodeSystem/observation-category", "code": "activity"}]}],
"code": {"coding": [{"system": "http://loinc.org", "code": "41950-7", "display": "Number of steps in 24 hour Measured"}]},
"subject": {"reference": "Patient/'"$PID"'"},
"effectivePeriod": {"start": "2026-10-15T00:00:00+03:00", "end": "2026-10-16T00:00:00+03:00"},
"valueQuantity": {"value": 8412, "unit": "steps", "system": "http://unitsofmeasure.org", "code": "{steps}"}
}'
Store one Observation per metric per local day, with the person's time zone in the period. The Idempotency-Key makes a resend harmless. Wearable data in FHIR has the full LOINC table and a tested daily upsert.
Read it back
# the last 30 daily step counts
curl "https://platform.anpheros.com/fhir/R4/Observation?patient=$PID&code=http://loinc.org|41950-7&_sort=-date&_count=30" \
-H "Authorization: Bearer $KEY"
Another application reads the same data only with the person's consent (OAuth 2.1, SMART scopes such as patient/Observation.rs?category=activity), and every read is logged where the person can see it.
Frequently asked questions
Is there a free health tracker API?
Anpheros has a free sandbox: store and read tracker data as FHIR Observations with 30 synthetic patients. Device makers' own APIs (Fitbit, Garmin, Oura, Withings) have their own access rules and terms.
Is there a web API for Apple Health or Health Connect?
No. HealthKit and Health Connect keep data on the phone; an installed app reads it with the person's permission and can send it to a server such as Anpheros.
Which codes should a health tracker API use?
LOINC: 41950-7 steps, 8867-4 heart rate, 40443-4 resting heart rate, 80404-7 heart rate variability (RMSSD), 59408-5 oxygen saturation, 93832-4 sleep duration, 29463-7 body weight. Units in UCUM.
Does Anpheros connect to Fitbit or Garmin directly?
No. Their data reaches Anpheros through the phone's health store and your app; there is no direct cloud-to-cloud connection.
Related
Ask your AI Paste this into Claude, ChatGPT, Cursor or Claude Code. Your assistant reads this guide and adapts it to your code.
Read https://developers.anpheros.com/guides/health-tracker-api.md and help me apply this guide to my own project. Use the Anpheros sandbox (base URL https://platform.anpheros.com) with my API key from the ANPHEROS_KEY environment variable, never written in the code. Give me complete, runnable code, the response I should expect, and how to fix the errors in https://developers.anpheros.com/guides/troubleshooting.md if a call fails.Open in Claude Open in ChatGPT This guide as Markdown Build the whole integration with an AI coding tool
More on Medical data integration
Healthcare data interoperability The technical, syntactic, semantic and organisational levels of interoperability, the standards Anpheros uses (FHIR R4, IPS, SMART on FHIR, HL7 v2) and why provenance makes exchanged data trustworthy. Healthcare integrations Integration patterns supported today: lab reports in one call, clinics writing on behalf of an organisation, devices, consented third-party apps, webhooks and SDKs — and what is not available. Lab results API: HL7 v2, FHIR and LOINC How lab results travel as HL7 v2 and FHIR R4 data, what one result must carry, and how to receive lab reports into a FHIR record, with a real example. HL7 v2 to FHIR mapping Segment-to-resource and OBX field-by-field mapping from HL7 v2 ORU^R01 to FHIR R4, the traps that break integrations, and a converter you call over HTTPS. HL7 v2 and FHIR for clinical dashboards From an HL7 v2 ORU^R01 lab message to a dashboard tile: FHIR Observations with ranges and flags, signed webhooks, no duplicates — and why this is not bedside monitoring. How to import laboratory results into a FHIR record Tutorial: import a lab report as CSV and as HL7 v2 ORU^R01 into FHIR R4 Observations with LOINC codes and reference ranges, handle unmapped markers and resent reports, and trace each result to its laboratory. Health data normalization: how to normalize medical data Tutorial: turn medical data from many sources into one comparable form — LOINC lookup, UCUM units, ISO dates, reference ranges, no duplicates on retry, and validation against the European lab profile. Medical data provenance explained What provenance records on every write to a FHIR R4 record — author type, person, organisation, source system, versions — how to set it with headers, how to read it, and how it labels data given to AI models. How to integrate clinic systems with a FHIR backend Tutorial: connect a clinic EMR to patients' FHIR R4 records — directory of doctors, matching by record number, a visit as one transaction with the doctor as author, lab reports, other providers' data and webhooks. A patient data platform for clinics and hospitals What a clinic, hospital or laboratory gets from Anpheros Platform: patient-approved access to a standard FHIR R4 record, results written back, an audit the patient can read, EU hosting, and how to start with the sandbox. ICD-10 to ICD-11 conversion API (official mapping tables) Translate ICD-10 codes to ICD-11 with the official mapping tables: REST and FHIR ConceptMap/$translate, ICD-11 titles in the official translations, one-to-many maps marked for clinical choice, CSV and Excel conversion in a free account. Clinic access requests with patient approval (CIBA) The OpenID CIBA flow behind clinic access requests: reception enters the patient's email, the patient approves in the app or by email for 30, 90 or 365 days, and the clinic's application receives tokens. International patient data exchange through the patient How hospitals in different countries can share a patient's record through the patient: a portable FHIR R4 record, an International Patient Summary, consent per clinic, and what it does not replace. Wearable data in FHIR (Apple Health, Health Connect) Get smartwatch, ring and scale data into a FHIR record: which devices reach which health store, a LOINC mapping table, daily summaries and a tested upsert. Wearable APIs compared: Oura, Garmin, WHOOP, Fitbit and 15 more Twenty wearable and CGM brands compared as of November 2026 — public API or not, who gets access, Apple Health and Health Connect sync — with a guide per brand and one FHIR format for every device. Oura API to FHIR: Oura sleep, HRV and heart rate in your app Read sleep, HRV, heart rate, SpO₂ and steps from the Oura API v2 and store them as LOINC-coded FHIR R4 Observations, with curl, Python and JavaScript; access, OAuth, endpoints and limits. Garmin API to FHIR: heart rate, sleep and steps (with code) Read Garmin Health API or Personal API data and store heart rate, sleep and steps as FHIR R4 Observations, with access tiers, auth and LOINC mapping. WHOOP API to FHIR: sleep, recovery and HRV (with code) Read WHOOP API v2 sleep and recovery and store them as FHIR R4 Observations: OAuth scopes, rate limits, RMSSD handling and Apple Health limits. Withings API to FHIR: heart rate, SpO₂, sleep and weight (with code) Read the Withings Public API and store measures, sleep and activity as FHIR R4 Observations, with OAuth, the 120/min limit and LOINC mapping. Polar AccessLink API to FHIR: sleep, heart rate and steps (with code) Read Polar AccessLink v3 sleep, heart rate and steps and store them as FHIR R4 Observations, with user registration, rate limits and phone sync. Google Health API to FHIR: Fitbit and Pixel Watch data in your app Read Fitbit and Pixel Watch data with the Google Health API, the Fitbit Web API successor, and store it as FHIR R4 Observations, with curl, Python and JS code. Huawei Health Kit API to FHIR: Huawei Health data in your app Huawei Health Kit REST API: approval, 100-user cap, OAuth, endpoints and data types, and how to store steps, sleep and heart data as FHIR R4. Xiaomi Mi Band API: get Mi Band data into FHIR (no public cloud API) Xiaomi has no public cloud API: read Mi Band data from Health Connect or Apple Health via Mi Fitness and store it as FHIR R4 Observations, with code. Amazfit and Zepp API: get Amazfit watch data into FHIR Zepp has no public cloud API: read Amazfit data with Zepp OS Mini Programs or Apple Health and store it as FHIR R4 Observations, with code. COROS API to FHIR: sleep, heart rate and steps (with code) Get COROS data via the Partner API or the self-service COROS MCP and store sleep, heart rate and steps as FHIR R4 Observations. Suunto API to FHIR: sleep, heart rate and steps (with code) Read the Suunto Cloud API (API Zone, subscription key) and store sleep, heart rate and steps as FHIR R4 Observations, with limits and webhooks. Ultrahuman API to FHIR: get Ultrahuman Ring data into your app Ultrahuman OAuth API, personal tokens and MCP: read Ring AIR heart rate, HRV, sleep and steps and store them as FHIR R4 Observations, with code. Eight Sleep API: get Eight Sleep data into FHIR without a public API Eight Sleep has no public API: read its sleep and heart data from Apple Health or Health Connect and store it as FHIR R4 Observations, with code. Dexcom API to FHIR: get CGM glucose readings into your app (with code) Read CGM glucose from the Dexcom API v3 and store each reading as a FHIR Observation: access tiers, OAuth, endpoints, limits and the US partner pause. FreeStyle Libre API: get Libre glucose data into FHIR (no public API) Abbott has no public FreeStyle Libre or LibreView API: what exists (partnerships, Lingo sync to phone stores) and how to store glucose readings in FHIR. Amazon Halo API alternative: where Halo users and developers go now Amazon Halo shut down in 2023 and never had a public API: what happened, and where activity, sleep and body data come from now, stored in FHIR. Fitbit Web API shutdown: what to use instead (Google Health API, Health Connect) Google turns the Fitbit Web API off on 30 October 2026: the dates, the Google Health API and Health Connect paths, and a migration checklist. CMS Patient Access API and FHIR What the CMS Patient Access API requires from US health plans, the FHIR profiles it uses (CARIN Blue Button, US Core), how an app registers and authorizes, and where the data can live with consent. Cures Act and information blocking for health apps What the 21st Century Cures Act and ONC's information blocking rule mean for a health app: certified FHIR APIs, USCDI, who the rules cover and what you still have to do. SMART on FHIR with Epic and Oracle Health A generic guide to reading patient data from Epic and Oracle Health with SMART App Launch: registration, discovery, EHR and standalone launch, PKCE, scopes and the differences you meet. TEFCA and QHINs for developers How TEFCA and Qualified Health Information Networks work, the exchange purposes including individual access, what joining means for an app, and how FHIR is phased in. HIPAA for health app backends When HIPAA applies to a health app backend, what the Security Rule asks (risk analysis, access control, audit logs, BAAs, breach notification) and what Anpheros does and does not claim. Blue Button 2.0 and the Medicare API CMS Blue Button 2.0: the Medicare claims it returns as FHIR R4, the sandbox, OAuth authorization, production review, and how to turn claims into a useful patient history. Apple HealthKit to FHIR: Apple Watch data in your app (with code) Read Apple Watch and Apple Health data with HealthKit in Swift, per local day, and write it to a FHIR R4 record: permissions, background sync, Apple's rules. Health Connect API to FHIR: Android, Fitbit, Garmin and Oura data (with code) Read Android Health Connect data from Fitbit, Garmin, Oura, Withings and Wear OS in Flutter and write it to a FHIR R4 record: permissions, history, Play review. Samsung Health API to FHIR: Galaxy Watch data in your app (with code) Galaxy Watch data through Health Connect or the Samsung Health Data SDK: a real comparison, partner approval, developer mode and the FHIR mapping. Remote patient monitoring with FHIR From home blood pressure readings to alerts: device Observations, signed webhooks, an idempotent rule, and what stays outside the data layer. Tested code. EHDS for developers: European Health Data Space (2029, 2031) Regulation (EU) 2025/327 for software teams: the 2029 and 2031 dates, EHR system components, wellness app labelling, the FHIR exchange format and what to build now. GDPR and health data for developers Article 9 health data as engineering tasks: legal basis, DPA, EU residency, security, access and erasure, DPIA — mapped to what Anpheros covers. HIPAA: BAA on request. Not legal advice. Try it free in the sandbox · first FHIR call in 5 minutes Free · 30 synthetic patients · no card Your first API call in 2 minutes →