Food Log
Preview server-authoritative macros for a (food_id, quantity, unit) tuple
post/api/food-log/preview-macros
Request
- Base URLhttps://api.rewritelifestyle.ai (the document declares no server; this is the origin it was published from)
- URLhttps://api.rewritelifestyle.ai/api/food-log/preview-macros
- AuthHTTP bearer
Request body
Example request
{
"food_id": "12345",
"quantity": 70,
"unit": "g",
"serving_id": "57969",
"region": "US"
}Response
unknown required
Example response
{
"mode": "server_authoritative",
"food_id": "33691",
"name": "Chicken Breast",
"quantity": 4,
"unit": "oz",
"serving_id": "57969",
"region": null,
"scale": 1.134,
"calories": 221,
"protein": 33.5,
"carbs": 0,
"fat": 8.8,
"fiber": 0,
"sugar": 0,
"sodium": 84,
"nutrition": [
{
"name": "Calories",
"value": 221,
"unit": "kcal"
},
{
"name": "Protein",
"value": 33.5,
"unit": "g"
},
{
"name": "Carbohydrates",
"value": 0,
"unit": "g"
},
{
"name": "Fat",
"value": 8.8,
"unit": "g"
},
{
"name": "Fiber",
"value": 0,
"unit": "g"
},
{
"name": "Sodium",
"value": 84,
"unit": "mg"
}
],
"fs_default": null
}Changes
No recorded changes to this operation across all 34 revisions of this API.