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

Activity APIs not providing workout location data

We are using fitbit activity APIs ( 

https://dev.fitbit.com/build/reference/web-api/activity/#get-daily-activity-summary,

https://dev.fitbit.com/build/reference/web-api/activity/#get-activity-logs-list) to sync fitbit workouts in our app. But these APIs are not returning location data for the fitbit workout. Location data is required to plot workout map, though map is being formed in fitbit app for the corresponding workout.

 

Please help. 

Best Answer
0 Votes
1 REPLY 1

Hi @VineetSuri,

 

Welcome to the forums!

 

the correct endpoint to fetch location data of activities is the Get Activity TCX endpoint. This endpoint is returned in XML, in 1-sec intervals of location and heart rate data, as long as the activity was recorded by a GPS and heart rate enabled device.

 

The Get Activity Logs List endpoint also provides a link to the TCX file under the "tcxLink" element:

 ],
      "activityName": "Workout",
      "activityTypeId": 3000,
      "averageHeartRate": 147,
      "calories": 416,
      "caloriesLink": "https://api.fitbit.com/1/user/-/activities/calories/date/2016-03-05/2016-03-05/1min/time/15:31/16:17.json",
      "duration": 2766000,
      "heartRateLink": "https://api.fitbit.com/1/user/-/activities/heart/date/2016-03-05/2016-03-05/1sec/time/15:31:17/16:17:23.json",
      "heartRateZones": [
        {
          "max": 94,
          "min": 30,
          "minutes": 3,
          "name": "Out of Range"
        },
        {
          "max": 131,
          "min": 94,
          "minutes": 8,
          "name": "Fat Burn"
        },
        {
          "max": 159,
          "min": 131,
          "minutes": 4,
          "name": "Cardio"
        },
        {
          "max": 220,
          "min": 159,
          "minutes": 30,
          "name": "Peak"
        }
      ],
      "lastModified": "2016-03-06T00:20:21.000Z",
      "logId": 1846159807,
      "logType": "tracker",
      "manualValuesSpecified": {
        "calories": false,
        "distance": false,
        "steps": false
      },
      "source": {
        "id": "47086726",
        "name": "Charge HR",
        "type": "tracker",
        "url": "https://www.fitbit.com/"
      },
      "startTime": "2016-03-05T15:31:17.000-08:00",
      "steps": 683,
      "tcxLink": "https://api.fitbit.com/1/user/-/activities/1846159807.json"

.I hope this helps. Let me know if you have any additional questions

Best Answer
0 Votes