05-12-2021 12:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-12-2021 12:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
The clarification is needed to understand when the distance property on /activity resource is missing.
The distance is optionally included but the description is vague: "distance only included when it is relevant". Source: https://dev.fitbit.com/build/reference/web-api/activity/.
In our integration, we filter out only relevant activity types, such as running, walking, cycling. For each of those activity types, the distance seems to be very relevant, so we expected it to be always available.
Many of our users complain that their activities are not synched on our platform. We investigated this issue deeply and narrow it down to missing distance for some activities. We assume that it might be related to the device type, .e.g. distance property might be included only if the Fitbit device has a built-in GPS.
Please help us to educate our users when the distance property is available because lack of consistency and missing activities make our integration very unstable and unpredictable for the end-users. We're even willing to explicitly limit our integration to the devices that have a built-in GPS if that is possible.
06-02-2021 14:10
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



06-02-2021 14:10
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi @krml
The only reasons I can think of for why the distance is not being returned is either the device doesn't support distance or the activity doesn't support distance. Can you provide me an example of a user who is not getting distance when it is expected? Please post the device and the activityID of the exercise performed.
Gordon
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

12-29-2021 09:59
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

12-29-2021 09:59
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Same problem here. Distance is given in json response of the API, but TCX endpoints says " <DistanceMeters>0.0</DistanceMeters>".
Would be great if this could be fixed soon.
(@GordonFitbit - You've got a message)

01-05-2022 09:46
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



01-05-2022 09:46
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Hi @runalyze
I'm assuming when you say "Distance is given in json response of the API" you mean the Get Daily Activity Summary or Get Activity Log List endpoints. One thing to note about the TCX files is GPS data is required to see distance. This means you need to have the location scope enabled AND an exercise that was recorded using on-device or connected GPS. Without this information, distance will be returned as zero within the TCX endpoint. See Get Activity TCX. We do state this on the Get Activity TCX page, but we could clarify distance is returned for "tracker" exercises only.
Gordon
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
01-06-2022 11:22
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



01-06-2022 11:22
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
01-08-2022 04:15
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

01-08-2022 04:15
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Sorry, but there is no reason not to write the distance calculated via step size into the tcx file.
Now you are writing
" <DistanceMeters>0.0</DistanceMeters>" into the tcx file. Why don't you simply write the distance you have instead into it.

