Get the menu

Read the menu the AI waiter serves at a branch and service mode, with Tamr's ids for every dish, size and option.

GET/api/v1/menuClient API

The menu the waiter serves at a branch and in a service mode: categories and dishes with prices in minor units, images, allergens, nutrition figures and Tamr's ids for each dish, size and option.

Authentication

Client API. Send your publishable key in x-tamr-key and the diner's session in x-tamr-session, from Start a session. For a guest's session, also send its device id in x-tamr-device. A browser may call it only from an origin listed on the key.

Query parameters

NameTypeRequiredDescription
branchstringNoAn address: lower-case letters, digits and dashes.
modestringNoOne of dine_in, pickup, delivery.

Headers

NameTypeRequiredDescription
x-tamr-devicestringNoGuest sessions only: the device id the session was exchanged with. Matches ^[A-Za-z0-9_-]{8,128}$.
x-tamr-appstringNoNative apps only: the app's iOS bundle id or Android package name. A key used from an app it doesn't list is logged, never refused. Matches ^[A-Za-z][A-Za-z0-9_-]*(\.[A-Za-z0-9_-]+)+$.

Response

A MenuResponse.

FieldTypeDescription
menuobject
menu.namestring1 to 200 characters.
menu.localestringA language tag, such as ar or en-GB.
menu.currencystringA three-letter currency code (ISO 4217).
categoriesarray of object
categories[].namestring1 to 200 characters.
categories[].dishesarray of object
categories[].dishes[].dishIdstring1 to 200 characters.
categories[].dishes[].namestring1 to 200 characters.
categories[].dishes[].pricestringAn amount in minor units, as a string.
categories[].dishes[].currencystringA three-letter currency code (ISO 4217).
categories[].dishes[].imageUrlstring or nullMatches ^https:\/\/[^\s]+$.
categories[].dishes[].caloriesinteger or null0 to 9,007,199,254,740,991.
categories[].dishes[].proteinGramsinteger or null0 to 9,007,199,254,740,991.
categories[].dishes[].carbsGramsinteger or null0 to 9,007,199,254,740,991.
categories[].dishes[].fatGramsinteger or null0 to 9,007,199,254,740,991.
categories[].dishes[].allergensarray of stringAt most 10 items. Each: One of gluten, dairy, egg, nuts, sesame, soy, fish, shellfish, peanut, mustard.
categories[].dishes[].dietaryTagsarray of stringAt most 11 items. Each: One of vegan, vegetarian, gluten_free, halal, kosher, dairy_free, nut_free, keto, spicy, high_protein, other. An open list: read a value you don't know as other.
categories[].dishes[].availableboolean
categories[].dishes[].externalIdstring or null1 to 200 characters.
categories[].dishes[].descriptionstring or nullAt most 2,000 characters.
categories[].dishes[].sizesarray of object
categories[].dishes[].choicesarray of object

Example

curl "https://tamr.link/api/v1/menu?branch=achrafieh&mode=dine_in" \
  -H "x-tamr-key: $TAMR_APP_KEY" \
  -H "x-tamr-session: $TAMR_SESSION"

Example response

{
  "menu": {
    "name": "Dinner",
    "locale": "en",
    "currency": "USD"
  },
  "categories": [
    {
      "name": "Mezze",
      "dishes": [
        {
          "dishId": "cmdish0001",
          "name": "Grilled halloumi",
          "price": "1200",
          "currency": "USD",
          "imageUrl": "https://tamr.link/image-proxy/media/halloumi.webp",
          "calories": 420,
          "proteinGrams": 24,
          "carbsGrams": 8,
          "fatGrams": 31,
          "allergens": [
            "dairy"
          ],
          "dietaryTags": [
            "vegetarian"
          ],
          "available": true,
          "externalId": "SKU-HALLOUMI",
          "description": "Grilled, with za'atar.",
          "sizes": [
            {
              "variantId": "9b1c2d3e-0001",
              "label": "Large",
              "price": "1600",
              "externalId": null
            }
          ],
          "choices": [
            {
              "name": "Sauce",
              "min": 0,
              "max": 1,
              "options": [
                {
                  "optionId": "9b1c2d3e-0002",
                  "name": "Garlic",
                  "price": null,
                  "extra": "150",
                  "calories": 90,
                  "proteinGrams": 1,
                  "carbsGrams": 2,
                  "fatGrams": 9,
                  "allergens": [],
                  "externalId": null
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}

Errors

Every error has the same body; switch on data.code. See Errors and rate limits.

data.codeStatusWhat to do
app_key_invalid401The key is wrong, revoked or of another kind. Check it in the dashboard.
sdk_disabled403The SDK isn't switched on for this restaurant. Ask Tamr.
origin_not_allowed403A browser called from an origin the key doesn't list. Add the origin to the key.
session_expired401Start a new session with a fresh token or code, then send the call again once.
invalid_request400A field doesn't match the spec. The message says which.
rate_limited429Wait retryAfter seconds (also in the Retry-After header), then try again.
menu_unavailable404No published menu is served at that branch and service mode.