This schema lets any device (Garmin, Apple Watch, Fitbit, Samsung, COROS, Polar, WHOOP, etc.) pass data into the LONG100 calculator.
{
"brand": "garmin | apple | fitbit | samsung | coros | polar | whoop | other",
"age": 40,
"sex": "male | female | other",
"units": "kg | lb",
"baselines": {
"rhr": 56, // Resting HR baseline (bpm)
"hrv": 70 // HRV baseline (ms), weekly avg typical
},
"metrics": {
"rhr": 58, // current resting HR (bpm)
"hrv": 68, // current HRV (ms, weekly avg)
"vo2pct": 76, // VO2 Max percentile for age/sex (0-100)
"training_load": "productive | maintaining | other",
"steps": 9000, // avg steps/day
"intensity_minutes": 165, // moderate mins/week or vigorous-equivalent
"sleep_hours": 7.4, // avg hours
"deep_sleep_pct": 18, // percent of total sleep
"stress_score": 30, // daily avg stress
"body_battery": 45, // end-of-day avg (if supported)
"body_fat_pct": 19, // if using body composition instead of battery
"weight": 86 // optional, used for info only
}
}
Only fields available on a given device are needed. The calculator will scale the score to the metrics provided.
You can pass data directly into LONG100 via a URL parameter. Build a JSON using the schema above, then:
Open https://YOURDOMAIN/app/index.html?data=BASE64_ENCODED_JSON
// Example in JavaScript
const payload = {
brand: "apple",
age: 38,
sex: "female",
units: "kg",
baselines: { rhr: 60, hrv: 65 },
metrics: { rhr: 61, hrv: 63, vo2pct: 72, steps: 8200, intensity_minutes: 155, sleep_hours: 7.2, deep_sleep_pct: 17, stress_score: 32 }
};
const url = 'https://long100.app/app/index.html?data=' + encodeURIComponent(btoa(JSON.stringify(payload)));
// Open this URL to import the data automatically.
Apple Health has no public web API for web apps. Use the Shortcuts app on iOS:
LONG100 Weekly
.https://YOURDOMAIN/app/index.html?data=BASE64_JSON
.In the app, the button Connect Apple (Shortcut) will try to run that Shortcut via shortcuts://
.