recipes

Resolve, correct or reject one ingredient line

Attach a food to the line, replace an incorrect match, or reject the line as not an ingredient. Every outcome is written to the correction ledger, including agreement with what the algorithm already proposed, and the recipe's nutrition and classification are recalculated.

put/chefs/recipes/{recipe_id}/review/{ingredient_id}

Path parameters

recipe_idinteger required
ingredient_idinteger required

Request body

rejectedboolean

The line is not an ingredient; it is removed and the decision recorded.

rxfood_idstring nullable

CNF food to attach. Required unless rejected.

serving_unit_amountnumber nullable
serving_unit_labelstring nullable
servingsnumber nullable

Response

successful operation

child_recipe_idinteger nullable
descriptionstring nullable
extracted_namestring nullable

What the parser read the ingredient as.

food_namestring nullable
ingredient_idinteger nullable

Null for a rejected line, which no longer has an ingredient but stays visible so the curator can see what was discarded.

mapping_confidencenumber nullable
mapping_status'unmatched' | 'auto' | 'confirmed' | 'rejected' nullable

A rejected line is returned with resolved=true and no ingredient_id: it needs no further decision but is shown so the discard is visible.

original_textstring nullable

What the source said, for a scanned or imported line.

resolvedboolean
rxfood_idstring nullable
serving_unit_labelstring nullable
servingsnumber nullable
sort_orderinteger

Changes