What’s Changing?
Functionality to support compliance with Food Information (Amendment) (England) Regulations 2019 (aka, Natasha’s Law)
- Recipe Report Amendments
- New 'Friendly Ingredient Name'
- Advanced Search for Recipes and Ingredients
- Triggers for Recalculation of ‘Automatically Generated’ Recipe Ingredient List
- Ingredient Report of ‘Ingredient List’ values
- Choice and Option Recipe Types Now Supported
APIs - (please click here to go straight to this section)
- Audit History for Ingredient Field: GET Request
- Audit History for Recipe Fields: GET Request
- Recipe Name: POST/GET APIs to Update Recipe Fields Including Menu Description
Endpoints released in Jan 2021 (also included in these release notes for easy reference)
- GET endpoint for Recipe ‘Full Ingredient’ Information
- POST /ingredientlist endpoint
- GET /ingredientlist endpoint
Release date: 6th and 7th April 2021
Reason for the Change
To support compliance with Natasha’s Law.
Customers Affected
Available to all RME customers using the ‘Full Ingredient List’ functionality. Configuration and credentials are required to access the APIs.
Release Notes
Food Information (Amendment) (England) Regulations 2019 Report (related changes)
New 'Friendly Ingredient Name'
A new ingredient field for use in the Food Information (Amendment) (England) Regulations 2019 Report has been created.
The new field is called: Label Description
The field can be seen on the Details tab of an Ingredient, underneath Short Name – see Fig.1.
Field visibility can be hidden or made visible ‘per user groups’ like other Ingredient fields
If this field is populated, its value will be used instead of the Ingredient Name field in the following functions:
-
- Recipe > Nutrition > Ingredient List (automatically generated version)
- Food Information (Amendment) (England) Regulations 2019 Report (Recipe Report) – see Fig.2
Fig.1 – New Ingredient field ‘Label Description’
Fig.2- ‘Label Description field used in ‘Food Information…2019’ Report
Recipe ‘Friendly Name’
Similarly, if the Recipe field Menu Description” is populated, it will be used instead of the Recipe Name field for these functions:
-
- Recipe > Nutrition > Ingredient List (automatically-generated version)
- Food Information (Amendment) (England) Regulations 2019 Report (Recipe Report)
Fig.3 – Recipe field ‘Menu Description’
Fig.4 – ‘Menu Description’ used in Recipe Ingredient list (automatically generated version)
Fig.5 – ‘Menu Description’ field used in ‘Food Information (Amendment)…2019’ Report
Data Compilation
When data is compiled for the ‘Food Information (Amendment) (England) Regulations 2019’ Report and for the Recipe > Nutrition > Ingredient List field, any ‘trailing periods’ present in the text entered in the Ingredient List field will be removed during auto-compilation. See examples below.
“Water, Chick., Salt, Pepper.” on the Ingredient -> “Water, Chick., Salt, Pepper” in the Recipe’s list
“Water, Salt, Pepper, Chick.” on the Ingredient -> “Water, Salt, Pepper, Chick” in the Recipe’s list
“Water, Salt, Pepper, Chick..” on the Ingredient -> “Water, Salt, Pepper, Chick.” in the Recipe’s list
Other Report Amendments
- A period will be added at the end of the auto-compiled Recipe Ingredient List data
- On the report, ‘INGREDIENTS:’ has been added before the Recipe Ingredient List
- The phrase ‘Allergy advice: For allergens, see ingredients in UPPERCASE.” Has been added below the list, with a line in between, on the report
Fig.6 – Label with added period and additional text
Ingredient List Added to Advanced Search for Recipes and Ingredients (Like Adv Search for 'Notes')
The text in the new 'Ingredient List' fields (ingredient field and recipe fields) can be searched using RME 'advanced search' functionality.
- Within Ingredients (or Recipes), select Advanced Search
The Advanced Search pop-up will display in the General tab.
- Use the Select Requirement drop-down and select Ingredient List
Fig.7– Advanced Search, Ingredient List
This Advanced Search option is available when the ‘Full Ingredient List’ functionality has been enabled for an organisation.
Fig.8 – Advanced Search, Ingredient List, sample search criteria
Ingredient List, Triggers for Recalculation of the Automatically Generated Recipe Ingredient List Text
Changes to the Field Names
When the fields listed below are changed, a recalculation of the recipe’s ‘automatically generated’ Ingredient List text is triggered. Changes via the user interface or the import API will prompt a recalculation.
Ingredient > Label Description
Ingredient > Ingredient Name
Recipe > Recipe Name
Recipe > Menu Description
Changes to Recipe Ingredients
When using the ‘Tools’ options to change or delete recipe ingredients, a recalculation will take place for all impacted recipes:
Replace in Recipes
Mass Delete
Bulk Edit Recipes
Changes to Parent Ingredient
When an alternate Ingredient is switched to a new parent Ingredient via the import API (using the POST /ingredientalternateswitch endpoint), a recalculation will take place for any Recipes using the alternate Ingredient whose parent Ingredient was changed.
The Ingredient List is an attribute of the parent Ingredient so when the alternate is moved to a different parent Ingredient, any Recipe using the alternate needs to be recalculated.
Important note: Recalculation happens as a background task so the newly calculated value will not appear immediately on the user interface. The greater the number of Recipes impacted by the change, the longer the recalculation could take.
Ingredients List, Ingredient Report
A new Ingredient report with information from the new Ingredient List and Label Description fields is now available in the Reports tab. The report name is Food Information (Amendment) (England) Regulations 2019 Ingredient Data.
The report is designed for output in Excel format.
The following columns are displayed for each (selected) ingredient:
Ingredient Name
Label Description (new field for ingredient 'friendly name')
Product Key (StarChef key)
Supplier Name
Supplier Code
Ingredient List
Fig.9 – New Food Information (Amendment) (England) Regulations 2019 Ingredient Data Report
New property for 'friendly ingredient name added in POST /ingredients and GET /ingredients
For API users, a new property called “LabelDescription” has been added to these endpoints:
POST /ingredients
GET /ingredients
This new property corresponds to the new ingredient field “Label Description”.
Please note: The POST /ingredients endpoint expects a full payload. If a property is omitted from the payload or submitted with an empty string, this property will be changed to ‘null’ in the database. Any existing value will be deleted.
‘Ingredient List’ Functionality to Support Choice and Option Recipe Types
For a ‘Choice’ Recipe, the information in the Ingredient List field is from the 'default' Recipe Ingredient only.
Fig.10 – A Choice recipe with ‘Sweet Potato Cake’ as the default Recipe Ingredient and with automatically generated Ingredient List reflecting only this ‘default’ Recipe Ingredient’s values
When the 'default' value within the Choice recipe is changed, the auto-compiled Ingredient List field will recalculate and will use the new default Recipe Ingredient’s Ingredient List values.
Fig.11 – A Choice recipe’s default Recipe Ingredient changes so the automatically generated ‘Ingredient List’ is updated
'Option' recipes are excluded from the 'Ingredient List' auto-compiled values for all scenarios. This is because, unlike Choice recipes, Option recipes have no 'default' value so have no nutrition, intolerance or cost info associated with them.
New Endpoints to support compliance with Food Information (Amendment) (England) Regulations 2019 (aka, Natasha’s Law)
Audit History for Ingredient Field: two new endpoints
The audit history for the ingredient field ‘Nutrition > Ingredient List’ can be accessed via two new endpoints:
GET /fullIngredientListHistory
GET /{guid}/fullIngredientListHistory
Sample response in JSON format
{
"ProductId": 139,
"FullIngredientList": "Cow's MILK, Salt",
"FirDate": "2021-02-10T16:06:02.503",
"ProductGuid": "f6f1630f-1dc3-4e5e-ab56-e38240433cde",
"ProductName": "Butter Salted",
"History": [
{
"HistoryLogId": 2148,
"ProductId": 139,
"FullIngredientListFrom": "MILK, Salt",
"FullIngredientListTo": "Cow's MILK, Salt",
"LoginName": "qaadmin",
"ModifyDate": "2021-02-10T16:06:02.503"
},
{
"HistoryLogId": 2128,
"ProductId": 139,
"FullIngredientListFrom": "MILK",
"FullIngredientListTo": "MILK, Salt",
"LoginName": "qaadmin",
"ModifyDate": "2021-02-09T19:03:31.923"
},
{
"HistoryLogId": 2103,
"ProductId": 139,
"FullIngredientListFrom": "",
"FullIngredientListTo": "MILK",
"LoginName": "qaadmin",
"ModifyDate": "2021-02-09T18:56:48.043"
}
]
Resource Name: /fullIngredientListHistory |
|||
URL: api.starchef.net/v2/ingredients/fullIngredientListHistory |
|||
Supported verbs: GET – retrieves list of ingredients with their audit history for the field “Ingredient List”. The response returns the date and user, as well as the previous and updated “Ingredient List” information. |
|||
URL Parameters |
Name |
Type |
Description |
|
lastModifiedAfter
|
Date |
YYYY-MM-DD The response will be limited to ingredients that have had the “Ingredient List” field modified on or after the specified date. |
Response Properties |
Name |
Type |
Description |
|
ProductId |
Integer |
Ingredient Product Key |
FullIngredientList |
String |
Corresponds to “Ingredient list” field. Displays text for this field. |
|
FirDate |
String |
Last modified date for the Ingredient’s “Ingredient List” field’ |
|
ProductGuid |
String |
Ingredient guid |
|
ProductName |
String |
Corresponds to “Ingredient Name” |
|
History |
Array |
Change log for this ingredient’s “Ingredient List” field |
|
HistoryLogId |
Integer |
|
|
ProductId |
Integer |
Ingredient product key |
|
FullIngredientListFrom |
String |
“Ingredient List” text before the change |
|
FullIngredientListTo |
String |
“Ingredient List” text after the change |
|
LoginName |
String |
Log-in name of the user who changed the “Ingredient List” field |
|
ModifyDate |
String |
Date that the “Ingredient List” field was modified |
Resource Name: /{guid}/fullIngredientListHistory |
|||
URL: api.starchef.net/v2/ingredients/{guid}/fullIngredientListHistory |
|||
Supported verbs: GET – retrieves a single ingredient with its audit history for the field “Ingredient List”. The response returns the date and user, as well as the previous and updated “Ingredient List” information. |
|||
URL Parameters |
Name |
Type |
Description |
|
lastModifiedAfter
|
Date |
YYYY-MM-DD The response will be limited to ingredients that have had the “Ingredient List” field modified on or after the specified date. |
guid |
String |
Ingredient GUID. The ingredient associated with this guid will be returned in the response. This is a mandatory value in the request. |
|
Response Properties |
Name |
Type |
Description |
|
ProductId |
Integer |
Ingredient Product Key |
FullIngredientList |
String |
Corresponds to “Ingredient list” field. Displays text for this field. |
|
FirDate |
String |
Last modified date for the Ingredient’s “Ingredient List” field |
|
ProductGuid |
String |
Ingredient guid |
|
ProductName |
String |
Corresponds to “Ingredient Name” |
|
History |
Array |
Change log for this ingredient’s “Ingredient List” field |
|
HistoryLogId |
Integer |
|
|
ProductId |
Integer |
Ingredient product key |
|
FullIngredientListFrom |
String |
“Ingredient List” text before the change |
|
FullIngredientListTo |
String |
“Ingredient List” text after the change |
|
LoginName |
String |
Login name of the user who changed the Ingredient List field |
|
ModifyDate |
String |
Date that the field was modified |
Examples of responses for GET /ingredients/fullIngredientListHistory
Scenario 1
Ingredient's Ingredient List is populated for the first time.
Fig.12 – Result: User interface is populated. Audit history is updated. API response below
API sample response
[
{
"ProductId": 341,
"FullIngredientList": "Tomatoes, Water, CELERY salt, Sugar",
"FirDate": "2021-03-19T12:37:36.113",
"ProductGuid": "00206c59-c357-4291-867b-44d698c15910",
"ProductName": "Tomato Ketchup",
"History": [
{
"HistoryLogId": 3440,
"ProductId": 341,
"FullIngredientListFrom": null,
"FullIngredientListTo": "Tomatoes, Water, CELERY salt, Sugar",
"LoginName": "desi03",
"ModifyDate": "2021-03-19T12:37:36.113"
}
]
Scenario 2
Ingredient's Ingredient List is updated for the second time
Fig.13 – When Ingredient List information is changed, this is captured in both the ingredient audit history and the API response
API: The API response lists the current state first then the most recent change, then older changes.
[
{
"ProductId": 341,
"FullIngredientList": "Tomatoes, Water, CELERY salt, Sugar, Anchovy FISH",
"FirDate": "2021-03-19T14:03:50.203",
"ProductGuid": "00206c59-c357-4291-867b-44d698c15910",
"ProductName": "Tomato Ketchup",
"History": [
{
"HistoryLogId": 3462,
"ProductId": 341,
"FullIngredientListFrom": "Tomatoes, Water, CELERY salt, Sugar",
"FullIngredientListTo": "Tomatoes, Water, CELERY salt, Sugar, Anchovy FISH",
"LoginName": "desi03",
"ModifyDate": "2021-03-19T14:03:50.203"
},
{
"HistoryLogId": 3440,
"ProductId": 341,
"FullIngredientListFrom": null,
"FullIngredientListTo": "Tomatoes, Water, CELERY salt, Sugar",
"LoginName": "desi03",
"ModifyDate": "2021-03-19T12:37:36.113"
}
]
},
Scenario 3
Ingredient's Ingredient List is changed to blank (user deletes the text in the field)
Fig.14 – Ingredient audit history shows that the Ingredient List was edited
API response: Shows a blank when the Ingredient’s Ingredient List information is not populated.
[
{
"ProductId": 341,
"FullIngredientList": "",
"FirDate": "2021-03-19T14:08:13.61",
"ProductGuid": "00206c59-c357-4291-867b-44d698c15910",
"ProductName": "Tomato Ketchup",
"History": [
{
"HistoryLogId": 3468,
"ProductId": 341,
"FullIngredientListFrom": "Tomatoes, Water, CELERY salt, Sugar, Anchovy FISH",
"FullIngredientListTo": "",
"LoginName": "desi03",
"ModifyDate": "2021-03-19T14:08:13.61"
},
{
"HistoryLogId": 3462,
"ProductId": 341,
"FullIngredientListFrom": "Tomatoes, Water, CELERY salt, Sugar",
"FullIngredientListTo": "Tomatoes, Water, CELERY salt, Sugar, Anchovy FISH",
"LoginName": "desi03",
"ModifyDate": "2021-03-19T14:03:50.203"
},
{
"HistoryLogId": 3440,
"ProductId": 341,
"FullIngredientListFrom": null,
"FullIngredientListTo": "Tomatoes, Water, CELERY salt, Sugar",
"LoginName": "desi03",
"ModifyDate": "2021-03-19T12:37:36.113"
}
]
},
Audit History for Recipe “Ingredient List” Fields: two new endpoints
The audit history for the recipe “Ingredient List” field that is specified for ‘use in reports‘ can be accessed via two new endpoints:
GET /Recipes/fullIngredientListHistory
GET /Recipes/{guid}/fullIngredientListHistory
Examples of responses for GET /Recipes/{guid}/fullIngredientListHistory
Scenario 1
Recipe is created. The recipe’s ‘automatically generated’ Ingredient List field is populated from recipe ingredients’ information. By default, the ‘automatically generated’ field is designated as the preferred field for ‘use in reports’. The user does not change this ‘use in reports’ setting.
Result: API response returns the automatically generated field because it is the one chosen for ‘use in reports’.
If the field specified for ‘use in reports’ changes, the audit history continues to track the audit history so the information displayed in the API response could vary between the automatically generated field and the manual field.
[
[
{
"ProductId": 74855,
"FullIngredientList": "Smoked Back Bacon (Pork, Water, Salt, Nitrates).",
"FirDate": "2021-03-22T13:12:04.397",
"ProductGuid": "101ef8a8-e61e-4f8a-9485-e05ff3ee488c",
"ProductName": "Bacon, Grilled, Side order",
"History": [
{
"HistoryLogId": 3453,
"ProductId": 74855,
"FullIngredientListFrom": null,
"FullIngredientListTo": "Smoked Back Bacon (Pork, Water, Salt, Nitrates).",
"LoginName": "desi03",
"ModifyDate": "2021-03-22T13:12:04.397"
}
]
Fig.15 – The recipe Ingredient List field that is specified for ‘use in report’ is the one tracked in the audit history
Scenario 2
Using the below recipe (Fig.16), the recipe’s Ingredient List ‘manual field’ is populated. The ‘automatically generated’ field is still specified as the one to ‘use in report'.
Fig.16 - 'Manual' field in recipe is populated
Result: API returns 'automatically generated' field because this is the field specified as the one to ‘use in report'
{
"ProductId": 74855,
"FullIngredientList": "Smoked Back Bacon (Pork, Water, Salt, Nitrates).",
"FirDate": "2021-03-22T13:12:04.397",
"ProductGuid": "101ef8a8-e61e-4f8a-9485-e05ff3ee488c",
"ProductName": "Bacon, Grilled, Side order",
"History": [
{
"HistoryLogId": 3454,
"ProductId": 74855,
"FullIngredientListFrom": "",
"FullIngredientListTo": "Smoked Back Bacon (Pork, Water, Salt, Nitrates).",
"LoginName": "desi03",
"ModifyDate": "2021-03-22T13:27:41.663"
},
{
"HistoryLogId": 3453,
"ProductId": 74855,
"FullIngredientListFrom": null,
"FullIngredientListTo": "",
"LoginName": "desi03",
"ModifyDate": "2021-03-22T13:12:04.397"
}
]
},
Scenario 3
As above but the recipe’s ‘manually populated’ Ingredient List field is 'preferred in report'
Fig.17 - 'Manual' field in recipe is populated, and 'Use Manual in report' is selected
API response
[
{
"ProductId": 74855,
"FullIngredientList": "Pork",
"FirDate": "2021-03-22T13:33:55.97",
"ProductGuid": "101ef8a8-e61e-4f8a-9485-e05ff3ee488c",
"ProductName": "Bacon, Grilled, Side order",
"History": [
{
"HistoryLogId": 3455,
"ProductId": 74855,
"FullIngredientListFrom": "Pork",
"FullIngredientListTo": "Pork",
"LoginName": "desi03",
"ModifyDate": "2021-03-22T13:33:55.97"
},
{
"HistoryLogId": 3454,
"ProductId": 74855,
"FullIngredientListFrom": "",
"FullIngredientListTo": "Pork",
"LoginName": "desi03",
"ModifyDate": "2021-03-22T13:27:41.663"
},
{
"HistoryLogId": 3453,
"ProductId": 74855,
"FullIngredientListFrom": null,
"FullIngredientListTo": "",
"LoginName": "desi03",
"ModifyDate": "2021-03-22T13:12:04.397"
}
]
},
{
Resource Name: /fullIngredientListHistory |
|||
URL: api.starchef.net/v2/recipes/fullIngredientListHistory |
|||
Supported verbs: GET – retrieves list of recipes with their audit history for the field specified as the one to ‘use in report’. This could be either the automatically generated field or the manual field. If the preferred field changes, the audit history continues to track the changes of the field chosen for ‘use in report’. The response returns the date and user, as well as the previous and updated “Ingredient List” information. |
|||
URL Parameters |
Name |
Type |
Description |
|
lastModifiedAfter
|
Date |
YYYY-MM-DD The response will be limited to recipes that have had the Preferred “Ingredient List” field modified on or after the specified date. |
Response Properties |
Name |
Type |
Description |
|
ProductId |
Integer |
Recipe Product Key |
FullIngredientList |
String |
Corresponds to 'Ingredient list’ field. Displays text for this field. |
|
FirDate |
String |
Last modified date for the recipe’s ‘Ingredient List’ field’ |
|
ProductGuid |
String |
Recipe guid |
|
ProductName |
String |
Corresponds to ‘Recipe Name’ |
|
History |
Array |
Change log for this recipe’s Ingredient List field |
|
HistoryLogId |
Integer |
|
|
ProductId |
Integer |
Recipe product key |
|
FullIngredientListFrom |
String |
Ingredient List text before the change |
|
FullIngredientListTo |
String |
Ingredient List text after the change |
|
LoginName |
String |
Log-in name of the user who changed the Ingredient List field |
|
ModifyDate |
String |
Date that the field was modified |
Resource Name: /{guid}/fullIngredientListHistory |
|||
URL: api.starchef.net/v2/recipes/{guid}/fullIngredientListHistory |
|||
Supported verbs: GET – retrieves a single recipe with its audit history for the field specified as the one to ‘use in report’. This could be either the automatically generated field or the manual field. If the preferred field changes, the audit history continues to track the changes of the field chosen for ‘use in report’. The response returns the date and user, as well as the previous and updated “Ingredient List” information. |
|||
URL Parameters |
Name |
Type |
Description |
|
lastModifiedAfter
|
Date |
YYYY-MM-DD The response will be limited to ingredients that have had the ‘Ingredient List’ field modified on or after the specified date. |
guid |
String |
Ingredient GUID. The ingredient associated with this guid will be returned in the response. This is a mandatory value in the request. |
|
Response Properties |
Name |
Type |
Description |
|
ProductId |
Integer |
Ingredient Product Key |
FullIngredientList |
String |
Corresponds to 'Ingredient list’ field. Displays text for this field. |
|
FirDate |
String |
Last modified date for the Ingredient’s ‘Ingredient List’ field |
|
ProductGuid |
String |
Ingredient guid |
|
ProductName |
String |
Corresponds to ‘Ingredient Name’ |
|
History |
Array |
Change log for this ingredient’s Ingredient List field |
|
HistoryLogId |
Integer |
|
|
ProductId |
Integer |
Ingredient product key |
|
FullIngredientListFrom |
String |
‘Ingredient List’ text before the change |
|
FullIngredientListTo |
String |
‘Ingredient List’ text after the change |
|
LoginName |
String |
Log-in name of the user who changed the Ingredient List field |
|
ModifyDate |
String |
Date that the field was modified |
New Endpoint to Update Recipe Fields Including Menu Description
POST /recipefriendlynames
Sample payload
[
{
"RecipeStarChefKey": "0030702",
"RecipeName": "Brown Cake",
"RecipeShortName": "Cake",
"RecipeMenuDescription": "Brownie",
"RecipeDescription": "Cake with coccoa and milk",
"RecipeInternalCode": "1123",
"RecipeExternalCode": "2345"
}
]
Resource Name: /recipefriendlynames |
|||
URL: <base URL> /recipefriendlynames |
|||
Supported verbs: POST – Allows update of recipe names, descriptions, internal and external codes. Supports all recipe ‘product types’, i.e. standard, batch, choice and option recipes. Note: This endpoint will allow a partial payload. If a property is omitted from the payload, this value will not be updated in the database. If a property is included in the payload with an empty string, this property will be changed to ‘null’ in the database and any existing value will be deleted. |
|||
Properties |
Name |
Type |
Description |
|
RecipeStarChefKey
|
String |
Recipe product key. Mandatory value. Will be used to identify recipe for update. |
RecipeName
|
String |
Corresponds to ‘Recipe Name’. This is a mandatory recipe value so cannot be changed to ‘blank’. |
|
RecipeShortName
|
String |
Corresponds to ‘Recipe Short Name’ |
|
RecipeMenuDescription
|
String |
Corresponds to ‘Recipe Menu Description’ |
|
RecipeDescription
|
String |
Corresponds to ‘Recipe Description’ |
|
RecipeInternalCode
|
String |
Corresponds to ‘Recipe Internal Code’ |
|
RecipeExternalCode |
String |
Corresponds to ‘Recipe External Code’ |
New Endpoint to Retrieve Recipe Fields Including Menu Description and to Prepare a Payload for the POST Request
Sample response
[
{
"RecipeGuid": "6BD28622-E5FE-452B-A627-E2C65584DAC2",
"RecipeStarChefKey": "0030702",
"RecipeName": "Brown Cake",
"RecipeShortName": "Cake",
"RecipeMenuDescription": "Brownie",
"RecipeDescription": "Cake with cocoa and milk",
"RecipeInternalCode": "1123",
"RecipeExternalCode": "2345"
}
]
Resource Name: recipefriendlynames |
|||
URL: <base URL>/recipefriendlynames |
|||
Supported verbs: GET – Retrieves list of recipes with their names, descriptions, internal and external code fields. Contains the same properties as the related POST endpoint so can be used to prepare a payload for the POST request. |
|||
URL Parameters |
Name |
Type |
Description |
|
lastModifiedAfter
|
Date |
YYYY-MM-DD The response will be limited to recipes that have been modified on or after the specified date. |
guid |
String |
Recipe GUID. The recipe associated with this guid will be returned in the response. |
|
groupGUID
|
String |
Response will be limited to recipes linked to the specified RME Group. |
|
setType
|
String |
Response will be limited to recipes in the specified 'set type'. Valid values: Blank, Trial, Archive or Live. |
|
Response Properties |
Name |
Type |
Description |
|
RecipeGuid |
String |
Recipe GUID |
RecipeStarChefKey |
String |
Recipe product key |
|
RecipeName
|
String |
Corresponds to Recipe Name |
|
RecipeShortName
|
String |
Corresponds to Recipe Short Name |
|
RecipeMenuDescription
|
String |
Corresponds to Recipe Menu Description |
|
RecipeDescription
|
String |
Corresponds to Recipe Description |
|
RecipeInternalCode
|
String |
Corresponds to Recipe Internal Code |
|
RecipeExternalCode |
String |
Corresponds to Recipe External Code |
January Deployment
New Endpoints to support compliance with Food Information (Amendment) (England) Regulations 2019 (aka, Natasha’s Law).
GET request that returns the ‘Ingredient List’ fields – automatically generated and manual – for recipes
Sample response in JSON format
{
"RecipeName": "Avocado and Crayfish Salad",
"StarchefKey": "14675",
"RecipeGuid": "986601f8-1add-410f-aa80-b6e9e910a2f4",
"ManualFullIngredientList": "Crayfish Tails (CRUSTACEAN), Avocado, Curly Endive, Little Gem Lettuce, Radicchio, Balsamic Vinegar and Mustard Dressing (Olive Oil, Balsamic Vinegar, Dijon Mustard (Water, MUSTARD Flour, Spirit Vinegar, Sea Salt, MUSTARD Husk, Pimento, Turmeric))",
"ManualLastModifiedDate": "Feb 1 2021 2:23PM",
"AutoFullIngredientList": "Crayfish Tails (CRUSTACEAN), Avocado, Lettuce Curly Endive, Lettuce, Little Gem, Lettuce Radicchio - Per Kg, Balsamic Vinegar and Mustard Dressing (Olive Oil, Balsamic Vinegar, Dijon Mustard (Water, MUSTARD Flour, Spirit Vinegar, Sea Salt, MUSTARD Husk, Pimento, Turmeric))",
"AutoLastModifiedDate": "Feb 1 2021 2:14PM",
"PreferredFieldInTheReport": "Auto"
}
Resource Name: recipeingredientlist |
|||
URL: <base URL>/recipeingredientlist |
|||
Supported verbs: GET – retrieves list of recipes with their two recipe 'ingredient list' fields, auto-compiled and manually-updated. |
|||
URL Parameters |
Name |
Type |
Description |
|
lastModifiedAfterAuto
|
Date |
YYYY-MM-DD The response will be limited to recipes that have had the automatically generated ‘Ingredient List’ field modified on or after the specified date. |
lastModifiedAfterManual
|
Date |
YYYY-MM-DD The response will be limited to recipes that have had the manual ‘Ingredient List’ field modified on or after the specified date. |
|
guid |
String |
Recipe GUID. The recipe associated with this guid will be returned in the response. |
|
groupGUID
|
String |
Response will be limited to recipes linked to the specified RME Group. |
|
setType
|
String |
Response will be limited to recipes in the specified 'set type'. Valid values: Blank, Trial, Archive or Live. |
|
Response Properties |
Name |
Type |
Description |
|
RecipeName |
String |
Recipe name |
StarchefKey |
String |
Recipe product key |
|
RecipeGuid |
String |
Recipe GUID |
|
ManualFullIngredientList |
String |
Manually generated 'ingredient list’ for this recipe |
|
ManualLastModifiedDate |
String |
Last modified date for the manually generated ‘Ingredient List’ field |
|
AutoFullIngredientList |
String |
Automatically generated 'Ingredient List’ for this recipe |
|
AutoLastModifiedDate |
String |
Last modified date for the automatically generated ‘Ingredient List’ field |
|
PreferredFieldInTheReport |
String |
Indicates which recipe ‘Ingredient List’ field - manual or auto – will be used in the related report (available via the UI) and which field will be used if this recipe is used as a recipe ingredient. |
Sample requests for URL parameters
- lastModifiedAfterAuto: GET <base URL>/recipeingredientlist?lastModifiedAfterAuto=2021-01-31
- lastModifiedAfterManual: GET <base URL>/recipeingredientlist?lastModifiedAfterManual=2021-01-31
- guid: GET <base URL>/recipeingredientlist?guid={guid}
- groupGUID: GET <base URL>/recipeingredientlist?guid={guid}
- setType: GET <base URL>/recipeingredientlist?setType=Trial
POST request that allows the update of the ‘Ingredient List’ field for ingredients
Note: POST requests will assume a complete payload. If an ingredient is included in the payload with the ‘FullIngredientList’ property as an empty string, existing values in the field will be deleted.
Sample request body for POST
[
{
"SupplierName": "Grocer",
"SuppplierCode": "1357",
"StarchefKey": "0014674",
"FullIngredientList": " Water, MUSTARD Flour, Spirit Vinegar, Sea Salt, MUSTARD Husk, Pimento, Turmeric"
}
]
Resource Name: ingredientlist |
|||
URL: <base URL>/ingredientlist |
|||
Supported verbs: POST – Allows update of the ‘Ingredient List’ field for ingredients in RME |
|||
Properties |
Name |
Type |
Description |
|
SupplierName |
String |
Supplier name for the ingredient to be updated via the post. The supplier name, combined with the supplier code, will act as the unique ingredient identifier unless the StarChef key is present in the request. If the StarChef key is included in the request, this is the value that will be used to identify the ingredient that is to be updated. |
SuppplierCode |
String |
Supplier code for the ingredient that is to be updated. See above for details. |
|
StarchefKey |
String |
StarChef key for the ingredient. This value will be used as the ingredient identifier to which the ‘FullIngredientList’ text should be added. |
|
FullIngredientList
|
String |
Text to be added to the ingredient’s ‘Ingredient List’ field. |
GET request that returns the ‘Full Ingredients’ information for ingredients
Sample response in JSON format
{
"IngredientName": "Bulgarian Pork Sausages",
"StarchefKey": "14889",
"ParentGuid": "ad0e454a-cbf5-420e-9c36-8dd7e1fbc0cc",
"AlternateGuid": "ad0e454a-cbf5-420e-9c36-8dd7e1fbc0cc",
"FullIngredientList": "Pork, Oats (GLUTEN), Salt, Pepper, Nitrates E420"
},
{
"IngredientName": "Flashy Sausages Dog",
"StarchefKey": "14891",
"ParentGuid": "ad0e454a-cbf5-420e-9c36-8dd7e1fbc0cc",
"AlternateGuid": "35a6d7a6-3e78-4d63-9b93-9073be0e0847",
"FullIngredientList": "Pork, Oats (GLUTEN), Salt, Pepper, Nitrates E420"
},
{
"IngredientName": "Posh Sausages",
"StarchefKey": "15861",
"ParentGuid": "ad0e454a-cbf5-420e-9c36-8dd7e1fbc0cc",
"AlternateGuid": "981f85d4-93e2-43ed-9b83-34f638d2f1ec",
"FullIngredientList": "Pork, Oats (GLUTEN), Salt, Pepper, Nitrates E420"
},
{
"IngredientName": "Baltic Sausages",
"StarchefKey": "16534",
"ParentGuid": "ad0e454a-cbf5-420e-9c36-8dd7e1fbc0cc",
"AlternateGuid": "3806b91e-d712-49ca-8aab-4f95439572f3",
"FullIngredientList": "Pork, Oats (GLUTEN), Salt, Pepper, Nitrates E420"
},
Note: ‘FullIngredientList’ is an attribute of the parent ingredient only. Therefore, the ‘FullIngredientList’ is the same for all of the alternates because they are all linked to the same parent ingredient. It corresponds to the ‘Ingredient List’ field in the user interface on the Ingredient > Nutrition tab > Ingredient List.
Resource Name: ingredientlist |
||||||
URL: <base URL>/ingredientlist |
||||||
Supported verbs: GET – retrieves list of ingredients with their 'ingredient list' field |
||||||
|
|
|
|
|||
URL Parameters |
Name |
Type |
Description |
|||
|
lastModifiedAfter
|
Date |
YYYY-MM-DD The response will be limited to ingredients that have been modified on or after the specified date. |
|||
guid |
String |
Ingredient GUID. The ingredient associated with this guid will be returned in the response. |
||||
groupGUID
|
String |
Response will be limited to ingredients linked to the specified RME Group. |
||||
setType
|
String |
Response will be limited to recipes in the specified 'set type'. Valid values: Blank, Trial, Archive or Live. |
||||
Response Properties |
Name |
Type |
Description |
|||
|
IngredientName |
String |
Name of ingredient |
|||
StarchefKey |
String |
Unique identifier for the parent ingredient. Corresponds to the Product ID in the user interface. |
||||
ParentGuid |
String |
Parent Ingredient GUID. This value will be the same for all alternate ingredients that are associated to the same parent ingredient. |
||||
AlternateGuid |
String |
Alternate Ingredient GUID. |
||||
FullIngredientList
|
String |
Text in the ingredient’s ‘Ingredient List’ field. |
Sample requests for URL parameters
- lastModifiedAfterAuto: GET <base URL>/ingredientlist?lastModifiedAfterAuto=2021-01-31
- guid: GET <base URL>/ingredientlist?guid={guid}
- groupGUID: GET <base URL>/ingredientlist?guid={guid}
- setType: GET <base URL>/ingredientlist?setType=Trial
Comments
0 comments
Please sign in to leave a comment.