Introduction

Background

Large chains are offered the ability to connect their menu or inventory infrastructure to platforms on Delivery Hero's side. These organizations can simply push new menus or inventory lists to a platform and it will update automatically on the front end.

Delivery Hero is running this service with some key chains globally.

This functionality is currently a limited release. Therefore the documentation here is for reference only.

Abilities

  • Product data - products that can be ordered including toppings
  • Menu hours - multiple menus can be sent per shop, time limited to specific points in the day
  • Images - every platform has its own requirements on images

Currently Out of Scope

  • Nutritional data
  • Store hours - the hours the shop is available to order from, not the menu
  • Delivery areas

Documentation

Modelling a menu is not described here. It will be provided upon request.

Delivery Hero uses XML for menu imports. The format of a valid Menu XML Document is defined via an XML Schema. In case you do not know what an XML Schema is, it defines the structure and rules of a document that belongs to a schema. It's possible to prove in an automatic way if a document belongs to a schema. That proof is called a validation. If you need a more in depth explanation on XML Schemas, the Schema section from w3schools.com would be a good starting point. (https://www.w3schools.com/xml/schema_intro.asp)

There is one overall rule: The Menu XML Schema is the source of truth. Even if there are any differences within the examples, the schema will always be correct.

You can model things that will not work or produce different results on certain platforms. As an example, Batman Eats might see Cheeseburger with Cola as two separate products, while Joker Delivery classifies Cola as a topping of the Cheeseburger.

TIPS

  • If you are unsure if a construct works for a certain platform please ask.
  • Don't design a menu for one platform only, make it as universal as possible. Keep that in mind for images as well.
  • Authenticated

On the Delivery Hero Middleware, requests can be sent to get the menu. This can be scheduled to occur daily and it is expected that menu can be pushed back to the platform. This is configured on Delivery Hero side.

[GET] http://example.com/menuimport/remoteId?vendorCode=vendorCode&menuImportId=menuImportId

Parameters
remoteId (required, string)
  • It represents the restaurantId on the POS side. There is a mapping on Delivery Hero between restaurantIdOnDeliveryHero <-> remoteId. This is because many shops from different platforms can be sent to the same physical location (e.g. Luigi's Berlin Mitte on Lieferheld, Pizza.de and Foodora). 150
vendorCode (string, optional)
  • This is an ID defined on the Delivery Hero side. You do not need to do anything with it. Deprecated 11234
menuImportId (string, optional)
  • A unique menu ID for a specific point in time sent by Delivery Hero. Deprecated x6dw-1449160200

Response

Attributes

The XML of menu should be generated in a background process and should not be returned on the HTTP response. Plugin MUST later call middleware and send the xml of menu.

202

500 | 502

Body
{
}

Submit Menu

  • Authenticated

Once a menu is requested or the chain decides to push a menu, a menu must be submitted.

Plugins use remoteId and a chainCode for identifying a vendor.

  • Note the image size required per platform. If the plugin cannot provide images at least as big as this dimension then the Image element should be submitted as empty <Image></Image>. Otherwise the entire menu import will fail.
  • The order of menu elements displayed to customers matches the order in which they will appear on the xml.
  • Position of toppings or choices inside a topping template cannot be set yet.

[POST] http://example.com/v2/chains/chainCode/remoteVendors/remoteId/menuImport

Parameters
chainCode (string, required)
  • Each chain has its own chain code. A POS company connected to two chains would need two chain codes. 56784
remoteId (string, required)
  • It represents the restaurantId on the POS side. There is a mapping on Delivery Hero between restaurantIdOnDeliveryHero <-> remoteId. This is because many shops from different platforms can be sent to the same physical location (e.g. Luigi's Berlin Mitte on Lieferheld, Pizza.de and Foodora). 15078

Why is chainCode needed ?

Since the Middleware API is used by multiple plugins, there could be two different plugins (for two different chains) that have the same identifier or remoteId. chainCode is the value which will make them unique since it would combine with remote-id.

Request

Headers

Content-Type:application/json

Body

Available upon request.

Response

200

ATTRIBUTES
status (enum, string, required)
  • SUBMITTED
  • TRIGGERED
Headers

Content-Type:application/json

Body
{
  "status": "SUBMITTED"
}

404 | 500

Headers

Content-Type:application/json

Body
{
}

Logging

  • Authenticated

[GET] http://example.com/v2/menuImportLogs/?vendorCode=n2cp%2Cv3xf&from=2016-01-02T00%3A00%3A00Z&to=2016-01-02T23%3A59%3A00Z&limit=5&sort=desc

Parameters
vendorCode (string)
  • The code for the shop. This is defined and provided by Delivery Hero. x6dw
from (string)
  • Entry creation date. Accepts any timezone date time in ISO_8601 format. 2016-01-02T00:00:00Z
to (string)
  • Entry creation date. Accepts any timezone date time in ISO_8601 format. Timeframe cannot be longer than a month (30 days). 2016-01-02T23:59:00Z
limit (string)
  • Number of entries to return for each vendorCodes. Maximum value allowed is 100. Example: 5. Default: 1.
sort (enum[string])
  • Ascending/Descending by createdAt. Example: desc. Default: desc. Possible values: desc , asc .

Response

200

Headers

Content-Type:application/json

Body
{
  "menuImportLogs": {
    "n2cp": [
      {
        "version": 1,
        "menuImportId": "n2cp-1449160200",
        "status": "in_progress",
        "message": "",
        "vendorCodes": "n2cp",
        "url": "",
        "createdAt": "2016-01-02T16:56:00Z"
      },
      {
        "version": 1,
        "menuImportId": "n2cp-1449160200",
        "status": "done",
        "message": "Import successful",
        "vendorCodes": "n2cp",
        "url": "http://fake-s3.foo/fake-s3/menuimporter_dev_menuimporter_in/development_deliveryhero_in_n2cp_1466180278.xml",
        "createdAt": "2016-01-02T16:56:05Z"
      }
    ],
    "v3xf": []
  }
}

400 | 401 | 500

Headers

Content-Type:application/json

Body
{
}