Discard Custom Ingredient Pending Changes
Discard a custom ingredient's open pending changes. The ingredient and every recipe using it are not changed. The discarded versions stay readable in the ingredient's history. Send the pending changes' newest version_id (tip_version_id) as If-Match, so nothing the caller has not seen is thrown away. Allowed while the ingredient is active or archived. An AI agent can discard only pending changes it started, for the same member, that no one else edited. A machine client cannot discard pending changes.
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
The pending changes after they were discarded.
The ingredient's current version is not changed. The discarded versions stay readable in the ingredient's history.
meta*Response metadata.
pending_changes*The open pending changes of a custom ingredient, without their content.
Pending changes are proposed edits kept beside the ingredient. Recipes,
search and the ingredient list keep using the ingredient's current
version until a person confirms them. Read their content with
getCustomIngredientPendingChanges.
curl -X DELETE 'https://api.bettermenu.live/studio/custom-ingredients/string/pending-changes' \ -H 'If-Match: string'{ "meta": { "version": "string", "request_id": "string", "timestamp": "string" }, "pending_changes": { "id": "string", "state": "open", "base_version_id": "string", "tip_version_id": "string", "origin": "member", "created_at": "2019-08-24T14:15:22Z", "created_by": "string", "last_commit_at": "2019-08-24T14:15:22Z" }}