Update ingredient
recipal_update_ingredientWRITE: change fields of one of YOUR ingredients (public ingredients cannot be edited); fields you leave out stay unchanged. If nutrition_unit, nutrition_quantity or their measure change, nutrients you do not pass are rescaled to keep the same amount per serving. measures REPLACES the whole list of custom units, so send them all. Setting archived true hides the ingredient from lists; false restores it. The change flows into every recipe using the ingredient. PUT /ingredients/{id}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Ingredient name. | |
| brand | No | Brand name. | |
| source | No | Data source. | |
| archived | No | true to archive, false to restore. | |
| measures | No | The FULL list of custom units (replaces the existing list). | |
| allergens | No | Allergens by name, e.g. {"Milk": true, "Almond": true, "other-shellfish": "Oyster"}. Standard names: Wheat, Peanuts, Soy, Sesame, Mustard, Sulfites, Milk (Goat milk, Sheep milk), Egg (Duck egg, Quail egg), Fish (Tuna, Cod, Salmon, Bass), Shellfish (Crab, Lobster, Shrimp), tree nuts (Almond, Cashew, Hazelnut, Macadamia nut, Pecan, Pine nut, Pistachio, Walnut ...), Gluten (Barley, Oats, Rye, Triticale). other-milk/-egg/-fish/-shellfish/-treenut take a free-text source. An empty object {} clears all allergens. | |
| nutrients | No | Nutrition facts to change; others are kept. Amounts per serving (nutrition_quantity x nutrition_unit): calories; grams for protein, fat, fat_saturated, fat_trans, carbohydrate, fiber, uncounted_fiber, sugar, added_sugar, sugar_alcohol, fat_monounsaturated, fat_polyunsaturated, omega_3, omega_6, water, ash; milligrams for cholesterol, sodium, calcium, iron, potassium, vitamin_c, vitamin_e, thiamin, riboflavin, niacin, vitamin_b6, pantothenic_acid, phosphorus, magnesium, zinc, copper, manganese, chloride, choline; micrograms for vitamin_k, folate, vitamin_b12, biotin, iodine, selenium, chromium, molybdenum; IU for vitamin_d_IU and vitamin_a_IU. | |
| ingredient_id | Yes | ReciPal ingredient id (one you created). | |
| nutrition_unit | No | Unit the nutrients are entered in. | |
| ingredient_list | No | Ingredient list text for labels. | |
| nutrition_quantity | No | Quantity of nutrition_unit the nutrients are for. |