Sync

Sync telemetry and fitness data

Receives and processes data from smartwatch devices or fitness trackers. Supports three formats:

  1. FitnessTrackerData (NEW): Complete daily fitness summary with time-series, workouts, and sleep - idempotent by user+date
  2. Device batch format: Send multiple telemetry readings in the items array - efficient for offline sync
  3. Device direct format: Send single reading as direct object properties - simpler for real-time data
post/api/v1/sync

Request

  • Base URL
    https://api.hiyd.ai
  • Auth
    • HTTP bearer
    • or HTTP bearer

Request body

OR

Example request

{
  "device_id": "WATCH-ABC-12345",
  "date": "2026-01-29",
  "time_series_metrics": [
    {
      "timestamp": "2026-01-29T08:00:00Z",
      "heart_rate": 72,
      "steps": 320,
      "hrv": 45,
      "respiratory_rate": 16.5,
      "spo2": 98
    }
  ],
  "daily_cumulatives": {
    "steps": 10524,
    "total_calories_burned": 2340,
    "active_calories_burned": 680,
    "distance_meters": 8420.5,
    "floors_climbed": 12
  },
  "detected_workouts": [
    {
      "workout_type": "run",
      "start_time": "2026-01-29T07:00:00Z",
      "end_time": "2026-01-29T07:45:00Z",
      "average_heart_rate": 145,
      "calories_burned": 420,
      "intensity_score": 8.5
    }
  ],
  "sleep_data": {
    "total_sleep_duration_minutes": 456,
    "sleep_score": 85,
    "stages": {
      "rem_minutes": 98,
      "deep_minutes": 112,
      "light_minutes": 230,
      "awake_minutes": 16
    },
    "bedtime": "2026-01-28T22:30:00Z",
    "wakeup_time": "2026-01-29T06:06:00Z"
  }
}

Response

Sync successful

OR

Example response

{
  "status": "ok",
  "type": "fitness",
  "user_id": "user123",
  "date": "2026-01-29"
}

Changes

No recorded changes to this operation across all 1 revision of this API.