Entwicklerdokumentation

Speisekarten

Jede veröffentlichte Speisekarte mit Gruppen und Positionen lesen, bepreist in der Währung der Location – die Anzeige-, nicht die Bestellkarte.

Jede veröffentlichte Speisekarte mit Gruppen und Positionen, bepreist in der Währung der Location. Das ist die Anzeige-Karte; woraus ein sitzender Gast bestellen kann, sind die menus der Tischsitzung (QR-Codes und Tischsitzungen). Er folgt denselben Schlüsselregeln wie der Rest von /api/venues/** (Schlüssel und Header) und antwortet mit 404 und einem Problem-Body, wenn keine Location diesen Slug hat.

Endpunkte

GET /api/venues/{venueSlug}/menus

Antwort 200 OK

Feld Typ Bedeutung
slug, currency string Die Location und die ISO-4217-Währung jedes Preises darunter
menus[] object[] id, name, description, groups[]
groups[] object[] name, description (nullable), items[]
items[] object[] name, description, price (decimal), currency, tags (string[], z. B. Ernährungshinweise), imageUrl (nullable)
{
  "slug": "demo-sportsbar",
  "currency": "EUR",
  "menus": [
    {
      "id": "kitchen",
      "name": "Kitchen",
      "description": "Served from open until one hour before close.",
      "groups": [
        {
          "name": "Small plates",
          "description": null,
          "items": [
            {
              "name": "Loaded nachos",
              "description": "Melted cheese, jalapeños, lime crema",
              "price": 9.50,
              "currency": "EUR",
              "tags": [
                "vegetarian"
              ],
              "imageUrl": "_content/BookDinePlay.App.Shared/menu/nachos.webp"
            },
            {
              "name": "Buffalo wings",
              "description": "Blue-cheese dip, celery",
              "price": 11.00,
              "currency": "EUR",
              "tags": [],
              "imageUrl": "_content/BookDinePlay.App.Shared/menu/wings.webp"
            },
            {
              "name": "Padrón peppers",
              "description": "Sea salt, olive oil",
              "price": 7.00,
              "currency": "EUR",
              "tags": [
                "vegan",
                "gluten-free"
              ],
              "imageUrl": "_content/BookDinePlay.App.Shared/menu/padron-peppers.webp"
            }
          ]
        },
        {
          "name": "Mains",
          "description": null,
          "items": [
            {
              "name": "Smash burger",
              "description": "Double patty, house sauce, fries",
              "price": 14.50,
              "currency": "EUR",
              "tags": [],
              "imageUrl": "_content/BookDinePlay.App.Shared/menu/smash-burger.webp"
            },
            {
              "name": "BBQ ribs",
              "description": "Slow-cooked, slaw, fries",
              "price": 19.00,
              "currency": "EUR",
              "tags": [],
              "imageUrl": "_content/BookDinePlay.App.Shared/menu/bbq-ribs.webp"
            },
            {
              "name": "Halloumi flatbread",
              "description": "Grilled halloumi, harissa, greens",
              "price": 13.00,
              "currency": "EUR",
              "tags": [
                "vegetarian"
              ],
              "imageUrl": "_content/BookDinePlay.App.Shared/menu/halloumi-flatbread.webp"
            }
          ]
        },
        {
          "name": "Sweet",
          "description": null,
          "items": [
            {
              "name": "Churros",
              "description": "Cinnamon sugar, chocolate",
              "price": 7.00,
              "currency": "EUR",
              "tags": [
                "vegetarian"
              ],
              "imageUrl": "_content/BookDinePlay.App.Shared/menu/churros.webp"
            }
          ]
        }
      ]
    },
    {
      "id": "bar",
      "name": "Bar",
      "description": "Draft, cocktails and zero-proof.",
      "groups": [
        {
          "name": "Draft beer",
          "description": null,
          "items": [
            {
              "name": "House lager 0.3L",
              "description": "Crisp pilsner",
              "price": 4.50,
              "currency": "EUR",
              "tags": [],
              "imageUrl": "_content/BookDinePlay.App.Shared/menu/lager.webp"
            },
            {
              "name": "Local IPA 0.5L",
              "description": "Hoppy, citrus finish",
              "price": 6.50,
              "currency": "EUR",
              "tags": [],
              "imageUrl": "_content/BookDinePlay.App.Shared/menu/ipa.webp"
            }
          ]
        },
        {
          "name": "Cocktails",
          "description": null,
          "items": [
            {
              "name": "Old Fashioned",
              "description": "Bourbon, bitters, orange",
              "price": 11.00,
              "currency": "EUR",
              "tags": [],
              "imageUrl": "_content/BookDinePlay.App.Shared/menu/old-fashioned.webp"
            },
            {
              "name": "Spicy margarita",
              "description": "Tequila, chilli, lime",
              "price": 10.50,
              "currency": "EUR",
              "tags": [],
              "imageUrl": "_content/BookDinePlay.App.Shared/menu/margarita.webp"
            }
          ]
        },
        {
          "name": "Zero proof",
          "description": null,
          "items": [
            {
              "name": "Craft soda",
              "description": "House-made, ask for today's flavour",
              "price": 4.00,
              "currency": "EUR",
              "tags": [
                "vegan"
              ],
              "imageUrl": "_content/BookDinePlay.App.Shared/menu/craft-soda.webp"
            }
          ]
        }
      ]
    }
  ]
}

Fehler – 404 keine Location mit diesem Slug.

curl

curl "https://api.bookdineplay.com/api/venues/your-venue/menus" \
  -H "X-BookDinePlay-Key: bdp_pk_your_publishable_key" \
  -H "Origin: https://www.your-venue.example"

JavaScript

const { menus, currency } = await (await fetch('https://api.bookdineplay.com/api/venues/your-venue/menus', {
  headers: { 'X-BookDinePlay-Key': 'bdp_pk_your_publishable_key' }
})).json();
for (const menu of menus) for (const group of menu.groups) for (const item of group.items) {
  console.log(menu.name, group.name, item.name, item.price, currency);
}

C#

var menus = await client.GetMenusAsync("your-venue", cancellationToken);

Nächste Schritte

  • Venue – die übrigen fünf Lesezugriffe dieser Location.
  • QR-Codes und Tischsitzungen – die Bestellkarte des sitzenden Gastes, nicht diese Anzeigekarte.
  • .NET-SDK – derselbe Lesezugriff als typisierte Methode.