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

Update Food Log

Hi,
We are integrating Fitbit Web API into the Android app. We have a query regarding updating the Food Log using Update Food Log API.

When updating the Food log using the logged ID, it returns the below error.

API: https://api.fitbit.com/1/user/-/foods/log/34550299878.json?mealTypeId=5&unitId=147&amount=149.0&calo...

Response: {"errors":[{"errorType":"request","fieldName":"n/a","message":"Food log entry without food could not be updated."}]}

Can you please suggest, What we are missing in the request URL? 


Best Answer
0 Votes
1 REPLY 1

Hi @bhavdip 

I didn't have any problems when I tested it.   Here are the queries I used to create the food log and edit it.

Create Food Log

https://api.fitbit.com/1/user/-/foods/log.json?foodId=692830270&mealTypeId=1&unitId=304&amount=1&dat...

Edit Food Log

https://api.fitbit.com/1/user/-/foods/log/<logId>.json?mealTypeId=1&unitId=304&amount=3 

If this doesn't work for you, please provide the instructions you used to create the food log, and then the endpoint used to edit it.   Based on the error, it seems like the Food Log didn't have a food item listed.  *shrugs*

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes