Skip to content
Skip to Content
Docs
Studio

Get Recipe Version Changes

Return a structural diff of version_id relative to compared_to (defaults to its parent).

before holds values at the comparison point; after holds values at the subject version. Only changed top-level fields appear in data.field_changes; an empty map means the two states are equivalent. For rollback preview, pass compared_to=\{current_head\} to see what reverting to version_id would change. Diffing a version against itself returns 400.

GET
/studio/recipes/{recipe_id}/versions/{version_id}/changes

Path Parameters

recipe_id*Recipe Id
version_id*Version Id

The version_id whose changes are described, from the recipe's version list.

Match^[0-9A-HJKMNP-TV-Z]{26}$
Length26 <= length <= 26

Query Parameters

compared_to?|

The version_id to compare against. Leave it out to compare with the version before version_id (what changed at that version). Any other version works too: to preview a restore, pass the current version_id here and the restore target as version_id. For the first version, leaving it out lists everything as added.

Response Body

Successful Response

application/json
  1. response

Standard envelope for the version-changes endpoint.

data*

Structural diff describing the subject version relative to the comparison point. The shape mirrors Recipe's nested types — each entry in field_changes is keyed by Recipe's top-level field name; its value carries the per-field diff. Use before/after (primitive), added/removed/modified (list with stable ids), or field_changes (sub-model) to render.

meta*

Standard response metadata (API version, request id, timestamp).

Example Request
curl -X GET 'https://api.bettermenu.live/studio/recipes/string/versions/stringstringstringstringst/changes'
Example Response
{  "data": {    "field_changes": {      "property1": {        "field_changes": {          "property1": {},          "property2": {}        },        "context": {}      },      "property2": {        "field_changes": {          "property1": {},          "property2": {}        },        "context": {}      }    }  },  "meta": {    "version": "string",    "request_id": "string",    "timestamp": "string"  }}

Recipe in, FDA-format Nutrition Facts out, with every version kept.

Start freeNo card needed.