02-16-2021 08:53
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-16-2021 08:53
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
How far back can I request sleep data of a user, through the Rest API?
Answered! Go to the Best Answer.
Accepted Solutions
02-17-2021 15:20
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



02-17-2021 15:20
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Hi @onesimo,
Welcome to the forums!
When testing the sleep logs by date range endpoint with a date range of 2017-01-01 to 2021-01-01, I get the following error:
{
"errors": [
{
"errorType": "validation",
"fieldName": "endDate",
"message": "Max date range is 100 days"
}
]
I hope this helps!
02-17-2021 15:20
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



02-17-2021 15:20
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Hi @onesimo,
Welcome to the forums!
When testing the sleep logs by date range endpoint with a date range of 2017-01-01 to 2021-01-01, I get the following error:
{
"errors": [
{
"errorType": "validation",
"fieldName": "endDate",
"message": "Max date range is 100 days"
}
]
I hope this helps!
03-23-2021 06:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-23-2021 06:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Thank you

03-23-2021 17:39
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-23-2021 17:39
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
The range can be up to 100 days, but you can request data for a "practically" unlimited period in the past. There is a date when the user joined FitBit(you can get that date in the prile endpoint), and since then there is a possibility to receive data. However, if you request for a period before that date, you will not get an error, but rather an empty result set.

