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.
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
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
startTimestampis providedFor duration-based data (e.g., activity periods, avg heart rate over a period), both
startTimestampandendTimestampare providedAll 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
timezoneOffsetin minutes to UTC - recommended for human-readable applicationsUnix timestamp in milliseconds (UTC) with
timezoneOffsetin 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
dayfield represents a calendar date in the user's local timezonetimezoneOffsetprovides the offset to UTC in minutesFor users traveling across timezones within a single day,
timezoneOffsetreflects 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
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.
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.
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:
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
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

