11-08-2023 11:06
11-08-2023 11:06
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.
11-13-2023 14:05
11-13-2023 14:05
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