For the complete documentation index, see llms.txt. This page is also available as Markdown.

Data Model

Your user's data is flowing in, and you want to build something awesome? Great! But first, you need to understand how we organize this data - picking the right approach will save you headaches later.

Thryve processes and stores wearable data using three data structures: epoch data, daily data and health documents. Data that was recorded together in one session, such as an ECG, is additionally grouped into a measurement. Understanding the distinction between these approaches is crucial for proper data interpretation and application development.

Aspect
Epoch Data
Daily Data
Health Documents

Time Reference

Absolute timestamps or timeframes

Calendar date in user's local timezone

Absolute timestamps (via measurement)

Precision

High (seconds)

Low (daily aggregates)

Depending on document type

Data Volume

Up to hundreds of records per day per data source per data type

One value per data source per data type per day

Depending on document type

Uniqueness

dataSourceId, thirdPartyDataSourceId, dataTypeId, startTimestamp, generationType

dataSourceId, dataTypeId, day

Defined via measurement

Linked to measurement

Optional. Linked when the value was recorded during a measurement

Optional

Always

A measurement represents one recording session, for example an ECG reading. It is not a separate type of data but groups all data captured or derived during that session (health documents, epoch data and daily data) under one unique reference ,

Why it exists? This way you don’t need to match values by timestamp to find out which ones belong together. The epoch and daily values in a measurement are still available through the regular epoch and daily endpoints.

Epoch data

Epoch data represents continuous, timestamped measurements collected at specific moments in time. This data maintains precise temporal accuracy and is ideal for detailed analysis of patterns, trends, and health and activity monitoring.

Key Characteristics

Granularity: Varies significantly based on data sources and devices used by the end user. Sensors in wearables typically record data at high sampling rates (50Hz and higher), which manufacturers transform into digestible values. The granularity of these processed values depends on the manufacturer's philosophy:

  • Withings: Provides step data in chunks of a maximum 10 minutes (during walking periods)

  • Polar: Aggregates data on an hourly level

  • Fitbit: Only provides intraday data for sleep periods and workout recordings without special access

Granularity also depends on measurement context. Some data sources generate more granular data during workout recordings triggered by end users compared to passive measurements throughout the day.

Temporal Precision:

  • For point-in-time measurements (e.g., weight, sometimes heart rate), only startTimestamp is provided

  • For duration-based data (e.g., activity periods, avg heart rate over a period), both startTimestamp and endTimestamp are provided

  • All timestamps maintain seconds-level precision

Timestamp Formats: Data is provided by Thryve in your preferred format:

  • ISO 8601 with timezone information (when available) and additional timezoneOffset in minutes to UTC - recommended for human-readable applications

  • Unix timestamp in milliseconds (UTC) with timezoneOffset in minutes to UTC - recommended for programmatic processing

Daily data

Daily data represents aggregated measurements organized by calendar days in the user's local timezone. This data is designed for simplified consumption and day-over-day comparisons.

Key Characteristics

Enhanced data availability: Daily aggregates provided directly by data sources may extend beyond available epoch data for a given user and data source. For example, Fitbit provides intraday data only when users actively trigger activity recording, while daily values include passive measurements throughout the entire day.

Timezone Handling:

  • The day field represents a calendar date in the user's local timezone

  • timezoneOffset provides the offset to UTC in minutes

  • For users traveling across timezones within a single day, timezoneOffset reflects the timezone where more data was recorded

Timestamp Formats: Data is provided by Thryve in your preferred format:

  • ISO 8601 date: Simple date string (YYYY-MM-DD) representing a calendar date in the user's local timezone - recommended for user interfaces

  • Unix timestamp: Milliseconds midnight UTC for the date - recommended for calculations and storage

timezoneOffset reflects the offsent in minutes to UTC timezone where data was recorded

Timezone Travel Detection: When users cross timezones during a calendar day, the actual duration of their "day" may not be exactly 24 hours. The chronologicalExactness field captures this deviation in minutes:

  • Positive values: Day was longer than 24 hours (e.g., +60 minutes when traveling westward and "gaining" an hour)

  • Negative values: Day was shorter than 24 hours (e.g., -60 minutes when traveling eastward and "losing" an hour)

  • Null: Standard 24-hour day with no significant timezone changes

For values that are not exactly 24 hours, timezoneOffset reflects the timezone where more data was recorded.

Timezone Travel Detection logic only applies when data is aggregated and calculated by Thryve, not when daily data is directly provided by the data source.

Smart Overlap Detection: When daily data is calculated and aggregated by Thryve, intelligent mechanisms prevent value inflation through smart overlap detection within the same data type and data source. This ensures accurate aggregation when data is recorded simultaneously by multiple devices (e.g., both smartphone and fitness tracker), preventing double-counting of activities like steps or calories.

Smart Overlap Detection logic only applies when data is aggregated and calculated by Thryve, not when daily data is directly provided by the data source. Data sources may use similar logics, however, no official documentation on how aggregates are created is available.

Health Documents

Some recordings, like an ECG waveform, are too large and structured to store as epoch or daily data. Thryve stores them as health documents. Each one belongs to a measurement: a single recording session with a start and end time and a unique reference. A measurement groups everything captured in that session:

Part
What it contains

Measurement

Start and end time, timezone offset, and a unique reference

Health document

The raw recording, e.g. the ECG waveform

Epoch data

Values derived from the recording, e.g. average heart rate or Afib

Device

The device the recording was made with, if the data source provides it

The epoch values linked to a measurement are also available through Get epoch data, like any other epoch data. The health document itself is only available through the dedicated endpoints.

Electrocardiogram (ECG)

The electrocardiogram is the first health document type supported by Thryve. When an end user takes an ECG reading on a supported wearable, Thryve retrieves the recording from the data source, harmonizes it into one common format and stores it as a measurement with:

  • Waveform data: the voltage samples per lead, in millivolts (mV), together with the sampling frequency in Hz.

  • Optional epoch data: for example the heart rate during the recording and, the rhythm classification (e.g. sinus rhythm or atrial fibrillation).

  • Optional Device data: model, manufacturer and further details of the recording device

Waveforms from different data sources are converted to the same unit and structure, so you can process ECGs from all sources the same way.

To retrieve ECG recordings, see Get ECG data.

When to Use Each

Choose Epoch Data When:

  • Building detailed health and activity dashboards or monitoring systems

  • Requiring intraday breakdowns for comprehensive health and activity assessment

  • Performing detailed temporal analysis or pattern recognition

  • Analyzing user behavior patterns throughout specific time periods

  • Correlating data across different timezones

Choose Daily Data When:

  • Creating simple user-facing summaries and progress reports

  • Building day-over-day comparison features

  • Generating weekly or monthly trend reports

  • Minimizing data processing complexity

  • Reducing bandwidth requirements for mobile applications

Implementation Considerations

Data Volume: Epoch data can generate hundreds of records per day per data type, while daily data provides one consolidated value. Plan storage and bandwidth accordingly.

Timezone Complexity: Daily data simplifies timezone handling for basic use cases, while epoch data provides maximum flexibility for complex temporal analysis.

Last updated