08-25-2017 15:40 - edited 08-28-2017 09:39
08-25-2017 15:40 - edited 08-28-2017 09:39
We would like to access a single value, saturatedFat, from logged foods for our accounts linked to fitbit.
On the matter of nutritionalValues, I have seen this response frequently...
"""Due to licensing restrictions, nutritional values are not available for all logged food items."""
Additionally, the api documentation states...
"""Nutritional values are currently included in responses, but only for PRIVATE or SHARED foods."""
However, the same api documentation includes this Example Response...
...which is clearly "PUBLIC" and clearly includes nutritionalValues.
Out of curiosity I retrieved the example foodId, https://api.fitbit.com/1/foods/12323.json
It came back as the same food item "Philadelphia Brand, Cream Cheese, Ranch, Whipped", notably without nutritionalValues.
Then there is this June 2014 forum post, which states...
'''[...], and only a subset for the foods from the public Food DB due to the licensing considerations."""
====================================================================
I realize this is a long shot, and suspect the ultimate answer is the first common response, along with the documentation's printed statement (example response notwithstanding). But I have a lot of time invested in this solution and was surprised during testing this afternoon to realize the limitation. So I have to ask...
====================================================================
Are there any public foods which render nutritionalValues today in 2017?
Is there any solution to retrieve a single value, such as saturatedFat, for entries in the food log?
Is there a third party subscription or license that correlates in any way to the fitbit food database?
Are there any alternatives we can explore? leads?
Answered! Go to the Best Answer.
09-26-2017 11:07
09-26-2017 11:07
After coming at this from every direction I could manage, the short answer is...
No, there is no way to obtain nutritionalValues form food items with accessLevel "Public."
Note to fitbit moderators:
The documentation located here, is misleading and/or incorrect...
https://dev.fitbit.com/reference/web-api/food-logging/#get-food
The example response documented, depicts a food item with accessLevel "Public" and a full nutritionalValues node. While "get" requests for this food item (foodId: 12323) do return the example record, they do not include the nutritionalValues node. And likely should not, given its "public" access level.
09-26-2017 11:07
09-26-2017 11:07
After coming at this from every direction I could manage, the short answer is...
No, there is no way to obtain nutritionalValues form food items with accessLevel "Public."
Note to fitbit moderators:
The documentation located here, is misleading and/or incorrect...
https://dev.fitbit.com/reference/web-api/food-logging/#get-food
The example response documented, depicts a food item with accessLevel "Public" and a full nutritionalValues node. While "get" requests for this food item (foodId: 12323) do return the example record, they do not include the nutritionalValues node. And likely should not, given its "public" access level.