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

HR Time Series response total is not 24 hours for a user

Hello, I have always encountered a total time of 24 hours when calling the "Get Heart Rate Time Series by Date" API (e.g. https://api.fitbit.com/1/user/-/activities/heart/date/-/1d.json)

User 1:

 

{
  "activities-heart": [
    {
      "dateTime": "<redacted>",
      "value": {
        "customHeartRateZones": [],
        "heartRateZones": [
          {
            "caloriesOut": 2204.2912499999998,
            "max": 97,
            "min": 30,
            "minutes": 1410,
            "name": "Out of Range"
          },
          {
            "caloriesOut": 147.86550000000005,
            "max": 117,
            "min": 97,
            "minutes": 27,
            "name": "Fat Burn"
          },
          {
            "caloriesOut": 5.4765,
            "max": 142,
            "min": 117,
            "minutes": 1,
            "name": "Cardio"
          },
          {
            "caloriesOut": 18.83916,
            "max": 220,
            "min": 142,
            "minutes": 2,
            "name": "Peak"
          }
        ],
        "restingHeartRate": 58
      }
    }
  ]
}

 

Recently, another user joined the application, and I have noticed that the same API for them is never returning a total of 24h, but a daily variable number, ranging from few minutes someday to "almost" 24 hours.
User 2:

 

{
  "activities-heart": [
    {
      "dateTime": "<redacted>",
      "value": {
        "customHeartRateZones": [],
        "heartRateZones": [
          {
            "caloriesOut": 357.79428,
            "max": 79,
            "min": 30,
            "minutes": 325,
            "name": "Out of Range"
          },
          {
            "caloriesOut": 2102.66596,
            "max": 111,
            "min": 79,
            "minutes": 938,
            "name": "Fat Burn"
          },
          {
            "caloriesOut": 225.60374,
            "max": 135,
            "min": 111,
            "minutes": 35,
            "name": "Cardio"
          },
          {
            "caloriesOut": 0,
            "max": 220,
            "min": 135,
            "minutes": 0,
            "name": "Peak"
          }
        ],
        "restingHeartRate": 75
      }
    }
  ]
}

 

I have read in another topic here in the forum that the expected return total time should always be 24h, but I do not get why it is not for the second user.

Best Answer
1 REPLY 1

Hi @fasan 

I've been looking through my own data to see if I have a similar example where the hours doesn't add up to 24.   I cannot find one.  So, I'm going to send you an email requesting some additional information about this user.

Gordon

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