In the Fitbit Web API documentation, the logged food JSON key is called 'loggedFood', but we now see in user data that this has changed to "logged_food":
{"foods":[{"logId":36982634939,"logged_food":{"foodId":0,
Can this be fixed, to match with the description in the documentation, or should we change it in our app?
Answered! Go to the Best Answer.
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
Engineering has rolled back the change that caused the response element names to change. The problem should be resolved.
We see that this issue with logged_food, and meal_type_id etc., doesn't happen for all Fitbit users. We can't reproduce it on our test devices. But for example for user with id CBMNZH the JSON fields are changed when we request the data.
If more information is needed (for Fitbit support) please let me know.
We even see that with a user the nutrition data almost every time is using 'logged_food' (and the other _ variants) but sometimes for the same request and same response, it uses 'loggedFood' (changed the date because date format used in JSON is not allowed on this forum):
{"foods":[{"isFavorite":false,"logDate":"..August 5...","logId":36986929041,"loggedFood":{"accessLevel":"PUBLIC","amount":1,"brand":"","calories":323,"foodId":537131397,"locale":"de_DE",
And an hour later when we do the same request and no new nutrition data is available, so exactly the same response (with another order of the fields):
{"foods":[{"logId":36986929041,"logged_food":{"foodId":537131397,"access_level":"PUBLIC","locale":"de_DE", .... "logDate":"...August 5...","is_favorite":false,
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
Thank you for posting this problem. I'm currently looking into it.
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
I have filed a bug to engineering. I'll respond here with what I find out.
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
The problem is when water is logged in the mobile app, the water data is not returned by the Get Water Log endpoint. This could have a wide-spread issue with 3P applications that pull water data from Fitbit. If you create a water log with the Create Water Log endpoint, the water data is returned by Get Water Log.
Best Answeryes we are also experiencing a ton of user complaints because their food is not syncing as the properties have been suddenly changed! Can they please be changed back?
Best Answerare you referring to the property names being changed? I am not sure I understand why logging water could cause property names to change?
Best AnswerHi @trevor_chong I think there is a mix in this topic: it is about nutrition data and changed field names in the Fitbit JSON response, I think @GordonFitbit accidentally wrote a comment about the water intake issue (which I reported in another topic) in this topic. Gordon already mentioned that the issue is being reported as a bug to Fitbit engineering, so let's hope there is a fix soon.
Best Answer@GordonFitbit any updates? We already patched the modified property names in our system, but now it seems the meal types are an issue where our code that relies on that model coming back is not receiving proper info to classify the meal types (breakfast, lunch, dinner).
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
Engineering has rolled back the change that caused the response element names to change. The problem should be resolved.