Requesting a menu card by id · Integration API
Requesting a menu card by id
GET
/Menus/{menuId}?type={type}&date={date}&includeMeta={includeMeta}This interface provides the information about the menu card with the given id
Property Description
| Property | Data type | Description |
|---|---|---|
| MondayOfWeek | DateTime | Date of the given calenderweek's monday. |
| Rows | Array[Object] | Categories included in this menu card. |
| Type | Integer | Describes the behaviour of products in this category0 = DailyChangingContent1 = SameContentEachDay. |
| Days | Object | The object holding all the weekdays with their respective products in this category. |
| Allergens | Array[Integer] | List of allergen IDs contained by a product. |
| SubAllergens0 | Array[Integer] | List of sub-allergen IDs contained by a product. |
| SubAllergens7 | Array[Integer] | List of sub-allergen IDs contained by a product. |
| Traces | Array[Integer] | List of IDs of allergen traces that can be contained by this product. |
| SubTraces0 | Array[Integer] | List of IDs of sub-allergen traces that can be contained by this product. |
| SubTraces7 | Array[Integer] | List of IDs of sub-allergen traces that can be contained by this product. |
| AdditiveIds | Array[Integer] | List of additive IDs contained by this product. |
| TagIds | Array[Integer] | List of "CustomTag" IDs assigned to this product. |
| Ingredients | String | A semicolon-seperated list of ingredients used to prepare this product. Example: Filet-Steak;Chanterelle;Onion |
| Prices in a product |
Array[Object] | A list of all prices available for this product. Object structure:PriceId(ID of the PriceTag)CurrencyIso (ISO Code of the currency)Value. |
| CoverUrls | Array[String] | A list of picture URLs linking to pictures chosen for this product. |
| WeightInGrams | Decimal | Weight of the product in grams. |
| VolumeInMilliliters | Decimal | Volume of the product in milliliters. |
| NutritionFacts | Object | An object containing the nutritional value of this product. The following nutritional values can be displayed: KCal KilocaloriesKJ KilojouleFatsSats Saturated fatty acidsMonounsats Monounsaturated fatty acidsPolyunsats Polyunsaturated fatty acidsCarbs CarbohydratesSugarAlcoholAmylumProteinsRoughageSaltAll of these properties can be displayed either per serving or per 100 grams, which is shown by the suffix PerServing or Per100 (e.g. FatsPerServing, SugarPer100) |
| Infos | Array[Object] | A list of objects containing information about this product. Object structure: { "Title"="Info1", "Message"="Information about this product", "PictureUrl"="https://qnips.blob.core.windows.net/prodpics/12345.jpg", "MediaType"="0", "AutoPlay"="false" } Available MediaTypes:0 = Image1 = VideoPictureUrl is used for both MediaTypes |
| CO2Info | Object | An object containing information about the amount of CO2 emitted during the production of this product. Object structure: { "Rating"="A", "Value"=100,5 } Rating is a scale from A to E, which describes the severity of the emissionValue provides the value of the CO2 emission in grams |
| Ratings | Object | An object containing the information about the rating. Object structure: { "1"={ "Value":123.4 } } "1" is the id of the rating matching in the RatingLabelsValue provides the value of the Rating |
| AppMeta | Object | An object containing metadata about this product. Object structure: { "DisplayOptions": 7100, "WeeksToPreview": 4, "WeekDays": [ 0, 1, 2, 3, 4 ], "ShowNextDayTime": "15:00:00" } DisplayOptions is a bitmask describing how the product is supposed to be displayed in the app. The reference sheet for the different meanings of the bits can be found belowWeeksToPreview shows how many weeks of data should be loaded in advanceWeekDays contains the IDs of the weekdays that should be displayed in the appShowNextDayTime provides the time at which the next day is to be shownDailyAllergensTime provides the time at which the relevant allergens for the day should be displayedEmptyMessage is the message that is to be displayed when the menu card is emptyEmptyCategoryMessage is the message that is to be displayed in place of an empty category |
| Additives | Array[Objekt] | A list of all additives that could be contained by products of this menu card. Object structure: { "Id": 235, "Name": "contains Phosphat", "Label": "10" } Label is what is displayed by the app instead of the full name |
| Tags | Array[Object] | A list of "CustomTags" that are available for products of this menu card. Object structure: { "Id": 239, "Name": "contains Beef", "Label": "", "IconUrl": "https://qnips.blob.core.windows.net/customtagproposalicons/Rind_Icon.png" } |
| RatingLabels | Array[Object] | A list of "RatingLabels" that are available for products of this menu card. Object structure: { "Id":1, "Name":"Vital", "Type":3, "IconUrl":"https://qnips.blob.core.windows.net/customtagproposalicons/Rind_Icon.png", "ThirdPartyId":"Vital_1" } |
| Prices in root of the response |
Array[Object] | A list of pricetags available for the products of this menu card. Object structure: { "Id": 36, "Name": "internal" } |
DisplayOptions
| Bit | Meaning |
|---|---|
| 0 | Categories will be displayed in a seperate View. If 0: Categories will be displayed as section headers. |
| 1 | Deprecated |
| 2 | Display pictures in the list of products. |
| 3 | Display pictures in the product details view. |
| 4 | Display allergens & additives in the product details. |
| 5 | Display allergen traces in the product details. |
| 6 | Display the recipe in the product details. |
| 7 | Display nutrition facts in the product details. |
| 8 | Display allergens in the list of products. |
| 9 | Display the "CustomTags" in the list of products. |
| 10 | Display prices in the list of products. |
| 11 | Display product details. |
| 12 | Display the rating of the product. The API for product ratings is not yet available. If this is wanted then please discuss this with your contact at Qnips. |
| 13 | Display the image uploaded with a rating for a product. The API for product ratings is not yet available. If this is wanted then please discuss this with your contact at Qnips. |
Allergens
| Id | Allergen |
|---|---|
| 0 | Grains containing gluten |
| 1 | Shellfish |
| 2 | Egg |
| 3 | Fish |
| 4 | Peanut |
| 5 | Soy |
| 6 | Milk |
| 7 | Nuts |
| 8 | Celery |
| 9 | Mustard |
| 10 | Sesame |
| 11 | Sulphites |
| 12 | Lupin |
| 13 | Molluscs |
SubAllergens0 and SubTraces0
| Id | SubAllergen |
|---|---|
| 0 | Wheat |
| 1 | Rye |
| 2 | Barley |
| 3 | Oats |
SubAllergens7 and SubTraces7
| Id | SubAllergen |
|---|---|
| 0 | Almond |
| 1 | Hazelnut |
| 2 | Walnut |
| 3 | Cashew |
| 4 | Pecan |
| 5 | Brazil |
| 6 | Pistachio |
| 7 | Macadamia |
Type of RatingLabel
| Id | Type |
|---|---|
| 0 | Nutrition |
| 1 | CO2 |
| 2 | WaterFootprint |
| 3 | HealthScore |
| 4 | AnimalTreatment |
| 5 | Rainforest |
Parameter
menuIdlongErforderlichThe ID of the menu card
typeintErforderlichThe type of platform that the request was sent from.
0 = App
1 = Web
datedatetimeThe date of the day of which the content is to be displayed. The default value is the server time.
includeMetabooleanDecides whether the meta information is to be included. The default value is true.
Request-Header
AuthorizationThe secret ApiKey provided to you by QnipsAccept-LanguageA prioritized list of languages that the menu card is to be displayed in. The first language that the menu card provides values for will be chosen from the list and displayed.Originaler Blueprint-Ausschnitt
API Blueprint
### Requesting a menu card by id [GET]
### Property Description
|Property|Data type|Description|
|:---:|:---:|:---|
|**MondayOfWeek**|*DateTime*|Date of the given calenderweek's monday.|
|**Rows**|*Array[Object]*|Categories included in this menu card.|
|**Type**|*Integer*|Describes the behaviour of products in this category<br>`0` = DailyChangingContent<br>`1` = SameContentEachDay.|
|**Days**|*Object*|The object holding all the weekdays with their respective products in this category.|
|**Allergens**|*Array[Integer]*|List of allergen IDs contained by a product.|
|**SubAllergens0**|*Array[Integer]*|List of sub-allergen IDs contained by a product.|
|**SubAllergens7**|*Array[Integer]*|List of sub-allergen IDs contained by a product.|
|**Traces**|*Array[Integer]*|List of IDs of allergen traces that can be contained by this product.|
|**SubTraces0**|*Array[Integer]*|List of IDs of sub-allergen traces that can be contained by this product.|
|**SubTraces7**|*Array[Integer]*|List of IDs of sub-allergen traces that can be contained by this product.|
|**AdditiveIds**|*Array[Integer]*|List of additive IDs contained by this product.|
|**TagIds**|*Array[Integer]*|List of "CustomTag" IDs assigned to this product.|
|**Ingredients**|*String*|A semicolon-seperated list of ingredients used to prepare this product.<br>Example: Filet-Steak;Chanterelle;Onion|
|**Prices**<br>in a product|*Array[Object]*|A list of all prices available for this product. Object structure:<br>`PriceId`(ID of the PriceTag)<br>`CurrencyIso` (ISO Code of the currency)<br>`Value`.|
|**CoverUrls**|*Array[String]*|A list of picture URLs linking to pictures chosen for this product.|
|**WeightInGrams**|*Decimal*|Weight of the product in grams.|
|**VolumeInMilliliters**|*Decimal*|Volume of the product in milliliters.|
|**NutritionFacts**|*Object*|An object containing the nutritional value of this product.<br>The following nutritional values can be displayed:<br><br>`KCal` Kilocalories<br>`KJ` Kilojoule<br>`Fats`<br>`Sats` Saturated fatty acids<br>`Monounsats` Monounsaturated fatty acids<br>`Polyunsats` Polyunsaturated fatty acids<br>`Carbs` Carbohydrates<br>`Sugar`<br>`Alcohol`<br>`Amylum`<br>`Proteins`<br>`Roughage`<br>`Salt`<br><br>All of these properties can be displayed either per serving or per 100 grams, which is shown by the suffix `PerServing` or `Per100` (e.g. `FatsPerServing`, `SugarPer100`)|
|**Infos**|*Array[Object]*|A list of objects containing information about this product.<br>Object structure:<br>**{<br>"Title"="Info1",<br>"Message"="Information about this product",<br>"PictureUrl"="https://qnips.blob.core.windows.net/prodpics/12345.jpg",<br>"MediaType"="0",<br>"AutoPlay"="false"<br>}**<br><br>Available `MediaType`s:<br>`0` = Image<br>`1` = Video<br><br>`PictureUrl` is used for both `MediaType`s|
|**CO2Info**|*Object*|An object containing information about the amount of CO2 emitted during the production of this product.<br>Object structure:<br>**{<br>"Rating"="A",<br>"Value"=100,5<br>}**<br><br>`Rating` is a scale from A to E, which describes the severity of the emission<br>`Value` provides the value of the CO2 emission in grams|
|**Ratings**|*Object*|An object containing the information about the rating.<br>Object structure:<br>**{<br>"1"={<br>"Value":123.4<br>}<br>}**<br><br>`"1"` is the id of the rating matching in the `RatingLabels`<br>`Value` provides the value of the Rating|
|**AppMeta**|*Object*|An object containing metadata about this product.<br>Object structure:<br>**{<br>"DisplayOptions": 7100,<br>"WeeksToPreview": 4,<br>"WeekDays": [<br>0,<br>1,<br>2,<br>3,<br>4<br>],<br>"ShowNextDayTime": "15:00:00"<br>}**<br><br>`DisplayOptions` is a bitmask describing how the product is supposed to be displayed in the app. The reference sheet for the different meanings of the bits can be found below<br>`WeeksToPreview` shows how many weeks of data should be loaded in advance<br>`WeekDays` contains the IDs of the weekdays that should be displayed in the app<br>`ShowNextDayTime` provides the time at which the next day is to be shown<br>`DailyAllergensTime` provides the time at which the relevant allergens for the day should be displayed<br>`EmptyMessage` is the message that is to be displayed when the menu card is empty<br>`EmptyCategoryMessage` is the message that is to be displayed in place of an empty category|
|**Additives**|*Array[Objekt]*|A list of all additives that could be contained by products of this menu card.<br>Object structure:<br>**{<br>"Id": 235,<br>"Name": "contains Phosphat",<br>"Label": "10"<br>}**<br><br>`Label` is what is displayed by the app instead of the full name|
|**Tags**|*Array[Object]*|A list of "CustomTags" that are available for products of this menu card.<br>Object structure:<br>**{<br>"Id": 239,<br>"Name": "contains Beef",<br>"Label": "",<br>"IconUrl": "https://qnips.blob.core.windows.net/customtagproposalicons/Rind_Icon.png"<br>}**|
|**RatingLabels**|*Array[Object]*|A list of "RatingLabels" that are available for products of this menu card.<br>Object structure:<br>**{<br>"Id":1,<br>"Name":"Vital",<br>"Type":3,<br>"IconUrl":"https://qnips.blob.core.windows.net/customtagproposalicons/Rind_Icon.png",<br>"ThirdPartyId":"Vital_1"<br>}**|
|**Prices**<br>in root of the response|*Array[Object]*|A list of pricetags available for the products of this menu card.<br>Object structure:<br>**{<br>"Id": 36,<br>"Name": "internal"<br>}**|
### `DisplayOptions`
|Bit|Meaning|
|:---|:---|
|0|Categories will be displayed in a seperate View. If 0: Categories will be displayed as section headers.|
|1|Deprecated|
|2|Display pictures in the list of products.|
|3|Display pictures in the product details view.|
|4|Display allergens & additives in the product details.|
|5|Display allergen traces in the product details.|
|6|Display the recipe in the product details.|
|7|Display nutrition facts in the product details.|
|8|Display allergens in the list of products.|
|9|Display the "CustomTags" in the list of products.|
|10|Display prices in the list of products.|
|11|Display product details.|
|12|Display the rating of the product. The API for product ratings is not yet available. If this is wanted then please discuss this with your contact at Qnips.|
|13|Display the image uploaded with a rating for a product. The API for product ratings is not yet available. If this is wanted then please discuss this with your contact at Qnips.|
### `Allergens`
|Id|Allergen|
|:---|:---|
|0|Grains containing gluten|
|1|Shellfish|
|2|Egg|
|3|Fish|
|4|Peanut|
|5|Soy|
|6|Milk|
|7|Nuts|
|8|Celery|
|9|Mustard|
|10|Sesame|
|11|Sulphites|
|12|Lupin|
|13|Molluscs|
### `SubAllergens0` and `SubTraces0`
|Id|SubAllergen|
|:---|:---|
|0|Wheat|
|1|Rye|
|2|Barley|
|3|Oats|
### `SubAllergens7` and `SubTraces7`
|Id|SubAllergen|
|:---|:---|
|0|Almond|
|1|Hazelnut|
|2|Walnut|
|3|Cashew|
|4|Pecan|
|5|Brazil|
|6|Pistachio|
|7|Macadamia|
### `Type` of `RatingLabel`
|Id|Type|
|:---|:---|
|0|Nutrition|
|1|CO2|
|2|WaterFootprint|
|3|HealthScore|
|4|AnimalTreatment|
|5|Rainforest|
+ Request
+ Headers
Authorization: The secret ApiKey provided to you by Qnips
Accept-Language: A prioritized list of languages that the menu card is to be displayed in. The first language that the menu card provides values for will be chosen from the list and displayed.
+ Parameters
+ menuId (long, required) - The ID of the menu card
+ type (int, required) - The type of platform that the request was sent from.<br>**0** = App<br>**1** = Web
+ date (datetime, optional) - The date of the day of which the content is to be displayed. The default value is the server time.
+ includeMeta (boolean, optional) - Decides whether the meta information is to be included. The default value is **true**.
+ Response 200
+ Body
{
"MenuCardId": 1234,
"StoreId": 12,
"Name": "Store 1 Card",
"MondayOfWeek": "2017-10-23T00:00:00Z",
"Rows": [
{
"Id": 2469,
"ThirdPartyId": "Vegan",
"Name": "API Demo LIVE Menu 1-1",
"Type": 0,
"Days": {
"0": [
{
"Id": 5821366,
"Name": "Braised pork goulash with mushroom gravy, a small salad and spaetzle",
"PictureUrl": "https://qnips.blob.core.windows.net/prodpics/16238.jpg",
"Allergens": [
0,
2,
9,
11
],
"SubAllergens0": [
0
],
"SubAllergens7": [],
"AdditiveIds": [],
"TagIds": [],
"CoverUrls": [],
"NutritionFacts": {
"KCalPerServing": 607,
"KJPerServing": 2544,
"FatsPerServing": 25.51,
"SatsPerServing": 5.9,
"CarbsPerServing": 71.15,
"SugarPerServing": 4.27,
"ProteinsPerServing": 22.88,
"SaltPerServing": 5.45
},
"Ratings": {
"1" : {
"Value": 123.4
}
}
}
],
"1": [
{
"Id": 5775966,
"Name": "Cheese bratwurst with bavarian coleslaw, parsley potatoes and sweet mustard",
"PictureUrl": "https://qnips.blob.core.windows.net/prodpics/16241.jpg",
"Allergens": [
6,
9
],
"SubAllergens0": [],
"SubAllergens7": [],
"AdditiveIds": [],
"TagIds": [],
"CoverUrls": [
"https://qnips.blob.core.windows.net/prodpics/16241.jpg"
],
"NutritionFacts": {
"KCalPerServing": 634,
"KJPerServing": 2654,
"FatsPerServing": 39.94,
"SatsPerServing": 15.38,
"CarbsPerServing": 43,
"SugarPerServing": 16.1,
"ProteinsPerServing": 25.36,
"SaltPerServing": 4.16
},
"Infos": []
}
],
"2": [
{
"Id": 5775969,
"Name": "Turkey ragout with grilled vegetables, paprika sauce, fried champignons and rice",
"PictureUrl": "https://qnips.blob.core.windows.net/prodpics/16245.jpg",
"Allergens": [
9
],
"SubAllergens0": [],
"SubAllergens7": [],
"AdditiveIds": [],
"TagIds": [],
"CoverUrls": [
"https://qnips.blob.core.windows.net/prodpics/16245.jpg"
],
"NutritionFacts": {
"KCalPerServing": 591,
"KJPerServing": 2471,
"FatsPerServing": 15.28,
"SatsPerServing": 1.84,
"CarbsPerServing": 88.21,
"SugarPerServing": 7.57,
"ProteinsPerServing": 23.93,
"SaltPerServing": 6.35
}
}
],
"3": [
{
"Id": 5775972,
"Name": "Vegetable stew with tomatoes, cabbage, beans, sour cream and cress",
"PictureUrl": "https://qnips.blob.core.windows.net/prodpics/16249.jpg",
"Allergens": [
0,
2,
4,
5,
6,
9,
10
],
"SubAllergens0": [
0,
1,
2
],
"SubAllergens7": [],
"AdditiveIds": [],
"TagIds": [],
"CoverUrls": [
"https://qnips.blob.core.windows.net/prodpics/16249.jpg"
],
"NutritionFacts": {
"KCalPerServing": 412,
"KJPerServing": 1720,
"FatsPerServing": 18.51,
"SatsPerServing": 9,
"CarbsPerServing": 44.5,
"SugarPerServing": 10.95,
"ProteinsPerServing": 16.36,
"SaltPerServing": 7.45
}
}
],
"4": [
{
"Id": 5775975,
"Name": "Baked plaice with Dijon mustard filling, green sauce and a potatoe-radish salad",
"PictureUrl": "https://qnips.blob.core.windows.net/prodpics/16254.jpg",
"Allergens": [
0,
2,
3,
6,
9
],
"SubAllergens0": [
0
],
"SubAllergens7": [],
"AdditiveIds": [
234
],
"TagIds": [],
"CoverUrls": [
"https://qnips.blob.core.windows.net/prodpics/16254.jpg"
],
"NutritionFacts": {
"KCalPerServing": 654,
"KJPerServing": 2738,
"FatsPerServing": 42.12,
"SatsPerServing": 4.83,
"CarbsPerServing": 48.91,
"SugarPerServing": 14.78,
"ProteinsPerServing": 20.47,
"SaltPerServing": 5.05
}
}
]
}
}
],
"AppMeta": {
"DisplayOptions": 7100,
"WeeksToPreview": 4,
"WeekDays": [
0,
1,
2,
3,
4
],
"ShowNextDayTime": "15:00:00"
},
"Additives": [
{
"Id": 234,
"Name": "waxed",
"Label": "4"
},
{
"Id": 235,
"Name": "contains phosphat",
"Label": "10"
},
{
"Id": 236,
"Name": "contains sweeteners",
"Label": "11"
}
],
"Tags": [
{
"Id": 239,
"Name": "contains beef",
"Label": "",
"IconUrl": "https://qnips.blob.core.windows.net/customtagproposalicons/Rind_Icon.png"
},
{
"Id": 240,
"Name": "contains pork",
"Label": "",
"IconUrl": "https://qnips.blob.core.windows.net/customtagproposalicons/Schwein_Icon.png"
},
{
"Id": 245,
"Name": "vegetarian",
"Label": "",
"IconUrl": "https://qnips.blob.core.windows.net/customtagproposalicons/Vegetarisch_Icon.png"
}
],
"RatingLabels": [
{
"Id": 1,
"Name": "Vital",
"Type": 3,
"IconUrl": "https://qnips.blob.core.windows.net/customtagproposalicons/Vegetarisch_Icon.png",
"ThirdPartyId": "Vital_1"
}
],
"Prices": [
{
"Id": 35,
"Name": "internal"
},
{
"Id": 36,
"Name": "external"
},
{
"Id": 330,
"Name": "small"
},
{
"Id": 331,
"Name": "large"
}
]
}