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

difference in logged steps and steps returned by api call

ANSWERED

Hi,

 

If as a user I log the following steps at non overlapping times I calculate 34192 steps. However an api call returns  [dateTime] => 2015-11-12,  [value] => 30297

 

Why is there a difference?

 

Today, 8:00AMWalk 11,3975 miles10:00:001,245 cals 
 
Today, 3:00AMWalk 22,79510 miles6:00:00747 cals 
Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Do you have a tracker paired to that account?

 

I tried to re-produce this based on your scenario and the steps add up for me. This is on an account with no tracker data and just 2 manual logged walks matching yours.

 

{
  "activities":  [
     {
      "activityId": 17151,
      "activityParentId": 90013,
      "activityParentName": "Walk",
      "calories": 598,
      "description": "less than 2 mph, strolling very slowly",
      "distance": 19.312128,
      "duration": 3600000,
      "hasStartTime": true,
      "isFavorite": false,
      "lastModified": "2015-11-12T21:03:15.000Z",
      "logId": 602104856,
      "name": "Walk",
      "startDate": "2015-11-09",
      "startTime": "10:00",
      "steps": 25444
    },
     {
      "activityId": 17151,
      "activityParentId": 90013,
      "activityParentName": "Walk",
      "calories": 247,
      "description": "less than 2 mph, strolling very slowly",
      "distance": 4.828032,
      "duration": 3600000,
      "hasStartTime": true,
      "isFavorite": false,
      "lastModified": "2015-11-12T21:03:47.000Z",
      "logId": 602481843,
      "name": "Walk",
      "startDate": "2015-11-09",
      "startTime": "16:00",
      "steps": 6361
    }
  ],
  ...
  "summary":  {
    ...
    "steps": 31805,
    ...
  }
}

 and calling the time series endpoint

{
      "dateTime": "2015-11-08",
      "value": "0"
    },
    {
      "dateTime": "2015-11-09",
      "value": "31805"
    },
    {
      "dateTime": "2015-11-10",
      "value": "0"
    },

View best answer in original post

Best Answer
0 Votes
5 REPLIES 5

Do the 2 activities overlap in time?

Best Answer
0 Votes

Hi Dan,

 

Thanks for the response. No, the times do not overlap. I have noticed a few issues. This is another one:

 

If I manually log steps on a previous date steps show up in an api call on the log day and the next day, but the steps (from the api call) do not equal the steps on the web page.

 

For example:

 

set your timezone to Eastern, 24 hour clock

 

log as follows:

9-Nov 10:00:00 to 11h00 enter 12 miles = 27,354 steps

9-Nov 16:00:00 to 17h00 enter  3 miles = 6,838 steps

 

ensure no data is logged for the 10-Nov

 

api call:

https://api.fitbit.com/1/user/-/activities/steps/date/today/30d.json

Returns:

...

            [26] => stdClass Object
                (
                    [dateTime] => 2015-11-09
                    [value] => 12960
                )

            [27] => stdClass Object
                (
                    [dateTime] => 2015-11-10
                    [value] => 3958
                )

...

 

If I enter the exact same data for the current date the api call returns:

            [29] => stdClass Object
                (
                    [dateTime] => 2015-11-12
                    [value] => 17640
                )

 

In another test I log:

5-Nov     3h00 - 4h00       4 miles =       9,118 steps

5-Nov     11h00 - 12h00   6 miles =      13,677 steps

 

and

 

1-Nov    10h00 - 11h00       4 miles =       9,118 steps

1-Nov     16h00 - 17h00   6 miles =      13,677 steps

 

The api call returns:

            [18] => stdClass Object
                (
                    [dateTime] => 2015-11-01
                    [value] => 10920
                )

            [19] => stdClass Object
                (
                    [dateTime] => 2015-11-02
                    [value] => 7437
                )


            [22] => stdClass Object
                (
                    [dateTime] => 2015-11-05
                    [value] => 22795
                )

 

The api value for 5-Nov is correct, the value returned for 1-Nov is not.

 

Best Answer
0 Votes

Do you have a tracker paired to that account?

 

I tried to re-produce this based on your scenario and the steps add up for me. This is on an account with no tracker data and just 2 manual logged walks matching yours.

 

{
  "activities":  [
     {
      "activityId": 17151,
      "activityParentId": 90013,
      "activityParentName": "Walk",
      "calories": 598,
      "description": "less than 2 mph, strolling very slowly",
      "distance": 19.312128,
      "duration": 3600000,
      "hasStartTime": true,
      "isFavorite": false,
      "lastModified": "2015-11-12T21:03:15.000Z",
      "logId": 602104856,
      "name": "Walk",
      "startDate": "2015-11-09",
      "startTime": "10:00",
      "steps": 25444
    },
     {
      "activityId": 17151,
      "activityParentId": 90013,
      "activityParentName": "Walk",
      "calories": 247,
      "description": "less than 2 mph, strolling very slowly",
      "distance": 4.828032,
      "duration": 3600000,
      "hasStartTime": true,
      "isFavorite": false,
      "lastModified": "2015-11-12T21:03:47.000Z",
      "logId": 602481843,
      "name": "Walk",
      "startDate": "2015-11-09",
      "startTime": "16:00",
      "steps": 6361
    }
  ],
  ...
  "summary":  {
    ...
    "steps": 31805,
    ...
  }
}

 and calling the time series endpoint

{
      "dateTime": "2015-11-08",
      "value": "0"
    },
    {
      "dateTime": "2015-11-09",
      "value": "31805"
    },
    {
      "dateTime": "2015-11-10",
      "value": "0"
    },
Best Answer
0 Votes

Hi Dan,

 

This account does not have any devices/trackers paired. Are you able to access my account data.

 

 

In the test which you conducted, do the api reported steps match the steps reported in the web cllent?

If you manually entered 12 miles and 3 miles in the web client:

 for 12 miles the web client shows 27,354 steps. Your test reports 25444 steps

 for 3 miles the web client shows 6838 steps. Your test reports 6361 steps

 

 

 

Best Answer
0 Votes

Can you PM me the email address of the account? 

Best Answer
0 Votes