ShotTracker Event API
Base URL: https://api.shottracker.com
Authentication (Event API)
REST requests use HMAC request signing with a ShotTracker-issued username and secret. Live Data V2 WebSocket uses a subscription token only.
External Data Ingestion
- POST/v1/data— Ingest External Data
External data ingestion endpoint for games. This endpoint is only supported with games.
The request body is a JSON envelope with a single
datafield. The shape of thedataobject is defined between the consumer and ShotTracker for each integration.
Team Events And Schedules
Search and manage team events, game schedules, subscription tokens, practices, games, lineups, and video actions.
- GET/v1/data/teams/{team_id}/events— Search Team Events
The response will include both practice and/or game events. If the event is a game, additional fields are returned; game_type, is returned in the event node to indicate whether the game is halves (HALF) or quarters (QUARTER); and totals which will include links to the full game stats.
- GET/v1/data/schedule/games/matchup— Game Schedule Matchup
The matchup endpoint is a more advanced way to find games using either the ShotTracker team ids or other supported identification systems. The endpoint requires the reference and gender query parameters are given for context.
- GET/v1/data/schedule/games— Game Schedule
- PUT/v1/data/schedule/games— Update Season Game Schedule
Create/update a list of games
- GET/v1/data/schedule/games/{event_id}/_subscribe— Game Subscription Token
When a game is not yet live, it might be necessary to subscribe to the game. This endpoint allows a consumer to subscribe to a scheduled or an already active game with only the games event_id returned from the game scheduler.
- GET/v1/data/teams/{team_id}/practices/{event_id}— Practice Event
A self reference to a specific teams practice event.
- GET/v1/data/games/{event_id}— Game Event
A self reference to a specific game event.
- GET/v1/data/games/{event_id}/lineups— Player Lineups
Returns players in lineups for a given game and at a specific timestamp.
- GET/v1/data/games/{event_id}/sensor/assignments/history— Sensor Assignments History
Returns the sensor assignment history during the certain game. The timestamp in the response indicates the sensor was assigned to the player_id at that time for the game. Multiple sensor assignments will be seen for the same player indicating the assignment at the start of each quarter or half and at time when the sensor was changed.
- PUT/v1/data/games/{event_id}/video/_action— Game Video Adjustment Actions
Video adjustment commands for live game video streams.
Actions Description CLIP Generate a clip; example request body {"action":"CLIP","start":<start timestamp; epoch ms>,"end":<end timestamp; epoch ms>}; returns a url to the video clip in the response. DISCOVER_STREAMS Discover supported streams; example request body {“action”:“DISCOVER_STREAMS”}; returns an array of objects that have the id and name of all discovered streams.
Live Data V2 Games
REST endpoints for catch-up and live game stats, play-by-play, shots, possessions, and ball screens (for WebSocket, see Live Data V2).
- GET/v1/data/stats/games/{event_id}/{resources}— Catch Up
The catch up endpoint is intended to be a single call that supports multiple resources. The Stats, Play-By-Play and Shots endpoints are avaliable in the catch up. Example multi-resource request ./games/{event_id}/shots,details,shots. The response will combind the response for each of the comma supplied resources.
- GET/v1/data/stats/games/{event_id}/stats— Stats
- GET/v1/data/stats/games/{event_id}/stats/presence— Player Presence Stats
Presence stats are the players involvement in play; minutes played (MIN) and count of possessions.
- GET/v1/data/stats/games/{event_id}/details— Play-By-Play
- GET/v1/data/stats/games/{event_id}/shots— Shots
- GET/v1/data/stats/games/{event_id}/videos— Game Videos
Use only the HLS-related fields for playback and alignment:
hlsFile,hlsVideoStartTimestamp,hlsStartOffset,hlsVideoDelayMs, andhlsDuration. Other fields on each item are contextual or legacy; do not rely on them for video delivery.The previous location-based video flow and poster URLs (
posterLocation) are no longer supported—do not call or depend on location endpoints for game video, and do not useposterLocation. - GET/v1/data/stats/games/{event_id}/possessions— Possessions
- GET/v1/data/stats/games/{event_id}/ballscreens— Ball Screens
Predicted ball screen events for the game. Each event includes ball handler and screener player IDs, offensive and defensive action probabilities, screener location, and optional possession linkage.
Teams
List teams, rosters, and officials. Replace or update team rosters.
- GET/v1/data/teams— List Teams
- GET/v1/data/teams/{team_id}— Team Roster
The current active players on the team. The game_event_id parameter can be used to look up all of the players on the team at the time of a game. Players who are no longer on the team will have an 'is_active' false. The special_services field returns items for specific special events; possible type values are MIC, VIDEO.
Basketball Player Positions
Abbreviation Description G GUARD F FORWARD C CENTER - PUT/v1/data/teams/roster— Replace Team Roster
Replace the current player roster for a specific team.
- GET/v1/data/officials/teams— List Officials Teams
- GET/v1/data/officials/teams/{team_id}— Officials Team Roster
The special_services field returns items for specific special events; possible type values are MIC, VIDEO.
Practice Stats
Team and player stats for practice, scrimmage, shooting drills, and workouts; includes shots and summaries.
- GET/v1/data/teams/{team_id}/players/practice/stats— Team Stats
A practice can consist of a team practice with shooting and scrimmage drills or a players individual workout. This endpoint will return team players stats that include both team practice drills (shooting and scrimmage) and workouts.
- GET/v1/data/teams/{team_id}/players/practice/scrimmage/stats— Team Scrimmage Stats
- GET/v1/data/teams/{team_id}/players/practice/shooting/stats— Team Shooting Drill Stats
- GET/v1/data/teams/{team_id}/players/workouts/stats— Team Workout Stats
- GET/v1/data/teams/{team_id}/players/practice/shots— Team Shots
- GET/v1/data/teams/{team_id}/players/practice/shots/summary— Team Shots Summary
- GET/v1/data/teams/{team_id}/players/practice/scrimmage/shots— Team Scrimmage Shots
- GET/v1/data/teams/{team_id}/players/practice/scrimmage/shots/summary— Team Scrimmage Shots Summary
- GET/v1/data/teams/{team_id}/players/practice/shooting/shots— Team Shooting Drill Shots
- GET/v1/data/teams/{team_id}/players/practice/shooting/shots/summary— Team Shooting Drill Shots Summary
- GET/v1/data/teams/{team_id}/players/workout/shots— Team Workout Shots
- GET/v1/data/teams/{team_id}/players/workout/shots/summary— Team Workout Shots Summary
Game Stats
Team and player stats for games (by event). Game shots and shot summaries.
- GET/v1/data/teams/{team_id}/players/game/stats— Team Game Stats
- GET/v1/data/teams/{team_id}/players/game/shots— Team Game Shots
- GET/v1/data/teams/{team_id}/players/game/shots/summary— Team Game Shots Summary
- GET/v1/data/stats/games/{event_id}/stats/details— Grouped Stats Details **DEPRECATED**
Returns all team and player stat details for the whole game. Team stats are included under player_stats with an id of 0.
Specific Period / Drill Stats
Stats, details, shots, and possessions for a specific period or drill by ID.
- GET/v1/data/stats/{id}/stats— Stats
Returns all team and player box score stats. Team stats are included under player_stats with an id of 0.
- GET/v1/data/stats/{id}/stats/details— Stats Details
Returns all team and player stat details. Team stats are included under player_stats with an id of 0.
- GET/v1/data/stats/{id}/shots— Shots
- GET/v1/data/stats/{id}/possessions— Stats Possessions
- GET/v1/data/stats/{id}/possessions/summary— Stats Possessions Summary
Sensors Locations
Sensor location data by ID and time range.
- GET/v1/data/sensors/locations— Sensor Locations
Returns an array of player and ball locations. The timeframe of the request should not exceed 30 minutes.
Web Callbacks
Register an HTTPS callback ShotTracker PUTs when live sessions, practices, or games start (and optionally end). Includes callback design requirements, query parameters, and notify management endpoints.
- GET/v1/data/live/notify— List LIVE Notifies
Returns all LIVE notify registrations for the authenticated consumer. Each item includes the notify
id,action(LIVE), registeredurl, and whetherend_notificationis enabled. An emptynotificationsarray means no LIVE notify is registered yet. See Create LIVE Notify for how to design the callback endpoint ShotTracker will PUT to. - PUT/v1/data/live/notify— Create LIVE Notify
Registers your callback URL for LIVE notifications. On success the response has no body; the new notify id is returned in the
X-ShotTracker-Notify-Idheader. End notifications are disabled by default (end_notification: false); call Enable LIVE End Notify if you also wantstate=ENDcallbacks.The
urlquery parameter is required and must be URL-encoded. Use a base path with no query string. Only one LIVE notify is allowed per consumer.Designing your callback endpoint
ShotTracker invokes your registered URL with an HTTP PUT when a live practice drill, practice, game round, or game starts (and optionally ends). Your service must expose a publicly reachable HTTPS endpoint that accepts that call.
Request ShotTracker sends
PUT {your-registered-url}?notify_id={notify id}&action=LIVE&data={id}&state={START|END}&type={SESSION|GAME|PRACTICE}Query Parameter Description notify_id The notify registration id returned in X-ShotTracker-Notify-Idwhen you created the notifyaction Always LIVEfor Event API live notifiesdata Id of the activity that changed. For type=SESSIONthis is the session (drill / half / quarter) id. Fortype=PRACTICEthis is the practice id. Fortype=GAMEthis is the game idstate STARTorENDtype SESSION,GAME, orPRACTICE(see when notifies fire below)- Method is always PUT
- Request body is empty
- ShotTracker does not send HMAC or other auth headers on the callback; secure the URL yourself (path secret, network controls, etc.)
- Query parameters are appended with
?. Register a URL without an existing query string (for examplehttps://hooks.example.com/shottracker/live)
Example:
PUT https://hooks.example.com/shottracker/live?notify_id=abc-123&action=LIVE&data=45a64b38-b205-11ed-b27e-0242e9e2912e&state=START&type=GAMEHow your callback should behave
- Accept PUT on the exact path you registered.
- Respond quickly. ShotTracker uses short connect (~500 ms) and read (~1000 ms) timeouts. Acknowledge immediately (for example
204 No Contentor200 OK) and do heavier work asynchronously. - Parse query parameters (
notify_id,action,data,state,type). Usedatawithtypeto decide what to fetch next from the Event API (subscribe, search, catch-up, WebSocket, and so on). - Treat the call as a signal, not a data payload. The callback does not include stats or box score; it tells you that something started or ended so you can call the Event API.
- Be idempotent. The same logical event should not break your system if delivered more than once.
- Failures are not retried. If your endpoint times out or returns an HTTP error, ShotTracker logs the failure and continues; it does not automatically retry that notification.
Minimal Node.js callback (see also Code examples):
const http = require("http"); const { URL } = require("url"); http.createServer((req, res) => { if (req.method !== "PUT") { res.writeHead(405); return res.end(); } const url = new URL(req.url, "http://localhost"); const notifyId = url.searchParams.get("notify_id"); const data = url.searchParams.get("data"); const state = url.searchParams.get("state"); const type = url.searchParams.get("type"); console.log({ notifyId, data, state, type }); res.writeHead(204); res.end(); }).listen(8080);
When notifies fire
type state When it is sent Value of data SESSION START A practice drill (for example scrimmage or shooting) or a game round (half / quarter) starts Session id SESSION END That practice or game-round session ends (only if end notify is enabled) Session id PRACTICE START A practice is started for the first time Practice id PRACTICE END A practice ends (only if end notify is enabled) Practice id GAME START A game enters pregame / live start Game id GAME END Game play ends (only if end notify is enabled) Game id SESSIONcovers period- or drill-level activity.GAME/PRACTICEcover the overall event lifecycle.End notifications
When you create a notify,
end_notificationis false. You only receivestate=STARTcallbacks until you call Enable LIVE End Notify. Use Disable LIVE End Notify to turn END callbacks off again.Registration rules
- Requires the consumer NOTIFY scope
- Only one LIVE notify may exist per consumer. Creating a second returns
422withNotify action already exists - You are notified only for live activity your credentials are authorized to access (team and/or court / facility access)
- URL-encode the
urlquery parameter when registering or updating (for examplehttps%3A%2F%2Fhooks.example.com%2Fshottracker%2Flive)
- PUT/v1/data/live/notify/{notify_id}— Update LIVE Notify URL
Replaces the callback URL for an existing LIVE notify. The notify id and end-notification setting are unchanged. The new
urlmust be URL-encoded and should not include a query string. - DELETE/v1/data/live/notify/{notify_id}— Delete LIVE Notify
Removes the LIVE notify registration. ShotTracker stops calling your callback. To receive notifies again, create a new registration.
- PUT/v1/data/live/notify/{notify_id}/_enableEndNotify— Enable LIVE End Notify
Turns on
state=ENDcallbacks for this notify (end_notification: true). Until this is called, ShotTracker only sendsstate=STARTnotifications. After enabling, you also receive END for SESSION, PRACTICE, and GAME activity your consumer is authorized to see. - PUT/v1/data/live/notify/{notify_id}/_disableEndNotify— Disable LIVE End Notify
Turns off
state=ENDcallbacks for this notify (end_notification: false). START notifications continue.
ShotTracker Facilities
List locations, court layouts, and nearest locations by lat/long.
System Data
System-level stats.