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

Subscriptions - Responding to Notifications - Part II

Follow up to https://community.fitbit.com/t5/Web-API-Development/Subscriptions-Responding-to-Notifications/m-p/46...

 

Body

 

After setting up to consume data for body notification using the endpoint we confirmed, I noticed that the data being returned from 

  /1/user/-/body/date/{date}.json

is returning minimal data:

{
    "body": {
        "bmi": 37.47,
        "fat": 20,
        "weight": 132.4
    }
}

 

That endpoint is not mentioned in the documentation at all. However, this one is, which seems to be the same data with some metadata added:

  /1/user/-/body/log/weight/date/{date}.json

{
    "weight": [
        {
            "bmi": 37.47,
            "date": "2021-01-03",
            "fat": 20,
            "logId": 1609718399000,
            "source": "API",
            "time": "23:59:59",
            "weight": 132.4
        }
    ]
}

Can you give some info on the difference between the two, and which one to use in response to a subscription notification for body?  I'm assuming the latter but wanted to confirm.

 

Thanks.

Best Answer
0 Votes
1 REPLY 1

Hi @Jeff_New_Ocean,

 

Apologies for the misunderstanding. For the body notification, you can query both weight and fat endpoints to get the new data.

 

  • /1/user/-/body/log/weight/date/{date}.json
  • /1/user/-/body/log/fat/date/{date}.json

As for the the endpoint you mentioned above, I believe /body/date/{date} is not a supported endpoint at this time despite it being able to return a proper response. I'll reach out to our team and get some clarification on its use case.

 

In the meantime, I'd like to revisit the original thread and update my response for better clarification. 

 

Best Answer
0 Votes