11-28-2017 15:49
11-28-2017 15:49
Hi,
I'm trying to fetch users' intra-day time series data for a date range with a single request/response. I can get it to work if I'm fetching for a single day:
GET https://api.fitbit.com/1/user/-/activities/heart/date/[date]/1d/[detail-level].json
The API documentation provides this request example, which implies that fetching intra-day time series data for a date range should be possible for a user:
GET https://api.fitbit.com/1/user/-/activities/heart/date/[date]/[end-date]/[detail-level].json
This is not the case for me as that request returns an entirely different response. Thanks in advance!
03-04-2019 11:36
03-04-2019 11:36
I would like to do this one as well but your post posted more than year ago does not promise good...
Any developer have any help on this matter?
03-05-2019 10:29
03-05-2019 10:29
Queries for Intraday are restricted to a 24 hour period. The date argument only allows a single date or the word "today".
The Time Series endpoints do allow querying data for more than 24 hours. The endpoints include start date and end date arguments, or the period of 1d, 7d, 30d, 1w, 1m, 3m, 6m or 1y.
08-07-2020 04:05
08-07-2020 04:05
I know this is an old post, but.
Based on the documentation there is indeed an endpoint that suggests that intraday data can be retrieved for a date range: https://dev.fitbit.com/build/reference/web-api/heart-rate/#get-heart-rate-intraday-time-series
GET https://api.fitbit.com/1/user/-/activities/heart/date/[date]/[end-date]/[detail-level].json
That endpoint still doesn't work. Someone should update the documentation if the endpoints are not supported.
08-18-2020 20:53
08-18-2020 20:53
Hi @Lorena772,
Welcome to the forums!
I can see where the confusion is. Looking at the documentation, these are the Heart Rate Intraday endpoints that we support:
GET https://api.fitbit.com/1/user/-/activities/heart/date/[date]/[end-date]/[detail-level].json
GET https://api.fitbit.com/1/user/-/activities/heart/date/[date]/[end-date]/[detail-level]/time/[start-time]/[end-time].json
GET https://api.fitbit.com/1/user/-/activities/heart/date/[date]/1d/[detail-level].json`
GET https://api.fitbit.com/1/user/-/activities/heart/date/[date]/1d/[detail-level]/time/[start-time]/[end-time].json
There are two sets of endpoints that provide the same data; the bottom 2 implies that only 24hrs of data can be returned while the top 2 appears that you can have a date range greater than 24 hrs. I assure you, this is not the case.
You are correct that the documentation can be clearer for these situations. I'll file a ticket to see how we can improve clarifying the usage of the endpoints to avoid further confusion.
I hope this helps clarify. Let me know if you have any additional questions in the meantime.
08-19-2020 02:06
08-19-2020 02:06
Hi @JohnFitbit
Thanks for the clarification. That makes far more sense now 👍
01-15-2021 05:21
01-15-2021 05:21
Hi @JohnFitbit ,
I am trying to fetch the Intra Heart rate for the whole year. As the Intra HR is returned if the span is for 1 day, it is not possible to use the 1y range. Another solution is to make 365 API calls. However, this will hit the rate limit range of 150. So, I would like to ask if there is an elegant way to solve this?