# Fields and blocks

Keep the fields you read, add the blocks you need.

```bash
curl -G "https://api.gloom.sh/v1/kpis" \
  -d symbols=AAPL,MSFT \
  -d fields=key,latest \
  -d include=methodology \
  -H "Authorization: Bearer $GLOOM_DATASETS_KEY"
```

```json
{
  "data": [
    { "symbol": "AAPL", "key": "…", "latest": { … } },
    { "symbol": "MSFT", "key": "…", "latest": { … } }
  ],
  "included": {
    "methodology": { "AAPL": "…", "MSFT": "…" }
  },
  "meta": { … }
}
```

- `data` is the route's rows, or its one record. A row has every field its schema names, null when the source has no value.
- `fields=` keeps the fields named. On a company route, each row keeps `symbol`.
- `include=` adds blocks such as facets, coverage or methodology under `included`. On a company route, each block is keyed by listing.
- A few names add a field to each row, or to the record, instead of a block: `include=fullText` on a transcript adds the whole transcript as `data.fullText`. The route's reference says which.
- Neither changes the price. An unknown name is a free `400` that lists the names the route takes; an empty list is as if not sent.
- A list may be sent repeated, `fields=key&fields=latest`, as many clients send an array: it reads as `fields=key,latest`. So may `include`, `symbols` and a filter that takes several names.
- Each route's reference lists its fields and blocks; the [OpenAPI document](https://gloom.sh/datasets/docs/openapi) types every one.

- [Previous Batches](https://gloom.sh/datasets/docs/batches)
- [Next Point in time](https://gloom.sh/datasets/docs/point-in-time)
