03-26-2015 15:34
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-26-2015 15:34
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Could someone from Fitbit API take a look at the following issue. Looks like Sleep in the Time Series is not returning correct values and the dashboard seems to be showing different information.
https://community.fitbit.com/t5/Fitbit-com-Dashboard/Bug-Total-Sleep-Discrepancy/m-p/722832/highligh...
Answered! Go to the Best Answer.

Accepted Solutions
03-26-2015 16:43
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-26-2015 16:43
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
@FedericoArg wrote:We are using the Time-Series API which should get the aggregated values for the entire day.
https://wiki.fitbit.com/display/API/API-Get-Time-Series
No, it shouldn't. You will note on that page it says: "1. Note that sleep collection resources represent values for the main sleep entry for the dates in request (this is the log entry labeled with "isMainSleep" = true)."
So it specifically only includes the primary sleep session.
03-20-2015 15:14
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-20-2015 15:14
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@FedericoArg wrote:I mainly asking this because I am seeing a Bug in the Fitbit API when returning this information.
215 / 60 = 3.58 hours which does not match with what I slept that day (6.32hours)
{
"sleep-minutesAsleep": [
{
"dateTime": "2015-03-18",
"value": "215"
}
]
}
What API call are you using? You should be using API-Get-Sleep and looking at the "summary" section, which shows the total of all sleep sessions for the day, which should look like:
"summary":{

03-26-2015 15:26
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-26-2015 15:26
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
We are using the Time-Series API which should get the aggregated values for the entire day.
https://wiki.fitbit.com/display/API/API-Get-Time-Series
sleep/minutesAsleep
sleep/awakeningsCount
sleep/minutesAwake

03-26-2015 16:43
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-26-2015 16:43
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
@FedericoArg wrote:We are using the Time-Series API which should get the aggregated values for the entire day.
https://wiki.fitbit.com/display/API/API-Get-Time-Series
No, it shouldn't. You will note on that page it says: "1. Note that sleep collection resources represent values for the main sleep entry for the dates in request (this is the log entry labeled with "isMainSleep" = true)."
So it specifically only includes the primary sleep session.
03-26-2015 16:51
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-26-2015 16:51
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I combined your posts all in the API forum, where it is most appropriate. But again, if you look at the documentation, it appears to be working as intended.

03-27-2015 10:16
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-27-2015 10:16
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Thank you for pointing that to me.

08-16-2015 20:56
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

08-16-2015 20:56
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I don't see that caveat at https://dev.fitbit.com/docs/sleep/#get-sleep-time-series. Was that an intentional omission?

