Compare Custom Ingredient Pending Changes
Compare a custom ingredient's open pending changes with its current version, which recipes use. field_changes is what confirming them would change on the current version: before is the current value and after the pending one. A field the current version changed after the pending changes were started, and that they did not change, keeps its current value. field_relevance classifies each change, conflicting_fields lists fields both sides changed, and blocking_reasons says why they cannot be confirmed yet (confirmable is true when it is empty). changes_hash identifies this comparison and changes whenever either version moves.
custom_ingredient_id*Custom Ingredient IdSuccessful Response
application/json- response
Envelope for the custom-ingredient pending-changes comparison.
data*What confirming a custom ingredient's pending changes would change.
Confirming lays the fields the pending changes set onto the ingredient's
current version and keeps the current value of every other field, so a
field the current version changed after the pending changes were started
is kept rather than undone. field_changes shows exactly that result:
before is the current value and after the value the pending changes
would set.
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 GET 'https://api.bettermenu.live/studio/custom-ingredients/string/pending-changes/changes'{ "data": { "field_changes": { "property1": { "field_changes": { "property1": {}, "property2": {} }, "context": {} }, "property2": { "field_changes": { "property1": {}, "property2": {} }, "context": {} } }, "field_relevance": { "property1": "label_affecting", "property2": "label_affecting" }, "conflicting_fields": [ "string" ], "confirmable": true, "blocking_reasons": [ "not_active" ], "base_version_id": "string", "main_version_id": "string", "tip_version_id": "string", "changes_hash": "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" }}