# Get the diner's usual

> Read the signed-in diner's usual order, or their last one, from the orders your backend sent.

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

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

The signed-in diner's usual, or their last completed order when there is no usual yet, from the orders your backend sent, on the menu the waiter serves there. Each item keeps your order's title, with today's `dish` (null once it's off the menu) and whether it's on sale now. `usual` is null for a guest and for a diner with no completed order. To reorder, send the diner's words to the chat ("Reorder my usual").

From the completed orders the host sent (`POST /api/v1/sdk/orders`) in the restaurant's window. `usual` is null for a guest's session and for a diner with no completed order. An item no longer on the menu has `dish: null` and `onMenu: false`; reorder through the chat (`reorder`), which proposes only what is on sale.

## Authentication

**Client API.** Send your publishable key in `x-tamr-key` and the diner's session in `x-tamr-session`, from [Start a session](https://tamr.link/docs/api/start-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

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

## Headers

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `x-tamr-device` | string | No | Guest sessions only: the device id the session was exchanged with. Matches `^[A-Za-z0-9_-]{8,128}$`. |
| `x-tamr-app` | string | No | Native 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

| Field | Type | Description |
| --- | --- | --- |
| `usual` | object or null |  |
| `usual.kind` | string | One of `usual`, `last`, `other`. An open list: read a value you don't know as `other`. |
| `usual.orders` | integer | 1 to 10. |
| `usual.lastOrderedAt` | string (date-time) |  |
| `usual.items` | array of object | 1 to 100 items. |
| `usual.items[].title` | string | 1 to 200 characters. |
| `usual.items[].quantity` | integer | 1 to 99. |
| `usual.items[].variantLabel` | string or null | 1 to 80 characters. |
| `usual.items[].dish` | [DishSummary](https://tamr.link/docs/api/schemas#dishsummary) or null |  |
| `usual.items[].onMenu` | boolean |  |
| `usual.items[].available` | boolean |  |

## Example

curl:

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

Node:

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

const tamr = createClient({ appKey: process.env.TAMR_APP_KEY });
// Sign the diner in first, with a token your backend signed (or a launch code).
await tamr.startSession({ token: dinerToken });

const result = await tamr.usual({ branch: "achrafieh", mode: "delivery" });
console.log(result);
```

Python:

```python
import os

import requests

API = "https://tamr.link/api/v1"
headers = {
    "x-tamr-key": os.environ["TAMR_APP_KEY"],
    "x-tamr-session": os.environ["TAMR_SESSION"],  # from POST /api/v1/sdk/session
}

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

## Example response

```json
{
  "usual": {
    "kind": "usual",
    "orders": 8,
    "lastOrderedAt": "2026-11-04T19:30:00.000Z",
    "items": [
      {
        "title": "Kafta plate",
        "quantity": 2,
        "variantLabel": "Large",
        "dish": {
          "dishId": "cmdish0003",
          "name": "Kafta plate",
          "price": "1200",
          "currency": "USD",
          "imageUrl": null,
          "calories": null,
          "proteinGrams": null,
          "carbsGrams": null,
          "fatGrams": null,
          "allergens": [],
          "dietaryTags": [],
          "available": true,
          "externalId": "SKU-1042"
        },
        "onMenu": true,
        "available": true
      },
      {
        "title": "Mixed grill for two",
        "quantity": 1,
        "variantLabel": null,
        "dish": null,
        "onMenu": false,
        "available": false
      }
    ]
  }
}
```

## 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. |
| `session_expired` | 401 | Start a new session with a fresh token or code, then send the call again once. |
| `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. |
