Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Mixed "classic" and "stages" sleep data within the same sleep event - Is this possible?

Hi Fitbit development team,

I'm working with sleep data from Fitbit devices and have encountered something unexpected that contradicts the official documentation.

Reference: https://dev.fitbit.com/build/reference/web-api/sleep/get-sleep-log-by-date/#Sleep-Efficiency-Calcula... 

According to Fitbit's documentation, the sleep levels field should contain either:

  • Classic sleep data: restless, asleep, awake
  • Stages sleep data: deep, light, rem, wake

but not both types simultaneously for the same night/logId.

However, in one of our datasets, we've found sleep events that contain both "classic" and "stages" level values within the same logId.

It's important to note that this dataset was provided by a third party, so we have no direct control over how the data was originally extracted via the API. We received the data as-is and are now trying to determine whether this behavior is expected or if it may result from an issue in the data retrieval or processing pipeline on the third party's side.

For comparison, in another dataset — also from Fitbit devices but obtained through a different source — we've confirmed that sleep events contain exclusively either "classic" or "stages" level values (never both), which aligns with the expected behavior described in the documentation.

My questions are:

  1. Is it actually possible for a single sleep event (same logId) to contain both "classic" level values (restless, asleep, awake) and "stages" level values (deep, light, rem, wake) simultaneously?
  2. If so, under what circumstances does this occur, and how should we handle it in data processing?
  3. If not, could this mixed data be the result of improper API usage or post-processing on the data provider's side?

Any clarification on this would be greatly appreciated. If needed, I'd be happy to provide additional details or examples from the dataset to help better illustrate the issue.

Thank you!

Best Answer
0 Votes
2 REPLIES 2

Hi @Federico1994 

Welcome to the community! 

Regarding your core question: while the documentation generally frames these schemas as distinct, it is possible for both Stages and Classic data to be present within the same day's response—specifically when a daytime nap is recorded alongside a main sleep event. Fitbit typically uses "Stages" for main nocturnal sleep (where heart rate data is consistent) and falls back to "Classic" for shorter naps (under 3 hours) or if heart rate tracking is interrupted. If these events are aggregated under a single date, you will see both data types.

To help us determine if this is an expected behavior or a processing error on the provider's side, we’d like to take a closer look at the data. Can you lease ask your third-party provider to rerun the data extraction for the specific date? Once the rerun is complete, please share the raw JSON response with us. Thanks!

 

 

 

Best Answer

Hi  @DorisFitbit ,

Thanks for the update.

Regarding the mixed sleep events, I’ve attached a screenshot showing both "Stages" and "Classic" data occurring together.

Since I cannot retrieve the raw JSON from the provider at this time, could you let me know if this visual evidence is enough to confirm whether this is standard behavior or a processing error?

Thanks for your help, Federico.

 

Example.png

Best Answer
0 Votes