Skip to content
Skip to Content
Docs
Studio

Get Custom Ingredient 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. Each changed field also carries a data.field_relevance entry classifying its downstream label impact (ADR 0008 D7): label_affecting, availability_affecting, or non_label_affecting. Diffing a version against itself returns 400.

GET
/studio/custom-ingredients/{custom_ingredient_id}/versions/{version_id}/changes

Path Parameters

custom_ingredient_id*Custom Ingredient Id
version_id*Version Id

The version_id whose changes are described, from the custom ingredient'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. For the first version, leaving it out lists everything as added.

Response Body

Successful Response

application/json
  1. response

Standard envelope for the custom-ingredient version-changes endpoint.

data*

Structural diff describing the subject version relative to the comparison point, plus the label-relevance classification for each changed field.

meta*

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

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

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

Start freeNo card needed.