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

Get Activities returns wrong calories in summary section

 

Please refer to the json response below.

 

There are 3 activites, each one reporting calories burned with the following values:

Activity ID = 58003 / Calories = 4300

activity Id = 1010 / Calories = 5500

activity Id = 12030 / Calories = 1461


Total Calories for above should be 4300+5500+1461 = 11261

 

But instead,  total shows 9800, which is excluding the 3rd activity:

 "summary": {
    "activityCalories": 9800

 

Then, in a subsequent request, the total shows 10871:

 "summary": {
    "activityCalories": 10871

 

 

Why are the activity calories not matching the total of the itemized calries from daily activities ?

 

Thanks,


John

 

 

 

 

 

 

{
  "activities": [
    {
      "activityId": 58003,
      "activityParentId": 90024,
      "activityParentName": "Swimming",
      "calories": 4300,
      "description": "75-100 yards/min",
      "distance": 32.19,
      "duration": 8130000,
      "hasStartTime": true,
      "isFavorite": false,
      "lastModified": "2014-12-23T08:07:18.000-05:00",
      "logId": 127048239,
      "name": "Swimming",
      "startDate": "2014-12-23",
      "startTime": "07:00"
    },
    {
      "activityId": 1010,
      "activityParentId": 90001,
      "activityParentName": "Bike",
      "calories": 5500,
      "description": "Very Leisurely - under 10 mph",
      "distance": 32.19,
      "duration": 9420000,
      "hasStartTime": true,
      "isFavorite": false,
      "lastModified": "2014-12-23T08:11:30.000-05:00",
      "logId": 127177036,
      "name": "Bike",
      "startDate": "2014-12-23",
      "startTime": "10:00"
    },
    {
      "activityId": 12030,
      "activityParentId": 90009,
      "activityParentName": "Run",
      "calories": 1461,
      "description": "5 mph (12 min/mile)",
      "distance": 3.22,
      "duration": 6300000,
      "hasStartTime": true,
      "isFavorite": false,
      "lastModified": "2014-12-23T13:03:50.077-05:00",
      "logId": 127254619,
      "name": "Run",
      "startDate": "2014-12-23",
      "startTime": "14:00",
      "steps": 3494
    }
  ],
  "goals": {
    "activeMinutes": 30,
    "caloriesOut": 2184,
    "distance": 8.05,
    "steps": 10000
  },
  "summary": {
    "activeScore": -1,
    "activityCalories": 9800,
    "caloriesBMR": 1380,
    "caloriesOut": 10671,
    "distances": [],
    "fairlyActiveMinutes": 0,
    "lightlyActiveMinutes": 0,
    "marginalCalories": 8968,
    "sedentaryMinutes": 0,
    "steps": 3494,
    "veryActiveMinutes": 398
  }
}

SECOND RESPONSE

 

{
  "activities": [
    {
      "activityId": 58003,
      "activityParentId": 90024,
      "activityParentName": "Swimming",
      "calories": 4300,
      "description": "75-100 yards/min",
      "distance": 32.19,
      "duration": 8130000,
      "hasStartTime": true,
      "isFavorite": false,
      "lastModified": "2014-12-23T08:07:18.000-05:00",
      "logId": 127048239,
      "name": "Swimming",
      "startDate": "2014-12-23",
      "startTime": "07:00"
    },
    {
      "activityId": 1010,
      "activityParentId": 90001,
      "activityParentName": "Bike",
      "calories": 5500,
      "description": "Very Leisurely - under 10 mph",
      "distance": 32.19,
      "duration": 9420000,
      "hasStartTime": true,
      "isFavorite": false,
      "lastModified": "2014-12-23T08:11:30.000-05:00",
      "logId": 127177036,
      "name": "Bike",
      "startDate": "2014-12-23",
      "startTime": "10:00"
    },
    {
      "activityId": 12030,
      "activityParentId": 90009,
      "activityParentName": "Run",
      "calories": 1461,
      "description": "5 mph (12 min/mile)",
      "distance": 3.22,
      "duration": 6300000,
      "hasStartTime": true,
      "isFavorite": false,
      "lastModified": "2014-12-23T13:03:50.000-05:00",
      "logId": 127254619,
      "name": "Run",
      "startDate": "2014-12-23",
      "startTime": "14:00",
      "steps": 3494
    }
  ],
  "goals": {
    "activeMinutes": 30,
    "caloriesOut": 2184,
    "distance": 8.05,
    "steps": 10000
  },
  "summary": {
    "activeScore": -1,
    "activityCalories": 10871,
    "caloriesBMR": 1594,
    "caloriesOut": 11822,
    "distances": [],
    "fairlyActiveMinutes": 0,
    "lightlyActiveMinutes": 0,
    "marginalCalories": 9815,
    "sedentaryMinutes": 69,
    "steps": 3494,
    "veryActiveMinutes": 398
  }
}

Best Answer
0 Votes
2 REPLIES 2

Hi John,

Was your third activity logged for a time in the future? Was it earlier than 3:45pm (the end of your third activity) when you made the request?

 

When you make a call to get activities for today, the site will respond with summary values achieved so far. For example, if it is 1pm, the site will respond with the calories that you burned from 12:00am to 1pm today, and will not look ahead and include activities logged later in the day. 

 

This also explains why a subsequent request showed a higher value: more time had elapsed in the day, and you had burned more calories.

 

If you make a request for activities on 2014-12-23, do you now see a total that is at least 11261?

Best Answer
0 Votes

Thank you for your response - it is very helpful !

 

We will review our results, given your clarification, and get back if we are still seeing any discrepancies.

 

John

Best Answer
0 Votes