04-08-2015 07:27 - edited 04-08-2015 07:30
04-08-2015 07:27 - edited 04-08-2015 07:30
I had logged a new food entry in my account and after hitting the API GetFoodLogs I realized not all data has been retrieved. NutritionalValues are missing in some food entries, but their values are included in the summary section. Please, take a look at the following screen shots.
After hitting the API, Pasta, Spaghetti (Mueller's) nutritional values are missing
https://api.fitbit.com/1/user/-/foods/log/date/2015-04-06.json
04-08-2015 08:29 - edited 04-08-2015 08:31
04-08-2015 08:29 - edited 04-08-2015 08:31
@FedericoArg I wonder if the documentation for API-Get-Food-Logs needs to be updated with the same note that is on API-Get-Food: Note that "nutritionalValues" will be included in response only for the foods with PRIVATE or SHARED access level for the user.
I assume this is a licensing issue in that they aren't allowed to let people harvest the food database via API calls.
Not that that explains why you get the values for one Public item but not another...
04-08-2015 08:44
04-08-2015 08:44
Thanks for replying Michael.
I agree with what you are saying. Both PUBLIC food log should be consistent but it is not the case. Also, the summary is actually adding the nutritional values from the first food log which doesn't have Nutritional Values. So the first food log nutritional values could be inferred in this specific case.
Either this is a Bug in the API or there is some other explanation that justifies this behaviour.
Let's wait until the Fitbit team responds.
Federico
04-08-2015 10:32
04-08-2015 10:32
@FedericoArg: @Michael is correct. Due to licensing issues, not all logged food items will contain complete nutrition data. We return as much data as we are permitted to for each food item.
04-08-2015 10:35
04-08-2015 10:35
@JeremiahFitbit So it is no longer as cut and dried as no details for public items anymore? (I guess that is good for us, as we get details on some of the items we didn't before.)
04-08-2015 11:40
04-08-2015 11:40
You should expect that "public" food items (the items available from Fitbit's provided food database) will have a mix of nutritionalValues returned.