10-07-2025 19:16 - edited 10-07-2025 19:23
10-07-2025 19:16 - edited 10-07-2025 19:23
Previously this web api endpoint
/1/user/[user-id]/foods/log/[resource]/date/[start-date]/[end-date].json
returned values in string format like below
{
"foods-log-water": [
{
"dateTime": "",
"value": "0.0"
},
{
"dateTime": "",
"value": "0.0"
},
currently its responding with number
{
"foods-log-water": [
{
"dateTime": "",
"value": 0
},
{
"dateTime": "",
"value": 0
},
Is this change intended, the api doc still shows string values in example response ?
https://dev.fitbit.com/build/reference/web-api/nutrition-timeseries/get-nutrition-timeseries-by-date...
11-12-2025 19:31
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.
11-12-2025 19:31
Hi @cvc_2025
Thanks for posting your question! I was able to reproduce the problem where it returned "value": 0
I will be filing a bug to engineering team to investigate the issue.
Best Answer11-14-2025 17:33
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.
11-14-2025 17:33
I will need to get more information from you to investigate this issue. I just sent you a message through Issue Tracker.
Thanks!
Best Answer11-18-2025 14:47
11-18-2025 14:47
Bro I ran into this exact thing before, and yeah, it caught me off guard too. The endpoint switching from string to number is not really documented properly, but it seems like they updated the backend for consistency. Your code might need a small tweak to handle numbers instead of strings now. When I was testing similar API changes while working on my Hypic project, catching these subtle changes early saved me a lot of debugging headaches.
Best Answer