Skip to content

API Usage Guide

Bryan Silva edited this page Jun 6, 2023 · 1 revision

Request format

GET http://zotmeal-backend.vercel.app/api?location=<location> Returns the menu for the current day and time at the specified location.

<location> can be anteatery or brandywine

GET http://zotmeal-backend.vercel.app/api?location=<location>&meal=<meal>&date=<date> Returns the menu for the specified meal and date.

<meal> can be 0, 1, or 2 for breakfast, lunch (or brunch), or dinner respectively.
<date> is formated MM/DD/YY, except the slashes (/) need to be URL-encoded.
For example, January 23rd, 2022 is encoded as 01%2F23%2F2022

Example request: GET http://zotmeal-backend.vercel.app/api?location=brandywine&meal=1&date=01%2F23%2F2022 See the Code Samples page for concrete examples in code.

Response format

The responses are in JSON formatted like the example at https://zotmeal-backend.vercel.app/example.json.
Here's a snippet:

{
    "refreshTime": 1639808216,
    "restaurant": "Sample",
    "schedule": {
        "breakfast": {
            "start": 900,
            "end": 1100
        },
        "brunch": {
            "start": 1100,
            "end": 1630
        },
        "dinner": {
            "start": 1630,
            "end": 2000
        }
    },
    "currentMeal": "lunch",
    "all": [
        {
            "station": "The Farm Stand / Salad Bar",
            "menu": [
                {
                    "category": "Condiments",
                    "items": [
                        {
                            "name": "Balsamic Vinaigrette",
                            "description": "Tangy balsamic vinaigrette dressing",
                            "nutrition": {
                                "isVegan": true,
                                "isVegetarian": true,
                                "servingSize": "2",
                                "servingUnit": "tablespoons",
                                "calories": "60",
                                "caloriesFromFat": "45",
                                "totalFat": "5",
                                "transFat": "0",
                                "cholesterol": "0",
                                "sodium": "200",
                                "totalCarbohydrates": "4",
                                "dietaryFiber": "0",
                                "sugars": "4",
                                "protein": "0",
                                "vitaminA": null,
                                "vitaminC": null,
                                "calcium": null,
                                "iron": null,
                                "saturatedFat": "0.5",
                                "isEatWell": false,
                                "isPlantForward": false,
                                "isWholeGrains": false
                            }
                        },
Clone this wiki locally