{
  "openapi": "3.1.0",
  "info": {
    "title": "travelball.gg Data API",
    "version": "1.0.0",
    "summary": "Read a team, its roster, its schedule and its games.",
    "description": "Every answer is JSON and every answer carries the version of the shape it is written in and the moment it was built. Ask with an API key in the Authorization header. Nothing here writes: this door only reads.\n\nThe shapes only ever gain fields. A field you read today is still there tomorrow, with the same meaning and the same type. Read past a field you do not recognise rather than failing on it.",
    "x-changelog": [
      {
        "date": "2026-09-22",
        "note": "First release."
      },
      {
        "date": "2026-09-23",
        "note": "Season totals for a team, and one player's season, previous seasons and career."
      },
      {
        "date": "2026-09-23",
        "note": "A team answer carries the link to its logo, `logoUrl`."
      },
      {
        "date": "2026-09-25",
        "note": "A play carries where the ball went, `hitLocation`. In the event log, a game start can carry `ordersOpen`, a move of fielders can carry `tenthFielder`, and a placed runner can be on first, second or third base."
      },
      {
        "date": "2026-09-28",
        "note": "A new outcome for a turn at bat, `obstruction`."
      },
      {
        "date": "2026-09-28",
        "note": "`lob` changed its meaning. A batter is charged the runners left on base only when he makes an out."
      },
      {
        "date": "2026-09-28",
        "note": "On a player, `previous` is now always an empty list and `career` is always null. A key reads the season of its own team only."
      },
      {
        "date": "2026-10-05",
        "note": "`hitLocation.angle` now runs from -180 to 180, so that a foul ball behind home plate has a place."
      },
      {
        "date": "2026-10-07",
        "note": "The event log reference now lists the fielding detail and the hit position that an entry can carry: `fielding`, `hitLocation`, `errorBy`, `wouldHaveBeenOut`, and `battedBall` on a foul."
      },
      {
        "date": "2026-10-07",
        "note": "The rule for a rewind in the event log changed. A correction to an entry that the rewind keeps is kept, even when the correction was recorded before the rewind."
      },
      {
        "date": "2026-10-07",
        "note": "The event log reference now says what happens when a coach starts a game over: every entry is removed, the lineups come back as new entries, and `sequence` begins again at 0. The API always worked this way."
      },
      {
        "date": "2026-10-23",
        "note": "Earned runs (`er`) are now worked out by rebuilding the half-inning as it would have gone with no error and no passed ball (OBR 9.16). A finished game's `er` can go up or down from what it showed before. In a game still being played, a run can be in `r` before it is in `er`: `er` can rise on a later play in the same half-inning, once the rebuilt inning decides the run."
      },
      {
        "date": "2026-10-29",
        "note": "The Data API is included with every plan: Base 1 team, Standard 3, Pro 6. Nothing is sold apart from the plan. The shared limit for all the keys on one account rose from 600 to 720 requests a minute. The sentences of `api-lapsed` and `no-api-seat` changed; the codes did not."
      },
      {
        "date": "2026-11-26",
        "note": "A play carries the results of its pitches, `pitches`. The plays answer carries a new list, `runnerPlays`: the steals, pickoffs, wild pitches and other moves of runners that were not part of a turn at bat, each with the place `beforePlay` it falls in. Fielding is open: the box score has a `fielding` table for each side and a `positions` list on each batting row; the season answer has a `fielding` table; a player's answer has `fielding` and `positions` on each season and `fielding` on each game of the log. A game's `broadcast` says whether it is `live` now, and the plays answer carries `lineupChanges`: the substitutions, courtesy runners, tiebreaker runners and pitching changes, each with the inning and half."
      }
    ]
  },
  "servers": [
    {
      "url": "https://api.travelball.gg/v1"
    }
  ],
  "security": [
    {
      "bearerKey": []
    }
  ],
  "paths": {
    "/teams/{teamId}": {
      "get": {
        "operationId": "getTeam",
        "summary": "Read one team.",
        "description": "The team's name, where it plays and which season it belongs to. No players and no games.",
        "parameters": [
          {
            "$ref": "#/components/parameters/TeamId"
          }
        ],
        "responses": {
          "200": {
            "description": "The team.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Team"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/teams/{teamId}/roster": {
      "get": {
        "operationId": "getRoster",
        "summary": "Read a team's players.",
        "description": "The players on this team, with jersey numbers and the positions they play. These are children: a key that does not belong to the account that created the roster reads first name and last initial.",
        "parameters": [
          {
            "$ref": "#/components/parameters/TeamId"
          }
        ],
        "responses": {
          "200": {
            "description": "The roster.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Roster"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/teams/{teamId}/games": {
      "get": {
        "operationId": "listGames",
        "summary": "List a team's games, newest first.",
        "description": "One page of games. Each game carries its line score, so a schedule page with scores on it needs one request. Follow `nextCursor` for the next page; a `nextCursor` of null means this was the last page.",
        "parameters": [
          {
            "$ref": "#/components/parameters/TeamId"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Keep only games in this state. Anything else is ignored and every game is returned.",
            "schema": {
              "type": "string",
              "enum": [
                "scheduled",
                "live",
                "final"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The `nextCursor` from the previous page. Leave it off for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many games to return, from 1 to 50. A larger number is trimmed to 50 rather than refused. Leave it off for 50.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of games.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GameList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/games/{gameId}": {
      "get": {
        "operationId": "getGame",
        "summary": "Read one game.",
        "description": "Both teams, the line score, the league rules this game was played under, and the YouTube video if there is one.",
        "parameters": [
          {
            "$ref": "#/components/parameters/GameId"
          }
        ],
        "responses": {
          "200": {
            "description": "The game.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Game"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/games/{gameId}/state": {
      "get": {
        "operationId": "getGameState",
        "summary": "Read the live scoreboard for one game.",
        "description": "The small answer a live scoreboard redraws: the score, the inning, the count, who is on base and who is at bat. Built for polling, so it is never cached. Ten seconds between requests is enough.",
        "parameters": [
          {
            "$ref": "#/components/parameters/GameId"
          }
        ],
        "responses": {
          "200": {
            "description": "The scoreboard.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GameState"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/games/{gameId}/plays": {
      "get": {
        "operationId": "getPlays",
        "summary": "Read the play-by-play for one game.",
        "description": "Every completed turn at bat, in order. Corrections are already applied and plays the scorer took back are already gone, so this is the finished story of the game.",
        "parameters": [
          {
            "$ref": "#/components/parameters/GameId"
          }
        ],
        "responses": {
          "200": {
            "description": "The plays.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Plays"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/games/{gameId}/boxscore": {
      "get": {
        "operationId": "getBoxscore",
        "summary": "Read the box score for one game.",
        "description": "A batting line and a pitching line for every player who took part, for each side, in the order they batted and pitched. A game scored on the scoreboard only has no lines at all, and both lists come back empty rather than missing.",
        "parameters": [
          {
            "$ref": "#/components/parameters/GameId"
          }
        ],
        "responses": {
          "200": {
            "description": "The box score.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Boxscore"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/games/{gameId}/events": {
      "get": {
        "operationId": "getEvents",
        "summary": "Read the raw record of one game.",
        "description": "Everything the scorer recorded, in the order it was recorded. A correction and a rewind take nothing out, so this list still holds the plays a correction replaced and the plays a rewind took back. One act empties it: when a coach starts the game over, every entry is removed, the game is `scheduled` again, the lineups come back as new entries, and `sequence` begins again at 0.\n\nTo rebuild the game from this list, first drop everything a `rewind.to` entry took back, and then apply each correction at the place of the entry it replaces. A rewind takes back each entry recorded after `throughSequence` and before the rewind itself, with one exception: a correction to an entry the rewind keeps is kept too. Read `/plays` or `/boxscore` instead if you only want the finished picture.",
        "parameters": [
          {
            "$ref": "#/components/parameters/GameId"
          }
        ],
        "responses": {
          "200": {
            "description": "The raw record.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Events"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/teams/{teamId}/season": {
      "get": {
        "operationId": "getTeamSeason",
        "summary": "Read a team's season totals.",
        "description": "The team's record, and every batter and pitcher who has appeared, added up across every game that counts. A game the team switched off is left out of every total and counted once under `record.excludedGames`. These are children: a key that does not belong to the account that created the roster reads first name and last initial.",
        "parameters": [
          {
            "$ref": "#/components/parameters/TeamId"
          }
        ],
        "responses": {
          "200": {
            "description": "The season table.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamSeason"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/players/{playerId}": {
      "get": {
        "operationId": "getPlayer",
        "summary": "Read one player's season.",
        "description": "This player's season on this team, with a game-by-game log. The player's team must have its Data API turned on. These are children: a key that does not belong to the account that created the roster reads first name and last initial. A key reads the season of its own team only, so `previous` is always an empty list and `career` is always null. Both stay in the answer so that its shape does not change.",
        "parameters": [
          {
            "$ref": "#/components/parameters/PlayerId"
          }
        ],
        "responses": {
          "200": {
            "description": "The player's page.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Player"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Your API key, sent as `Authorization: Bearer tb_live_…`. Each team whose Data API is on has its own key, and that key reads only that team. The owner copies it, or replaces it, on that team's API page in the app. Never put the key in the address: a key in a query string is refused, because it ends up in server logs, browser history and referrer headers. See /docs/key."
      }
    },
    "x-refusals": {
      "not-authenticated": {
        "status": 401,
        "message": "Send your API key as `Authorization: Bearer tb_live_…`."
      },
      "key-in-url": {
        "status": 400,
        "message": "Do not put the key in the address. Send it in the Authorization header."
      },
      "api-lapsed": {
        "status": 402,
        "message": "This account's plan is not active, so its Data API keys are paused. The owner can fix it from Billing & hours."
      },
      "no-api-seat": {
        "status": 403,
        "message": "This team's Data API is off. The owner can turn it on from Billing & hours."
      },
      "key-scope": {
        "status": 403,
        "message": "This key belongs to another team. Use that team's own key."
      },
      "not-found": {
        "status": 404,
        "message": "Nothing with that id."
      },
      "rate-limited": {
        "status": 429,
        "message": "Too many requests. Try again in {seconds} seconds."
      },
      "internal": {
        "status": 500,
        "message": "Something went wrong on our side."
      }
    },
    "parameters": {
      "TeamId": {
        "name": "teamId",
        "in": "path",
        "required": true,
        "description": "The team's public id, as `team_…`.",
        "schema": {
          "type": "string"
        }
      },
      "GameId": {
        "name": "gameId",
        "in": "path",
        "required": true,
        "description": "The game's public id, as `game_…`.",
        "schema": {
          "type": "string"
        }
      },
      "PlayerId": {
        "name": "playerId",
        "in": "path",
        "required": true,
        "description": "The player's public id, as `plyr_…`.",
        "schema": {
          "type": "string"
        }
      }
    },
    "headers": {
      "X-RateLimit-Limit": {
        "description": "How many requests this key may make in the current minute.",
        "schema": {
          "type": "integer"
        }
      },
      "X-RateLimit-Remaining": {
        "description": "How many of those requests are left.",
        "schema": {
          "type": "integer"
        }
      },
      "X-RateLimit-Reset": {
        "description": "When the count goes back to the full limit, in whole seconds since 1 January 1970.",
        "schema": {
          "type": "integer"
        }
      },
      "Retry-After": {
        "description": "How many seconds to wait before asking again. Sent only when a request was refused for asking too often.",
        "schema": {
          "type": "integer"
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "The request itself is wrong. Today this is only a key put in the address instead of the header.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Refusal"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "No key was sent, or the key is not one of ours.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Refusal"
            }
          }
        }
      },
      "PaymentRequired": {
        "description": "This account's API access has lapsed.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Refusal"
            }
          }
        }
      },
      "Forbidden": {
        "description": "The key is good, but it may not read this team: the team's Data API is off, or this key belongs to another team.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Refusal"
            }
          }
        }
      },
      "NotFound": {
        "description": "Nothing with that id. A team or a game that belongs to another account answers the same way, so that a stranger cannot learn an id exists.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Refusal"
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "Too many requests. Wait the number of seconds in `Retry-After` and ask again.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Refusal"
            }
          }
        },
        "headers": {
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/X-RateLimit-Limit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/X-RateLimit-Remaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/X-RateLimit-Reset"
          },
          "Retry-After": {
            "$ref": "#/components/headers/Retry-After"
          }
        }
      },
      "ServerError": {
        "description": "Something went wrong on our side.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Refusal"
            }
          }
        }
      }
    },
    "schemas": {
      "Refusal": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "error"
        ],
        "description": "Every refused request answers with this shape and nothing else.",
        "properties": {
          "error": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "code",
              "message"
            ],
            "description": "Why the request was refused.",
            "properties": {
              "code": {
                "type": "string",
                "description": "A fixed word to branch on. `not-authenticated`: no key, or an unknown key. `key-in-url`: the key was in the address instead of the header. `api-lapsed`: this account's plan is not active, so its keys are paused. `no-api-seat`: this team's Data API is off. `key-scope`: this key belongs to another team. `not-found`: nothing with that id. `rate-limited`: too many requests. `internal`: our fault.",
                "enum": [
                  "not-authenticated",
                  "key-in-url",
                  "api-lapsed",
                  "no-api-seat",
                  "key-scope",
                  "not-found",
                  "rate-limited",
                  "internal"
                ]
              },
              "message": {
                "type": "string",
                "description": "One sentence about what went wrong, safe to log. It never carries a stack trace or an internal detail."
              }
            }
          }
        }
      },
      "Version": {
        "type": "string",
        "const": "v1",
        "description": "The version of the shape this answer is written in. It changes only if a field is ever removed or retyped, which this contract promises not to do."
      },
      "GeneratedAt": {
        "type": "integer",
        "description": "When this answer was built, in milliseconds since 1 January 1970."
      },
      "Team": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "name",
          "abbrev",
          "city",
          "state",
          "ageGroup",
          "division",
          "season",
          "sport",
          "logoUrl",
          "version",
          "generatedAt"
        ],
        "description": "One team.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The team's public id, as `team_…`. Use it in the other team addresses."
          },
          "name": {
            "type": "string",
            "description": "The team's full name, as the coach typed it."
          },
          "abbrev": {
            "type": "string",
            "description": "A short label for a scoreboard, normally three letters."
          },
          "logoUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "A link to the team's logo: a square PNG, 512 pixels on each side, with a see-through background. Null when the team has no logo. The link can change, so read it again rather than keeping it."
          },
          "city": {
            "type": "string",
            "description": "The city the team plays out of."
          },
          "state": {
            "type": "string",
            "description": "The two-letter state code."
          },
          "ageGroup": {
            "type": "string",
            "description": "The age group, written as a number and the letter U, from `6U` to `18U`."
          },
          "division": {
            "type": "string",
            "enum": [
              "A",
              "AA",
              "AAA",
              "Majors"
            ],
            "description": "The competitive level inside the age group, weakest first."
          },
          "season": {
            "type": "string",
            "description": "The season this team belongs to, such as `Spring 2026`."
          },
          "sport": {
            "type": "string",
            "enum": [
              "baseball",
              "fastpitch"
            ],
            "description": "Which game the team plays."
          },
          "version": {
            "$ref": "#/components/schemas/Version"
          },
          "generatedAt": {
            "$ref": "#/components/schemas/GeneratedAt"
          }
        }
      },
      "RosterPlayer": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "name",
          "positions"
        ],
        "description": "One player on a roster.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The player's public id, as `plyr_…`. It is the same id used in plays and box scores."
          },
          "name": {
            "type": "string",
            "description": "The player's name. A key that does not belong to the account that created this roster reads a first name and a last initial. A player entered by jersey number alone reads as `#14`."
          },
          "number": {
            "type": "string",
            "description": "The jersey number, as text so that `07` stays `07`. Absent when the team never gave one."
          },
          "positions": {
            "type": "array",
            "description": "The positions this player is listed at, most usual first.",
            "items": {
              "$ref": "#/components/schemas/Position"
            }
          }
        }
      },
      "Position": {
        "type": "string",
        "enum": [
          "P",
          "C",
          "1B",
          "2B",
          "3B",
          "SS",
          "LF",
          "CF",
          "RF",
          "DH",
          "EH",
          "SF"
        ],
        "description": "A fielding position. `DH` is a designated hitter, `EH` an extra hitter and `SF` a short fielder."
      },
      "Roster": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "players",
          "version",
          "generatedAt"
        ],
        "description": "A team's players.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The team's public id."
          },
          "players": {
            "type": "array",
            "description": "The players on the team, in the order the team keeps them.",
            "items": {
              "$ref": "#/components/schemas/RosterPlayer"
            }
          },
          "version": {
            "$ref": "#/components/schemas/Version"
          },
          "generatedAt": {
            "$ref": "#/components/schemas/GeneratedAt"
          }
        }
      },
      "TeamRef": {
        "type": [
          "object",
          "null"
        ],
        "additionalProperties": false,
        "required": [
          "id",
          "name",
          "abbrev"
        ],
        "description": "One side of a game. Null when that side is not settled yet: a game can be on the schedule before an opponent is agreed.",
        "properties": {
          "id": {
            "type": "string",
            "description": "That team's public id."
          },
          "name": {
            "type": "string",
            "description": "That team's name, frozen onto the game when it was created. A later rename does not rewrite it."
          },
          "abbrev": {
            "type": "string",
            "description": "A short label for a scoreboard."
          }
        }
      },
      "LineScoreTotals": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "awayRuns",
          "homeRuns",
          "awayHits",
          "homeHits",
          "awayErrors",
          "homeErrors"
        ],
        "description": "The runs, hits and errors line at the end of a line score.",
        "properties": {
          "awayRuns": {
            "type": "integer",
            "description": "Runs scored by the visiting team."
          },
          "homeRuns": {
            "type": "integer",
            "description": "Runs scored by the home team."
          },
          "awayHits": {
            "type": "integer",
            "description": "Hits by the visiting team."
          },
          "homeHits": {
            "type": "integer",
            "description": "Hits by the home team."
          },
          "awayErrors": {
            "type": "integer",
            "description": "Errors charged to the visiting team while it was fielding."
          },
          "homeErrors": {
            "type": "integer",
            "description": "Errors charged to the home team while it was fielding."
          }
        }
      },
      "LineScore": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "away",
          "home",
          "totals"
        ],
        "description": "Runs by inning for both sides, with the totals line.",
        "properties": {
          "away": {
            "type": "array",
            "description": "Runs the visiting team scored, one number per inning it batted, first inning first.",
            "items": {
              "type": "integer",
              "description": "Runs in that inning."
            }
          },
          "home": {
            "type": "array",
            "description": "Runs the home team scored, one number per inning it batted. It can be one shorter than the visiting list when the home team did not need to bat.",
            "items": {
              "type": "integer",
              "description": "Runs in that inning."
            }
          },
          "totals": {
            "$ref": "#/components/schemas/LineScoreTotals"
          }
        }
      },
      "Broadcast": {
        "type": [
          "object",
          "null"
        ],
        "additionalProperties": false,
        "required": [
          "youtubeVideoId",
          "watchUrl",
          "live"
        ],
        "description": "The YouTube video of this game, live or saved. Null when the game was never broadcast.",
        "properties": {
          "youtubeVideoId": {
            "type": "string",
            "description": "The YouTube video id, for building your own player."
          },
          "watchUrl": {
            "type": "string",
            "description": "The address a viewer can open to watch."
          },
          "live": {
            "type": "boolean",
            "description": "True while this game is broadcasting to YouTube now. False once the broadcast has ended."
          }
        }
      },
      "LineupChange": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "kind",
          "inning",
          "half",
          "in"
        ],
        "description": "One change to the lineup during the game: a substitution, a courtesy runner, a tiebreaker runner or a pitching change.",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "substitution",
              "courtesy_runner",
              "tiebreaker_runner",
              "pitching_change"
            ],
            "description": "`substitution` is a player replaced for good. `courtesy_runner` is a player who runs for another. `tiebreaker_runner` is the runner placed on base to start an extra inning. `pitching_change` is a new pitcher; `out` is the pitcher he replaced, when known."
          },
          "inning": {
            "type": "integer",
            "description": "The inning when the change was made."
          },
          "half": {
            "$ref": "#/components/schemas/HalfInning"
          },
          "in": {
            "$ref": "#/components/schemas/PlayerRef",
            "description": "The player who came in."
          },
          "out": {
            "$ref": "#/components/schemas/PlayerRef",
            "description": "The player who went out, who the runner runs for, or who the new pitcher replaced. Absent on `tiebreaker_runner`, and on a `pitching_change` when the replaced pitcher is not known."
          },
          "position": {
            "type": "string",
            "description": "The position the player came in at, when the scorer named one. Absent otherwise."
          }
        }
      },
      "GameStatus": {
        "type": "string",
        "enum": [
          "scheduled",
          "live",
          "final"
        ],
        "description": "Where the game is. `scheduled` has not started, `live` is being played now, `final` is over."
      },
      "EndReason": {
        "type": "string",
        "enum": [
          "regulation",
          "run_rule",
          "time_limit",
          "forfeit",
          "called"
        ],
        "description": "Why the game ended. Absent while the game is still on."
      },
      "GameSummary": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "status",
          "home",
          "away",
          "lineScore",
          "broadcast",
          "version"
        ],
        "description": "A game as it appears in a list. The same fields as a single game, less the rules and the scoring detail.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The game's public id, as `game_…`."
          },
          "status": {
            "$ref": "#/components/schemas/GameStatus"
          },
          "endReason": {
            "$ref": "#/components/schemas/EndReason"
          },
          "scheduledAt": {
            "type": "integer",
            "description": "When the game is due to start, in milliseconds since 1 January 1970. Absent when no time was set."
          },
          "home": {
            "$ref": "#/components/schemas/TeamRef"
          },
          "away": {
            "$ref": "#/components/schemas/TeamRef"
          },
          "lineScore": {
            "$ref": "#/components/schemas/LineScore"
          },
          "broadcast": {
            "$ref": "#/components/schemas/Broadcast"
          },
          "version": {
            "$ref": "#/components/schemas/Version"
          }
        }
      },
      "GameList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "games",
          "nextCursor",
          "version",
          "generatedAt"
        ],
        "description": "One page of a team's games.",
        "properties": {
          "games": {
            "type": "array",
            "description": "The games on this page, newest first. A game with no start time sorts last.",
            "items": {
              "$ref": "#/components/schemas/GameSummary"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass this back as `cursor` for the next page. Null when this was the last page."
          },
          "version": {
            "$ref": "#/components/schemas/Version"
          },
          "generatedAt": {
            "$ref": "#/components/schemas/GeneratedAt"
          }
        }
      },
      "TimeLimit": {
        "type": [
          "object",
          "null"
        ],
        "additionalProperties": false,
        "required": [
          "minutes",
          "noNewInningAfterMinutes"
        ],
        "description": "The league's clock for this game. Null when the league set none. It is advice: the app warns, and the scorer ends the game.",
        "properties": {
          "minutes": {
            "type": "integer",
            "description": "How many minutes the game may run."
          },
          "noNewInningAfterMinutes": {
            "type": "integer",
            "description": "After this many minutes, no new inning starts."
          }
        }
      },
      "RunRule": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "afterInning",
          "differential"
        ],
        "description": "One mercy rule: a lead this big after this inning ends the game.",
        "properties": {
          "afterInning": {
            "type": "integer",
            "description": "The inning after which the rule applies."
          },
          "differential": {
            "type": "integer",
            "description": "How many runs ahead a team must be."
          }
        }
      },
      "AdvisoryRuleset": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "regulationInnings",
          "timeLimit",
          "runRules",
          "maxRunsPerHalfInning",
          "finalInningOpen"
        ],
        "description": "The league rules this game was played under, as the team typed them in. Every one of them is advice, never enforcement: the scorer records what happened on the field, and the app only warns.",
        "properties": {
          "regulationInnings": {
            "type": "integer",
            "enum": [
              6,
              7,
              9
            ],
            "description": "How many innings a full game is."
          },
          "timeLimit": {
            "$ref": "#/components/schemas/TimeLimit"
          },
          "runRules": {
            "type": "array",
            "description": "The mercy rules, if the league has any.",
            "items": {
              "$ref": "#/components/schemas/RunRule"
            }
          },
          "maxRunsPerHalfInning": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The most runs one side may score in a half inning. Null when the league set none."
          },
          "finalInningOpen": {
            "type": "boolean",
            "description": "True when the run cap is lifted for the last inning."
          }
        }
      },
      "Game": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "status",
          "home",
          "away",
          "lineScore",
          "broadcast",
          "ruleset",
          "scoringMode",
          "partialFrom",
          "version",
          "generatedAt"
        ],
        "description": "One game in full.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The game's public id, as `game_…`."
          },
          "status": {
            "$ref": "#/components/schemas/GameStatus"
          },
          "endReason": {
            "$ref": "#/components/schemas/EndReason"
          },
          "scheduledAt": {
            "type": "integer",
            "description": "When the game is due to start, in milliseconds since 1 January 1970. Absent when no time was set."
          },
          "home": {
            "$ref": "#/components/schemas/TeamRef"
          },
          "away": {
            "$ref": "#/components/schemas/TeamRef"
          },
          "lineScore": {
            "$ref": "#/components/schemas/LineScore"
          },
          "broadcast": {
            "$ref": "#/components/schemas/Broadcast"
          },
          "ruleset": {
            "$ref": "#/components/schemas/AdvisoryRuleset"
          },
          "scoringMode": {
            "type": "string",
            "enum": [
              "full",
              "scoreboard"
            ],
            "description": "How this game was scored. `full` records every pitch and has a box score. `scoreboard` records runs, outs and innings only, for a volunteer holding a camera as well as a phone, and has no box score at all."
          },
          "partialFrom": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The point at which this game stopped being scored in full, as an entry number in the raw record. Null when the book is complete. Batting and pitching lines simply stop there, so show a note rather than a total if this is set."
          },
          "version": {
            "$ref": "#/components/schemas/Version"
          },
          "generatedAt": {
            "$ref": "#/components/schemas/GeneratedAt"
          }
        }
      },
      "PlayerRef": {
        "type": [
          "object",
          "null"
        ],
        "additionalProperties": false,
        "required": [
          "id",
          "name"
        ],
        "description": "A player named in a game. Null where nobody is named, such as before the batting order is settled.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The player's public id, the same one the roster uses."
          },
          "name": {
            "type": "string",
            "description": "The player's name, shortened to a first name and a last initial unless the key belongs to the account that created the roster. Empty when the player is not in this game's lineup."
          }
        }
      },
      "Bases": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "first",
          "second",
          "third"
        ],
        "description": "Which bases have a runner on them right now.",
        "properties": {
          "first": {
            "type": "boolean",
            "description": "True when a runner is on first."
          },
          "second": {
            "type": "boolean",
            "description": "True when a runner is on second."
          },
          "third": {
            "type": "boolean",
            "description": "True when a runner is on third."
          }
        }
      },
      "GameState": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "inning",
          "half",
          "outs",
          "balls",
          "strikes",
          "bases",
          "awayScore",
          "homeScore",
          "batter",
          "dueUp",
          "updatedAt",
          "version",
          "generatedAt"
        ],
        "description": "The live scoreboard for one game.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The game's public id."
          },
          "inning": {
            "type": "integer",
            "description": "Which inning is being played, counting from 1."
          },
          "half": {
            "$ref": "#/components/schemas/HalfInning"
          },
          "outs": {
            "type": "integer",
            "description": "Outs in this half inning, from 0 to 2."
          },
          "balls": {
            "type": "integer",
            "description": "Balls on the batter."
          },
          "strikes": {
            "type": "integer",
            "description": "Strikes on the batter."
          },
          "bases": {
            "$ref": "#/components/schemas/Bases"
          },
          "awayScore": {
            "type": "integer",
            "description": "Runs scored by the visiting team so far."
          },
          "homeScore": {
            "type": "integer",
            "description": "Runs scored by the home team so far."
          },
          "batter": {
            "$ref": "#/components/schemas/PlayerRef"
          },
          "dueUp": {
            "type": "array",
            "description": "The next two batters, in order. Empty when the batting order is not settled.",
            "items": {
              "$ref": "#/components/schemas/PlayerRef"
            }
          },
          "updatedAt": {
            "type": "integer",
            "description": "When the scorer last recorded anything in this game, in milliseconds since 1 January 1970. Zero before the first entry."
          },
          "version": {
            "$ref": "#/components/schemas/Version"
          },
          "generatedAt": {
            "$ref": "#/components/schemas/GeneratedAt"
          }
        }
      },
      "HalfInning": {
        "type": "string",
        "enum": [
          "top",
          "bottom"
        ],
        "description": "Which half of the inning. The visiting team bats in the top, the home team in the bottom."
      },
      "MovementCause": {
        "type": "string",
        "enum": [
          "batted_ball",
          "forced",
          "fielders_choice",
          "stolen_base",
          "wild_pitch",
          "passed_ball",
          "balk",
          "illegal_pitch",
          "error",
          "defensive_indifference",
          "tagged",
          "caught_stealing",
          "picked_off",
          "interference",
          "appeal",
          "advanced"
        ],
        "description": "Why a runner moved. `advanced` is the scorer moving a runner without saying why: it credits nobody and charges nobody, and a run scored on it is earned."
      },
      "Movement": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "runner",
          "from",
          "to",
          "cause"
        ],
        "description": "One runner moving from one place to another on a single play.",
        "properties": {
          "runner": {
            "type": "string",
            "description": "The public id of the player who moved."
          },
          "from": {
            "enum": [
              "batter",
              1,
              2,
              3
            ],
            "description": "Where he started: `batter` at the plate, or the number of the base he was on."
          },
          "to": {
            "enum": [
              1,
              2,
              3,
              "home",
              "out"
            ],
            "description": "Where he finished: the number of the base he reached, `home` for a run, or `out`."
          },
          "cause": {
            "$ref": "#/components/schemas/MovementCause"
          }
        }
      },
      "BattedBall": {
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "ground",
          "hard_ground",
          "fly",
          "line",
          "pop",
          "bunt",
          null
        ],
        "description": "How the ball was hit. Null when nothing was hit, or when the scorer did not say."
      },
      "HitLocation": {
        "type": [
          "object",
          "null"
        ],
        "additionalProperties": false,
        "required": [
          "angle",
          "distance"
        ],
        "description": "Where the ball went, as the scorer dragged it. Null when nothing was hit, or when the scorer did not say. angle is degrees from straight-away centre field: negative toward the third-base line, positive toward the first-base line, so -45 and 45 are the foul lines, past 90 either way is behind home plate, and 180 or -180 is straight back. distance is the share of the way from home plate to the fence: 1 is the fence, above 1 is over it.",
        "properties": {
          "angle": {
            "type": "number",
            "description": "Degrees from centre field, from -180 to 180; the foul lines are -45 and 45, and past 90 either way is behind home plate."
          },
          "distance": {
            "type": "number",
            "description": "Share of the way from the plate to the fence; 1 is the fence."
          }
        }
      },
      "PlateAppearanceOutcome": {
        "type": "string",
        "enum": [
          "single",
          "double",
          "triple",
          "home_run",
          "walk",
          "intentional_walk",
          "hit_by_pitch",
          "strikeout",
          "dropped_third_strike_safe",
          "fielders_choice",
          "reached_on_error",
          "sacrifice_fly",
          "sacrifice_bunt",
          "ground_out",
          "fly_out",
          "line_out",
          "pop_out",
          "batter_out",
          "catcher_interference",
          "obstruction"
        ],
        "description": "How the turn at bat finished. `batter_out` is the umpire calling the batter out with nobody fielding anything, such as batting out of turn. `obstruction` is the batter awarded first because a fielder obstructed him: no at-bat, and an error on that fielder."
      },
      "Play": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "inning",
          "half",
          "batter",
          "outcome",
          "movements",
          "rbi",
          "outs",
          "battedBall",
          "hitLocation",
          "pitches"
        ],
        "description": "One completed turn at bat.",
        "properties": {
          "inning": {
            "type": "integer",
            "description": "The inning this play happened in."
          },
          "half": {
            "$ref": "#/components/schemas/HalfInning"
          },
          "batter": {
            "$ref": "#/components/schemas/PlayerRef"
          },
          "outcome": {
            "$ref": "#/components/schemas/PlateAppearanceOutcome"
          },
          "movements": {
            "type": "array",
            "description": "Every runner who moved on this play, the batter included.",
            "items": {
              "$ref": "#/components/schemas/Movement"
            }
          },
          "rbi": {
            "type": "integer",
            "description": "Runs batted in on this play alone."
          },
          "outs": {
            "type": "integer",
            "description": "Outs recorded on this play alone."
          },
          "battedBall": {
            "$ref": "#/components/schemas/BattedBall"
          },
          "hitLocation": {
            "$ref": "#/components/schemas/HitLocation"
          },
          "pitches": {
            "type": "array",
            "description": "What each pitch of this turn at bat did, in the order thrown. Empty when the pitches were not recorded.",
            "items": {
              "$ref": "#/components/schemas/PitchResult"
            }
          }
        }
      },
      "PitchResult": {
        "type": "string",
        "enum": [
          "ball",
          "strike",
          "strike_called",
          "strike_swinging",
          "foul",
          "foul_tip",
          "foul_bunt",
          "hit_by_pitch",
          "in_play"
        ],
        "description": "What one pitch did. A plain `strike` is a strike of unknown kind, written by every phone before 22 September 2026 and kept for ever."
      },
      "RunnerPlay": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "beforePlay",
          "inning",
          "half",
          "kind",
          "cause",
          "movements"
        ],
        "description": "A runner moving with no turn at bat: a steal, a pickoff, a wild pitch, a balk and the like.",
        "properties": {
          "beforePlay": {
            "type": "integer",
            "description": "The place of this move among the plays: the index in `plays` of the next turn at bat. It equals the length of `plays` when no turn at bat followed."
          },
          "inning": {
            "type": "integer",
            "description": "The inning this happened in."
          },
          "half": {
            "$ref": "#/components/schemas/HalfInning"
          },
          "kind": {
            "type": "string",
            "enum": [
              "runners.advanced",
              "runner.out"
            ],
            "description": "`runners.advanced` is one or more runners moving; `runner.out` is one runner put out."
          },
          "cause": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the runners moved, in the words of a movement cause, such as `stolen_base`, `caught_stealing`, `picked_off` or `wild_pitch`."
          },
          "movements": {
            "type": "array",
            "description": "Every runner who moved.",
            "items": {
              "$ref": "#/components/schemas/Movement"
            }
          },
          "runner": {
            "$ref": "#/components/schemas/PlayerRef",
            "description": "On `runner.out` only: the runner who was put out."
          }
        }
      },
      "Plays": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "plays",
          "runnerPlays",
          "lineupChanges",
          "version",
          "generatedAt"
        ],
        "description": "The play-by-play for one game.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The game's public id."
          },
          "plays": {
            "type": "array",
            "description": "Every completed turn at bat, first to last, with corrections applied.",
            "items": {
              "$ref": "#/components/schemas/Play"
            }
          },
          "runnerPlays": {
            "type": "array",
            "description": "Every move of runners that was not part of a turn at bat, first to last, with corrections applied. `beforePlay` says where each one falls among `plays`.",
            "items": {
              "$ref": "#/components/schemas/RunnerPlay"
            }
          },
          "lineupChanges": {
            "type": "array",
            "description": "Every change to the lineup, first to last, with corrections applied: substitutions, courtesy runners, tiebreaker runners and pitching changes. Empty when nobody came in.",
            "items": {
              "$ref": "#/components/schemas/LineupChange"
            }
          },
          "version": {
            "$ref": "#/components/schemas/Version"
          },
          "generatedAt": {
            "$ref": "#/components/schemas/GeneratedAt"
          }
        }
      },
      "BattingRow": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "name",
          "pa",
          "ab",
          "h",
          "r",
          "rbi",
          "bb",
          "k",
          "hbp",
          "sf",
          "sac",
          "doubles",
          "triples",
          "hr",
          "kLooking",
          "roe",
          "fc",
          "ci",
          "gidp",
          "lob",
          "pitchesSeen",
          "sb",
          "cs",
          "pickedOff",
          "groundBalls",
          "hardGroundBalls",
          "flyBalls",
          "lineDrives",
          "popUps",
          "bunts",
          "positions"
        ],
        "description": "One player's batting line.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The player's public id."
          },
          "name": {
            "type": "string",
            "description": "The player's name, shortened unless the key owns the roster."
          },
          "pa": {
            "type": "integer",
            "description": "Plate appearances: every turn at bat that finished, walks and hit batsmen included."
          },
          "ab": {
            "type": "integer",
            "description": "At-bats: the plate appearances that count towards a batting average."
          },
          "h": {
            "type": "integer",
            "description": "Hits."
          },
          "r": {
            "type": "integer",
            "description": "Runs scored."
          },
          "rbi": {
            "type": "integer",
            "description": "Runs batted in."
          },
          "bb": {
            "type": "integer",
            "description": "Walks, intentional ones included."
          },
          "k": {
            "type": "integer",
            "description": "Strikeouts."
          },
          "hbp": {
            "type": "integer",
            "description": "Times hit by a pitch."
          },
          "sf": {
            "type": "integer",
            "description": "Sacrifice flies."
          },
          "sac": {
            "type": "integer",
            "description": "Sacrifice bunts."
          },
          "doubles": {
            "type": "integer",
            "description": "Doubles."
          },
          "triples": {
            "type": "integer",
            "description": "Triples."
          },
          "hr": {
            "type": "integer",
            "description": "Home runs."
          },
          "kLooking": {
            "type": "integer",
            "description": "Strikeouts where the third strike was called, not swung at."
          },
          "roe": {
            "type": "integer",
            "description": "Times he reached base on a fielding error."
          },
          "fc": {
            "type": "integer",
            "description": "Times he reached base on a fielder's choice."
          },
          "ci": {
            "type": "integer",
            "description": "Times he reached base because the catcher interfered."
          },
          "gidp": {
            "type": "integer",
            "description": "Times he grounded into a double play."
          },
          "lob": {
            "type": "integer",
            "description": "Runners on base when his turn at bat ended in his own out, who did not score on it. A batter who reached base is charged none."
          },
          "pitchesSeen": {
            "type": "integer",
            "description": "Pitches thrown to him in this game."
          },
          "sb": {
            "type": "integer",
            "description": "Stolen bases."
          },
          "cs": {
            "type": "integer",
            "description": "Times caught stealing."
          },
          "pickedOff": {
            "type": "integer",
            "description": "Times picked off a base."
          },
          "groundBalls": {
            "type": "integer",
            "description": "Ground balls he hit."
          },
          "hardGroundBalls": {
            "type": "integer",
            "description": "Ground balls he hit hard. The scorer judges this one."
          },
          "flyBalls": {
            "type": "integer",
            "description": "Fly balls he hit."
          },
          "lineDrives": {
            "type": "integer",
            "description": "Line drives he hit."
          },
          "popUps": {
            "type": "integer",
            "description": "Pop-ups he hit."
          },
          "bunts": {
            "type": "integer",
            "description": "Bunts he put down."
          },
          "positions": {
            "type": "array",
            "description": "The positions he held in this game, the one he held longest first. When he has made no out in the field yet, the position he is listed at now; empty when he has none.",
            "items": {
              "$ref": "#/components/schemas/FieldingPosition"
            }
          }
        }
      },
      "PitchingRow": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "name",
          "outsRecorded",
          "h",
          "r",
          "er",
          "bb",
          "k",
          "hbp",
          "pitches",
          "strikes",
          "sbAllowed",
          "csAgainst",
          "pickoffs",
          "wp",
          "balks",
          "illegalPitches",
          "battersFaced",
          "abAgainst",
          "strikesCalled",
          "strikesSwinging",
          "firstPitchStrikes",
          "hrAllowed",
          "kLooking",
          "groundOuts",
          "airOuts"
        ],
        "description": "One player's pitching line.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The player's public id."
          },
          "name": {
            "type": "string",
            "description": "The player's name, shortened unless the key owns the roster."
          },
          "outsRecorded": {
            "type": "integer",
            "description": "Outs recorded while he pitched. Divide by three for innings pitched."
          },
          "h": {
            "type": "integer",
            "description": "Hits allowed."
          },
          "r": {
            "type": "integer",
            "description": "Runs allowed."
          },
          "er": {
            "type": "integer",
            "description": "Earned runs allowed. In a game still being played this can rise on a later play in the same half-inning: a run can be in `r` before it is in `er`."
          },
          "bb": {
            "type": "integer",
            "description": "Walks allowed."
          },
          "k": {
            "type": "integer",
            "description": "Strikeouts."
          },
          "hbp": {
            "type": "integer",
            "description": "Batters he hit with a pitch."
          },
          "pitches": {
            "type": "integer",
            "description": "Pitches thrown."
          },
          "strikes": {
            "type": "integer",
            "description": "Strikes thrown: every pitch but a ball and a hit batsman."
          },
          "sbAllowed": {
            "type": "integer",
            "description": "Bases stolen while he was on the mound."
          },
          "csAgainst": {
            "type": "integer",
            "description": "Runners caught stealing while he was on the mound."
          },
          "pickoffs": {
            "type": "integer",
            "description": "Runners he picked off."
          },
          "wp": {
            "type": "integer",
            "description": "Wild pitches."
          },
          "balks": {
            "type": "integer",
            "description": "Balks."
          },
          "illegalPitches": {
            "type": "integer",
            "description": "Illegal pitches."
          },
          "battersFaced": {
            "type": "integer",
            "description": "Batters faced."
          },
          "abAgainst": {
            "type": "integer",
            "description": "Batters faced that counted as an at-bat."
          },
          "strikesCalled": {
            "type": "integer",
            "description": "Pitches the umpire called a strike."
          },
          "strikesSwinging": {
            "type": "integer",
            "description": "Pitches the batter swung at, fouls included."
          },
          "firstPitchStrikes": {
            "type": "integer",
            "description": "Turns at bat he opened with anything but a ball or a hit batter."
          },
          "hrAllowed": {
            "type": "integer",
            "description": "Home runs allowed."
          },
          "kLooking": {
            "type": "integer",
            "description": "Strikeouts whose last pitch was called, not swung at."
          },
          "groundOuts": {
            "type": "integer",
            "description": "Ground-ball outs he recorded, a sacrifice bunt included."
          },
          "airOuts": {
            "type": "integer",
            "description": "Fly-ball, line-drive and pop-up outs he recorded."
          }
        }
      },
      "BattingSides": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "home",
          "away"
        ],
        "description": "Batting lines for both sides, each in batting order.",
        "properties": {
          "home": {
            "type": "array",
            "description": "The home team's batting lines.",
            "items": {
              "$ref": "#/components/schemas/BattingRow"
            }
          },
          "away": {
            "type": "array",
            "description": "The visiting team's batting lines.",
            "items": {
              "$ref": "#/components/schemas/BattingRow"
            }
          }
        }
      },
      "PitchingSides": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "home",
          "away"
        ],
        "description": "Pitching lines for both sides, each in the order the pitchers appeared.",
        "properties": {
          "home": {
            "type": "array",
            "description": "The home team's pitching lines.",
            "items": {
              "$ref": "#/components/schemas/PitchingRow"
            }
          },
          "away": {
            "type": "array",
            "description": "The visiting team's pitching lines.",
            "items": {
              "$ref": "#/components/schemas/PitchingRow"
            }
          }
        }
      },
      "Boxscore": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "batting",
          "pitching",
          "fielding",
          "version",
          "generatedAt"
        ],
        "description": "The box score for one game.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The game's public id."
          },
          "batting": {
            "$ref": "#/components/schemas/BattingSides"
          },
          "pitching": {
            "$ref": "#/components/schemas/PitchingSides"
          },
          "version": {
            "$ref": "#/components/schemas/Version"
          },
          "generatedAt": {
            "$ref": "#/components/schemas/GeneratedAt"
          },
          "fielding": {
            "$ref": "#/components/schemas/FieldingSides"
          }
        }
      },
      "LineupEntry": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "player",
          "battingOrder",
          "position"
        ],
        "description": "One place in a batting order.",
        "properties": {
          "player": {
            "type": "string",
            "description": "The player's public id."
          },
          "battingOrder": {
            "type": "integer",
            "description": "The slot in the batting order, counting from 1."
          },
          "position": {
            "$ref": "#/components/schemas/Position"
          }
        }
      },
      "TeamSideName": {
        "type": "string",
        "enum": [
          "home",
          "away"
        ],
        "description": "Which side of the game this is about."
      },
      "GameEvent": {
        "description": "One thing the scorer recorded. Read `type` first and branch on it. The list only ever gains members, so treat a type you do not know as something to skip.",
        "oneOf": [
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "homeLineup",
              "awayLineup",
              "startedAt"
            ],
            "description": "The game began, with both batting orders as they stood.",
            "properties": {
              "type": {
                "const": "game.started",
                "description": "The kind of entry."
              },
              "homeLineup": {
                "type": "array",
                "description": "The home team's batting order.",
                "items": {
                  "$ref": "#/components/schemas/LineupEntry"
                }
              },
              "awayLineup": {
                "type": "array",
                "description": "The visiting team's batting order.",
                "items": {
                  "$ref": "#/components/schemas/LineupEntry"
                }
              },
              "startedAt": {
                "type": "integer",
                "description": "When the game began, in milliseconds since 1 January 1970."
              },
              "ordersOpen": {
                "type": "boolean",
                "description": "True when neither batting order was settled at the start: each one goes back to the top only after the scorer says so. Absent on games started before 25 September 2026, where an order given at the start was settled at once."
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "inning",
              "half"
            ],
            "description": "A half inning began.",
            "properties": {
              "type": {
                "const": "half_inning.started",
                "description": "The kind of entry."
              },
              "inning": {
                "type": "integer",
                "description": "Which inning, counting from 1."
              },
              "half": {
                "$ref": "#/components/schemas/HalfInning"
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "cause"
            ],
            "description": "A half inning ended.",
            "properties": {
              "type": {
                "const": "half_inning.ended",
                "description": "The kind of entry."
              },
              "cause": {
                "type": "string",
                "enum": [
                  "three_outs",
                  "run_limit",
                  "time",
                  "other"
                ],
                "description": "Why it ended. Only `three_outs` happens by itself; the rest are a person's decision."
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "reason"
            ],
            "description": "The game ended. The scorer ends a game; nothing ends it automatically.",
            "properties": {
              "type": {
                "const": "game.ended",
                "description": "The kind of entry."
              },
              "reason": {
                "$ref": "#/components/schemas/EndReason"
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "side",
              "entries"
            ],
            "description": "A batting order was set or added to.",
            "properties": {
              "type": {
                "const": "lineup.set",
                "description": "The kind of entry."
              },
              "side": {
                "$ref": "#/components/schemas/TeamSideName"
              },
              "entries": {
                "type": "array",
                "description": "The slots being set.",
                "items": {
                  "$ref": "#/components/schemas/LineupEntry"
                }
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "side"
            ],
            "description": "The scorer said a batting order is settled, so the app stops asking who is up.",
            "properties": {
              "type": {
                "const": "batting_order.closed",
                "description": "The kind of entry."
              },
              "side": {
                "$ref": "#/components/schemas/TeamSideName"
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "side",
              "battingOrder"
            ],
            "description": "The scorer moved the batting order by hand, to say who is up.",
            "properties": {
              "type": {
                "const": "batting_cursor.moved",
                "description": "The kind of entry."
              },
              "side": {
                "$ref": "#/components/schemas/TeamSideName"
              },
              "battingOrder": {
                "type": "integer",
                "description": "The slot the order resumes at, counting from 1."
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "at"
            ],
            "description": "The league clock started. This is not the first pitch: a clock can start at the plate meeting.",
            "properties": {
              "type": {
                "const": "clock.started",
                "description": "The kind of entry."
              },
              "at": {
                "type": "integer",
                "description": "The time the scorer chose, in milliseconds since 1 January 1970."
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "at"
            ],
            "description": "The league clock stopped, for rain or anything else.",
            "properties": {
              "type": {
                "const": "clock.paused",
                "description": "The kind of entry."
              },
              "at": {
                "type": "integer",
                "description": "The time the scorer chose, in milliseconds since 1 January 1970."
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "at"
            ],
            "description": "The league clock started again.",
            "properties": {
              "type": {
                "const": "clock.resumed",
                "description": "The kind of entry."
              },
              "at": {
                "type": "integer",
                "description": "The time the scorer chose, in milliseconds since 1 January 1970."
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "startedAt"
            ],
            "description": "The scorer corrected when the league clock began.",
            "properties": {
              "type": {
                "const": "clock.adjusted",
                "description": "The kind of entry."
              },
              "startedAt": {
                "type": "integer",
                "description": "The corrected start, in milliseconds since 1 January 1970."
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "side",
              "out",
              "in",
              "battingOrder"
            ],
            "description": "One player came out and another went in.",
            "properties": {
              "type": {
                "const": "substitution.made",
                "description": "The kind of entry."
              },
              "side": {
                "$ref": "#/components/schemas/TeamSideName"
              },
              "out": {
                "type": "string",
                "description": "The public id of the player leaving."
              },
              "in": {
                "type": "string",
                "description": "The public id of the player arriving."
              },
              "battingOrder": {
                "type": "integer",
                "description": "The slot they share, counting from 1."
              },
              "position": {
                "$ref": "#/components/schemas/Position"
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "side",
              "pitcher"
            ],
            "description": "A new pitcher took the mound.",
            "properties": {
              "type": {
                "const": "pitching_change",
                "description": "The kind of entry."
              },
              "side": {
                "$ref": "#/components/schemas/TeamSideName"
              },
              "pitcher": {
                "type": "string",
                "description": "The public id of the pitcher going in."
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "side",
              "assignments"
            ],
            "description": "Fielders moved to new positions.",
            "properties": {
              "type": {
                "const": "defensive_change",
                "description": "The kind of entry."
              },
              "side": {
                "$ref": "#/components/schemas/TeamSideName"
              },
              "assignments": {
                "type": "array",
                "description": "Who now plays where.",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "player",
                    "position"
                  ],
                  "description": "One fielder's new position.",
                  "properties": {
                    "player": {
                      "type": "string",
                      "description": "The player's public id."
                    },
                    "position": {
                      "$ref": "#/components/schemas/Position"
                    }
                  }
                }
              },
              "tenthFielder": {
                "type": "boolean",
                "description": "Opens (true) or closes (false) the fourth outfield spot, SF, that some leagues allow at 8U and under. Opening it puts nobody there yet. Closing it takes whoever stood there off the field; that player keeps their place in the batting order. Absent on an ordinary move of fielders."
              },
              "withPitchingChange": {
                "type": "boolean",
                "description": "True when this move was recorded together with the pitching change before it: the player who takes the new pitcher's old position. It changes no number. Absent on every other move."
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "forPlayer",
              "runner",
              "base"
            ],
            "description": "A courtesy runner went in for a pitcher or a catcher.",
            "properties": {
              "type": {
                "const": "courtesy_runner.inserted",
                "description": "The kind of entry."
              },
              "forPlayer": {
                "type": "string",
                "description": "The public id of the player being run for."
              },
              "runner": {
                "type": "string",
                "description": "The public id of the runner going in."
              },
              "base": {
                "enum": [
                  1,
                  2,
                  3
                ],
                "description": "The base he takes over."
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "result"
            ],
            "description": "One pitch.",
            "properties": {
              "type": {
                "const": "pitch.thrown",
                "description": "The kind of entry."
              },
              "result": {
                "type": "string",
                "enum": [
                  "ball",
                  "strike",
                  "strike_called",
                  "strike_swinging",
                  "foul",
                  "foul_tip",
                  "foul_bunt",
                  "hit_by_pitch",
                  "in_play"
                ],
                "description": "What the pitch did. A plain `strike` is a strike of unknown kind, written by every phone before 22 September 2026 and kept for ever."
              },
              "battedBall": {
                "type": "string",
                "enum": [
                  "ground",
                  "hard_ground",
                  "fly",
                  "line",
                  "pop",
                  "bunt"
                ],
                "description": "On a foul only: how the ball was hit before it went foul. Absent when the scorer did not say. No number counts it."
              },
              "hitLocation": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "angle",
                  "distance"
                ],
                "description": "On a foul only: where the ball went, as the scorer dragged it. Absent when the scorer did not say. See `hitLocation` on a play for what the two numbers mean.",
                "properties": {
                  "angle": {
                    "type": "number",
                    "description": "Degrees from centre field, from -180 to 180; the foul lines are -45 and 45, and past 90 either way is behind home plate."
                  },
                  "distance": {
                    "type": "number",
                    "description": "Share of the way from the plate to the fence; 1 is the fence."
                  }
                }
              },
              "errorBy": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "P",
                  "C",
                  "1B",
                  "2B",
                  "3B",
                  "SS",
                  "LF",
                  "CF",
                  "RF",
                  "SF",
                  null
                ],
                "description": "On a foul only: the position charged with an error for a foul fly it dropped. Null when nobody could be named. Absent on a plain foul."
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "batter",
              "outcome",
              "movements"
            ],
            "description": "A turn at bat finished.",
            "properties": {
              "type": {
                "const": "plate_appearance.completed",
                "description": "The kind of entry."
              },
              "batter": {
                "type": "string",
                "description": "The public id of the batter."
              },
              "outcome": {
                "$ref": "#/components/schemas/PlateAppearanceOutcome"
              },
              "movements": {
                "type": "array",
                "description": "Every runner who moved, the batter included.",
                "items": {
                  "$ref": "#/components/schemas/Movement"
                }
              },
              "errorCharged": {
                "type": "string",
                "description": "The public id of the fielder charged with an error, when one was. Only one fielder can be named. Newer games name each error by position in `fielding.errors` instead."
              },
              "outReason": {
                "type": "string",
                "enum": [
                  "interference",
                  "out_of_order",
                  "illegal_action"
                ],
                "description": "Why the umpire called the batter out with nobody fielding anything. It changes no number."
              },
              "battedBall": {
                "type": "string",
                "enum": [
                  "ground",
                  "hard_ground",
                  "fly",
                  "line",
                  "pop",
                  "bunt"
                ],
                "description": "How the ball was hit, when the scorer said. An out already implies it."
              },
              "fielding": {
                "$ref": "#/components/schemas/FieldingCredit"
              },
              "hitLocation": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "angle",
                  "distance"
                ],
                "description": "Where the ball went, as the scorer dragged it. Absent when nothing was hit, or when the scorer did not say. See `hitLocation` on a play for what the two numbers mean.",
                "properties": {
                  "angle": {
                    "type": "number",
                    "description": "Degrees from centre field, from -180 to 180; the foul lines are -45 and 45, and past 90 either way is behind home plate."
                  },
                  "distance": {
                    "type": "number",
                    "description": "Share of the way from the plate to the fence; 1 is the fence."
                  }
                }
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "movements",
              "cause"
            ],
            "description": "Runners moved between turns at bat, such as a steal or a wild pitch.",
            "properties": {
              "type": {
                "const": "runners.advanced",
                "description": "The kind of entry."
              },
              "movements": {
                "type": "array",
                "description": "Every runner who moved.",
                "items": {
                  "$ref": "#/components/schemas/Movement"
                }
              },
              "cause": {
                "$ref": "#/components/schemas/MovementCause"
              },
              "errorBy": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "P",
                  "C",
                  "1B",
                  "2B",
                  "3B",
                  "SS",
                  "LF",
                  "CF",
                  "RF",
                  "SF",
                  null
                ],
                "description": "Read only when `cause` is `error`: the position charged with the error. Null when nobody could be named."
              },
              "wouldHaveBeenOut": {
                "type": "boolean",
                "description": "Read only when `cause` is `error`: true when the error saved the lead runner from an out, such as a dropped throw that had him beaten. Absent when the error only let him take a base."
              },
              "fielding": {
                "$ref": "#/components/schemas/FieldingCredit"
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "runner",
              "base",
              "cause"
            ],
            "description": "A runner was put out between turns at bat.",
            "properties": {
              "type": {
                "const": "runner.out",
                "description": "The kind of entry."
              },
              "runner": {
                "type": "string",
                "description": "The public id of the runner."
              },
              "base": {
                "enum": [
                  "batter",
                  1,
                  2,
                  3
                ],
                "description": "Where he was when it happened."
              },
              "cause": {
                "$ref": "#/components/schemas/MovementCause"
              },
              "fielding": {
                "$ref": "#/components/schemas/FieldingCredit"
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "runner",
              "base"
            ],
            "description": "A runner was placed on a base by the scorer, most often the extra-innings runner on second. He is recorded, never conjured, so a run he scores comes from something the record holds.",
            "properties": {
              "type": {
                "const": "tiebreaker_runner.placed",
                "description": "The kind of entry."
              },
              "runner": {
                "type": "string",
                "description": "The public id of the runner."
              },
              "base": {
                "type": "integer",
                "enum": [
                  1,
                  2,
                  3
                ],
                "description": "The base he was placed on: 1, 2 or 3. Second for an extra-innings tiebreaker runner."
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "runs"
            ],
            "description": "Runs recorded in a scoreboard-only game. They go to whichever side is batting.",
            "properties": {
              "type": {
                "const": "runs.recorded",
                "description": "The kind of entry."
              },
              "runs": {
                "type": "integer",
                "description": "How many runs, always a positive whole number."
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type"
            ],
            "description": "One out recorded in a scoreboard-only game.",
            "properties": {
              "type": {
                "const": "out.recorded",
                "description": "The kind of entry."
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type"
            ],
            "description": "The scorer set the board by hand to match the scoreboard on the fence. Every field is a target, never a change to add on. At least one field is always set.",
            "properties": {
              "type": {
                "const": "board.corrected",
                "description": "The kind of entry."
              },
              "score": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "home",
                  "away"
                ],
                "description": "The score as the fence shows it.",
                "properties": {
                  "home": {
                    "type": "integer",
                    "description": "The home team's runs."
                  },
                  "away": {
                    "type": "integer",
                    "description": "The visiting team's runs."
                  }
                }
              },
              "inning": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "inning",
                  "half"
                ],
                "description": "Which half inning the game is really in.",
                "properties": {
                  "inning": {
                    "type": "integer",
                    "description": "The inning, counting from 1."
                  },
                  "half": {
                    "$ref": "#/components/schemas/HalfInning"
                  }
                }
              },
              "outs": {
                "type": "integer",
                "description": "How many outs there really are."
              },
              "count": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "balls",
                  "strikes"
                ],
                "description": "The count on the batter.",
                "properties": {
                  "balls": {
                    "type": "integer",
                    "description": "Balls."
                  },
                  "strikes": {
                    "type": "integer",
                    "description": "Strikes."
                  }
                }
              },
              "bases": {
                "type": "object",
                "additionalProperties": false,
                "description": "Who is on each base, by public id, or null for empty. Runners are named so that a run one of them scores is credited to a real child.",
                "properties": {
                  "1": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The runner on first, or null."
                  },
                  "2": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The runner on second, or null."
                  },
                  "3": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The runner on third, or null."
                  }
                }
              },
              "note": {
                "type": "string",
                "description": "Reserved. Nothing writes it today."
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "mode"
            ],
            "description": "The game changed between full scoring and scoreboard-only scoring.",
            "properties": {
              "type": {
                "const": "scoring_mode.changed",
                "description": "The kind of entry."
              },
              "mode": {
                "type": "string",
                "enum": [
                  "full",
                  "scoreboard"
                ],
                "description": "The mode from this point on."
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "throughSequence"
            ],
            "description": "The scorer took the game back to an earlier point. Each entry recorded after `throughSequence` and before this one is void, except a correction to an entry at or before `throughSequence`. Every void entry is still in this list: nothing is ever deleted.",
            "properties": {
              "type": {
                "const": "rewind.to",
                "description": "The kind of entry."
              },
              "throughSequence": {
                "type": "integer",
                "description": "The last entry that still counts. Every later entry, up to this one, is void. A correction is judged by the entry it replaces, not by its own number: when that entry is at or before this number, the correction still counts."
              },
              "reason": {
                "type": "string",
                "description": "What the scorer said about it, when they said anything."
              }
            }
          }
        ]
      },
      "LoggedEvent": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "sequence",
          "event",
          "recordedAt",
          "scorer"
        ],
        "description": "One entry in the raw record.",
        "properties": {
          "sequence": {
            "type": "integer",
            "description": "This entry's number in the game, counting up and never reused. Other entries point at it by this number."
          },
          "event": {
            "$ref": "#/components/schemas/GameEvent"
          },
          "recordedAt": {
            "type": "integer",
            "description": "When the scorer recorded it, in milliseconds since 1 January 1970."
          },
          "scorer": {
            "type": "integer",
            "description": "Which scorer recorded it, numbered 1, 2, 3 within this game in the order they first appear. It names nobody: we do not publish who kept the book."
          },
          "supersedes": {
            "type": "integer",
            "description": "The `sequence` of the entry this one replaces, when it is a correction. The correction takes the place of that entry in the order of the game. The replaced entry stays in the list; drop it yourself when you rebuild the game. A correction can itself be replaced; follow the chain to the newest one."
          }
        }
      },
      "Events": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "events",
          "version",
          "generatedAt"
        ],
        "description": "The raw record for one game.",
        "properties": {
          "events": {
            "type": "array",
            "description": "Every entry, in the order it was recorded, including the ones a correction replaced and the ones a rewind took back.",
            "items": {
              "$ref": "#/components/schemas/LoggedEvent"
            }
          },
          "version": {
            "$ref": "#/components/schemas/Version"
          },
          "generatedAt": {
            "$ref": "#/components/schemas/GeneratedAt"
          }
        }
      },
      "BattingLine": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "pa",
          "ab",
          "h",
          "r",
          "rbi",
          "bb",
          "k",
          "hbp",
          "sf",
          "sac",
          "doubles",
          "triples",
          "hr",
          "kLooking",
          "roe",
          "fc",
          "ci",
          "gidp",
          "lob",
          "pitchesSeen",
          "sb",
          "cs",
          "pickedOff",
          "groundBalls",
          "hardGroundBalls",
          "flyBalls",
          "lineDrives",
          "popUps",
          "bunts"
        ],
        "description": "One player's batting numbers, added up over whatever games the line covers.",
        "properties": {
          "pa": {
            "type": "integer",
            "description": "Plate appearances: every turn at bat that finished, walks and hit batsmen included."
          },
          "ab": {
            "type": "integer",
            "description": "At-bats: the plate appearances that count towards a batting average."
          },
          "h": {
            "type": "integer",
            "description": "Hits."
          },
          "r": {
            "type": "integer",
            "description": "Runs scored."
          },
          "rbi": {
            "type": "integer",
            "description": "Runs batted in."
          },
          "bb": {
            "type": "integer",
            "description": "Walks, intentional ones included."
          },
          "k": {
            "type": "integer",
            "description": "Strikeouts."
          },
          "hbp": {
            "type": "integer",
            "description": "Times hit by a pitch."
          },
          "sf": {
            "type": "integer",
            "description": "Sacrifice flies."
          },
          "sac": {
            "type": "integer",
            "description": "Sacrifice bunts."
          },
          "doubles": {
            "type": "integer",
            "description": "Doubles."
          },
          "triples": {
            "type": "integer",
            "description": "Triples."
          },
          "hr": {
            "type": "integer",
            "description": "Home runs."
          },
          "kLooking": {
            "type": "integer",
            "description": "Strikeouts where the third strike was called, not swung at."
          },
          "roe": {
            "type": "integer",
            "description": "Times he reached base on a fielding error."
          },
          "fc": {
            "type": "integer",
            "description": "Times he reached base on a fielder's choice."
          },
          "ci": {
            "type": "integer",
            "description": "Times he reached base because the catcher interfered."
          },
          "gidp": {
            "type": "integer",
            "description": "Times he grounded into a double play."
          },
          "lob": {
            "type": "integer",
            "description": "Runners on base when his turn at bat ended in his own out, who did not score on it. A batter who reached base is charged none."
          },
          "pitchesSeen": {
            "type": "integer",
            "description": "Pitches thrown to him in this game."
          },
          "sb": {
            "type": "integer",
            "description": "Stolen bases."
          },
          "cs": {
            "type": "integer",
            "description": "Times caught stealing."
          },
          "pickedOff": {
            "type": "integer",
            "description": "Times picked off a base."
          },
          "groundBalls": {
            "type": "integer",
            "description": "Ground balls he hit."
          },
          "hardGroundBalls": {
            "type": "integer",
            "description": "Ground balls he hit hard. The scorer judges this one."
          },
          "flyBalls": {
            "type": "integer",
            "description": "Fly balls he hit."
          },
          "lineDrives": {
            "type": "integer",
            "description": "Line drives he hit."
          },
          "popUps": {
            "type": "integer",
            "description": "Pop-ups he hit."
          },
          "bunts": {
            "type": "integer",
            "description": "Bunts he put down."
          }
        }
      },
      "PitchingLine": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "outsRecorded",
          "h",
          "r",
          "er",
          "bb",
          "k",
          "hbp",
          "pitches",
          "strikes",
          "sbAllowed",
          "csAgainst",
          "pickoffs",
          "wp",
          "balks",
          "illegalPitches",
          "battersFaced",
          "abAgainst",
          "strikesCalled",
          "strikesSwinging",
          "firstPitchStrikes",
          "hrAllowed",
          "kLooking",
          "groundOuts",
          "airOuts"
        ],
        "description": "One player's pitching numbers, added up over whatever games the line covers.",
        "properties": {
          "outsRecorded": {
            "type": "integer",
            "description": "Outs recorded while he pitched. Divide by three for innings pitched."
          },
          "h": {
            "type": "integer",
            "description": "Hits allowed."
          },
          "r": {
            "type": "integer",
            "description": "Runs allowed."
          },
          "er": {
            "type": "integer",
            "description": "Earned runs allowed."
          },
          "bb": {
            "type": "integer",
            "description": "Walks allowed."
          },
          "k": {
            "type": "integer",
            "description": "Strikeouts."
          },
          "hbp": {
            "type": "integer",
            "description": "Batters he hit with a pitch."
          },
          "pitches": {
            "type": "integer",
            "description": "Pitches thrown."
          },
          "strikes": {
            "type": "integer",
            "description": "Strikes thrown: every pitch but a ball and a hit batsman."
          },
          "sbAllowed": {
            "type": "integer",
            "description": "Bases stolen while he was on the mound."
          },
          "csAgainst": {
            "type": "integer",
            "description": "Runners caught stealing while he was on the mound."
          },
          "pickoffs": {
            "type": "integer",
            "description": "Runners he picked off."
          },
          "wp": {
            "type": "integer",
            "description": "Wild pitches."
          },
          "balks": {
            "type": "integer",
            "description": "Balks."
          },
          "illegalPitches": {
            "type": "integer",
            "description": "Illegal pitches."
          },
          "battersFaced": {
            "type": "integer",
            "description": "Batters faced."
          },
          "abAgainst": {
            "type": "integer",
            "description": "Batters faced that counted as an at-bat."
          },
          "strikesCalled": {
            "type": "integer",
            "description": "Pitches the umpire called a strike."
          },
          "strikesSwinging": {
            "type": "integer",
            "description": "Pitches the batter swung at, fouls included."
          },
          "firstPitchStrikes": {
            "type": "integer",
            "description": "Turns at bat he opened with anything but a ball or a hit batter."
          },
          "hrAllowed": {
            "type": "integer",
            "description": "Home runs allowed."
          },
          "kLooking": {
            "type": "integer",
            "description": "Strikeouts whose last pitch was called, not swung at."
          },
          "groundOuts": {
            "type": "integer",
            "description": "Ground-ball outs he recorded, a sacrifice bunt included."
          },
          "airOuts": {
            "type": "integer",
            "description": "Fly-ball, line-drive and pop-up outs he recorded."
          }
        }
      },
      "PitchingLineWithInnings": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "outsRecorded",
          "h",
          "r",
          "er",
          "bb",
          "k",
          "hbp",
          "pitches",
          "strikes",
          "sbAllowed",
          "csAgainst",
          "pickoffs",
          "wp",
          "balks",
          "illegalPitches",
          "battersFaced",
          "abAgainst",
          "strikesCalled",
          "strikesSwinging",
          "firstPitchStrikes",
          "hrAllowed",
          "kLooking",
          "groundOuts",
          "airOuts",
          "ip"
        ],
        "description": "A pitching line with its innings-pitched figure already written out.",
        "properties": {
          "outsRecorded": {
            "type": "integer",
            "description": "Outs recorded while he pitched. Divide by three for innings pitched."
          },
          "h": {
            "type": "integer",
            "description": "Hits allowed."
          },
          "r": {
            "type": "integer",
            "description": "Runs allowed."
          },
          "er": {
            "type": "integer",
            "description": "Earned runs allowed."
          },
          "bb": {
            "type": "integer",
            "description": "Walks allowed."
          },
          "k": {
            "type": "integer",
            "description": "Strikeouts."
          },
          "hbp": {
            "type": "integer",
            "description": "Batters he hit with a pitch."
          },
          "pitches": {
            "type": "integer",
            "description": "Pitches thrown."
          },
          "strikes": {
            "type": "integer",
            "description": "Strikes thrown: every pitch but a ball and a hit batsman."
          },
          "sbAllowed": {
            "type": "integer",
            "description": "Bases stolen while he was on the mound."
          },
          "csAgainst": {
            "type": "integer",
            "description": "Runners caught stealing while he was on the mound."
          },
          "pickoffs": {
            "type": "integer",
            "description": "Runners he picked off."
          },
          "wp": {
            "type": "integer",
            "description": "Wild pitches."
          },
          "balks": {
            "type": "integer",
            "description": "Balks."
          },
          "illegalPitches": {
            "type": "integer",
            "description": "Illegal pitches."
          },
          "battersFaced": {
            "type": "integer",
            "description": "Batters faced."
          },
          "abAgainst": {
            "type": "integer",
            "description": "Batters faced that counted as an at-bat."
          },
          "strikesCalled": {
            "type": "integer",
            "description": "Pitches the umpire called a strike."
          },
          "strikesSwinging": {
            "type": "integer",
            "description": "Pitches the batter swung at, fouls included."
          },
          "firstPitchStrikes": {
            "type": "integer",
            "description": "Turns at bat he opened with anything but a ball or a hit batter."
          },
          "hrAllowed": {
            "type": "integer",
            "description": "Home runs allowed."
          },
          "kLooking": {
            "type": "integer",
            "description": "Strikeouts whose last pitch was called, not swung at."
          },
          "groundOuts": {
            "type": "integer",
            "description": "Ground-ball outs he recorded, a sacrifice bunt included."
          },
          "airOuts": {
            "type": "integer",
            "description": "Fly-ball, line-drive and pop-up outs he recorded."
          },
          "ip": {
            "type": "string",
            "description": "Innings pitched, written the way a scoreboard writes them: `2.1` is two innings and one out."
          }
        }
      },
      "BattingRates": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "avg",
          "obp",
          "slg",
          "ops",
          "sbPct",
          "bbPerK",
          "pitchesPerPa"
        ],
        "description": "Batting rates worked out from the line beside them. Each one is null when it has no denominator — a player with no at-bats has no average, and null is the honest answer rather than .000.",
        "properties": {
          "avg": {
            "type": [
              "number",
              "null"
            ],
            "description": "Batting average: hits divided by at-bats."
          },
          "obp": {
            "type": [
              "number",
              "null"
            ],
            "description": "On-base percentage: hits, walks and hit batsmen over at-bats, walks, hit batsmen and sacrifice flies."
          },
          "slg": {
            "type": [
              "number",
              "null"
            ],
            "description": "Slugging: total bases divided by at-bats."
          },
          "ops": {
            "type": [
              "number",
              "null"
            ],
            "description": "On-base plus slugging."
          },
          "sbPct": {
            "type": [
              "number",
              "null"
            ],
            "description": "Share of steal attempts that were successful."
          },
          "bbPerK": {
            "type": [
              "number",
              "null"
            ],
            "description": "Walks per strikeout."
          },
          "pitchesPerPa": {
            "type": [
              "number",
              "null"
            ],
            "description": "Pitches seen per turn at bat."
          }
        }
      },
      "PitchingRates": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "era",
          "whip",
          "kPerBb",
          "strikePct",
          "fpsPct",
          "pitchesPerInning",
          "pitchesPerBatter",
          "baa"
        ],
        "description": "Pitching rates worked out from the line beside them. Each one is null when it has no denominator.",
        "properties": {
          "era": {
            "type": [
              "number",
              "null"
            ],
            "description": "Earned run average, per regulation game rather than per nine innings. `regulationInnings` says how long a regulation game is here."
          },
          "whip": {
            "type": [
              "number",
              "null"
            ],
            "description": "Walks and hits per inning pitched."
          },
          "kPerBb": {
            "type": [
              "number",
              "null"
            ],
            "description": "Strikeouts per walk."
          },
          "strikePct": {
            "type": [
              "number",
              "null"
            ],
            "description": "Share of pitches that were strikes."
          },
          "fpsPct": {
            "type": [
              "number",
              "null"
            ],
            "description": "Share of batters whose first pitch was a strike."
          },
          "pitchesPerInning": {
            "type": [
              "number",
              "null"
            ],
            "description": "Pitches thrown per inning pitched."
          },
          "pitchesPerBatter": {
            "type": [
              "number",
              "null"
            ],
            "description": "Pitches thrown per batter faced."
          },
          "baa": {
            "type": [
              "number",
              "null"
            ],
            "description": "Batting average against."
          }
        }
      },
      "SeasonRecord": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "wins",
          "losses",
          "ties",
          "countingGames",
          "excludedGames"
        ],
        "description": "A team's won-lost record over the games that count, and what was left out.",
        "properties": {
          "wins": {
            "type": "integer",
            "description": "Games won. Only games that are final are counted."
          },
          "losses": {
            "type": "integer",
            "description": "Games lost."
          },
          "ties": {
            "type": "integer",
            "description": "Games that finished level."
          },
          "countingGames": {
            "type": "integer",
            "description": "Games in these totals: every game that has started and that the team has not switched off. A game in progress is one of these and is not yet a win, a loss or a tie, so this can be greater than `wins` + `losses` + `ties`."
          },
          "excludedGames": {
            "type": "integer",
            "description": "Games played that the team switched off, so they are in no total here. A game still on the schedule is not one of these."
          }
        }
      },
      "SeasonBattingRow": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "playerPublicId",
          "name",
          "gp",
          "line",
          "rates"
        ],
        "description": "One player's batting for the season.",
        "properties": {
          "playerPublicId": {
            "type": "string",
            "description": "The player's public id, as `plyr_…`."
          },
          "name": {
            "type": "string",
            "description": "The player's name, shortened unless the key owns the roster."
          },
          "number": {
            "type": "string",
            "description": "The jersey number, as text. Absent when the team never gave one."
          },
          "gp": {
            "type": "integer",
            "description": "Games in which this player had a turn at bat."
          },
          "line": {
            "$ref": "#/components/schemas/BattingLine"
          },
          "rates": {
            "$ref": "#/components/schemas/BattingRates"
          }
        }
      },
      "SeasonPitchingRow": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "playerPublicId",
          "name",
          "gp",
          "ip",
          "line",
          "rates"
        ],
        "description": "One player's pitching for the season.",
        "properties": {
          "playerPublicId": {
            "type": "string",
            "description": "The player's public id, as `plyr_…`."
          },
          "name": {
            "type": "string",
            "description": "The player's name, shortened unless the key owns the roster."
          },
          "number": {
            "type": "string",
            "description": "The jersey number, as text. Absent when the team never gave one."
          },
          "gp": {
            "type": "integer",
            "description": "Games in which this player pitched."
          },
          "ip": {
            "type": "string",
            "description": "Innings pitched, written the way a scoreboard writes them: `2.1` is two innings and one out."
          },
          "line": {
            "$ref": "#/components/schemas/PitchingLine"
          },
          "rates": {
            "$ref": "#/components/schemas/PitchingRates"
          }
        }
      },
      "SeasonGame": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "gamePublicId",
          "opponentName",
          "opponentAgeGroup",
          "scheduledAt"
        ],
        "description": "One game that counts towards this season's totals.",
        "properties": {
          "gamePublicId": {
            "type": "string",
            "description": "The game's public id, as `game_…`. Read the game itself at `/v1/games/{gameId}`."
          },
          "opponentName": {
            "type": "string",
            "description": "Who the team played, frozen onto the game when it was created."
          },
          "opponentAgeGroup": {
            "type": [
              "string",
              "null"
            ],
            "description": "The opponent's age group when the opponent is a listed team. Null when the opponent was typed in by hand."
          },
          "scheduledAt": {
            "type": [
              "integer",
              "null"
            ],
            "description": "When the game was scheduled, in milliseconds since 1 January 1970. Null when no date was ever set."
          }
        }
      },
      "TeamSeason": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "teamName",
          "season",
          "record",
          "batting",
          "pitching",
          "fielding",
          "regulationInnings",
          "games",
          "version",
          "generatedAt"
        ],
        "description": "A team's season: its record, and every batter and pitcher who has appeared, added up across every game that counts.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The team's public id."
          },
          "teamName": {
            "type": "string",
            "description": "The team's name."
          },
          "season": {
            "type": "string",
            "description": "The season this team plays, as the team wrote it — `Spring 2026`."
          },
          "record": {
            "$ref": "#/components/schemas/SeasonRecord"
          },
          "batting": {
            "type": "array",
            "description": "Every player who has had a turn at bat, in the team's own roster order.",
            "items": {
              "$ref": "#/components/schemas/SeasonBattingRow"
            }
          },
          "pitching": {
            "type": "array",
            "description": "Every player who has pitched, in the team's own roster order.",
            "items": {
              "$ref": "#/components/schemas/SeasonPitchingRow"
            }
          },
          "regulationInnings": {
            "type": "integer",
            "description": "How long a regulation game is for this team, taken from the rules of its most recent game that counts. Earned run average is per regulation game, so this is the number it is scaled by."
          },
          "games": {
            "type": "array",
            "description": "The games in these totals, newest first.",
            "items": {
              "$ref": "#/components/schemas/SeasonGame"
            }
          },
          "version": {
            "$ref": "#/components/schemas/Version"
          },
          "generatedAt": {
            "$ref": "#/components/schemas/GeneratedAt"
          },
          "fielding": {
            "type": "array",
            "description": "Every player who has taken the field, in the team's own roster order.",
            "items": {
              "$ref": "#/components/schemas/SeasonFieldingRow"
            }
          }
        }
      },
      "PlayerGame": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "gamePublicId",
          "scheduledAt",
          "opponentName",
          "counts",
          "status",
          "result",
          "batting",
          "pitching",
          "fielding"
        ],
        "description": "One game in a player's log: this player's own line from that game, unaltered.",
        "properties": {
          "gamePublicId": {
            "type": "string",
            "description": "The game's public id, as `game_…`."
          },
          "scheduledAt": {
            "type": [
              "integer",
              "null"
            ],
            "description": "When the game was scheduled, in milliseconds since 1 January 1970. Null when no date was ever set."
          },
          "opponentName": {
            "type": "string",
            "description": "Who the team played."
          },
          "counts": {
            "type": "boolean",
            "description": "Whether this game is in the totals above it. A game the team switched off still appears here."
          },
          "status": {
            "$ref": "#/components/schemas/GameStatus"
          },
          "result": {
            "type": [
              "string",
              "null"
            ],
            "description": "How the game finished, from this team's side — `W 7–3`. Null until the game is final."
          },
          "batting": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BattingLine"
              },
              {
                "type": "null"
              }
            ],
            "description": "This player's batting in that game. Null when this player did not bat."
          },
          "pitching": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PitchingLineWithInnings"
              },
              {
                "type": "null"
              }
            ],
            "description": "This player's pitching in that game. Null when this player did not pitch."
          },
          "fielding": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FieldingLine"
              },
              {
                "type": "null"
              }
            ],
            "description": "This player's fielding in that game. Null when he did not take the field."
          }
        }
      },
      "PlayerSeason": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "teamPublicId",
          "teamName",
          "season",
          "canOpenGames",
          "gp",
          "batting",
          "battingRates",
          "pitching",
          "pitchingRates",
          "log",
          "fielding",
          "positions"
        ],
        "description": "One season, for one team, for one player: its totals and its game log.",
        "properties": {
          "teamPublicId": {
            "type": "string",
            "description": "The team's public id for this season."
          },
          "teamName": {
            "type": "string",
            "description": "That team's name."
          },
          "season": {
            "type": "string",
            "description": "That season, as the team wrote it — `Spring 2026`."
          },
          "canOpenGames": {
            "type": "boolean",
            "description": "Whether the games in this block can be read with this key. False when that team's Data API is off, in which case `/v1/games/{gameId}` refuses them and a site should print the log row rather than link it."
          },
          "gp": {
            "type": "integer",
            "description": "Games in this block's totals."
          },
          "batting": {
            "$ref": "#/components/schemas/BattingLine"
          },
          "battingRates": {
            "$ref": "#/components/schemas/BattingRates"
          },
          "pitching": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PitchingLineWithInnings"
              },
              {
                "type": "null"
              }
            ],
            "description": "This player's pitching across the block. Null when this player never pitched."
          },
          "pitchingRates": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PitchingRates"
              },
              {
                "type": "null"
              }
            ],
            "description": "Rates for the pitching line beside it. Null when this player never pitched."
          },
          "log": {
            "type": "array",
            "description": "Every game this player appeared in, newest first, whether or not it counts.",
            "items": {
              "$ref": "#/components/schemas/PlayerGame"
            }
          },
          "fielding": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FieldingWithRates"
              },
              {
                "type": "null"
              }
            ],
            "description": "This player's fielding across the block. Null when he never took the field."
          },
          "positions": {
            "type": "array",
            "description": "Innings at each position he played. Empty when he never took the field.",
            "items": {
              "$ref": "#/components/schemas/PositionInnings"
            }
          }
        }
      },
      "PlayerCareer": {
        "type": [
          "object",
          "null"
        ],
        "additionalProperties": false,
        "required": [
          "gp",
          "batting",
          "battingRates",
          "pitching",
          "pitchingRates",
          "fielding",
          "positions"
        ],
        "description": "Always null since 28 September 2026. A key reads the season of its own team only, so there is no total across teams. The field stays so that the shape of the answer does not change.",
        "properties": {
          "gp": {
            "type": "integer",
            "description": "Games in this total."
          },
          "batting": {
            "$ref": "#/components/schemas/BattingLine"
          },
          "battingRates": {
            "$ref": "#/components/schemas/BattingRates"
          },
          "pitching": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PitchingLineWithInnings"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pitching across the career. Null when this player never pitched."
          },
          "pitchingRates": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PitchingRates"
              },
              {
                "type": "null"
              }
            ],
            "description": "Rates for the pitching line beside it. Null when this player never pitched."
          },
          "fielding": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FieldingWithRates"
              },
              {
                "type": "null"
              }
            ],
            "description": "This player's fielding across the block. Null when he never took the field."
          },
          "positions": {
            "type": "array",
            "description": "Innings at each position he played. Empty when he never took the field.",
            "items": {
              "$ref": "#/components/schemas/PositionInnings"
            }
          }
        }
      },
      "Player": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "player",
          "current",
          "previous",
          "career",
          "version",
          "generatedAt"
        ],
        "description": "One player: this season on this team, any previous seasons the same account has linked to the same child, and a career line across them.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The player's public id."
          },
          "player": {
            "$ref": "#/components/schemas/RosterPlayer"
          },
          "current": {
            "$ref": "#/components/schemas/PlayerSeason"
          },
          "previous": {
            "type": "array",
            "description": "Always an empty list since 28 September 2026. A key reads the season of its own team only, so a child's season on another team is never sent here. The field stays so that the shape of the answer does not change.",
            "items": {
              "$ref": "#/components/schemas/PlayerSeason"
            }
          },
          "career": {
            "$ref": "#/components/schemas/PlayerCareer"
          },
          "version": {
            "$ref": "#/components/schemas/Version"
          },
          "generatedAt": {
            "$ref": "#/components/schemas/GeneratedAt"
          }
        }
      },
      "FieldingPosition": {
        "type": "string",
        "enum": [
          "P",
          "C",
          "1B",
          "2B",
          "3B",
          "SS",
          "LF",
          "CF",
          "RF",
          "SF"
        ],
        "description": "A position on the field that can make a play. `SF` is a short fielder, the fourth outfielder some leagues allow."
      },
      "FieldingCredit": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "putouts",
          "assists",
          "errors"
        ],
        "description": "Which fielders made the play, by position. Find the player at a position from the lineup and the moves of fielders recorded before this entry.",
        "properties": {
          "putouts": {
            "type": "array",
            "description": "The position that made each out on this play, one entry for each out, in order.",
            "items": {
              "$ref": "#/components/schemas/FieldingPosition"
            }
          },
          "assists": {
            "type": "array",
            "description": "Each position credited with an assist on this play.",
            "items": {
              "$ref": "#/components/schemas/FieldingPosition"
            }
          },
          "errors": {
            "type": "array",
            "description": "Each error on this play, by the position charged. An entry is null when the scorer saw an error and could not say who made it. Empty when there was no error.",
            "items": {
              "type": [
                "string",
                "null"
              ],
              "enum": [
                "P",
                "C",
                "1B",
                "2B",
                "3B",
                "SS",
                "LF",
                "CF",
                "RF",
                "SF",
                null
              ]
            }
          },
          "errorAfterPutouts": {
            "type": "array",
            "description": "Where each error fell in the play: for each entry in `errors`, how many of this play's outs were made before it. Absent when the scorer did not say, and then no error is read as between two outs.",
            "items": {
              "type": "integer"
            }
          }
        }
      },
      "FieldingLine": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "po",
          "a",
          "e",
          "dp",
          "tp",
          "pb",
          "sbAllowed",
          "cs",
          "outsInField",
          "outsAt"
        ],
        "description": "One player's fielding line, counted by the scorer's recorded plays.",
        "properties": {
          "po": {
            "type": "integer",
            "description": "Putouts."
          },
          "a": {
            "type": "integer",
            "description": "Assists."
          },
          "e": {
            "type": "integer",
            "description": "Errors."
          },
          "dp": {
            "type": "integer",
            "description": "Double plays on which he had a putout or an assist."
          },
          "tp": {
            "type": "integer",
            "description": "Triple plays on which he had a putout or an assist."
          },
          "pb": {
            "type": "integer",
            "description": "Passed balls while he was the catcher."
          },
          "sbAllowed": {
            "type": "integer",
            "description": "Bases stolen while he was the catcher."
          },
          "cs": {
            "type": "integer",
            "description": "Runners caught stealing while he was the catcher."
          },
          "outsInField": {
            "type": "integer",
            "description": "Outs recorded while he held a fielding position. Divide by three for innings in the field."
          },
          "outsAt": {
            "type": "object",
            "description": "The same outs, split by the position he held when each was made. A position he never held is absent.",
            "additionalProperties": {
              "type": "integer",
              "description": "Outs recorded while he held this position."
            }
          }
        }
      },
      "FieldingRates": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "fpct"
        ],
        "description": "Rates worked out from the fielding line beside them.",
        "properties": {
          "fpct": {
            "type": [
              "number",
              "null"
            ],
            "description": "Fielding percentage: putouts plus assists, divided by those plus errors. Null when he had no chances."
          }
        }
      },
      "FieldingRow": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "name",
          "positions",
          "po",
          "a",
          "e",
          "dp",
          "tp",
          "pb",
          "sbAllowed",
          "cs",
          "outsInField",
          "outsAt"
        ],
        "description": "One player's fielding line in one game. A player who took the field and had no chances still has a row when he played an inning.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The player's public id."
          },
          "name": {
            "type": "string",
            "description": "The player's name, shortened unless the key owns the roster."
          },
          "positions": {
            "type": "array",
            "description": "The positions he held in this game, the one he held longest first.",
            "items": {
              "$ref": "#/components/schemas/FieldingPosition"
            }
          },
          "po": {
            "type": "integer",
            "description": "Putouts."
          },
          "a": {
            "type": "integer",
            "description": "Assists."
          },
          "e": {
            "type": "integer",
            "description": "Errors."
          },
          "dp": {
            "type": "integer",
            "description": "Double plays on which he had a putout or an assist."
          },
          "tp": {
            "type": "integer",
            "description": "Triple plays on which he had a putout or an assist."
          },
          "pb": {
            "type": "integer",
            "description": "Passed balls while he was the catcher."
          },
          "sbAllowed": {
            "type": "integer",
            "description": "Bases stolen while he was the catcher."
          },
          "cs": {
            "type": "integer",
            "description": "Runners caught stealing while he was the catcher."
          },
          "outsInField": {
            "type": "integer",
            "description": "Outs recorded while he held a fielding position. Divide by three for innings in the field."
          },
          "outsAt": {
            "type": "object",
            "description": "The same outs, split by the position he held when each was made. A position he never held is absent.",
            "additionalProperties": {
              "type": "integer",
              "description": "Outs recorded while he held this position."
            }
          }
        }
      },
      "FieldingSides": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "home",
          "away"
        ],
        "description": "Fielding lines for both sides, in position order: pitcher, catcher, first base and on round the field.",
        "properties": {
          "home": {
            "type": "array",
            "description": "The home team's fielding lines.",
            "items": {
              "$ref": "#/components/schemas/FieldingRow"
            }
          },
          "away": {
            "type": "array",
            "description": "The visiting team's fielding lines.",
            "items": {
              "$ref": "#/components/schemas/FieldingRow"
            }
          }
        }
      },
      "PositionInnings": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "position",
          "innings"
        ],
        "description": "Innings at one position.",
        "properties": {
          "position": {
            "$ref": "#/components/schemas/FieldingPosition"
          },
          "innings": {
            "type": "string",
            "description": "Innings at that position, the way a scoreboard writes them: `2.1` is two innings and one out."
          }
        }
      },
      "FieldingWithRates": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "line",
          "rates",
          "inn"
        ],
        "description": "A summed fielding line with its rate.",
        "properties": {
          "line": {
            "$ref": "#/components/schemas/FieldingLine"
          },
          "rates": {
            "$ref": "#/components/schemas/FieldingRates"
          },
          "inn": {
            "type": "string",
            "description": "Innings in the field, written the way a scoreboard writes them: `4.1` is four innings and one out."
          }
        }
      },
      "SeasonFieldingRow": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "playerPublicId",
          "name",
          "gp",
          "inn",
          "line",
          "rates"
        ],
        "description": "One player's fielding for the season.",
        "properties": {
          "playerPublicId": {
            "type": "string",
            "description": "The player's public id, as `plyr_…`."
          },
          "name": {
            "type": "string",
            "description": "The player's name, shortened unless the key owns the roster."
          },
          "number": {
            "type": "string",
            "description": "The jersey number, as text. Absent when the team never gave one."
          },
          "gp": {
            "type": "integer",
            "description": "Games in which this player took the field."
          },
          "inn": {
            "type": "string",
            "description": "Innings in the field, written the way a scoreboard writes them: `4.1` is four innings and one out."
          },
          "line": {
            "$ref": "#/components/schemas/FieldingLine"
          },
          "rates": {
            "$ref": "#/components/schemas/FieldingRates"
          }
        }
      }
    }
  }
}
