Epicuri Menu API


Epicuri's open API for menu's gives a restaurant full control over digital menus beyond the Epicuri system itself. Manage your menu's in Epicuri's Menu Manager, and the changes will be reflected to all applications or websites that use this API.


This means that as soon as you change your menu - be it names, descriptions, prices or availability, your client sites - such as websites - get the updates right away. 


The API is standard REST that uses ordinary HTTP requests with JSON bodies. 


API URLs


Development URL
http://book.api.staging.epicuri.co.uk


Production URL

http://book.api.epicuri.co.uk


API End Points


The API resource endpoints are preceded by an id which is unique to every restaurant. Ask Epicuri Support what your id is if you're unsure. It will be the same numeric Restaurant id you use to log into the Waiter App.


Endpoint  HTTP Method  Authorisation token required Description
{id}/logon GET   No Gets some basic information about the restaurant, including a short-lived security token
{id}/menuitems GET   Yes Gets individual menu items

Please ensure that all calls to the API, whatever language you are using, have the content type specifically defined as application/json.

Getting and Applying a Security Token

The API grants temporary access via a simple authentication mechanism. 

Request

content: application/json

GET
http://{url}/menu/{id}/logon


Response


{
   "token" : "7ddf32e17a6ac5ce04a8ecbf782ca509"
}


 

You then use this token for all subsequent calls to the API. Subsequent calls must place this token in the X-Auth-Token HTTP header. 

Tokens, if left unused for approximately an hour, will expire - in which case subsequent calls will error with HTTP response 401 Unauthorized. You must capture this error and do the logon process again to get a new token.


Getting Menu Items

The API returns a list of menu items arranged by the structure defined in Epicuri. The hierarchy of the menu is as follows:

  1. Menu (e.g. Mains)
  2. Category (e.g. Curries)
  3. Group (e.g. Vegetarian)
  4. Menu Item (e.g. Mushroom Curry)

It is up to the API caller to then use this data and display as necessary.

Request

content type: "application/json"

HTTP Header: "X-Auth-Token : {token}"

GET

http://{url}/menu/{id}/menuitems


Response

    

{
  "menus" : [
    {
      "name" : "Mains",
        "categories" : [
          {
            "name" : "Curries",
              "groups" : [
                {
                  "name" : "Vegetarian",
                    "items" : [
                      {
                        "name" : "Mushroom Curry",
                        "price" : 8.00, //64 bit decimal
                        "description" : "Mushroom chunks in a creamy onion and tomato broth",
                        "unavailable" : false,
                        "id" : 1234
                      },
                      // ...more items
                    ]
                },
                  // ...more groups
              ]
          },
          // ...more categories
        ]
    },
    // ...more menus
  ]
}

   

Note that menu items have an unavailability flag. This is set from the Epicuri Waiter app by managers/waiters when an item is no longer available.


Menu items can belong to multiple groups. Duplicates can be identified using the id field.


For menu item prices it is always safe to round to 2 decimal places.