Get Preselection Allergens

​

Returns the allergens each product carries once its preselected modifiers are taken into account, which is what you need to filter a menu listing by allergen without loading every product in full.

Like preselection prices, read this once per menu. The allergen ids match Get Declarations.

This endpoint is only available to brands with the allergen and dietary filter enabled; other brands receive an error rather than an empty set.

Path Parameters

  • UUID of venue

  • UUID of a menu

Headers

  • White Label Application Key

Responses

  • application/json
  • The allergen and dietary filter is not enabled for this brand.

  • The brand is not on the NMG product structure.

  • Unknown venue or menu UUID.

Request Example for get/venues/{venue_uuid}/menus/{menu_uuid}/preselection-allergens
curl 'https://api-public-demo.menu.app/api/v2/venues/{venue_uuid}/menus/{menu_uuid}/preselection-allergens' \
  --header 'Application: '
{
  "status": "OK",
  "code": 200,
  "data": {
    "preselection_allergens_set": {
      "venue_id": "8d2f2c42-2f1e-4a3c-9a1e-2c4c9f0d7f11",
      "menu_id": "b1c5f0a3-77a2-4b91-8a0e-1f2d3c4b5a60",
      "preselection_allergens": [
        {
          "product_id": "5e4072f5-976a-4f21-b77e-41a3ef3ff38e",
          "allergens": [
            "milk",
            "wheat"
          ]
        },
        {
          "product_id": "9a1c7d34-6b21-4f0e-9b77-2d5e8f1a3c44",
          "allergens": [
            "peanuts"
          ]
        }
      ]
    }
  }
}