In this tutorial, you will learn to:

Before starting this tutorial:

The ability to view menus and place orders through a Test Restaurant on your Delivery Partner's Website (JustEat, SkipTheDishes, etc.) may not be available for all partners.

If these features are not available for your integration, you may still complete the following walkthrough by simply omitting the steps related to these features and examining the responses.

Step 1: Setup

In order to gain access to the Flyt Platform, you will need to obtain configuration information from your integration support team including an API key, endpoint URL's and a Test Restaurant, which will be required in your requests and responses.

If you have not received this information please reach out to your brand manager. You can learn more about each of these values in the various request and response definitions of our API Reference section.

Step 2: Publish a menu

In this step we will publish a simple test menu to your Test Restaurant using the cURL command.

curl \\
--location --request POST '<https://api.flytplatform.com/menus>' \\
--header 'Content-Type: application/json' \\
--header 'X-Flyt-API-Key: API_KEY' \\
--data-raw \\
'{
  "restaurants": [ "RESTAURANT_ID" ],
  "menus": [
    {
      "name": "Getting Started Menu!",
      "reference": "1001",
      "type": "DELIVERY",
      "availability": {
        "monday": ["10:00 - 21:00"],
        "tuesday": ["10:00 - 21:00"],
        "wednesday": ["10:00 - 21:00"],
        "thursday": ["10:00 - 21:00"],
        "friday": ["10:00 - 21:00"],
        "saturday": ["11:00 - 23:00"],
        "sunday": ["12:00 - 20:00"]
      },
      "categories": [
        {
          "name": "Speciality Soups",
          "description": "",
          "items": [
            {
              "name": "Secret Ingredient Soup",
              "description": "The secret ingredient is ... nothing!",
              "plu": "123-456-789",
              "price": 150,
              "modifiers": [],
              "includes": [],
              "ingredients": []
            },
            {
              "name": "Chicken Dumplings",
              "description": "Authentic chicken dumplings",
              "plu": "234-567-890",
              "price": 250,
              "modifiers": [],
              "includes": [],
              "ingredients": []
            }
          ]
        }
      ]
    }
  ]
}'

IMPORTANT: Pushing this test menu will overwrite the menu that is currently posted with your Delivery Partner.

Step 3: Mark a menu item as unavailable

curl \\
--location --request POST '<https://api.flytplatform.com/item-availability>' \\
--header 'Content-Type: application/json' \\
--header 'X-Flyt-API-Key: API_KEY' \\
--data-raw \\
'{
    "restaurant": "RESTAURANT_ID"
    "event": "UNAVAILABLE",
    "itemReference": "123-456-789",
    "happenedAt": "2020-10-11T14:56:18.234284+01:00"
}'