# List branding themes

`GET /businesses/{bid}/branding-themes`

Requires the `businesses` scope.

The business's themes, oldest first. The main design is the business's own `branding` and is not in this list.

## Path parameters

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

## Query parameters

| Name | Type | | Description |
|---|---|---|---|
| `archived` | string |  | Include archived themes. One of: `1`. |
| `summary` | string |  | What a picker needs: each theme without its logo and signature, with `hasLogo`. One of: `1`. |

## Response

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

| Field | Type | | Description |
|---|---|---|---|
| `ok` | boolean | **required** |  |
| `themes` | array of BrandingTheme | **required** |  |
| `main` | object |  | On a `summary=1` list: the main design's `accentColor` and `template`, for a picker that shows it beside the themes. |
| `main.accentColor` | string |  |  |
| `main.template` | string |  |  |

Errors: `400`, `401`, `403`, `404`, `429`. Every failure answers `{ "error", "reason", "hint", "param", "doc_url", "retryable", "request_id" }`: branch on `reason`, and read `hint` for what to change (https://docs.billos.co.il/errors.md).

## Examples

### cURL

```bash
curl -X GET "$BASE/businesses/$BID/branding-themes?archived=&summary=" \
  -H "X-Api-Key: $KEY"
```
### Node

```node
const res = await fetch(`${BASE}/businesses/${BID}/branding-themes`, {
  method: 'GET',
  headers: {
    'X-Api-Key': KEY,
  },
})
const data = await res.json()
if (!data.ok) throw new Error(data.reason)
```
### Python

```python
import requests
res = requests.get(
    f"{BASE}/businesses/{BID}/branding-themes",
    headers={"X-Api-Key": KEY},
)
data = res.json()
```