Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

In the Routine data being returned for Fitbit, why are there instances where the data in the API response has Calories value but no Steps?

Fitbit always returns calorie values even for days when the user has not uploaded his or her device data to Fitbit. This is due to Intraday user calories data being calculated from the end user's Basal Metabolic Rate (BMR) and/or Estimated Energy Requirement (EER) for days where the tracker/device is not worn by the user and thus has no steps tracked. Once the user has uploaded tracker data, the steps for those days will be updated.

How do I retrieve the BMR value for Fitbit so that I can exclude it from the total calories burned?

To retrieve the Basal Metabolic Rate (BMR) calories a Fitbit user burns daily, make an expanded data request then get the value of "calories_bmr" and subtract it from the "calories_burned" value. That will give you the calories the user has burned by being active.

GET [ORGANIZATION_ID]/routine.json?access_token=[ACCESS_TOKEN]&expanded=1
{
    "summary":{
            ...
        }
    },
    "routine":[
        {
            "_id":"56b0ba79b61822a6cc0bb160",
            "activity_calories":0,
            "activity_id":"2016-02-02",
            "calories_bmr":760,
            "calories_burned":760.0,
            "distance":0.0,
            "elevation":null,
            "floors":null,
            "last_updated":"2016-02-02T14:17:29+00:00",
            "minutes_fairly_active":0,
            "minutes_lightly_active":0,
            "minutes_sedentary":557,
            "minutes_very_active":0,
            "source":"fitbit",
            "source_name":"Fitbit",
            "steps":0.0,
            "timestamp":"2016-02-02T05:00:00+00:00",
            "utc_offset":"-05:00",
            "validated":false,
            "water":0
        }
    ]
}

  • No labels