Skip to content
Skip to Content
Docs
Studio

Get Recipe Allergens

Returns the recipe's allergen record: one row per major allergen of the market's list, each contains, not_present or not_answered, with species and where the answer came from. Answers carry up from the allergen declarations of the custom ingredients the recipe uses; nothing is looked up or suggested, and an ingredient with no declaration leaves rows not_answered. not_answered never means free from. Nothing is saved by reading.

confirmation.state says whether a person's confirmation covers this record: confirmed, stale (an answer, the ingredients or the allergen list changed since), unconfirmed or unreadable.

Pass ?version_id= to read an earlier version.

GET
/studio/recipes/{recipe_id}/allergens

Path Parameters

recipe_id*Recipe Id

Query Parameters

version_id?|

Leave out for the current recipe. To read an earlier version, pass a version_id from the recipe's version list.

Response Body

Successful Response

application/json
  1. response

The envelope for reading and changing a recipe's allergen record.

data*

The allergen record of one recipe version.

meta*

Response metadata.

version_id?|

The version the record was read at; pass it as If-Match on the next change. Null only for a recipe that was never versioned.

Example Request
curl -X GET 'https://api.bettermenu.live/studio/recipes/string/allergens'
Example Response
{  "data": {    "country": "US",    "list_version": "string",    "rows": [      {        "code": "string",        "state": "contains",        "species": [          "string"        ],        "other_species": [          "string"        ],        "sources": [          {            "kind": "custom_ingredient",            "ingredient_row_id": "string",            "custom_ingredient_id": "string",            "custom_ingredient_version_id": "string",            "name": "string",            "via": [              "string"            ],            "actor": {              "type": "member",              "id": "string"            },            "channel": "studio",            "at": "2019-08-24T14:15:22Z"          }        ],        "carried_state": "contains",        "carried_species": [          "string"        ],        "carried_other_species": [          "string"        ],        "person": {          "state": "contains",          "species": [            "string"          ],          "other_species": [            "string"          ],          "actor": {            "type": "member",            "id": "string"          },          "channel": "studio",          "at": "2019-08-24T14:15:22Z"        },        "person_answer_superseded": false,        "name": "string"      }    ],    "cross_contact": [      {        "code": "string",        "sources": [          {            "kind": "custom_ingredient",            "ingredient_row_id": "string",            "custom_ingredient_id": "string",            "custom_ingredient_version_id": "string",            "name": "string",            "via": [              "string"            ],            "actor": {              "type": "member",              "id": "string"            },            "channel": "studio",            "at": "2019-08-24T14:15:22Z"          }        ]      }    ],    "unanswered": [      "string"    ],    "unreadable_ingredient_rows": [      "string"    ],    "complete": true,    "record_hash": "string",    "confirmation": {      "state": "confirmed",      "current": {        "confirmation_id": "string",        "version_id": "string",        "record_hash": "string",        "actor": {          "type": "member",          "id": "string"        },        "channel": "studio",        "confirmed_at": "2019-08-24T14:15:22Z"      }    }  },  "meta": {    "version": "string",    "request_id": "string",    "timestamp": "string"  },  "version_id": "string"}

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

Start freeNo card needed.