Food API
Here are the various things you can do with the Food API. Check in the top right for the different protocols.
Example Request
PUT /v1/food/
{
id: 2,
calories: 54
}
GET /foods/16424
Example Response
{
data:
[{
"aisle": "Ethnic Foods",
"calorie": 53.0,
"fat": 0.08,
"id": 16424,
"img": "soy-sauce.jpg",
"name": "low sodium soy sauce",
"protein": 5.17,
"servings": "100.0",
"sodium": 3333.0
}]
}
Example Request
GET /foods/99063
POST /v1/food
{
"calorie": 254.75,
"fat": 2.93,
"id": 99063,
"img": "pizza-dough.jpg",
"name": "bread dough",
"protein": 5.87,
"servings": "100.0",
"sodium": 470.31
}
DELETE /v1/food/
{
id: 1
}
Example Response
{
"calorie": 254.75,
"fat": 2.93,
"id": 99063,
"img": "pizza-dough.jpg",
"name": "bread dough",
"protein": 5.87,
"servings": "100.0",
"sodium": 470.3
}
Response Status 201:
{
data: {
uri: /v1/food/3
}
}
Response Status 202:
{
data: {
uri: /v1/food/2
}
}
Response Status 202