food
Validates Nutrients and returns warnings
put/food/apply_warnings
Query parameters
food_namestring required
Request body
Example request
{
"components": [
{
"component_addons": [
{
"serving_unit_amount": 1,
"serving_unit_label": "gram"
}
],
"serving_unit_amount": 1,
"serving_unit_label": "gram"
}
],
"ontology": {
"levels": [
"food"
]
}
}Response
successful operation
Example response
{
"components": [
{
"serving_unit_amount": 1,
"serving_unit_label": "gram"
}
],
"ontology": {
"id": 42,
"levels": [
"food"
]
},
"option_collection": {
"categories": [
{
"description": "Food's preparation",
"id": "preparation",
"label": "Preparation",
"name": "preparation",
"restrictions": [
{
"source_string": "xb: dairy = non-dairy",
"target_id": "dairy.dairy",
"target_value": "non-dairy"
}
]
}
],
"id": 123,
"options": [
{
"category_id": "preparation",
"description": "Food's preparation method",
"id": "preparation.method",
"label": "Method",
"name": "method",
"restrictions": [
{
"source_string": "xb: dairy = non-dairy",
"target_id": "dairy.dairy",
"target_value": "non-dairy"
}
]
}
],
"values": [
{
"description": "Food is raw",
"id": "preparation.method:yes",
"label": "Raw",
"option_id": "preparation.method",
"restrictions": [
{
"source_string": "xb: dairy = non-dairy",
"target_id": "dairy.dairy",
"target_value": "non-dairy"
}
],
"synonyms": [
"uncooked"
],
"value": "raw"
}
]
},
"translations": [
{
"id": 123
}
]
}Changes
No recorded changes to this endpoint across all 1 revision of this API.