Sync Core

Conferences, divisions, and teams

Sync Core

Fetches the foundational NFL data: conferences, divisions, and teams. This is the first collector that should run since other collectors depend on Team records existing.

API Endpoint

GET https://api.lionschedule.me/api/v1/football/core/

No parameters required.

What It Does

  1. Fetches a single payload containing all conferences, divisions, and teams
  2. Creates or updates Conference records (AFC, NFC)
  3. Creates or updates Division records (NFC North, AFC East, etc.)
  4. Creates or updates Team records (all 32 NFL teams)

Data Stored

Conference: conference_id, name, abbreviation

Division: division_id, name, abbreviation, conference FK

Team: team_id, abbreviation, display_name, location, color, alternate_color, logo_url, slug, venue_name, venue_city, venue_state, venue_indoor, record_summary, standing_summary

Response Structure

{
  "conferences": [
    {"conference_id": 8, "name": "American Football Conference", "abbreviation": "AFC"}
  ],
  "divisions": [
    {"division_id": 10, "name": "NFC North", "conference_id": 9}
  ],
  "teams": [
    {"team_id": 8, "display_name": "Detroit Lions", "abbreviation": "DET", ...}
  ]
}

Schedule

Run infrequently (daily or on-demand). Team/division data rarely changes.

Management Command

python manage.py sync_core --triggered-by manual