# Get pickup options

> Read where and when the diner can collect a pickup order: locations, times and how each takes payment.

Source: https://tamr.link/docs/api/get-pickup-options

`GET https://tamr.link/api/v1/pickup/options`

Where and when the diner can collect: each location that takes pickups, its times and whether it is paid at the counter or ahead with Tamr Pay.

## 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. |

## 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 |
| --- | --- | --- |
| `available` | boolean |  |
| `reason` | string or null | One of `ordering_off`, `no_branch`, `paused`, `closed`, `pickup_time`, `details`, `blocked`, `too_large`, `unavailable`, `catering_menu`, `test_key`, `other`. An open list: read a value you don't know as `other`. |
| `serverNow` | string (date-time) |  |
| `asapMinutes` | object |  |
| `asapMinutes.min` | integer | 0 to 240. |
| `asapMinutes.max` | integer | 0 to 240. |
| `locations` | array of object | At most 50 items. |
| `locations[].branch` | string | An address: lower-case letters, digits and dashes. |
| `locations[].name` | string | 1 to 200 characters. |
| `locations[].address` | string or null | At most 500 characters. |
| `locations[].timezone` | string | 1 to 64 characters. |
| `locations[].openNow` | boolean |  |
| `locations[].pausedUntil` | string (date-time) or null |  |
| `locations[].payFirst` | boolean |  |
| `locations[].today` | array of string (date-time) | At most 40 items. |
| `locations[].tomorrow` | array of string (date-time) | At most 40 items. |

## Example

curl:

```bash
curl "https://tamr.link/api/v1/pickup/options?branch=achrafieh" \
  -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.pickupOptions({ 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"],
    "x-tamr-session": os.environ["TAMR_SESSION"],  # from POST /api/v1/sdk/session
}

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

## Example response

```json
{
  "available": true,
  "reason": null,
  "serverNow": "2026-11-08T14:00:00.000Z",
  "asapMinutes": {
    "min": 15,
    "max": 20
  },
  "locations": [
    {
      "branch": "achrafieh",
      "name": "Achrafieh",
      "address": "Sursock Street, Beirut",
      "timezone": "Asia/Beirut",
      "openNow": true,
      "pausedUntil": null,
      "payFirst": true,
      "today": [
        "2026-11-08T14:30:00.000Z",
        "2026-11-08T14:45:00.000Z"
      ],
      "tomorrow": [
        "2026-11-09T09:00:00.000Z"
      ]
    },
    {
      "branch": "hamra",
      "name": "Hamra",
      "address": null,
      "timezone": "Asia/Beirut",
      "openNow": false,
      "pausedUntil": "2026-11-08T14:20:00.000Z",
      "payFirst": false,
      "today": [],
      "tomorrow": []
    }
  ]
}
```

## 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. |
