Delete Custom Ingredient
Permanently delete a custom ingredient — irreversible via the API. restoreCustomIngredient is refused on a deleted ingredient (409 custom_ingredient_not_restorable), so no prior version can undo this. Scoped to draft, never-confirmed ingredients with zero recipe usage only: a typo'd or misnamed draft that was never confirmed and never composed into a recipe. Rejected once the ingredient has been confirmed (active), archived, or is already deleted — use archiveCustomIngredient to withdraw an ingredient that's ever been active. Rejected if any recipe pins this ingredient, even though a draft cannot normally acquire usage — check getCustomIngredientUsage first if unsure. Unlike deleteRecipe, the ingredient remains readable afterward with status=deleted — the record and every version before the delete are retained; what ends is any further use of the ingredient.
custom_ingredient_id*Custom Ingredient IdIf-Match*stringThe custom ingredient's current version_id: the one the last change to this custom ingredient returned, or the one reading it returns (get_custom_ingredient). A stale value is refused with the current version_id; read the custom ingredient again and retry.
Successful Response
application/json- response
Response for the delete-custom-ingredient endpoint.
data reflects the post-delete ingredient (status=deleted), so the
caller can confirm the transition without a follow-up read. Unlike a
deleted recipe, a deleted custom ingredient stays readable.
data*A custom ingredient's full data: identity, lifecycle status, serving/nutrition data, and descriptive attributes.
meta*Response metadata.
version_id?|Version committed for this delete (tombstone) transition.
curl -X DELETE 'https://api.bettermenu.live/studio/custom-ingredients/string' \ -H 'If-Match: string'{ "data": { "id": "stringstringstringstringst", "org_id": "stringstringstringstrings", "status": "draft", "name": "string", "entry_method": "form", "notes": "string", "reference_amount": "string", "reference_unit": "string", "household_measure": "string", "reference_quantity_g": "string", "density_g_per_ml": "string", "nutrients": [ { "id": "stringstringstringstringst", "unit": "string", "amount": "string", "market_nutrients": { "property1": { "bmid": "string", "nutrient_id": 1 }, "property2": { "bmid": "string", "nutrient_id": 1 } } } ], "approved_markets": [ "US" ], "brand": "string", "manufacturer": "string", "source_url": "string", "attributes": [ { "key": "string", "type": "string", "value": null, "searchable": false } ], "artifacts": [ { "key": "string", "kind": "string", "uploaded_at": "2019-08-24T14:15:22Z" } ], "ingredient_statement": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" }, "meta": { "version": "string", "request_id": "string", "timestamp": "string" }, "version_id": "string"}