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

API GetFoodLogs nutritional issue

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.

 

Food.JPG

 

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

Capture.JPG

Best Answer
0 Votes
5 REPLIES 5

@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...

Best Answer

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

Best Answer

@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.

Best Answer
0 Votes

@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.)

Best Answer
0 Votes

You should expect that "public" food items (the items available from Fitbit's provided food database) will have a mix of nutritionalValues returned.

Best Answer
0 Votes