Divisions
Divisions belong to a league and hold teams. Each division tracks its own standings, schedule, and configuration.
Endpoint: /api/v1/divisions
Required scope: read:leagues (read) / admin (write)
Endpoints
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /api/v1/divisions?league=:id | Recommended | List all divisions for a league |
| GET | /api/v1/divisions/:id | Recommended | Get a single division (includes standings) |
| POST | /api/v1/divisions | Required | Create a division within a league |
| PUT | /api/v1/divisions/:id | Required | Update a division |
Allowed ?include= roots: league, layout, organization, paymentProduct. By default, league and layout are returned as ObjectId strings — pass ?include=league,layout to get them as nested objects. See Query Parameter: ?include=.
Division Fields
| Field | Type | Description |
|---|---|---|
_id | ObjectId | Unique identifier |
name | string | Division name (required) |
organization | ObjectId | Owning organization (ref: Organization) |
league | ObjectId | Parent league (ref: League) |
sports | string[] | Sports for this division. Default: [] |
priority | number | Display sort order |
paymentProduct | ObjectId | Payment product override (ref: PaymentProduct) |
config | ConfigSchema | Division-level configuration — highest precedence |
strengthLevel | number | Skill level indicator |
startDate | date | Division start date |
endDate | date | Division end date |
layout | ObjectId | Bracket/schedule layout (ref: Layout) |
created | date | Creation timestamp |
updated | date | Last update timestamp |
ConfigSchema Fields
Division config overrides league, tournament, and registration config. See Config Hierarchy for details.
| Field | Type | Default | Description |
|---|---|---|---|
requirePlayers | boolean | — | Teams must add players to complete registration |
hideTeams | boolean | — | Hide team names from public views |
hideSchedules | boolean | false | Hide schedules from public views |
excludeTeamName | boolean | — | Show player names instead of team name |
minPlayers | number | — | Minimum players per team |
maxPlayers | number | — | Maximum players per team |
gameDurationInMinutes | number | — | Default game duration |
requireCoaches | boolean | — | Teams must add coaches |
requireTeamRepresentatives | boolean | — | Teams must add team representatives |
minTeamRepresentatives | number | — | Minimum team representatives |
maxTeamRepresentatives | number | — | Maximum team representatives |
minCoaches | number | — | Minimum coaches |
maxCoaches | number | — | Maximum coaches |
capacity | number | 0 | Max teams (0 = unlimited) |
waitlistCapacity | number | 0 | Waitlist spots (0 = no waitlist) |
autoPromote | boolean | false | Auto-promote waitlisted teams |
promotionPaymentWindowHours | number | 48 | Hours to complete payment after promotion |
disableSync | boolean | — | Disable automatic sync |
admins | string[] | [] | Additional admin user IDs |
tiebreakers | object | — | Tiebreaker rules per sport (basketball, football, baseball, soccer) |
Create a Division
curl -X POST https://api.staty.io/api/v1/divisions \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Competitive",
"league": "league_abc123",
"config": {
"capacity": 12,
"minPlayers": 7,
"maxPlayers": 15,
"gameDurationInMinutes": 50
}
}'Response:
{
"success": true,
"data": {
"_id": "div_def456",
"name": "Competitive",
"league": "league_abc123",
"config": {
"capacity": 12,
"minPlayers": 7,
"maxPlayers": 15,
"gameDurationInMinutes": 50,
"waitlistCapacity": 0,
"autoPromote": false,
"promotionPaymentWindowHours": 48
},
"created": "2026-03-15T10:00:00.000Z"
}
}Division config takes the highest precedence in the config hierarchy. See Config Hierarchy for how it interacts with league, tournament, and registration config.
Last updated on