# Reports API

Every reports call: what to send, what comes back, and copy-ready examples.

## Main numbers

`GET /overview` (scope: reports:read)

```bash
curl "https://api.usetotems.com/v1/overview?from=2026-11-01&to=2026-11-30&model=first" \
  -H "Authorization: Bearer $TOTEMS_KEY"
```

```json
{
  "data": {
    "from": "2026-11-01",
    "to": "2026-11-30",
    "model": "first",
    "net_cents": 1670306,
    "gross_cents": 1913606,
    "refunds_cents": 243300,
    "credited_cents": 1651406,
    "unknown_cents": 18900,
    "sales": 28,
    "bookings": 13,
    "clicks": 557,
    "bot_clicks": 29,
    "visitors": 369,
    "currency": "USD",
    "funnel": {
      "clicks": 557,
      "forms": 26,
      "bookings": 13,
      "sales": 28
    }
  },
  "request_id": "req_..."
}
```

## One number for each day

`GET /timeseries` (scope: reports:read)

```bash
curl "https://api.usetotems.com/v1/timeseries?from=2026-11-01&to=2026-11-30&metric=net_cents" \
  -H "Authorization: Bearer $TOTEMS_KEY"
```

```json
{
  "data": [
    {
      "day": "2026-11-01",
      "value": 120039
    }
  ],
  "request_id": "req_..."
}
```

## Click, form, booking, sale

`GET /funnel` (scope: reports:read)

```bash
curl "https://api.usetotems.com/v1/funnel?from=2026-11-01&to=2026-11-30" \
  -H "Authorization: Bearer $TOTEMS_KEY"
```

```json
{
  "data": {
    "clicks": 557,
    "forms": 26,
    "bookings": 13,
    "sales": 28
  },
  "request_id": "req_..."
}
```

## Channel report

`GET /channels` (scope: reports:read)

```bash
curl "https://api.usetotems.com/v1/channels?from=2026-11-01&to=2026-11-30" \
  -H "Authorization: Bearer $TOTEMS_KEY"
```

```json
{
  "data": [
    {
      "channel": "youtube",
      "clicks": 222,
      "visitors": 160,
      "bookings": 4,
      "sales": 14,
      "cents": 978431
    }
  ],
  "request_id": "req_..."
}
```
