Ingress Sports Contracts

This page summarizes ingress event contracts for the currently documented sports and provides validation guidance.

Supported event types (documented in this guide)

  • Baseball / Softball: EventId 1 and 4
  • Football: EventId 2
  • Basketball: EventId 3
  • Volleyball: EventId 6
  • Soccer: EventId 8

Common ingress fields

Most ingress payloads include:

  • EventId (int, required)
  • Clock (string, optional)
  • IsClockRunning (bool?)
  • ClockMode (char?, usually : or .)
  • IsPlayClockRunning (bool?)
  • GuestTeamName (string)
  • HomeTeamName (string)

Baseball / Softball (EventId: 1, 4)

Key groups:

  • Count/state: Balls, Strikes, Outs, Inning, TopOfInning, BottomOfInning
  • Totals: GuestRuns, HomeRuns, GuestHits, HomeHits, GuestErrors, HomeErrors
  • Inning-by-inning: GuestInning1..10, HomeInning1..10
  • Runners: OnFirst, OnSecond, OnThird
  • Pitching: PitchSpeed, PitchCount, PitchClock
  • Error flag enum (BaseballErrorFlag):
    • 0 None
    • 1 Hit (H)
    • 2 Error (E)

Basketball (EventId: 3)

Key groups:

  • Game state: Period, Clock, ShotClock, TimeoutClock, Horn
  • Score/fouls: HomeScore, GuestScore, HomeFouls, GuestFouls
  • Bonus: HomeBonus, GuestBonus, HomeDoubleBonus, GuestDoubleBonus
  • Possession: HomePossession, GuestPossession
  • Timeouts: full/partial timeout fields
  • Player blocks: HomePlayer1..5, GuestPlayer1..5 plus foul/points fields

Football (EventId: 2)

Key groups:

  • Drive state: Quarter, Down, ToGo, BallOn, PlayClock
  • Score: HomeScore, GuestScore
  • Quarter scores: HomeScoreQuarter1..4, VisitorScoreQuarter1..4
  • Possession/timeouts: HomePossession, GuestPossession, timeout fields
  • Team stats: rushing/passing/total yards, first downs
  • Flags: Flag, Horn

Soccer (EventId: 8)

Key groups:

  • Score: HomeScore, GuestScore
  • Possession: HomePossession, GuestPossession
  • Stats: shots, corner kicks, saves, penalties
  • Match state: Period, Horn, timeout fields

Volleyball (EventId: 6)

Key groups:

  • Match state: Set, Game, IsSet3
  • Current score: HomeScore, GuestScore
  • Set scores: HomeScoreGame1..5, GuestScoreGame1..5
  • Serve/timeouts: HomeServe, GuestServe, timeout fields
  • Roster blocks: HomePlayer1..6, GuestPlayer1..6 plus kills/digs fields

Validation guidance

  • EventId must match the intended sport contract.
  • Use the class-definition endpoint to validate exact field names and types.
  • Keep time formats consistent (for example MM:SS or M:SS depending on field).
  • Ensure boolean flags are actual booleans (true/false).
  • Keep numeric fields non-negative and within sport-appropriate ranges.
  • Subscribe to ingress status topic and fix reported InvalidField/parse errors.

Important

Ingress contracts are authoritative from:

GET /external/ingress/event-types/{eventTypeId}/class-definition

Always validate your payload shape against that endpoint for your exact event type.