Menu API

Overview

The menu API can be used to retrieve various menu related data for the brands owned by Spur Corporation.  The API contains the information required to display a menu on websites and in applications suitable for online ordering.  The API also includes endpoints to perform POS code lookups.

Brand Menus

Each brand will have multiple menus with each menu typically targeted for a specific channel and country or currency.  In most cases, the menus for the same brand differ significantly across channels and countries. 

For example, the in-restaurant sit-down menu would be different to the third party click and collect menu and so on.   Another example is the menu in South Africa will have different products in a different currency and pricing than the menu in Mauritius.

There are also menus for Halaal restaurants, menus for website display and many many other scenarios.

Key Concepts

The below few sections deal with the key concepts of how the key, versionand revisionproperties are meant to be used.

Menu Keys

Each menu has a unique key to identify the menu in the API.  The key property is a combination of the brand, country and a unique identifier for the menu.  As mentioned above, each brand has multiple menus for different channels or intended uses.

Menu Versions

In the restaurants, menus go through changes and updates over time.  These updates typically include items getting added and removed and menu item prices changing.  Each brand updates their menus at least once per year.  Some brands update their menus more often.  

In order to facilitate these updates, the API supports menu versions, provided via the version property.

Once a menu is created for a brand and channel, it is unlikely that the menu will be replaced but the menu will have new versions published from time to time.  In other words, the menu key will remain the same but new versions will be made available.  At any given time a menu may have the current version, previous versions and future versions available.  

Menu versions follow the business menu lifecycle.  New versions will be published when the physical menus go to print and older versions will be removed over time.

Menu Revisions

Once a menu version has been published, it may go through minor revisions to fix data on the specific version.  The updates published in a revision should be relatively minor and should not result in massive changes to the menu version.  

Should a partner synchronise the menu into their own data stores on a schedule, the revision data could be used to see if any changes have been made to the menu by looking at the value of the revision property.

Item Data

Below is basic data hierarchy in the menu:

Menu
   - Sections
      - SubSections
         - Items
            - OptionSets
               - OptionSetItem

Sections

Each menu has a few sections to group items together for display in the menu.  Some sections may contain subsections.  Each menu item must have a section defined however subsections are optional.  This means that some sections may contain items and others may contain subsections.  In some cases, a section could contain items and subsections.

Items

Items are the products that customers purchase.