07-25-2017 19:55
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-25-2017 19:55
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi All,
I am kinda new to the fitbit api. I am trying to get the daily summary for distance, but I keep getting back data that doesn't match the users fitbit app. For instance, I get back a daily summary of 2.47 and the user reports thats wrong and it should be 1.84. I have tried ALL calculations on the distance returned and nothing is adding up to what she is saying she is showing in her app. So I am kinda confused as to how I should be calculating the distance to display to a customer on our site. Any one have any insight on this? I'll paste a response below:
{"dateTime":"2017-07-16","value":"5.74535"}
She is reporting that on this day, her fitbit is saying 3.57 miles. Here is the response from the server when requesting those daily summaries:
"distances": [ { "activity": "total", "distance": 5.75 }, { "activity": "tracker", "distance": 5.75 }, { "activity": "loggedActivities", "distance": 0 }, { "activity": "veryActive", "distance": 0.67 }, { "activity": "moderatelyActive", "distance": 1.65 }, { "activity": "lightlyActive", "distance": 3.42 }, { "activity": "sedentaryActive", "distance": 0 } ]
As you can see, it clearly matches up with what we are showing her, but definitely not what she says is displaying in her app. The endpoint I am calling is
activities/tracker/distance
Can anyone point me in the right direction? I am kinda at a loss here and am not sure how this is actually calculated. Any help is greatly appreciated. Thanks Community!
Answered! Go to the Best Answer.
Accepted Solutions
07-31-2017 07:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



07-31-2017 07:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@Taddy_Mason The data is returned in metric units so that would be correct.
In the example you gave, 5.75 km = 3.57 miles.

07-31-2017 07:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



07-31-2017 07:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@Taddy_Mason The data is returned in metric units so that would be correct.
In the example you gave, 5.75 km = 3.57 miles.

07-31-2017 07:33
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-31-2017 07:33
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Yep! I figured that out the other day that it was coming back in Kilometers. I didn't see it in the docs, but I could have easily overlooked it. Thanks for the answer!
06-06-2018 00:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-06-2018 00:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
https://api.fitbit.com/1/user/-/activities/tracker/distance/date/2018-06-05/2018-06-06.json
Will this API always return Distance in kilometers even I setup my Distance Unit = Miles in the Fitbit App?

06-12-2018 09:35
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



06-12-2018 09:35
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@SowmiyaMadesh We will send the data back in the unit defined by the Accept-Language header. The Accept-Language values "en_US" and "en_GB" are case sensitive. If you use the Accept-Language header en_US, then your distance unit data should return in miles.
https://dev.fitbit.com/build/reference/web-api/basics/
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

