Lineups & Box Scores
Rotation
Basketball-only endpoint for nba and kbl. Returns the
per-game rotation entity keyed by canonical game id. Other
sports return 404 endpoint_not_for_sport.
Requires the stats entitlement (a paid plan). See Responses & Errors for the success envelope and availability rules.
https://api.sportquanta.com/v1/{league}/rotations/{id}Reference context: WKBL.
Overview · Response conventions
Authorizations
AuthorizationstringheaderrequiredSend a workspace API token in the Authorization: Bearer <token> header.
Path Parameters
leagueenum<string>default:wkblrequiredLeague for this reference section: wkbl.
Available options: wkbl
idstringrequiredQuery Parameters
provenancebooleandefault:falseOpt in to per-field provenance on supported single game, match, team, player, and venue reads. Lists and composites accept the flag but generally omit provenance. It is returned under _meta.provenance only when source metadata exists.
Response
application/jsonRotation document.
Query validation failed. Depending on the handler, invalid_query_parameter is returned with HTTP 400 or 422. Pre-read validation is non-billable.
Missing or invalid bearer API token.
Access is forbidden: the token lacks api.read scope, the plan lacks an endpoint/bookmaker capability, or configured billing access is inactive. Inspect error.code and details.feature when present.
The id is well-formed but no document has been ingested for it yet.
Hourly rate ceiling or monthly quota exceeded. The error code disambiguates
which limit was hit. X-RateLimit-* and X-Requests-*-Month response headers
carry the current state of both counters.
Token validation or an internal handler failed. Token-store failures use api_token_lookup_failed; unsupported internal sport dispatch can use data_layer_unavailable.
The data layer (Mongo / ClickHouse / Redis cache) is temporarily unreachable. The server attempted the lookup; it failed. Retry with backoff. Per the spec's order of evaluation, this DOES consume monthly quota — the request reached step 6.
The configured billing provider could not verify API access. The request is refused before the data handler and does not consume monthly quota.
dataobjectrequireddata.idstringdata.canonical_idstringdata.external_idsobjectMap from the exact stored source/namespace key to that provider's identifier for this entity. Keys vary by entity and league. Values are strings, even when the provider ID looks numeric. Use the exact key and value for external-ID lookups; these are distinct from the canonical ID. SOURCE_KEY below is an illustrative placeholder.
data.external_ids.{key}stringdata.created_atstring<date-time>Canonical document creation timestamp, when present; not the scheduled start or event time.
data.updated_atstring<date-time>Canonical document update timestamp, when present. It is not a guarantee that every field was refreshed at this time; field provenance carries individual ingestion times.
data.game_idstringrequireddata.homeobjectdata.home.teamIdstringCanonical team ID for this side.
data.home.playersobject[]Player rotation/box-score entries, with starter flags and source-reported minutes.
data.home.players.playerIdstring | nulldata.home.players.positionstring | nulldata.home.players.starterbooleanWhether this source entry identifies the player as a starter.
data.home.players.minutesstring | nullSource box-score playing-time string, when available. The reconciler accepts M:SS, ISO-8601 PT durations, or numeric minutes; use reconciliation.boxScoreSeconds for parsed seconds.
data.home.substitutionsobject[]Explicit substitution events with player-in/player-out IDs and remaining period clock, when available.
data.home.substitutions.periodnumber | nulldata.home.substitutions.clockstring | nulldata.home.substitutions.teamIdstring | nulldata.home.substitutions.playerInIdstring | nulldata.home.substitutions.playerOutIdstring | nulldata.home.substitutions.playerInEventNumnumber | nulldata.home.substitutions.playerOutEventNumnumber | nulldata.home.substitutions.sourcestring | nulldata.home.periodLineupsobject[]Player IDs used to establish the lineup for a period, with the source/method of that lineup.
data.home.periodLineups.periodnumberdata.home.periodLineups.playerIdsstring[]data.home.periodLineups.sourcestringdata.home.stintsobject[]Reconstructed on-court intervals per player and period. Read availability, issues, and reconciliation before treating them as complete.
data.home.stints.playerIdstringdata.home.stints.periodnumberdata.home.stints.startClockstringRemaining period clock at stint start, formatted M:SS (counts down).
data.home.stints.endClockstringRemaining period clock at stint end, formatted M:SS (counts down).
data.home.stints.startEventNumnumber | nullSource event number at the interval start, or null when the boundary has no event number.
data.home.stints.endEventNumnumber | nullSource event number at the interval end, or null when the boundary has no event number.
data.home.stints.durationSecondsnumberNonnegative seconds in this on-court interval: start-clock seconds minus end-clock seconds.
data.home.stints.sourcestringdata.home.reconciliationobject[]Per-player comparison of reconstructed stint seconds against parsed box-score minutes.
data.home.reconciliation.playerIdstringdata.home.reconciliation.boxScoreSecondsnumber | nullBox-score minutes parsed into seconds; null when unavailable or unparseable.
data.home.reconciliation.stintSecondsnumberTotal reconstructed on-court seconds across this player's stints.
data.home.reconciliation.deltaSecondsnumber | nullstintSeconds minus boxScoreSeconds; positive means the reconstructed timeline assigns more time. Null when box-score minutes are unavailable.
data.home.reconciliation.withinToleranceboolean | nullWhether absolute deltaSeconds is within provenance.minuteToleranceSeconds. Null when box-score minutes cannot be compared.
data.home.availabilityenum<string>Available options: available, partial, provider_unavailable
data.home.issuesstring[]Machine-readable explanations of incomplete or inconsistent rotation reconstruction, when present.
data.home.provenanceobjectdata.home.provenance.sourcestringdata.home.provenance.method"starting_lineup_and_explicit_substitutions"Reconstruction uses starting lineups and explicit substitution events.
data.home.provenance.minuteToleranceSecondsnumberMaximum allowed absolute difference between reconstructed and box-score seconds for a player.
data.home.confirmedbooleanSide-level rotation/lineup confirmation. Derived timelines set this false when reconstruction issues remain; inspect availability and reconciliation as well.
data.awayobjectdata.away.teamIdstringCanonical team ID for this side.
data.away.playersobject[]Player rotation/box-score entries, with starter flags and source-reported minutes.
data.away.players.playerIdstring | nulldata.away.players.positionstring | nulldata.away.players.starterbooleanWhether this source entry identifies the player as a starter.
data.away.players.minutesstring | nullSource box-score playing-time string, when available. The reconciler accepts M:SS, ISO-8601 PT durations, or numeric minutes; use reconciliation.boxScoreSeconds for parsed seconds.
data.away.substitutionsobject[]Explicit substitution events with player-in/player-out IDs and remaining period clock, when available.
data.away.substitutions.periodnumber | nulldata.away.substitutions.clockstring | nulldata.away.substitutions.teamIdstring | nulldata.away.substitutions.playerInIdstring | nulldata.away.substitutions.playerOutIdstring | nulldata.away.substitutions.playerInEventNumnumber | nulldata.away.substitutions.playerOutEventNumnumber | nulldata.away.substitutions.sourcestring | nulldata.away.periodLineupsobject[]Player IDs used to establish the lineup for a period, with the source/method of that lineup.
data.away.periodLineups.periodnumberdata.away.periodLineups.playerIdsstring[]data.away.periodLineups.sourcestringdata.away.stintsobject[]Reconstructed on-court intervals per player and period. Read availability, issues, and reconciliation before treating them as complete.
data.away.stints.playerIdstringdata.away.stints.periodnumberdata.away.stints.startClockstringRemaining period clock at stint start, formatted M:SS (counts down).
data.away.stints.endClockstringRemaining period clock at stint end, formatted M:SS (counts down).
data.away.stints.startEventNumnumber | nullSource event number at the interval start, or null when the boundary has no event number.
data.away.stints.endEventNumnumber | nullSource event number at the interval end, or null when the boundary has no event number.
data.away.stints.durationSecondsnumberNonnegative seconds in this on-court interval: start-clock seconds minus end-clock seconds.
data.away.stints.sourcestringdata.away.reconciliationobject[]Per-player comparison of reconstructed stint seconds against parsed box-score minutes.
data.away.reconciliation.playerIdstringdata.away.reconciliation.boxScoreSecondsnumber | nullBox-score minutes parsed into seconds; null when unavailable or unparseable.
data.away.reconciliation.stintSecondsnumberTotal reconstructed on-court seconds across this player's stints.
data.away.reconciliation.deltaSecondsnumber | nullstintSeconds minus boxScoreSeconds; positive means the reconstructed timeline assigns more time. Null when box-score minutes are unavailable.
data.away.reconciliation.withinToleranceboolean | nullWhether absolute deltaSeconds is within provenance.minuteToleranceSeconds. Null when box-score minutes cannot be compared.
data.away.availabilityenum<string>Available options: available, partial, provider_unavailable
data.away.issuesstring[]Machine-readable explanations of incomplete or inconsistent rotation reconstruction, when present.
data.away.provenanceobjectdata.away.provenance.sourcestringdata.away.provenance.method"starting_lineup_and_explicit_substitutions"Reconstruction uses starting lineups and explicit substitution events.
data.away.provenance.minuteToleranceSecondsnumberMaximum allowed absolute difference between reconstructed and box-score seconds for a player.
data.away.confirmedbooleanSide-level rotation/lineup confirmation. Derived timelines set this false when reconstruction issues remain; inspect availability and reconciliation as well.
_metaobjectResponse request/cache metadata. Optional evidence fields are specific to this handler; cache TTL does not measure source-data freshness.
_meta.request_idstring_meta.served_fromenum<string>Available options: live, cache
_meta.cache_ttl_secondsintegerResponse cache TTL; independent of source freshness. Omitted when zero.
_meta.provenanceobjectMap keyed by canonical source field name. Each value identifies the winning source, ingestion run, and ingestion timestamp for that field. Keys can use the stored camelCase field name even when the response uses snake_case.
_meta.provenance.{key}object_meta.provenance.{key}.sourcestring_meta.provenance.{key}.run_idstring_meta.provenance.{key}.ingested_atstring<date-time>errorobjectrequirederror.codestringrequiredStable machine-readable error code.
error.messagestringrequiredUser-facing error summary.
error.detailsanyOptional error details.