Sync Standings

League standings and division rankings

Sync Standings

Fetches NFL league standings for a given season. Powers the Standings page showing NFC North division rankings.

API Endpoint

GET https://api.lionschedule.me/api/v1/football/standings/?season=2025
Parameter Default Description
season 2025 NFL season year

What It Does

  1. Fetches standings for all 32 teams
  2. Resolves team, conference, and division ForeignKeys
  3. Creates or updates Standing records (unique on team + season)

Data Stored

Standing: team (FK), season, conference (FK), division (FK), wins, losses, ties, win_percentage, division_rank, playoff_seed, clinch_indicator, points_for, points_against, point_differential, record_splits (JSON: home, away, division, conference), streak

Response Structure

{
  "standings": [
    {
      "team": 8,
      "team_name": "Detroit Lions",
      "season": 2025,
      "wins": 9,
      "losses": 8,
      "points_for": 481,
      "points_against": 413,
      "division_rank": 3,
      "record_splits": {"home": "5-3", "away": "4-5", "division": "2-4"},
      "streak": "W1"
    }
  ]
}

Schedule

Every 6 hours during the season. Standings update after each game.

Management Command

python manage.py sync_standings --season 2025 --triggered-by manual

Dependencies

Requires sync_core to have run first (needs Team, Conference, Division records).