01-03-2024 23:55
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

SunsetRunner
01-03-2024 23:55
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Answered! Go to the Best Answer.
Accepted Solutions
01-05-2024 11:34
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



01-05-2024 11:34
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Hi @SunsetRunner
The output you provided is a little different than the default for the Get Sleep Log by Date endpoint. If you call the endpoint directly, you should see the individual sleep periods and their data listed separately, followed by the summary of all values added up for the 24 hour period. For example, the individual sleep periods summary would look like this
"summary": {
"deep": {
"count": 5,
"minutes": 104,
"thirtyDayAvgMinutes": 69
},
"light": {
"count": 32,
"minutes": 205,
"thirtyDayAvgMinutes": 202
},
"rem": {
"count": 11,
"minutes": 75,
"thirtyDayAvgMinutes": 87
},
"wake": {
"count": 30,
"minutes": 78,
"thirtyDayAvgMinutes": 55
}
}
And, the summary for the entire day when adding up all of the individual sleep periods would look like this
"summary": {
"stages": {
"deep": 104,
"light": 205,
"rem": 75,
"wake": 78
},
"totalMinutesAsleep": 384,
"totalSleepRecords": 1,
"totalTimeInBed": 462
}
Based on the names, it appears the values you see are for the 24 hour period and not the individual sleep periods for the day. If you are not seeing the results for the individual sleep periods, check with the person who wrote the code to retrieve the data to make certain they are accounting for multiple sleep periods in a single day.
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
01-05-2024 11:34
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



01-05-2024 11:34
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Hi @SunsetRunner
The output you provided is a little different than the default for the Get Sleep Log by Date endpoint. If you call the endpoint directly, you should see the individual sleep periods and their data listed separately, followed by the summary of all values added up for the 24 hour period. For example, the individual sleep periods summary would look like this
"summary": {
"deep": {
"count": 5,
"minutes": 104,
"thirtyDayAvgMinutes": 69
},
"light": {
"count": 32,
"minutes": 205,
"thirtyDayAvgMinutes": 202
},
"rem": {
"count": 11,
"minutes": 75,
"thirtyDayAvgMinutes": 87
},
"wake": {
"count": 30,
"minutes": 78,
"thirtyDayAvgMinutes": 55
}
}
And, the summary for the entire day when adding up all of the individual sleep periods would look like this
"summary": {
"stages": {
"deep": 104,
"light": 205,
"rem": 75,
"wake": 78
},
"totalMinutesAsleep": 384,
"totalSleepRecords": 1,
"totalTimeInBed": 462
}
Based on the names, it appears the values you see are for the 24 hour period and not the individual sleep periods for the day. If you are not seeing the results for the individual sleep periods, check with the person who wrote the code to retrieve the data to make certain they are accounting for multiple sleep periods in a single day.
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
