# List Menus v1.1

The List Menus endpoint retrieves a list of menus. Parameters can be applied to narrow down the menus and expands can be used to retrieve entire menus with all of their data.

# Request

GET /menu-api/v1.1/menus[?countryCode][&brandKey][&menuKey][&menuVersion][&expand][&pageSize][&pageNumber]

# Query Parameters

A list of the supported query parameters is described below.

Name Required Type Description
countryCode false string Filters menus based on an ISO 3166-1 Alpha-2 country code.
brandKey false int Filters menus based on a brand key.
menuKey false boolean Filters menus on a menu key.
menuVersion false boolean Filters menus on a menu version.
expand false string[] Provide a list of array properties that should be expanded in the response. See Expands below for more information.
pageSize false boolean The number of menus to return per page. If the parameter is omitted, paging is not applied.
pageNumber false boolean The page number to return. If the parameter is omitted, paging is not applied.

# Expands

The expand parameter allows some arrays in the response object to be expanded in the response. We support this to allow you to control the amount of data you will get in the response. Pick only the data you need for the specific scenario and we'll send you less data, faster.

Valid values are sections or items or images or restaurants or featured or any combination thereof. Expanding images only returns image data for sections and items and must be used in combination with those expands.

WARNING

Expanding arrays increases the response time as more data needs to be fetched and processed. A request with no filters and all the expands specified results in a large JSON response.

# Response

200
OK
Returns an array of Menu resources in an ApiPagedListResponse envelope.

Some of the arrays in the response may be empty as they need to be expanded to be populated. Other arrays will be populated without requiring an expand as they are either small data sets or are required for accurate display of the menu, sections and items. For example, availability will always be included as it needs to be honored in almost all scenarios.

# Response Body

The endpoint returns our ApiPagedListResponse envelope. The data property of the response will contain an array of Menu resources.

# Sample

{
    "message": "The operation succeeded! 1 record returned.",
    "notifications": [],
    "numberOfRecords": 13,
    "totalRecords": 13,
    "pageSize": 13,
    "pageNumber": 1,
    "pageCount": 1,
    "hasPreviousPage": false,
    "hasNextPage": false,
    "data": [
        {
            "key": "SPUR-ZA-45",
            "version": 202010,
            "revision": "4417846432",
            "name": "DEMO MENU",
            "displayName": "DEMO",
            "description": "This menu is to demo new features and functionality.",
            "status": "QA",
            "statusChangedOn": "2020-12-15T11:08:37.1433333",
            "publishStatus": "Draft",
            "publishedOn": null,
            "brand": {
                "key": "SPUR",
                "name": "Spur",
                "displayName": "Spur",
                "enabled": true,
                "createdOn": "2013-09-25T13:37:28.8966667",
                "modifiedOn": "2021-03-18T14:12:19.087"
            },
            "defaultForBrand": false,
            "countryCode": "ZA",
            "currency": "ZAR",
            "foodTypes": [],
            "orderingChannels": [
                {
                    "key": 3,
                    "name": "1st Party Ordering Platform"
                },
                {
                    "key": 38,
                    "name": "Branded App"
                },
                {
                    "key": 39,
                    "name": "ChatBot"
                },
                {
                    "key": 118,
                    "name": "Kiosk"
                }
            ],
            "fulfilmentChannels": [
                {
                    "key": 79,
                    "name": "Collection"
                },
                {
                    "key": 81,
                    "name": "Delivery"
                }
            ],
            "availableFrom": null,
            "availableTo": null,
            "enabled": true,
            "hasAvailabilityRestrictions": true,
            "effectiveFrom": "2020-10-01T00:00:00",
            "effectiveTo": "2021-12-31T23:59:59.9999999",
            "allergens": [
                {
                    "key": 1,
                    "name": "Gluten"
                },
                {
                    "key": 2,
                    "name": "Cows Milk"
                },
                {
                    "key": 3,
                    "name": "Wheat"
                },
                {
                    "key": 4,
                    "name": "Egg"
                },
                {
                    "key": 5,
                    "name": "Soya"
                },
                {
                    "key": 6,
                    "name": "Tree Nuts"
                }
            ],
            "dayParts": [
                {
                    "key": 18,
                    "name": "Breakfast"
                }
            ],
            "itemCategories": [
                {
                    "key": 3,
                    "name": "Burgers"
                },
                {
                    "key": 4,
                    "name": "Steaks"
                },
                {
                    "key": 5,
                    "name": "Chicken"
                },
                {
                    "key": 7,
                    "name": "Wings"
                },
                {
                    "key": 9,
                    "name": "Ribs"
                },
                {
                    "key": 11,
                    "name": "Seafood"
                }
            ],
            "menuCategories": [
                {
                    "key": 1,
                    "name": "Main Meals"
                },
                {
                    "key": 2,
                    "name": "Starters"
                },
                {
                    "key": 3,
                    "name": "Sharing"
                },
                {
                    "key": 5,
                    "name": "Kids Meals"
                },
                {
                    "key": 7,
                    "name": "Beverages"
                }
            ],
            "sections": [],
            "items": [],
            "featuredPeriods": [],
            "restaurants": [],
            "createdOn": "2020-10-20T09:05:37",
            "modifiedOn": "2020-10-01T00:00:00"
        },
        {
            // Other menus omitted for brevity.
        }
    ]
}

# Errors

The standard error responses apply.

400
Bad Request
When the expand provided is invalid.