Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Distance unit in tracker/distance API

what is the distance unit the data is returned in this API
https://api.fitbit.com/1/user/-/activities/tracker/distance/date/2018-01-26/2018-01-27.json
Will this API always return Distance in kilometers even I setup my Distance Unit = Miles in the Fitbit App?

Is there API to get the user's distance setup (Miles/Kilo Meters)?

Thanks in advance.

Best Answer
3 REPLIES 3

@SowmiyaMadesh I answered your question on another post where you commented.  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/

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

This is such a poorly documented API. Can you please add that to https://dev.fitbit.com/build/reference/web-api/activity/#get-daily-activity-summary

Best Answer
0 Votes

Hi @KidA001.  Thank you for the feedback on the documentation.  I'll see what we can do to improve the documentation in that area.

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes