

This is the full set of schemas the Statshawk API serves — every object that can
appear in a response, with its fields, types, and descriptions. It is generated
from the same OpenAPI spec that powers the [REST API reference](/docs/api), so it
stays in lockstep with the live API.

## How to read a model [#how-to-read-a-model]

* Every successful response is wrapped in the **envelope** `{ data, meta }`; errors
  return `{ error }`. Start with [Envelope & meta](/docs/reference/data-model/envelope)
  to see those wrappers, then follow `data` into the concrete types.
* A field whose type is another model is a **link** — click it to jump to that
  model's full entry, or expand the field in place to see one level of its fields.
* **Polymorphic fields** (e.g. sport-specific stat lines) show a *selector table* — the
  payload is one of several shapes, picked by sport or by a discriminator field
  like `role`. The table maps each key to the model you'll get.
* Each model page ends with a **Used by** list — the wrappers and fields that
  point at it, so you can see where a type plugs in.
* `optional` fields may be absent or `null`; everything else is always present.

## Groups [#groups]

| Group                                                              | What's in it                                                                     |
| ------------------------------------------------------------------ | -------------------------------------------------------------------------------- |
| [Envelope & meta](/docs/reference/data-model/envelope)             | Response/error wrappers, `meta`, and cache status.                               |
| [Persons](/docs/reference/data-model/persons)                      | Person profiles, appearances, memberships, and person game logs.                 |
| [Teams](/docs/reference/data-model/teams)                          | Team profiles, rosters, game logs, standings rows, and team traits.              |
| [Competitions & editions](/docs/reference/data-model/competitions) | Competitions, editions/seasons, capability discovery, and event summaries.       |
| [Contests & box scores](/docs/reference/data-model/contests)       | Contest summaries, match projections, entrants, results, box scores, and scores. |
| [Per-sport stat lines](/docs/reference/data-model/stat-lines)      | Sport-specific player/team season and game stat lines.                           |
| [Analysis cards](/docs/reference/data-model/analysis)              | Player-prop cards, hit rates, and team comparison shapes.                        |
| [Shared primitives](/docs/reference/data-model/shared)             | Small reusable values shared across resource groups.                             |

Prefer the raw spec? It's at [`/api-docs/openapi.json`](https://api.statshawk.ai/api-docs/openapi.json),
and every endpoint page has a live playground.
