# Read one event and its deliveries

`GET /events/{id}`

Requires the `businesses` scope.

## Path parameters

| Name | Type | | Description |
|---|---|---|---|
| `id` | string | **required** | Event id. |

## Response

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

| Field | Type | | Description |
|---|---|---|---|
| `ok` | boolean | **required** |  |
| `event` | Event | **required** | One thing that happened under your key, recorded whether or not a webhook was subscribed. The webhook envelope `data` is this row's `data`. |

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/events/$DOC_ID" \
  -H "X-Api-Key: $KEY"
```
### Node

```node
const res = await fetch(`${BASE}/events/${DOC_ID}`, {
  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}/events/{DOC_ID}",
    headers={"X-Api-Key": KEY},
)
data = res.json()
```