# Batched receipt thumbnails

`POST /businesses/{bid}/files/thumbs`

Requires the `export` scope.

Small data-URI JPEG previews for up to 60 stored image files in ONE call, built for list views, where a request per row would burn the rate limit. Non-image files (PDFs) are simply absent from the answer.

## Path parameters

| Name | Type | | Description |
|---|---|---|---|
| `bid` | string | **required** | Business id, from `POST /businesses`. |

## Body

| Field | Type | | Description |
|---|---|---|---|
| `ids` | array of string | **required** |  |

## Response

`200`: `{ "ok": true, … }`

| Field | Type | | Description |
|---|---|---|---|
| `ok` | boolean |  |  |
| `thumbs` | object |  | fileId → data URI. Missing key = no thumbnail for that file. |

Errors: `400`, `401`, `403`, `404`, `429`. Every failure answers `{ "error": …, "reason": … }`. Branch on `reason`.

## Examples

### cURL

```bash
curl -X POST "$BASE/businesses/$BID/files/thumbs" \
  -H "X-Api-Key: $KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": []
  }'
```
### Node

```node
const res = await fetch(`${BASE}/businesses/${BID}/files/thumbs`, {
  method: 'POST',
  headers: {
    'X-Api-Key': KEY,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "ids": []
  }),
})
const data = await res.json()
if (!data.ok) throw new Error(data.reason)
```
### Python

```python
import requests
res = requests.post(
    f"{BASE}/businesses/{BID}/files/thumbs",
    headers={"X-Api-Key": KEY},
    json={
      "ids": []
    },
)
data = res.json()
```