# Get the waiter

> Read the waiter's public face: name, greeting, starters, languages, brand, the restaurant's published app settings and where orders go.

Source: https://tamr.link/docs/api/get-waiter

`GET https://tamr.link/api/v1/waiter`

What a custom chat screen needs before the first message: the waiter's name and greeting, starters, languages, the restaurant's brand, its published "Waiter in your app" settings (`app`) and `ordersGoTo` (`tamr` or `app_cart`), with `ordersGoToByMode` when the restaurant sends each way of ordering its own way (see [Ordering modes](https://tamr.link/docs/guides/ordering#different-for-each-way-of-ordering)). It needs your app key only, no session.

## Authentication

**Client API.** Send your publishable key in `x-tamr-key`. No session is needed.

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `branch` | string | No | An address: lower-case letters, digits and dashes. |
| `mode` | string | No | One of `dine_in`, `pickup`, `delivery`. |

## Response

A [WaiterFace](https://tamr.link/docs/api/schemas#waiterface).

| Field | Type | Description |
| --- | --- | --- |
| `name` | string | 1 to 60 characters. |
| `avatarLetter` | string | 1 to 2 characters. |
| `greeting` | string | 1 to 500 characters. |
| `starters` | array of string | At most 8 items. 1 to 80 characters. |
| `voice` | boolean |  |
| `languages` | array of string | At most 12 items. A language tag, such as `ar` or `en-GB`. |
| `brand` | object | May be absent. The restaurant's brand: the menu's kit over the organization's. Every field optional. |
| `brand.accent` | string | May be absent. Matches `^#[0-9a-fA-F]{6}$`. |
| `brand.accentSecondary` | string | May be absent. Matches `^#[0-9a-fA-F]{6}$`. |
| `brand.paper` | string | May be absent. Matches `^#[0-9a-fA-F]{6}$`. |
| `brand.displayFont` | string | May be absent. One of `fraunces`, `cormorant`, `playfair`, `dm-serif`, `eb-garamond`, `crimson`, `other`. An open list: read a value you don't know as `other`. |
| `brand.uiFont` | string | May be absent. One of `geist`, `inter`, `system`, `manrope`, `sora`, `dm-sans`, `other`. An open list: read a value you don't know as `other`. |
| `brand.displayFontUrl` | string | May be absent. Matches `^https:\/\/[^\s]+$`. |
| `brand.uiFontUrl` | string | May be absent. Matches `^https:\/\/[^\s]+$`. |
| `brand.logoUrl` | string | May be absent. Matches `^https:\/\/[^\s]+$`. |
| `ordersGoTo` | string | One of `tamr`, `app_cart`. An open list: read a value you don't know as `tamr`. |
| `ordersGoToByMode` | object | May be absent. Where orders go for each way of ordering, over ordersGoTo. A way left out goes where ordersGoTo says. |
| `ordersGoToByMode.dine_in` | string | May be absent. One of `tamr`, `app_cart`. An open list: read a value you don't know as `tamr`. |
| `ordersGoToByMode.pickup` | string | May be absent. One of `tamr`, `app_cart`. An open list: read a value you don't know as `tamr`. |
| `ordersGoToByMode.delivery` | string | May be absent. One of `tamr`, `app_cart`. An open list: read a value you don't know as `tamr`. |
| `app` | object | May be absent. The restaurant's settings for the waiter in its app, between the menu's brand and the app's overrides. Every field but allowCustomise may be left out. |
| `app.look` | object | May be absent. |
| `app.look.scheme` | string | May be absent. One of `light`, `dark`, `auto`. An open list: read a value you don't know as `auto`. |
| `app.look.accent` | string | May be absent. Matches `^#[0-9a-fA-F]{6}$`. |
| `app.look.accentSecondary` | string | May be absent. Matches `^#[0-9a-fA-F]{6}$`. |
| `app.look.paper` | string | May be absent. Matches `^#[0-9a-fA-F]{6}$`. |
| `app.look.text` | string | May be absent. Matches `^#[0-9a-fA-F]{6}$`. |
| `app.look.displayFont` | string | May be absent. One of `fraunces`, `cormorant`, `playfair`, `dm-serif`, `eb-garamond`, `crimson`, `other`. An open list: read a value you don't know as `other`. |
| `app.look.uiFont` | string | May be absent. One of `geist`, `inter`, `system`, `manrope`, `sora`, `dm-sans`, `other`. An open list: read a value you don't know as `other`. |
| `app.look.corners` | string | May be absent. One of `round`, `soft`, `square`. An open list: read a value you don't know as `soft`. |
| `app.look.headerColor` | string | May be absent. Matches `^#[0-9a-fA-F]{6}$`. |
| `app.look.bubbleColor` | string | May be absent. Matches `^#[0-9a-fA-F]{6}$`. |
| `app.look.buttonColor` | string | May be absent. Matches `^#[0-9a-fA-F]{6}$`. |
| `app.look.cardColor` | string | May be absent. Matches `^#[0-9a-fA-F]{6}$`. |
| `app.look.mutedColor` | string | May be absent. Matches `^#[0-9a-fA-F]{6}$`. |
| `app.look.lineColor` | string | May be absent. Matches `^#[0-9a-fA-F]{6}$`. |
| `app.look.positiveColor` | string | May be absent. Matches `^#[0-9a-fA-F]{6}$`. |
| `app.look.header` | string | May be absent. One of `plain`, `brand`. An open list: read a value you don't know as `plain`. |
| `app.look.bubble` | string | May be absent. One of `soft`, `brand`. An open list: read a value you don't know as `soft`. |
| `app.look.buttons` | string | May be absent. One of `pill`, `rounded`, `square`. An open list: read a value you don't know as `pill`. |
| `app.look.starterStyle` | string | May be absent. One of `chips`, `cards`. An open list: read a value you don't know as `chips`. |
| `app.shown` | object | May be absent. |
| `app.shown.showHeader` | boolean | May be absent. |
| `app.shown.showLogo` | boolean | May be absent. |
| `app.shown.showWaiterName` | boolean | May be absent. |
| `app.shown.showWelcome` | boolean | May be absent. |
| `app.shown.showStarters` | boolean | May be absent. |
| `app.shown.showQuickReplies` | boolean | May be absent. |
| `app.shown.showNewChat` | boolean | May be absent. |
| `app.shown.showCheckout` | boolean | May be absent. |
| `app.shown.showBack` | boolean | May be absent. |
| `app.shown.hideVoice` | boolean | May be absent. |
| `app.shown.hideReviews` | boolean | May be absent. |
| `app.shown.hideRetailSuggestions` | boolean | May be absent. |
| `app.shown.hideLoyalty` | boolean | May be absent. |
| `app.wording` | object | May be absent. |
| `app.starters` | object | May be absent. |
| `app.allowCustomise` | boolean |  |

## Example

curl:

```bash
curl "https://tamr.link/api/v1/waiter?branch=achrafieh" \
  -H "x-tamr-key: $TAMR_APP_KEY"
```

Node:

```js
import { createClient } from "@tamr/api";

const tamr = createClient({ appKey: process.env.TAMR_APP_KEY });

const result = await tamr.waiter({ branch: "achrafieh" });
console.log(result);
```

Python:

```python
import os

import requests

API = "https://tamr.link/api/v1"
headers = {"x-tamr-key": os.environ["TAMR_APP_KEY"]}

response = requests.get(
    f"{API}/waiter",
    headers=headers,
    params={"branch": "achrafieh"},
    timeout=30,
)
response.raise_for_status()
print(response.json())
```

## Example response

```json
{
  "name": "Céline",
  "avatarLetter": "C",
  "ordersGoTo": "tamr",
  "greeting": "Hi! What are you in the mood for?",
  "starters": [
    "What's popular?",
    "Something vegan"
  ],
  "voice": true,
  "languages": []
}
```

## Errors

Every error has the same body; switch on `data.code`. See [Errors and rate limits](https://tamr.link/docs/errors).

| `data.code` | Status | What to do |
| --- | --- | --- |
| `app_key_invalid` | 401 | The key is wrong, revoked or of another kind. Check it in the dashboard. |
| `sdk_disabled` | 403 | The SDK isn't switched on for this restaurant. Ask Tamr. |
| `origin_not_allowed` | 403 | A browser called from an origin the key doesn't list. Add the origin to the key. |
| `invalid_request` | 400 | A field doesn't match the spec. The message says which. |
| `rate_limited` | 429 | Wait `retryAfter` seconds (also in the `Retry-After` header), then try again. |
| `menu_unavailable` | 404 | No published menu is served at that branch and service mode. |
