LONG100 Universal Schema v1

This schema lets any device (Garmin, Apple Watch, Fitbit, Samsung, COROS, Polar, WHOOP, etc.) pass data into the LONG100 calculator.

JSON structure

{
  "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
  }
}

Brand field hints

Only fields available on a given device are needed. The calculator will scale the score to the metrics provided.

Deep-link import

You can pass data directly into LONG100 via a URL parameter. Build a JSON using the schema above, then:

  1. Serialize to text
  2. URL-encode it
  3. Base64-encode the result

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 (Shortcut approach)

Apple Health has no public web API for web apps. Use the Shortcuts app on iOS:

  1. Create a Shortcut named LONG100 Weekly.
  2. Use Health actions to get the last 7 days for: Resting Heart Rate, Steps, Sleep (hours & deep), HRV, etc.
  3. Build the LONG100 JSON (see schema above), then Base64-encode it.
  4. Open URL: https://YOURDOMAIN/app/index.html?data=BASE64_JSON.

In the app, the button Connect Apple (Shortcut) will try to run that Shortcut via shortcuts://.