09-30-2015 11:19
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-30-2015 11:19
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I'm struggling successfully hitting the DELETE Food Log service from my PHP application using Curl. From what I'm reading, my request is accurately constructing with setting the curl option CURLOPT_CUSTOMREQUEST = 'DELETE'. I'm also using a FitBit user-id that can already get and post food logs.
Here's what I'm returning from the API request:
Array ( [errors] => Array ( [0] => Array ( [errorType] => not_found [fieldName] => n/a [message] => The API you are requesting could not be found. ) ) [success] => )
Has anyone else had trouble deleting from PHP?
Answered! Go to the Best Answer.
Accepted Solutions
09-30-2015 14:04
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



09-30-2015 14:04
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
It should be DELETE https://api.fitbit.com/
1
/user/-/foods/log/
food-log-id-here
.json . This was incorrectly transferred from our old wiki documentation. I will fix it. Apologies for the error.

09-30-2015 12:53
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



09-30-2015 12:53
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Can you please tell us what the URL is that your application is requesting?

09-30-2015 13:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-30-2015 13:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Jeremiah,
I'm trying to request:
DELETE /1/user/[user-id]/food/[food-log-id].json
/1/user/xxxxx/food/xxxxxxxx.json
Would it help if I gave you the exact URL?

09-30-2015 14:04
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



09-30-2015 14:04
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
It should be DELETE https://api.fitbit.com/
1
/user/-/foods/log/
food-log-id-here
.json . This was incorrectly transferred from our old wiki documentation. I will fix it. Apologies for the error.

09-30-2015 14:50
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-30-2015 14:50
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Thanks Jeremiah

