Admin

Upsert a league season window

Changed on

Platform admin only. Creates or replaces the window for one season year, idempotent on (leagueId, seasonYear). Body: { seasonYear, startDate, endDate, preseasonStartDate?, stateOverride?, hubEnabled? }. Dates are ISO-8601; endDate must not precede startDate and preseasonStartDate must not follow startDate. stateOverride (in_season | off_season | preseason | null) opens or holds the off-season hub outside the date math; hubEnabled (boolean | null) pins the hub switch on its own. Both nullable — null derives. 400 is returned only for an invalid body; a persistence failure is 500.

put/api/admin/leagues/{leagueId}/season-windows

Request

  • Base URL
    https://app.d-sports.org
  • Auth
    HTTP bearer

Path parameters

leagueIdstring required

League id or slug.

Request body

seasonYearinteger required

Season label year (2026 = the 2026-27 season).

startDatestring date-time required
endDatestring date-time required

Last day of the season, inclusive.

preseasonStartDatestring date-time nullable

Training camp opener. Null means no preseason phase.

stateOverride'in_season' | 'off_season' | 'preseason' nullable
hubEnabledboolean nullable

Response

{ success, data: { window } }

Changes