11-04-2014 06:24 - edited 11-04-2014 06:24
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-04-2014 06:24 - edited 11-04-2014 06:24
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi,
We are having a problem with Fitbit API, it is returing data different than what we see in Fitbit dashboard.
We used this fitbit account - renushankar@ymail.com
Attached is the logger data for fitbit data.
On fitbit site for the above account there are data for the month of september. But it sends 1 data from the current date,which was not actually added.


11-04-2014 08:50
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


11-04-2014 08:50
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hello,
please provide Fitbit API request URL you're making as well as Fitbit website page you comparing it to.
Senior Software Developer at Fitbit

11-06-2014 13:06
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-06-2014 13:06
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
where resource id, start date, and todays date are being filled in dynamically
- the resource id has to do with the authentication process
- the start date is the member's start date
- and today is the current day the query is being issued

11-07-2014 13:37
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


11-07-2014 13:37
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Please PM me with concrete API url and concrete page url you're comparing it to.
I know how the urls should look like. I need to investigate your concrete case.
This is why I need exact Fitbit Api url you're calling.
For the fitbit.com website you can just send me screenshot what you're seeng for the weight values.
Senior Software Developer at Fitbit

11-09-2014 22:21
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-09-2014 22:21
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Ivan,
I sent you a private message with the requested data above. Please let me know if you need any further information.
Appreciate your help.

11-11-2014 08:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


11-11-2014 08:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Ok, so based on API request you sent me in PM it seems to me as a valid behavior.
The thing is that you're calling TimeSeries endpoint that supose to auto-fill the weight with the latest weights that user posted if there is not weight logged for particular date.
if you're interested in list of days when user actually entered his weight you need to use this format:
https://api.fitbit.com/1/user/{your_user_id_here OR -}/body/log/weight/date/2014-11-04/2014-11-11.json
instead of this
https://api.fitbit.com/1/user/{you_user_id_here OR -}/body/weight/date/2014-11-04/2014-11-11.json
see https://wiki.fitbit.com/display/API/API-Get-Body-Weight for more details.
Senior Software Developer at Fitbit

11-12-2014 21:53
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-12-2014 21:53
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hello Ivan,
We changed the API calls to use the endpoint you suggested, but now we are seeing a different error:
Here is the exact call:
@OAuthRequest(GET, https://api.fitbit.com/1/user/2QX3TF/body/log/weight/date/2014-06-22/2014-11-13.json)
And here is the response:
{"errors":[{"errorType":"validation","fieldName":"endDate","message":"Invalid end date: 2014-11-13"}]}
Is this because this API has a limit of returning data for a maximum of 31 days ?
I saw that here: https://wiki.fitbit.com/display/API/API-Get-Body-Weight
end-date: Range end date when date range is provided. Note that period should not be longer than 31 day.
Thanks,
John

11-12-2014 21:57 - edited 11-12-2014 21:58
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


11-12-2014 21:57 - edited 11-12-2014 21:58
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Yep.
The error message in response does not describes the problem very well, but yep you're right, you'll see this error response when you request for data for more then 31 days.
We have a ticket to fix the message to be more descriptive, so the error message should be returning valid explanation when we address the thicket.
Senior Software Developer at Fitbit

11-12-2014 21:58
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-12-2014 21:58
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
to follow up on my previous post, what is the best practice, for say, retrieving 5 months of weight data ?
Should we run subsequent calls to /body/log/weight ? Or is there an easier way ?
Thanks,
John

11-12-2014 21:59
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


11-12-2014 21:59
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Yep, I'd suggest pulling by one month.
Senior Software Developer at Fitbit

11-12-2014 22:02
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-12-2014 22:02
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
If we do one month at a time, is there a limit on how frequently we can query and how many queries we can issue within a specific timeframe ? Do we have to throttle our requests?
Also, Can you please explain again how the timeseries API is different from the log api.
I am looking here: https://wiki.fitbit.com/display/API/API-Get-Time-Series
/body/weight vs /body/log/weight
Thanks

11-12-2014 22:03
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

SunsetRunner
11-12-2014 22:03
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@Khaled wrote:
If we do one month at a time, is there a limit on how frequently we can query and how many queries we can issue within a specific timeframe ? Do we have to throttle our requests?

11-12-2014 22:06
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-12-2014 22:06
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
For the time series api's ....
The documentation page (https://wiki.fitbit.com/display/API/API-Get-Time-Series) is not very detailed. Can you please answer these additional questions:
1) what is the maximum date range for time series API -- in days ? in months ?
2) is the data format the same as the /body/log/weight api ? So we could process the response in the same exact way ?

11-12-2014 22:08
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


11-12-2014 22:08
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Default limit is 150 requests per particular user per hour.
If you reach your limit for particular hour, you'll be able to make requests again when hour ends.
The main difference between weight log and time series is that time series normally returns only date+ value list. Where non-time series endpoint also return other useful information.
Some (not all though) endpoints may fullfill missing data, weight time series as you can see does it.
Senior Software Developer at Fitbit

11-12-2014 22:09
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-12-2014 22:09
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
can you also please clarify on the difference between /body/weight vs /body/log/weight ?

11-12-2014 22:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-12-2014 22:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
ok ... so in terms of filling missing data, can you please be more specific.
Is it repeating a weight value from the previous day if a value was not entered ?
So in effect, you see a weight value until a different value was entered by the user ?

11-12-2014 22:13
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


11-12-2014 22:13
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@Khaled wrote:
ok ... so in terms of filling missing data, can you please be more specific.
Is it repeating a weight value from the previous day if a value was not entered ?
So in effect, you see a weight value until a different value was entered by the user ?
yes.
Senior Software Developer at Fitbit

11-12-2014 22:15
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-12-2014 22:15
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
.... and I am sure there is no specific way for us to detect that a weight value returned by time series API was filled in by the API or entered by the user.. right ? Or is there a way 🙂

11-12-2014 22:16 - edited 11-12-2014 22:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


11-12-2014 22:16 - edited 11-12-2014 22:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Unfortunately no, I posted above the only way you can do it for your use case .
You need to use non timeseries endpoint for that.
Senior Software Developer at Fitbit

11-13-2014 07:01
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-13-2014 07:01
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hello Ivan,
One more question regarding the log api. How far back can we query for data ?
Is it also a max of 1 year, as the timeseries api ?
Thanks,
John

