04-14-2020 18:21
04-14-2020 18:21
Hello Fitbit Community!
I'm having an Issue making a specific request for Body Fat logs, and I can't figure out if it's a documentation issue, or a PEBKAC issue.
On the following documentation page: https://dev.fitbit.com/build/reference/web-api/body/#body-fat
The second GET request shows that you can run a GET on 1/user/-/body/log/fat/date/today/1m.json
This is returning an invalid Resource error.
{"errors":[{"errorType":"validation","fieldName":"resource path","message":"Invalid time series resource path: /body/log/fat"}]}
Can someone point me to what I'm missing?
Answered! Go to the Best Answer.
04-15-2020 11:59 - edited 04-15-2020 15:30
04-15-2020 11:59 - edited 04-15-2020 15:30
Hi @tormentz,
Welcome to the forums!
I'm also able to reproduce the error that you're seeing using the parameters you used. I think the issue is being caused by the "today" value you entered for [date]. When I switch "today" with the actual date in the YYYY-MM-DD, as advised by the documentation, I receive the correct response.
Can you let me know if this works for you as well? On the other hand, I will have to follow up with the team to verify if this is the correct error message that should be displayed since I've confirmed that the resource path is valid.
I hope this helps. Let me know if you have any additional questions.
Hope to hear from you soon.
04-15-2020 11:59 - edited 04-15-2020 15:30
04-15-2020 11:59 - edited 04-15-2020 15:30
Hi @tormentz,
Welcome to the forums!
I'm also able to reproduce the error that you're seeing using the parameters you used. I think the issue is being caused by the "today" value you entered for [date]. When I switch "today" with the actual date in the YYYY-MM-DD, as advised by the documentation, I receive the correct response.
Can you let me know if this works for you as well? On the other hand, I will have to follow up with the team to verify if this is the correct error message that should be displayed since I've confirmed that the resource path is valid.
I hope this helps. Let me know if you have any additional questions.
Hope to hear from you soon.
04-15-2020 15:21
04-15-2020 15:21
That did assist, thank you.
I find it strange how on some of the date fields (Activities/steps) that you can use "today" and others you cannot.
FYI, I assume the other /body/X/logs also have this happen, as I had it happen on weight yesterday as well.
04-15-2020 15:31
04-15-2020 15:31
@tormentz I agree, I'll need to get further clarification on the usage of using today vs YYYY-MM-DD as well.