{"openapi":"3.1.0","info":{"title":"Preciser Data Management API","version":"1.0.0"},"servers":[{"url":"https://preciser-data-management-system-public-api-209665173436.us-central1.run.app","description":"Production API"}],"paths":{"/api/v1/health":{"get":{"tags":["health"],"summary":"Health Check","description":"Health check endpoint for Cloud Run and load balancers.\n\nReturns a simple status indicating the service is running.\nDoes not require authentication or League header.","operationId":"health_check_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/version":{"get":{"tags":["health"],"summary":"Get Version","description":"Get API version and environment information.\n\nDoes not require authentication or League header.","operationId":"get_version_api_v1_version_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/test-db":{"get":{"tags":["health"],"summary":"Test Database Connection","description":"Test database connection for a specific league.\n\nRequires League header.\n\nExample:\n    curl -H \"League: t1_league\" http://localhost:8080/api/v1/test-db","operationId":"test_database_connection_api_v1_test_db_get","parameters":[{"name":"League","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"League"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/games/schedule":{"get":{"tags":["Games"],"summary":"Get Schedule","description":"Get the game schedule with optional filtering and pagination.\n\nArgs:\n    season: Filter by season (e.g., \"2024-25\")\n    season_type: Filter by season type (e.g., \"regular\", \"playoff\")\n    limit: Maximum number of results to return (default: 100, max: 1000)\n    offset: Number of results to skip for pagination (default: 0)\n\nReturns:\n    Dictionary containing:\n    - data: List of game schedule items\n    - pagination: Pagination metadata (limit, offset, count, total)","operationId":"get_schedule_api_v1_games_schedule_get","parameters":[{"name":"season","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Season"}},{"name":"competition_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}],"title":"Competition Id"}},{"name":"season_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Season Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameScheduleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/games/{game_id}":{"get":{"tags":["Games"],"summary":"Get Game","description":"Get one game's metadata, including its competition when applicable.","operationId":"get_game_api_v1_games__game_id__get","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Games"],"summary":"Delete Game","description":"Delete a game record by game_id (must be a valid UUID).","operationId":"delete_game_api_v1_games__game_id__delete","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Game Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/games/{game_id}/post_player_stats":{"get":{"tags":["Games"],"summary":"Get Post Player Stats","description":"Get post player stats for a specific game.\n\nArgs:\n    game_id: The game identifier\n    conn: Database connection (injected)\n\nReturns:\n    List of player stats dictionaries","operationId":"get_post_player_stats_api_v1_games__game_id__post_player_stats_get","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Post Player Stats Api V1 Games  Game Id  Post Player Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/games":{"post":{"tags":["Games"],"summary":"Upsert Game","description":"Upsert a game record.\n\nInserts a new game or updates an existing one based on video_id.\nIf game_id is not provided, a UUID will be auto-generated.","operationId":"upsert_game_api_v1_games_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameUpsertRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameUpsertResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/games/bulk-delete":{"delete":{"tags":["Games"],"summary":"Bulk Delete Games","description":"Delete multiple game records in a single request.\n\nArgs:\n    request: Contains list of game_ids to delete (max 1000 per request)\n\nReturns:\n    GameBulkDeleteResponse with success status and deletion count","operationId":"bulk_delete_games_api_v1_games_bulk_delete_delete","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameBulkDeleteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameBulkDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/games/{game_id}/summary":{"get":{"tags":["Games"],"summary":"Get Game Summary","description":"Get the game summary with final scores and team totals.\n\nReturns aggregated team statistics including points, rebounds, assists,\nsteals, blocks, turnovers, and shooting stats.\n\nRequires League header and x-api-key header.\n\nArgs:\n    game_id: The game identifier (UUID string)\n    conn: Database connection (injected)\n\nReturns:\n    GameSummaryResponse with game metadata and team statistics","operationId":"get_game_summary_api_v1_games__game_id__summary_get","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/games/{game_id}/quarter_summary":{"get":{"tags":["Games"],"summary":"Get Game Quarter Summary","description":"Get per-quarter team statistics for a single game.\n\nReturns the same shape as `/summary` but split by quarter, ordered by quarter.\n\nRequires League header and x-api-key header.\n\nArgs:\n    game_id: The game identifier (UUID string, matches game_info.video_id)\n    conn: Database connection (injected)\n\nReturns:\n    GameQuarterSummaryResponse with game_id and a list of per-quarter team stats","operationId":"get_game_quarter_summary_api_v1_games__game_id__quarter_summary_get","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameQuarterSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/videos":{"post":{"tags":["Videos"],"summary":"Submit Video","description":"Submit a video for AI processing.\n\nWhen VIDEO_ENDPOINTS_LIVE is False, returns a preview response without DB writes.","operationId":"submit_video_api_v1_videos_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GLVideoSubmitRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GLVideoSubmitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/videos/{video_uuid}/info":{"post":{"tags":["Videos"],"summary":"Submit Video Info","description":"Complete a URL-only submission with its game info and start processing.\n\nCalled by the Preciser Stats Breakdown page (JWT-gated BFF) after the end\nuser fills the video info form. The initial submit reserved a credit; this\nendpoint finalizes that charge only after the info is committed, then\ncreates the video records and kicks off PBP-AI. 404 when no submission\nexists, 409 when the info was already provided or the submission is past\n'pending'.","operationId":"submit_video_info_api_v1_videos__video_uuid__info_post","parameters":[{"name":"video_uuid","in":"path","required":true,"schema":{"type":"string","title":"Video Uuid"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GLVideoInfoSubmitRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GLVideoSubmitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/videos/{video_uuid}/results":{"get":{"tags":["Videos"],"summary":"Get Video Results","description":"Get processing results for a submitted video.\n\nAI submissions return the richer raw PBP-AI events. Manual-review\nsubmissions have no PBP job_id, so once QC is delivered they fall back to\nthe finalized league ``video_clips`` rows resolved through\n``videos.upload_id = video_uuid``.\n\nWhen VIDEO_ENDPOINTS_LIVE is False, returns sample preview events.","operationId":"get_video_results_api_v1_videos__video_uuid__results_get","parameters":[{"name":"video_uuid","in":"path","required":true,"schema":{"type":"string","title":"Video Uuid"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoResultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/videos/{video_uuid}/post_player_stats":{"get":{"tags":["Videos"],"summary":"Get Video Post Player Stats","description":"Post-processed player stats for a submitted video — the same data the\ninternal flow serves at /jobs/{job_id}/post_player_stats.\n\nvideo_uuid accepts either the Glory League video UUID or the league DB's\nnumeric videos.video_id (the /jobs key), so results can be correlated to\nvideo_id directly.\n\nStats exist only once processing completed and the stats were delivered\n(raw league status '4'); before that — including while the video is still\nawaiting its game info — this returns an empty list. 404 when the key\nmatches nothing.\n\nWhen VIDEO_ENDPOINTS_LIVE is False, returns a preview response.","operationId":"get_video_post_player_stats_api_v1_videos__video_uuid__post_player_stats_get","parameters":[{"name":"video_uuid","in":"path","required":true,"schema":{"type":"string","title":"Video Uuid"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Video Post Player Stats Api V1 Videos  Video Uuid  Post Player Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/videos/{video_uuid}/clips":{"get":{"tags":["Videos"],"summary":"List Video Detected Clips","description":"Detected play clips for a submitted video — the same data the internal\nflow serves at /jobs/{job_id}/clips.\n\nvideo_uuid accepts either the Glory League video UUID or the league DB's\nnumeric videos.video_id (the /jobs key).\n\nEmpty until the stats were delivered (the clips query itself filters on\nleague status '4'). 404 when the key matches nothing.\n\nWhen VIDEO_ENDPOINTS_LIVE is False, returns a preview response.","operationId":"list_video_detected_clips_api_v1_videos__video_uuid__clips_get","parameters":[{"name":"video_uuid","in":"path","required":true,"schema":{"type":"string","title":"Video Uuid"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectedClipsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/videos/{video_uuid}/status":{"get":{"tags":["Videos"],"summary":"Get Video Status","description":"Get the processing status of a submitted video.\n\nWhen VIDEO_ENDPOINTS_LIVE is False, returns a preview response without DB access.\nRequires League header and x-api-key header.","operationId":"get_video_status_api_v1_videos__video_uuid__status_get","parameters":[{"name":"video_uuid","in":"path","required":true,"schema":{"type":"string","title":"Video Uuid"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/videos/{video_uuid}/notify":{"post":{"tags":["Videos"],"summary":"Notify Video Status","description":"Trigger webhooks for video processing completion or failure.\n\nWhen VIDEO_ENDPOINTS_LIVE is False, returns a preview response without triggering webhooks.","operationId":"notify_video_status_api_v1_videos__video_uuid__notify_post","parameters":[{"name":"video_uuid","in":"path","required":true,"schema":{"type":"string","title":"Video Uuid"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoNotifyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoNotifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/videos/{video_uuid}/cancel":{"post":{"tags":["Videos"],"summary":"Cancel Video","description":"Cancel an in-flight Glory League video submission.\n\nMarks the submission terminally and best-effort halts the league processing\npipeline. Only submissions still pending/processing can be cancelled; an\nalready-cancelled submission returns success idempotently, and\ncompleted/failed ones return 409.\n\nWhen VIDEO_ENDPOINTS_LIVE is False, returns a preview response without DB writes.","operationId":"cancel_video_api_v1_videos__video_uuid__cancel_post","parameters":[{"name":"video_uuid","in":"path","required":true,"schema":{"type":"string","title":"Video Uuid"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GLVideoCancelResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/accounts/lookup":{"post":{"tags":["Accounts"],"summary":"Lookup Account","description":"Resolve a user UUID to its credit wallet, creating it on first sight.\n\nGet-or-create, so a brand-new user always has a uuid to submit with. A\ncreated account starts at zero credits — exactly the account POST /videos\nwould have provisioned — so `can_upload` is false until credits are bought.\n\n``user_id`` is the canonical billing key. Email and org_id remain supported\nonly as legacy lookup inputs.","operationId":"lookup_account_api_v1_accounts_lookup_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GLAccountLookupRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GLAccountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/accounts/{org_id}":{"get":{"tags":["Accounts"],"summary":"Get Account","description":"Read a user's credit balance by UUID (legacy path name: org_id).\n\nRead-only on purpose: an unknown uuid is a 404 rather than a new account, so\na typo cannot mint wallets. Use POST /accounts/lookup to create one.","operationId":"get_account_api_v1_accounts__org_id__get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GLAccountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs":{"post":{"tags":["Jobs"],"summary":"Submit Job","description":"Submit a new video processing job.\n\nWhen VIDEO_ENDPOINTS_LIVE is False, returns a preview response without any processing.","operationId":"submit_job_api_v1_jobs_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobSubmitRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobSubmitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/by-game/{game_id}/cancel":{"post":{"tags":["Jobs"],"summary":"Cancel Job By Game","description":"Cancel a video by game_id instead of job_id.","operationId":"cancel_job_by_game_api_v1_jobs_by_game__game_id__cancel_post","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/by-game/{game_id}/status":{"get":{"tags":["Jobs"],"summary":"Get Job Status By Game","description":"Get job status by game_id instead of job_id.\n\nThe returned `state` is one of:\n  - \"processing\": the video is uploaded and still being processed or reviewed\n  - \"completed\": processing finished — stats are available, or there were no clips\n  - \"Video can not processed by Mux\": the source video could not be processed\n  - \"Jersey Color Mismatch\": the home and away jersey colors could not be told apart\n  - \"Visible Issue\": visible quality issue found during QC\n  - \"cancelled\": the job was cancelled by the client\n\n`processing_started_at` is the worker start time in UTC (+00:00).","operationId":"get_job_status_by_game_api_v1_jobs_by_game__game_id__status_get","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/by-game/{game_id}/results":{"get":{"tags":["Jobs"],"summary":"Get Job Results By Game","description":"Get job results by game_id instead of job_id.","operationId":"get_job_results_by_game_api_v1_jobs_by_game__game_id__results_get","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/{job_id}/cancel":{"post":{"tags":["Jobs"],"summary":"Cancel Job","description":"Cancel a submitted video processing job.\n\nOnly jobs still in the \"processing\" state can be cancelled. Cancelling an\nalready-cancelled job succeeds without changing anything; jobs that have\ncompleted or terminally failed return 409.\n\nWhen VIDEO_ENDPOINTS_LIVE is False, returns a preview response.","operationId":"cancel_job_api_v1_jobs__job_id__cancel_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/{job_id}/status":{"get":{"tags":["Jobs"],"summary":"Get Job Status","description":"Get the status of a processing job.\n\nThe returned `state` is one of:\n  - \"processing\": the video is uploaded and still being processed or reviewed\n  - \"completed\": processing finished — stats are available, or there were no clips\n  - \"Video can not processed by Mux\": the source video could not be processed\n  - \"Jersey Color Mismatch\": the home and away jersey colors could not be told apart\n  - \"Visible Issue\": visible quality issue found during QC\n  - \"cancelled\": the job was cancelled by the client\n\nThe response also includes `video_quality`: objective measurements of the\nsource video (resolution and frame_rate) with per-component 0-1 scores.\nUnknown metadata is represented by null component scores. No grade or\nshow/hide decision is implied.\n\n`completed_at` is the final worker-start-to-status-complete duration in\n`hh:mm:ss` format. It is `null` until the final status update completes.\n\n`processing_started_at` is the worker start time in UTC (+00:00). It is\n`null` until the worker has started.\n\nWhen VIDEO_ENDPOINTS_LIVE is False, returns a preview response.","operationId":"get_job_status_api_v1_jobs__job_id__status_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/{job_id}/results":{"get":{"tags":["Jobs"],"summary":"Get Job Results","description":"Get the results of a completed processing job.\n\nWhen VIDEO_ENDPOINTS_LIVE is False, returns a preview response.","operationId":"get_job_results_api_v1_jobs__job_id__results_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/{job_id}/post_player_stats":{"get":{"tags":["Jobs"],"summary":"Get Post Player Stats","description":"Get post player stats for a completed video/game.\n\nPlayer stats are only available once processing has completed and the stats\nhave been delivered. While the video is still processing, or if it failed or\nproduced no clips, this returns an empty list.\n\nWhen VIDEO_ENDPOINTS_LIVE is False, returns a preview response.","operationId":"get_post_player_stats_api_v1_jobs__job_id__post_player_stats_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Post Player Stats Api V1 Jobs  Job Id  Post Player Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/{job_id}/clips":{"get":{"tags":["Jobs"],"summary":"List Detected Clips","operationId":"list_detected_clips_api_v1_jobs__job_id__clips_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectedClipsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/instastats_videos":{"post":{"tags":["InstaStatsVideos"],"summary":"Submit Video","description":"Submit a new video upload.\n\nIngests the video from the provided URL and registers it for later use.\nPass `game_id` to attach the upload to an existing scheduled game; omit\nit for a standalone video.","operationId":"submit_video_api_v1_instastats_videos_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobSubmitRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobSubmitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/instastats_videos/by-game/{game_id}/cancel":{"post":{"tags":["InstaStatsVideos"],"summary":"Cancel Video By Game","description":"Cancel a registered upload by game_id instead of job_id.","operationId":"cancel_video_by_game_api_v1_instastats_videos_by_game__game_id__cancel_post","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/instastats_videos/by-game/{game_id}/status":{"get":{"tags":["InstaStatsVideos"],"summary":"Get Video Status By Game","description":"Get upload/processing status by game_id instead of job_id.\n\nThe returned `state` is one of:\n  - \"processing\": the video is uploaded and still being processed or reviewed\n  - \"completed\": processing finished — stats are available, or there were no clips\n  - \"Video can not processed by Mux\": the source video could not be processed\n  - \"Jersey Color Mismatch\": the home and away jersey colors could not be told apart\n  - \"Visible Issue\": visible quality issue found during QC\n  - \"cancelled\": the job was cancelled by the client","operationId":"get_video_status_by_game_api_v1_instastats_videos_by_game__game_id__status_get","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/instastats_videos/by-game/{game_id}/results":{"get":{"tags":["InstaStatsVideos"],"summary":"Get Video Results By Game","description":"Get processed clip results by game_id instead of job_id.","operationId":"get_video_results_by_game_api_v1_instastats_videos_by_game__game_id__results_get","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/instastats_videos/{job_id}/cancel":{"post":{"tags":["InstaStatsVideos"],"summary":"Cancel Video","description":"Cancel a registered upload.\n\nOnly uploads still in the \"processing\" state can be cancelled. Cancelling an\nalready-cancelled upload succeeds without changing anything; uploads that have\ncompleted or terminally failed return 409.\n\nWhen VIDEO_ENDPOINTS_LIVE is False, returns a preview response.","operationId":"cancel_video_api_v1_instastats_videos__job_id__cancel_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/instastats_videos/{job_id}/status":{"get":{"tags":["InstaStatsVideos"],"summary":"Get Video Status","description":"Get the upload/processing status of a video.\n\nPass the `job_id` returned by the submit endpoint. While the endpoint\nis not yet generally available, a `preview` state is returned.\n\nThe returned `state` is one of:\n  - \"processing\": the video is uploaded and still being processed or reviewed\n  - \"completed\": processing finished — stats are available, or there were no clips\n  - \"Video can not processed by Mux\": the source video could not be processed\n  - \"Jersey Color Mismatch\": the home and away jersey colors could not be told apart\n  - \"Visible Issue\": visible quality issue found during QC\n  - \"cancelled\": the job was cancelled by the client\n\nThe response also includes `video_quality`: objective measurements of the\nsource video (resolution and frame_rate). Unknown metadata is represented by\nnull component scores.","operationId":"get_video_status_api_v1_instastats_videos__job_id__status_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/instastats_videos/{job_id}/results":{"get":{"tags":["InstaStatsVideos"],"summary":"Get Video Results","description":"Get the processed clip results of a completed upload.\n\nWhen VIDEO_ENDPOINTS_LIVE is False, returns a preview response.","operationId":"get_video_results_api_v1_instastats_videos__job_id__results_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/instastats_videos/{job_id}/post_player_stats":{"get":{"tags":["InstaStatsVideos"],"summary":"Get Post Player Stats","description":"Get post player stats for a completed upload.\n\nPlayer stats are only available once processing has completed and the stats\nhave been delivered. While the video is still processing, or if it failed or\nproduced no clips, this returns an empty list.\n\nWhen VIDEO_ENDPOINTS_LIVE is False, returns a preview response.","operationId":"get_post_player_stats_api_v1_instastats_videos__job_id__post_player_stats_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Post Player Stats Api V1 Instastats Videos  Job Id  Post Player Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/instastats_videos/{job_id}/clips":{"get":{"tags":["InstaStatsVideos"],"summary":"List Detected Clips","operationId":"list_detected_clips_api_v1_instastats_videos__job_id__clips_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectedClipsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/roster":{"get":{"tags":["Roster"],"summary":"Get Roster","description":"List roster assignments, optionally scoped by competition.","operationId":"get_roster_api_v1_roster_get","parameters":[{"name":"season","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Season"}},{"name":"competition_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}],"title":"Competition Id"}},{"name":"team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id"}},{"name":"player_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Player Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Roster"],"summary":"Upsert Roster","description":"Upsert roster entries (batch support).\n\nFor each entry:\n1. Resolve player_id: use provided value, look up by (team_id, jersey_number, season), or generate new UUID\n2. Upsert player_info (by player_id)\n3. Upsert player_jersey mapping (team_id + jersey_number + season -> player_id)\n4. Upsert roster entry\n5. Upsert team_roster (season + player_id -> team_id)\n\n**Important:** When a player changes jersey number, you MUST provide `player_id` in the request.\nOtherwise the system cannot resolve the existing player (the new jersey has no prior mapping)\nand will create a duplicate player record. player_id is the canonical identity; jersey_number\nis only a roster attribute.","operationId":"upsert_roster_api_v1_roster_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterUpsertRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterUpsertResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/roster/{player_id}/{team_id}/{season}":{"delete":{"tags":["Roster"],"summary":"Delete Roster Entry","description":"Delete a roster entry by player_id, team_id, and season.\n\nNote: This only removes the roster entry. player_info and player_jersey\nmappings are preserved for historical stats integrity.","operationId":"delete_roster_entry_api_v1_roster__player_id___team_id___season__delete","parameters":[{"name":"player_id","in":"path","required":true,"schema":{"type":"string","title":"Player Id"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"season","in":"path","required":true,"schema":{"type":"string","title":"Season"}},{"name":"competition_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}],"title":"Competition Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/competitions":{"post":{"tags":["Competitions"],"summary":"Create Competition","description":"Create one season-scoped competition in the authenticated league.","operationId":"create_competition_api_v1_competitions_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompetitionCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompetitionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Competitions"],"summary":"List Competitions","description":"List competitions owned by the authenticated league.","operationId":"list_competitions_api_v1_competitions_get","parameters":[{"name":"season","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":50},{"type":"null"}],"title":"Season"}},{"name":"active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true,"title":"Active"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompetitionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/competitions/{competition_id}":{"get":{"tags":["Competitions"],"summary":"Get Competition","description":"Look up one competition by its season-scoped identifier.","operationId":"get_competition_api_v1_competitions__competition_id__get","parameters":[{"name":"competition_id","in":"path","required":true,"schema":{"type":"string","title":"Competition Id"}},{"name":"season","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":50,"title":"Season"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompetitionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Competitions"],"summary":"Update Competition","description":"Update a competition and atomically rename all of its references.","operationId":"update_competition_api_v1_competitions__competition_id__patch","parameters":[{"name":"competition_id","in":"path","required":true,"schema":{"type":"string","title":"Competition Id"}},{"name":"season","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":50,"title":"Season"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompetitionUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompetitionResponse"}}}},"404":{"description":"Competition not found"},"409":{"description":"Target competition identifier conflicts"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/biomech/sessions":{"post":{"tags":["Biomech"],"summary":"Ingest Sessions","description":"Ingest biomech sessions, pitches, and frames.\n\nIdempotency: when source_pitch_id is present, pitch_uuid is derived from the\nplayer, session, and source_pitch_id only; pitch_index is a display sequence.\nThe default sync_mode=snapshot removes pitches/frames omitted from a re-upload.","operationId":"ingest_sessions_api_v1_biomech_sessions_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BiomechSessionsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BiomechSessionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Biomech"],"summary":"Delete Sessions","description":"Delete complete biomech sessions; pitches and frames cascade.","operationId":"delete_sessions_api_v1_biomech_sessions_delete","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BiomechSessionsDeleteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BiomechSessionsDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/biomech/historical-stats":{"post":{"tags":["Biomech"],"summary":"Ingest Historical Stats","description":"Ingest biomech historical stat rows.\n\nPlayer resolution: if a row uses ``player.alias`` for a pitcher that does not\nyet exist in ``player_info``, this endpoint will bootstrap the row with\n``team_id=NULL`` (no team binding is available at this stage). Callers should\nestablish ``player_info`` first — either via ``POST /biomech/sessions`` (which\ncan resolve ``team_id`` from the session's ``team_id`` field) or by pre-creating\nrosters — to avoid teamless pitcher records.","operationId":"ingest_historical_stats_api_v1_biomech_historical_stats_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BiomechHistoricalStatsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BiomechHistoricalStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Biomech"],"summary":"Delete Historical Stats","description":"Delete historical stat rows by their complete composite identity.","operationId":"delete_historical_stats_api_v1_biomech_historical_stats_delete","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BiomechHistoricalStatsDeleteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BiomechHistoricalStatsDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/biomech/baselines":{"post":{"tags":["Biomech"],"summary":"Ingest Baselines","description":"Ingest per-player biomech baselines and baseline frames.\n\nNew baselines are inserted normally. Replacing an existing baseline requires\n``replace_existing=true``; only then does the endpoint DELETE all existing\n``biomech_baseline_frame`` rows for that ``player_id`` and bulk-insert the new\nones. ``skip_existing=true`` leaves existing baselines unchanged. Each baseline\nis committed independently.\n\nPlayer resolution: same caveat as ``/historical-stats`` — if ``player.alias``\ntriggers bootstrap, the new ``player_info`` row will have ``team_id=NULL``.\nEstablish ``player_info`` via ``POST /biomech/sessions`` or roster creation\nfirst to avoid teamless pitcher records.","operationId":"ingest_baselines_api_v1_biomech_baselines_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BiomechBaselinesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BiomechBaselinesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Biomech"],"summary":"Delete Baselines","description":"Delete complete precomputed baselines for the selected players.","operationId":"delete_baselines_api_v1_biomech_baselines_delete","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BiomechBaselinesDeleteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BiomechBaselinesDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/biomech/baselines/recompute":{"post":{"tags":["Biomech"],"summary":"Recompute Baseline","description":"Recompute one player's normalized baseline from existing pitch/frame rows.","operationId":"recompute_baseline_api_v1_biomech_baselines_recompute_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BiomechBaselineRecomputeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BiomechBaselineRecomputeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pitch-trajectory":{"post":{"tags":["Pitch Trajectory"],"summary":"Ingest Pitch Trajectories","operationId":"ingest_pitch_trajectories_api_v1_pitch_trajectory_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PitchTrajectoryBatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PitchTrajectoryBatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Pitch Trajectory"],"summary":"Delete Pitch Trajectories","operationId":"delete_pitch_trajectories_api_v1_pitch_trajectory_delete","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PitchTrajectoryDeleteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PitchTrajectoryDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/baseball/pitch-sessions":{"post":{"tags":["Baseball Pitch Sessions"],"summary":"Ingest Pitch Sessions","description":"Create or update baseball pitch sessions.\n\nSend one or more pitcher sessions with pitch-level tracking measurements.\nStable source identifiers make retries idempotent. The returned gameId can\nbe used with schedule and game detail APIs.","operationId":"ingest_pitch_sessions_api_v1_baseball_pitch_sessions_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PitchSessionsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PitchSessionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Baseball Pitch Sessions"],"summary":"Delete Pitch Sessions","description":"Delete complete pitch-tracking sessions by the gameId returned by POST.","operationId":"delete_pitch_sessions_api_v1_baseball_pitch_sessions_delete","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackingSessionsDeleteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackingSessionsDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/baseball/bat-sessions":{"post":{"tags":["Baseball Bat Sessions"],"summary":"Ingest Bat Sessions","description":"Create or update baseball batting sessions.\n\nSend one or more hitter sessions with swing-level bat-tracking measurements.\nStable source identifiers make retries idempotent. Set dryRun to validate and\npreview the import without database writes.","operationId":"ingest_bat_sessions_api_v1_baseball_bat_sessions_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatSessionsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatSessionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Baseball Bat Sessions"],"summary":"Delete Bat Sessions","description":"Delete complete bat-tracking sessions by the gameId returned by POST.","operationId":"delete_bat_sessions_api_v1_baseball_bat_sessions_delete","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackingSessionsDeleteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackingSessionsDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/teams":{"post":{"tags":["Teams"],"summary":"Upsert Team","description":"Upsert a team record.\n\nInserts a new team or updates an existing one based on team_id.","operationId":"upsert_team_api_v1_teams_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamUpsertRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamUpsertResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/teams/{team_id}":{"delete":{"tags":["Teams"],"summary":"Delete Team","description":"Delete a team record by team_id (must be a valid UUID).","operationId":"delete_team_api_v1_teams__team_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks":{"post":{"tags":["Webhooks"],"summary":"Create Webhook","description":"Register a new webhook subscription.\n\nCreates or updates a webhook subscription for the authenticated client.\nA secret will be auto-generated for signature verification.\nIf a subscription already exists for the same event_type and webhook_url,\nit will be updated with a new secret.\n\nRequires x-api-key header.\n\nReturns the subscription details including the secret (only shown once on creation).","operationId":"create_webhook_api_v1_webhooks_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionRequest"}}}},"callbacks":{"webhook_delivery_callback":{"{$request.body#/webhook_url}":{"post":{"summary":"Receive a Preciser terminal video event","description":"Verify X-Webhook-Signature as HMAC-SHA256 over the exact raw request body, deduplicate by event + video_id, then return any 2xx response within 10 seconds.","operationId":"webhook_delivery_callback__request_body__webhook_url__post","parameters":[{"name":"X-Webhook-Signature","in":"header","required":true,"schema":{"type":"string","description":"sha256=<hex HMAC>","title":"X-Webhook-Signature"},"description":"sha256=<hex HMAC>"},{"name":"X-Webhook-Event","in":"header","required":true,"schema":{"type":"string","title":"X-Webhook-Event"}},{"name":"X-Webhook-Timestamp","in":"header","required":true,"schema":{"type":"string","title":"X-Webhook-Timestamp"}},{"name":"X-Webhook-Delivery-Id","in":"header","required":true,"schema":{"type":"string","title":"X-Webhook-Delivery-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookPayload"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Webhooks"],"summary":"List Webhooks","description":"List all webhook subscriptions for the authenticated client.\n\nRequires x-api-key header.","operationId":"list_webhooks_api_v1_webhooks_get","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks/{webhook_id}":{"get":{"tags":["Webhooks"],"summary":"Get Webhook","description":"Get a specific webhook subscription by ID.\n\nRequires x-api-key header.","operationId":"get_webhook_api_v1_webhooks__webhook_id__get","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"integer","title":"Webhook Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Webhooks"],"summary":"Delete Webhook","description":"Delete a webhook subscription.\n\nRequires x-api-key header.","operationId":"delete_webhook_api_v1_webhooks__webhook_id__delete","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"integer","title":"Webhook Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Webhook Api V1 Webhooks  Webhook Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks/{webhook_id}/test":{"post":{"tags":["Webhooks"],"summary":"Test Webhook","description":"Send a test payload to a webhook subscription.\n\nSends a sample payload to verify the webhook endpoint is working correctly.\n\nRequires x-api-key header.","operationId":"test_webhook_api_v1_webhooks__webhook_id__test_post","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"integer","title":"Webhook Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/all-season-stats":{"get":{"tags":["Season Stats"],"summary":"Get All Season Stats","description":"Return one consistent per-season summary for the PLG home page.","operationId":"get_all_season_stats_api_v1_all_season_stats_get","parameters":[{"name":"competition_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}],"title":"Competition Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get All Season Stats Api V1 All Season Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/players":{"get":{"tags":["Players Stats"],"summary":"Get All Players","description":"Migrated from the following legacy PLG API route(s):\n\n- `all-players-list`: `https://api.preciser.io/all/players/list/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_all_players_api_v1_players_get","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get All Players Api V1 Players Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/all/players/list/*"],"x-legacy-deployments":[{"name":"all-players-list","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/players/game-stats":{"get":{"tags":["Players Stats"],"summary":"Get Player Game Stats","description":"Migrated from the following legacy PLG API route(s):\n\n- `player-game-stats`: `https://api.preciser.io/player/game/stats/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_player_game_stats_api_v1_players_game_stats_get","parameters":[{"name":"player_id","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Player Id"}},{"name":"game_id","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Game Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Player Game Stats Api V1 Players Game Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/player/game/stats/*"],"x-legacy-deployments":[{"name":"player-game-stats","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/players/advanced-game-stats":{"get":{"tags":["Players Stats"],"summary":"Get Player Advanced Game Stats","description":"Migrated from the following legacy PLG API route(s):\n\n- `player-advanced-game-stats`: `https://api.preciser.io/player/advanced-game/stats/*`\n- `live-player-advanced-game-stats-test`: `https://api.preciser.io/player/live-advanced-game-test/stats/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_player_advanced_game_stats_api_v1_players_advanced_game_stats_get","parameters":[{"name":"game_id","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Game Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Player Advanced Game Stats Api V1 Players Advanced Game Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/player/advanced-game/stats/*","/player/live-advanced-game-test/stats/*"],"x-legacy-deployments":[{"name":"player-advanced-game-stats","platform":"Cloud Functions (1st gen)"},{"name":"live-player-advanced-game-stats-test","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/players/advanced-stats/{season}/{season_type}/{stats_type}":{"get":{"tags":["Players Stats"],"summary":"Get Player Season Advanced Stats","description":"Migrated from the following legacy PLG API route(s):\n\n- `player_season_advanced_stats`: `https://api.preciser.io/player/season/advanced-stats/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_player_season_advanced_stats_api_v1_players_advanced_stats__season___season_type___stats_type__get","parameters":[{"name":"season","in":"path","required":true,"schema":{"type":"string","title":"Season"}},{"name":"season_type","in":"path","required":true,"schema":{"type":"string","title":"Season Type"}},{"name":"stats_type","in":"path","required":true,"schema":{"type":"string","title":"Stats Type"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Player Season Advanced Stats Api V1 Players Advanced Stats  Season   Season Type   Stats Type  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/player/season/advanced-stats/*"],"x-legacy-deployments":[{"name":"player_season_advanced_stats","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/players/special-stats/{season}/{season_type}":{"get":{"tags":["Players Stats"],"summary":"Get Player Special Stats","description":"Migrated from the following legacy PLG API route(s):\n\n- `player-special-stats`: `https://api.preciser.io/player/special/stats/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_player_special_stats_api_v1_players_special_stats__season___season_type__get","parameters":[{"name":"season","in":"path","required":true,"schema":{"type":"string","title":"Season"}},{"name":"season_type","in":"path","required":true,"schema":{"type":"string","title":"Season Type"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Player Special Stats Api V1 Players Special Stats  Season   Season Type  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/player/special/stats/*"],"x-legacy-deployments":[{"name":"player-special-stats","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/players/record-stats":{"get":{"tags":["Players Stats"],"summary":"Get Player Record Stats","description":"Migrated from the following legacy PLG API route(s):\n\n- `player-record-stats`: `https://api.preciser.io/player/record/stats/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_player_record_stats_api_v1_players_record_stats_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Status"}},{"name":"playerType","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Playertype"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Player Record Stats Api V1 Players Record Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/player/record/stats/*"],"x-legacy-deployments":[{"name":"player-record-stats","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/players/performance-rank":{"get":{"tags":["Players Stats"],"summary":"Get Player Performance Rank","description":"Migrated from the following legacy PLG API route(s):\n\n- `player-performance-rank-season`: `https://api.preciser.io/player/performance/rank/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_player_performance_rank_api_v1_players_performance_rank_get","parameters":[{"name":"season","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Season"}},{"name":"season_type","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Season Type"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Player Performance Rank Api V1 Players Performance Rank Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/player/performance/rank/*"],"x-legacy-deployments":[{"name":"player-performance-rank-season","platform":"Cloud Run"}]}},"/api/v1/players/records/season":{"get":{"tags":["Players Stats"],"summary":"Get Player Record Season","description":"Migrated from the following legacy PLG API route(s):\n\n- `player-record-season`: `https://api.preciser.io/player/record/season/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_player_record_season_api_v1_players_records_season_get","parameters":[{"name":"season","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Season"}},{"name":"season_type","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Season Type"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Player Record Season Api V1 Players Records Season Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/player/record/season/*"],"x-legacy-deployments":[{"name":"player-record-season","platform":"Cloud Run"}]}},"/api/v1/players/{player_id}":{"get":{"tags":["Players Stats"],"summary":"Get Player Info","description":"Migrated from the following legacy PLG API route(s):\n\n- `player-info`: `https://api.preciser.io/player/info/search/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_player_info_api_v1_players__player_id__get","parameters":[{"name":"player_id","in":"path","required":true,"schema":{"type":"string","title":"Player Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Player Info Api V1 Players  Player Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/player/info/search/*"],"x-legacy-deployments":[{"name":"player-info","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/players/{player_id}/career-stats":{"get":{"tags":["Players Stats"],"summary":"Get Player Career Stats","description":"Migrated from the following legacy PLG API route(s):\n\n- `player-career-stats`: `https://api.preciser.io/player/career/stats/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_player_career_stats_api_v1_players__player_id__career_stats_get","parameters":[{"name":"player_id","in":"path","required":true,"schema":{"type":"string","title":"Player Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Player Career Stats Api V1 Players  Player Id  Career Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/player/career/stats/*"],"x-legacy-deployments":[{"name":"player-career-stats","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/players/{player_id}/gamelogs/{season}/{season_type}":{"get":{"tags":["Players Stats"],"summary":"Get Player Gamelog Stats","description":"Migrated from the following legacy PLG API route(s):\n\n- `player-gamelog-stats`: `https://api.preciser.io/player/gamelog/stats/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.\n\nThis endpoint is used by the `bcl-asia` and `easl` leagues.","operationId":"get_player_gamelog_stats_api_v1_players__player_id__gamelogs__season___season_type__get","parameters":[{"name":"player_id","in":"path","required":true,"schema":{"type":"string","title":"Player Id"}},{"name":"season","in":"path","required":true,"schema":{"type":"string","title":"Season"}},{"name":"season_type","in":"path","required":true,"schema":{"type":"string","title":"Season Type"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Player Gamelog Stats Api V1 Players  Player Id  Gamelogs  Season   Season Type  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/player/gamelog/stats/*"],"x-legacy-deployments":[{"name":"player-gamelog-stats","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/players/{player_id}/season-stats/{season}/{season_type}":{"get":{"tags":["Players Stats"],"summary":"Get Player Season Stats","description":"Migrated from the following legacy PLG API route(s):\n\n- `player-season-stats`: `https://api.preciser.io/player/season/stats/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.\n\nThis endpoint is used by the `bcl-asia` and `easl` leagues.","operationId":"get_player_season_stats_api_v1_players__player_id__season_stats__season___season_type__get","parameters":[{"name":"player_id","in":"path","required":true,"schema":{"type":"string","title":"Player Id"}},{"name":"season","in":"path","required":true,"schema":{"type":"string","title":"Season"}},{"name":"season_type","in":"path","required":true,"schema":{"type":"string","title":"Season Type"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Player Season Stats Api V1 Players  Player Id  Season Stats  Season   Season Type  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/player/season/stats/*"],"x-legacy-deployments":[{"name":"player-season-stats","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/players/{player_id}/game-logs-chart":{"get":{"tags":["Players Stats"],"summary":"Get Player Game Logs Chart","description":"Migrated from the following legacy PLG API route(s):\n\n- `player-game-logs-chart`: `https://api.preciser.io/player/game/logs/chart/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_player_game_logs_chart_api_v1_players__player_id__game_logs_chart_get","parameters":[{"name":"player_id","in":"path","required":true,"schema":{"type":"string","title":"Player Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Player Game Logs Chart Api V1 Players  Player Id  Game Logs Chart Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/player/game/logs/chart/*"],"x-legacy-deployments":[{"name":"player-game-logs-chart","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/players/{player_id}/statistics":{"get":{"tags":["Players Stats"],"summary":"Get Player Statistics","description":"Migrated from the following legacy PLG API route(s):\n\n- `player-statistics-data`: `https://api.preciser.io/player/statistics/season/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_player_statistics_api_v1_players__player_id__statistics_get","parameters":[{"name":"player_id","in":"path","required":true,"schema":{"type":"string","title":"Player Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Player Statistics Api V1 Players  Player Id  Statistics Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/player/statistics/season/*"],"x-legacy-deployments":[{"name":"player-statistics-data","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/players/{player_id}/offense/{season}/{season_type}/{stats_type}":{"get":{"tags":["Players Stats"],"summary":"Get Player Stats Offense","description":"Migrated from the following legacy PLG API route(s):\n\n- `player-stats-offense`: `https://api.preciser.io/player/offense/seasons/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_player_stats_offense_api_v1_players__player_id__offense__season___season_type___stats_type__get","parameters":[{"name":"player_id","in":"path","required":true,"schema":{"type":"string","title":"Player Id"}},{"name":"season","in":"path","required":true,"schema":{"type":"string","title":"Season"}},{"name":"season_type","in":"path","required":true,"schema":{"type":"string","title":"Season Type"}},{"name":"stats_type","in":"path","required":true,"schema":{"type":"string","title":"Stats Type"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Player Stats Offense Api V1 Players  Player Id  Offense  Season   Season Type   Stats Type  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/player/offense/seasons/*"],"x-legacy-deployments":[{"name":"player-stats-offense","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/players/best-top-10/{season}/{season_type}":{"get":{"tags":["Players Stats"],"summary":"Get Player Stats Best Top 10","operationId":"get_player_stats_best_top_10_api_v1_players_best_top_10__season___season_type__get","parameters":[{"name":"season","in":"path","required":true,"schema":{"type":"string","title":"Season"}},{"name":"season_type","in":"path","required":true,"schema":{"type":"string","title":"Season Type"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Player Stats Best Top 10 Api V1 Players Best Top 10  Season   Season Type  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/teams/":{"get":{"tags":["Teams Stats"],"summary":"Get All Teams","operationId":"get_all_teams_api_v1_teams__get","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get All Teams Api V1 Teams  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/teams/game-stats":{"get":{"tags":["Teams Stats"],"summary":"Get Team Game Stats","description":"Migrated from the following legacy PLG API route(s):\n\n- `team-game-stats`: `https://api.preciser.io/team/game/stats/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_team_game_stats_api_v1_teams_game_stats_get","parameters":[{"name":"team_id","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Team Id"}},{"name":"game_id","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Game Id"}},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Team Game Stats Api V1 Teams Game Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/team/game/stats/*"],"x-legacy-deployments":[{"name":"team-game-stats","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/teams/advanced-stats/offense/{season}/{season_type}":{"get":{"tags":["Teams Stats"],"summary":"Get Team Advanced Stats Offense","description":"Migrated from the following legacy PLG API route(s):\n\n- `team-season-advanced-stats`: `https://api.preciser.io/team/season-advanced-stats/offense/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_team_advanced_stats_offense_api_v1_teams_advanced_stats_offense__season___season_type__get","parameters":[{"name":"season","in":"path","required":true,"schema":{"type":"string","title":"Season"}},{"name":"season_type","in":"path","required":true,"schema":{"type":"string","title":"Season Type"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Team Advanced Stats Offense Api V1 Teams Advanced Stats Offense  Season   Season Type  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/team/season-advanced-stats/offense/*"],"x-legacy-deployments":[{"name":"team-season-advanced-stats","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/teams/advanced-stats/defense/{season}/{season_type}":{"get":{"tags":["Teams Stats"],"summary":"Get Team Advanced Stats Defense","description":"Migrated from the following legacy PLG API route(s):\n\n- `team-season-advanced-stats-defense`: `https://api.preciser.io/team/season-advanced-stats/defense/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_team_advanced_stats_defense_api_v1_teams_advanced_stats_defense__season___season_type__get","parameters":[{"name":"season","in":"path","required":true,"schema":{"type":"string","title":"Season"}},{"name":"season_type","in":"path","required":true,"schema":{"type":"string","title":"Season Type"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Team Advanced Stats Defense Api V1 Teams Advanced Stats Defense  Season   Season Type  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/team/season-advanced-stats/defense/*"],"x-legacy-deployments":[{"name":"team-season-advanced-stats-defense","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/teams/special-stats/{season}/{season_type}":{"get":{"tags":["Teams Stats"],"summary":"Get Team Special Stats","description":"Migrated from the following legacy PLG API route(s):\n\n- `team-special-stats`: `https://api.preciser.io/team/special/stats/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_team_special_stats_api_v1_teams_special_stats__season___season_type__get","parameters":[{"name":"season","in":"path","required":true,"schema":{"type":"string","title":"Season"}},{"name":"season_type","in":"path","required":true,"schema":{"type":"string","title":"Season Type"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Team Special Stats Api V1 Teams Special Stats  Season   Season Type  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/team/special/stats/*"],"x-legacy-deployments":[{"name":"team-special-stats","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/teams/records/season":{"get":{"tags":["Teams Stats"],"summary":"Get Team Record Season","description":"Migrated from the following legacy PLG API route(s):\n\n- `team-record-season`: `https://api.preciser.io/team/record/season/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_team_record_season_api_v1_teams_records_season_get","parameters":[{"name":"season","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Season"}},{"name":"season_type","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Season Type"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Team Record Season Api V1 Teams Records Season Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/team/record/season/*"],"x-legacy-deployments":[{"name":"team-record-season","platform":"Cloud Run"}]}},"/api/v1/teams/opponent-data/{season_id}/{season_type}":{"get":{"tags":["Teams Stats"],"summary":"Get Opp Team Data","description":"Migrated from the following legacy PLG API route(s):\n\n- `opp-team-data`: `https://api.preciser.io/v1/opp-team-data/id/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_opp_team_data_api_v1_teams_opponent_data__season_id___season_type__get","parameters":[{"name":"season_id","in":"path","required":true,"schema":{"type":"string","title":"Season Id"}},{"name":"season_type","in":"path","required":true,"schema":{"type":"string","title":"Season Type"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Opp Team Data Api V1 Teams Opponent Data  Season Id   Season Type  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/v1/opp-team-data/id/*"],"x-legacy-deployments":[{"name":"opp-team-data","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/teams/matches/{season_id}/{season_type}":{"get":{"tags":["Teams Stats"],"summary":"Get Team Matches","description":"Migrated from the following legacy PLG API route(s):\n\n- `team-data`: `https://api.preciser.io/v1/team-data/id/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_team_matches_api_v1_teams_matches__season_id___season_type__get","parameters":[{"name":"season_id","in":"path","required":true,"schema":{"type":"string","title":"Season Id"}},{"name":"season_type","in":"path","required":true,"schema":{"type":"string","title":"Season Type"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Team Matches Api V1 Teams Matches  Season Id   Season Type  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/v1/team-data/id/*"],"x-legacy-deployments":[{"name":"team-data","platform":"Cloud Run"}]}},"/api/v1/teams/{team_id}/schedule":{"get":{"tags":["Teams Stats"],"summary":"Get Team Schedule","description":"Migrated from the following legacy PLG API route(s):\n\n- `schedule-list`: `https://api.preciser.io/league/schedule/list/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_team_schedule_api_v1_teams__team_id__schedule_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Team Schedule Api V1 Teams  Team Id  Schedule Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/league/schedule/list/*"],"x-legacy-deployments":[{"name":"schedule-list","platform":"Cloud Run"}]}},"/api/v1/teams/{team_id}/players":{"get":{"tags":["Teams Stats"],"summary":"Get Team Players","description":"Migrated from the following legacy PLG API route(s):\n\n- `player-list`: `https://api.preciser.io/league/player/list/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_team_players_api_v1_teams__team_id__players_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Team Players Api V1 Teams  Team Id  Players Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/league/player/list/*"],"x-legacy-deployments":[{"name":"player-list","platform":"Cloud Run"}]}},"/api/v1/teams/{team_id}/players/{player_id}":{"get":{"tags":["Teams Stats"],"summary":"Get Team Player Info","description":"Migrated from the following legacy PLG API route(s):\n\n- `player-info`: `https://api.preciser.io/league/player/info/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_team_player_info_api_v1_teams__team_id__players__player_id__get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"player_id","in":"path","required":true,"schema":{"type":"string","title":"Player Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Team Player Info Api V1 Teams  Team Id  Players  Player Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/league/player/info/*"],"x-legacy-deployments":[{"name":"player-info","platform":"Cloud Run"}]}},"/api/v1/teams/{team_id}/coaches":{"get":{"tags":["Teams Stats"],"summary":"Get Team Coaches","description":"Migrated from the following legacy PLG API route(s):\n\n- `coach-list`: `https://api.preciser.io/league/coach/list/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_team_coaches_api_v1_teams__team_id__coaches_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Team Coaches Api V1 Teams  Team Id  Coaches Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/league/coach/list/*"],"x-legacy-deployments":[{"name":"coach-list","platform":"Cloud Run"}]}},"/api/v1/teams/{team_id}/coaches/{coach_id}":{"get":{"tags":["Teams Stats"],"summary":"Get Team Coach Info","description":"Migrated from the following legacy PLG API route(s):\n\n- `coach-info`: `https://api.preciser.io/league/coach/info/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_team_coach_info_api_v1_teams__team_id__coaches__coach_id__get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"coach_id","in":"path","required":true,"schema":{"type":"string","title":"Coach Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Team Coach Info Api V1 Teams  Team Id  Coaches  Coach Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/league/coach/info/*"],"x-legacy-deployments":[{"name":"coach-info","platform":"Cloud Run"}]}},"/api/v1/teams/{team_id}/gamelogs/{season}/{season_type}":{"get":{"tags":["Teams Stats"],"summary":"Get Team Gamelog Stats","description":"Migrated from the following legacy PLG API route(s):\n\n- `team-gamelog-stats`: `https://api.preciser.io/team/gamelog/stats/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.\n\nThis endpoint is used by the `bcl-asia` and `easl` leagues.","operationId":"get_team_gamelog_stats_api_v1_teams__team_id__gamelogs__season___season_type__get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"season","in":"path","required":true,"schema":{"type":"string","title":"Season"}},{"name":"season_type","in":"path","required":true,"schema":{"type":"string","title":"Season Type"}},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Team Gamelog Stats Api V1 Teams  Team Id  Gamelogs  Season   Season Type  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/team/gamelog/stats/*"],"x-legacy-deployments":[{"name":"team-gamelog-stats","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/teams/{team_id}/ranking/{season}/{season_type}/{stats_type}":{"get":{"tags":["Teams Stats"],"summary":"Get Team Stats Ranking","description":"Migrated from the following legacy PLG API route(s):\n\n- `team-stats-ranking`: `https://api.preciser.io/team/statistics/rank/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_team_stats_ranking_api_v1_teams__team_id__ranking__season___season_type___stats_type__get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"season","in":"path","required":true,"schema":{"type":"string","title":"Season"}},{"name":"season_type","in":"path","required":true,"schema":{"type":"string","title":"Season Type"}},{"name":"stats_type","in":"path","required":true,"schema":{"type":"string","title":"Stats Type"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Team Stats Ranking Api V1 Teams  Team Id  Ranking  Season   Season Type   Stats Type  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/team/statistics/rank/*"],"x-legacy-deployments":[{"name":"team-stats-ranking","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/teams/{team_id}/best-player/{season}/{season_type}/{stats_type}":{"get":{"tags":["Teams Stats"],"summary":"Get Team Stats Best Player","description":"Migrated from the following legacy PLG API route(s):\n\n- `team-stats-best-player`: `https://api.preciser.io/team/statistics/leaders/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_team_stats_best_player_api_v1_teams__team_id__best_player__season___season_type___stats_type__get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"season","in":"path","required":true,"schema":{"type":"string","title":"Season"}},{"name":"season_type","in":"path","required":true,"schema":{"type":"string","title":"Season Type"}},{"name":"stats_type","in":"path","required":true,"schema":{"type":"string","title":"Stats Type"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Team Stats Best Player Api V1 Teams  Team Id  Best Player  Season   Season Type   Stats Type  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/team/statistics/leaders/*"],"x-legacy-deployments":[{"name":"team-stats-best-player","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/teams/{team_id}/offense/{season}/{season_type}/{stats_type}":{"get":{"tags":["Teams Stats"],"summary":"Get Team Stats Offense","operationId":"get_team_stats_offense_api_v1_teams__team_id__offense__season___season_type___stats_type__get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"season","in":"path","required":true,"schema":{"type":"string","title":"Season"}},{"name":"season_type","in":"path","required":true,"schema":{"type":"string","title":"Season Type"}},{"name":"stats_type","in":"path","required":true,"schema":{"type":"string","title":"Stats Type"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Team Stats Offense Api V1 Teams  Team Id  Offense  Season   Season Type   Stats Type  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/teams/{team_id}/defense/{season}/{season_type}/{stats_type}":{"get":{"tags":["Teams Stats"],"summary":"Get Team Stats Defense","description":"Migrated from the following legacy PLG API route(s):\n\n- `team-stats-defense`: `https://api.preciser.io/team/defense/seasons/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_team_stats_defense_api_v1_teams__team_id__defense__season___season_type___stats_type__get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"season","in":"path","required":true,"schema":{"type":"string","title":"Season"}},{"name":"season_type","in":"path","required":true,"schema":{"type":"string","title":"Season Type"}},{"name":"stats_type","in":"path","required":true,"schema":{"type":"string","title":"Stats Type"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Team Stats Defense Api V1 Teams  Team Id  Defense  Season   Season Type   Stats Type  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/team/defense/seasons/*"],"x-legacy-deployments":[{"name":"team-stats-defense","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/games/info":{"get":{"tags":["Games Stats"],"summary":"Get Game Info","description":"Migrated from the following legacy PLG API route(s):\n\n- `game-info`: `https://api.preciser.io/game/info/stats/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.\n\nThis endpoint is used by the `bcl-asia` and `easl` leagues.","operationId":"get_game_info_api_v1_games_info_get","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Game Info Api V1 Games Info Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/game/info/stats/*"],"x-legacy-deployments":[{"name":"game-info","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/games/shot-chart/season/{season_id}/{season_type}/{team_id}":{"get":{"tags":["Games Stats"],"summary":"Get Shot Pbp Season","description":"Migrated from the following legacy PLG API route(s):\n\n- `shot-pbp-season`: `https://api.preciser.io/v1/shot-pbp-season/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_shot_pbp_season_api_v1_games_shot_chart_season__season_id___season_type___team_id__get","parameters":[{"name":"season_id","in":"path","required":true,"schema":{"type":"string","title":"Season Id"}},{"name":"season_type","in":"path","required":true,"schema":{"type":"string","title":"Season Type"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Shot Pbp Season Api V1 Games Shot Chart Season  Season Id   Season Type   Team Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/v1/shot-pbp-season/*"],"x-legacy-deployments":[{"name":"shot-pbp-season","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/games/{game_id}/detail":{"get":{"tags":["Games Stats"],"summary":"Get Game Detail","description":"Migrated from the following legacy PLG API route(s):\n\n- `game-detail`: `https://api.preciser.io/league/game/detail/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_game_detail_api_v1_games__game_id__detail_get","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Game Detail Api V1 Games  Game Id  Detail Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/league/game/detail/*"],"x-legacy-deployments":[{"name":"game-detail","platform":"Cloud Run"}]}},"/api/v1/games/{game_id}/pre-summary":{"get":{"tags":["Games Stats"],"summary":"Get Pre Game Summary","description":"Migrated from the following legacy PLG API route(s):\n\n- `pre-game-summary`: `https://api.preciser.io/pre/game/summary/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_pre_game_summary_api_v1_games__game_id__pre_summary_get","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Pre Game Summary Api V1 Games  Game Id  Pre Summary Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/pre/game/summary/*"],"x-legacy-deployments":[{"name":"pre-game-summary","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/games/{game_id}/post-summary":{"get":{"tags":["Games Stats"],"summary":"Get Post Game Summary","description":"Migrated from the following legacy PLG API route(s):\n\n- `post-game-summary`: `https://api.preciser.io/post/game/summary/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_post_game_summary_api_v1_games__game_id__post_summary_get","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Post Game Summary Api V1 Games  Game Id  Post Summary Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/post/game/summary/*"],"x-legacy-deployments":[{"name":"post-game-summary","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/games/{game_id}/injuries":{"get":{"tags":["Games Stats"],"summary":"Get Game Injuries","description":"Migrated from the following legacy PLG API route(s):\n\n- `game-injury-list`: `https://api.preciser.io/game/injury/list/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_game_injuries_api_v1_games__game_id__injuries_get","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Game Injuries Api V1 Games  Game Id  Injuries Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/game/injury/list/*"],"x-legacy-deployments":[{"name":"game-injury-list","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/games/{game_id}/rotation-chart":{"get":{"tags":["Games Stats"],"summary":"Get Game Rotation Chart","description":"Migrated from the following legacy PLG API route(s):\n\n- `game-rotation-chart`: `https://api.preciser.io/game/rotation/chart/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_game_rotation_chart_api_v1_games__game_id__rotation_chart_get","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Game Rotation Chart Api V1 Games  Game Id  Rotation Chart Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/game/rotation/chart/*"],"x-legacy-deployments":[{"name":"game-rotation-chart","platform":"Cloud Run"}]}},"/api/v1/games/{game_id}/commentators":{"get":{"tags":["Games Stats"],"summary":"Get Game Commentators","description":"Migrated from the following legacy PLG API route(s):\n\n- `game-commentator-list`: `https://api.preciser.io/game/commentators/list/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_game_commentators_api_v1_games__game_id__commentators_get","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Game Commentators Api V1 Games  Game Id  Commentators Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/game/commentators/list/*"],"x-legacy-deployments":[{"name":"game-commentator-list","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/games/{game_id}/lead-stats":{"get":{"tags":["Games Stats"],"summary":"Get Game Lead Stats","description":"Migrated from the following legacy PLG API route(s):\n\n- `game-leading-stats`: `https://api.preciser.io/game/leading/stats/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_game_lead_stats_api_v1_games__game_id__lead_stats_get","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Game Lead Stats Api V1 Games  Game Id  Lead Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/game/leading/stats/*"],"x-legacy-deployments":[{"name":"game-leading-stats","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/games/{game_id}/shot-chart":{"get":{"tags":["Games Stats"],"summary":"Get Shot Pbp Games","description":"Migrated from the following legacy PLG API route(s):\n\n- `shot-pbp-games`: `https://api.preciser.io/v1/chart-data/id/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_shot_pbp_games_api_v1_games__game_id__shot_chart_get","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Shot Pbp Games Api V1 Games  Game Id  Shot Chart Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/v1/chart-data/id/*"],"x-legacy-deployments":[{"name":"shot-pbp-games","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/games/{game_id}/pbp":{"get":{"tags":["Games Stats"],"summary":"Get Pbp","operationId":"get_pbp_api_v1_games__game_id__pbp_get","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Pbp Api V1 Games  Game Id  Pbp Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/standings":{"get":{"tags":["Standings"],"summary":"Get Standings","description":"Migrated from the following legacy PLG API route(s):\n\n- `standings`: `https://api.preciser.io/league/standings/result/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_standings_api_v1_standings_get","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Standings Api V1 Standings Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/league/standings/result/*"],"x-legacy-deployments":[{"name":"standings","platform":"Cloud Run"}]}},"/api/v1/standings/{season}/{season_type}":{"get":{"tags":["Standings"],"summary":"Get Standings By Season","description":"Migrated from the following legacy PLG API route(s):\n\n- `standings`: `https://api.preciser.io/standings/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_standings_by_season_api_v1_standings__season___season_type__get","parameters":[{"name":"season","in":"path","required":true,"schema":{"type":"string","title":"Season"}},{"name":"season_type","in":"path","required":true,"schema":{"type":"string","title":"Season Type"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Standings By Season Api V1 Standings  Season   Season Type  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/standings/*"],"x-legacy-deployments":[{"name":"standings","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/self-serve/players/{player_name}/gamelogs":{"get":{"tags":["Self-Serve"],"summary":"Get Self Serve Player Gamelog Stats","description":"Migrated from the following legacy PLG API route(s):\n\n- `self-serve-player-gamelog-stats`: `https://api.preciser.io/self-serve-player-gamelog-stats/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_self_serve_player_gamelog_stats_api_v1_self_serve_players__player_name__gamelogs_get","parameters":[{"name":"player_name","in":"path","required":true,"schema":{"type":"string","title":"Player Name"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Self Serve Player Gamelog Stats Api V1 Self Serve Players  Player Name  Gamelogs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/self-serve-player-gamelog-stats/*"],"x-legacy-deployments":[{"name":"self-serve-player-gamelog-stats","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/self-serve/players/{player_name}/overall-stats":{"get":{"tags":["Self-Serve"],"summary":"Get Self Serve Player Overall Stats","description":"Migrated from the following legacy PLG API route(s):\n\n- `self-serve-post-overall-stats`: `https://api.preciser.io/self-serve-player-overall-stats/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_self_serve_player_overall_stats_api_v1_self_serve_players__player_name__overall_stats_get","parameters":[{"name":"player_name","in":"path","required":true,"schema":{"type":"string","title":"Player Name"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Self Serve Player Overall Stats Api V1 Self Serve Players  Player Name  Overall Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/self-serve-player-overall-stats/*"],"x-legacy-deployments":[{"name":"self-serve-post-overall-stats","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/self-serve/teams/stats":{"get":{"tags":["Self-Serve"],"summary":"Get Self Serve Team Stats","description":"Migrated from the following legacy PLG API route(s):\n\n- `self-serve-team-stats`: `https://api.preciser.io/self-serve-team-stats/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_self_serve_team_stats_api_v1_self_serve_teams_stats_get","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Self Serve Team Stats Api V1 Self Serve Teams Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/self-serve-team-stats/*"],"x-legacy-deployments":[{"name":"self-serve-team-stats","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/self-serve/teams/opponent-stats":{"get":{"tags":["Self-Serve"],"summary":"Get Self Serve Opp Team Stats","description":"Migrated from the following legacy PLG API route(s):\n\n- `self-serve-opp-team-stats`: `https://api.preciser.io/self-serve-opp-team-stats/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_self_serve_opp_team_stats_api_v1_self_serve_teams_opponent_stats_get","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Self Serve Opp Team Stats Api V1 Self Serve Teams Opponent Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/self-serve-opp-team-stats/*"],"x-legacy-deployments":[{"name":"self-serve-opp-team-stats","platform":"Cloud Functions (1st gen)"}]}},"/api/v1/self-serve/games/{game_id}/post-stats":{"get":{"tags":["Self-Serve"],"summary":"Get Self Serve Post Game Stats","description":"Migrated from the following legacy PLG API route(s):\n\n- `self-serve-post-game-stats`: `https://api.preciser.io/post_stats/*`\n\nThe legacy URL's organization segment is replaced by the `League` request header, allowing the same handler to select any authorized league database.","operationId":"get_self_serve_post_game_stats_api_v1_self_serve_games__game_id__post_stats_get","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Required API key issued by Preciser.","title":"X-Api-Key"},"description":"Required API key issued by Preciser."},{"name":"League","in":"header","required":true,"schema":{"type":"string","description":"Required tenant/database selector, for example pitchbio-master.","title":"League"},"description":"Required tenant/database selector, for example pitchbio-master."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Self Serve Post Game Stats Api V1 Self Serve Games  Game Id  Post Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-legacy-api-paths":["/post_stats/*"],"x-legacy-deployments":[{"name":"self-serve-post-game-stats","platform":"Cloud Functions (1st gen)"}]}}},"components":{"schemas":{"BatSession":{"properties":{"sourceSessionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcesessionid","description":"Stable session identifier from your system. Recommended for idempotent retries."},"session":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session","description":"Session label shown to users."},"sessionDate":{"type":"string","format":"date","title":"Sessiondate","description":"Session date."},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduledat","description":"Optional exact session timestamp."},"team":{"$ref":"#/components/schemas/BatTrackingEntity"},"hitter":{"$ref":"#/components/schemas/BatTrackingEntity"},"swings":{"items":{"$ref":"#/components/schemas/SwingMeasurement"},"type":"array","maxItems":500,"minItems":1,"title":"Swings","description":"Bat-tracking measurements in this session."}},"type":"object","required":["sessionDate","team","hitter","swings"],"title":"BatSession"},"BatSessionImportItem":{"properties":{"sourceSessionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcesessionid"},"gameId":{"type":"string","title":"Gameid"},"teamId":{"type":"string","title":"Teamid"},"hitterId":{"type":"string","title":"Hitterid"},"swingsAccepted":{"type":"integer","title":"Swingsaccepted"},"swingsSkipped":{"type":"integer","title":"Swingsskipped"}},"type":"object","required":["gameId","teamId","hitterId","swingsAccepted","swingsSkipped"],"title":"BatSessionImportItem"},"BatSessionsRequest":{"properties":{"season":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Season","description":"Optional season label. When omitted, each session uses the year from scheduledAt or sessionDate, so one request may span calendar years."},"seasonType":{"type":"string","minLength":1,"title":"Seasontype","description":"Season type.","default":"regular season"},"gameTier":{"type":"string","minLength":1,"title":"Gametier","description":"Competition tier.","default":"1"},"venue":{"type":"string","minLength":1,"title":"Venue","description":"Venue or source label.","default":"BatData"},"speedUnit":{"type":"string","enum":["kph","mph"],"title":"Speedunit","description":"Input unit used by batSpeed and exitVelocity. Defaults to kph, meaning kilometres per hour (km/h). Preciser tracking responses are also returned in km/h.","default":"kph"},"distanceUnit":{"type":"string","enum":["m","ft"],"title":"Distanceunit","description":"Unit used by hitDistance. Values are stored as feet.","default":"ft"},"syncMode":{"type":"string","enum":["snapshot","upsert"],"title":"Syncmode","description":"snapshot treats every submitted session as its complete current state and removes previously stored swings that are omitted. upsert keeps omitted swings.","default":"snapshot"},"dryRun":{"type":"boolean","title":"Dryrun","description":"Validate and prepare the import without writing to the database.","default":false},"sessions":{"items":{"$ref":"#/components/schemas/BatSession"},"type":"array","maxItems":50,"minItems":1,"title":"Sessions","description":"Batting sessions to create or update."}},"type":"object","required":["sessions"],"title":"BatSessionsRequest"},"BatSessionsResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"dryRun":{"type":"boolean","title":"Dryrun"},"summary":{"$ref":"#/components/schemas/BatSessionsSummary"},"items":{"items":{"$ref":"#/components/schemas/BatSessionImportItem"},"type":"array","title":"Items"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"type":"object","required":["success","dryRun","summary","items"],"title":"BatSessionsResponse"},"BatSessionsSummary":{"properties":{"sessions":{"type":"integer","title":"Sessions"},"swings":{"type":"integer","title":"Swings"},"teams":{"type":"integer","title":"Teams"},"hitters":{"type":"integer","title":"Hitters"}},"type":"object","required":["sessions","swings","teams","hitters"],"title":"BatSessionsSummary"},"BatTrackingEntity":{"properties":{"externalId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Externalid","description":"Stable identifier from your system. If omitted, name is used for matching."},"name":{"type":"string","minLength":1,"title":"Name","description":"Display name."},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color","description":"Optional hex color for team display."}},"type":"object","required":["name"],"title":"BatTrackingEntity"},"BiomechBaseline":{"properties":{"player":{"$ref":"#/components/schemas/PlayerRef"},"num_pitches":{"type":"integer","minimum":1.0,"title":"Num Pitches"},"num_sessions":{"type":"integer","minimum":1.0,"title":"Num Sessions"},"frame_range":{"prefixItems":[{"type":"integer"},{"type":"integer"}],"type":"array","maxItems":2,"minItems":2,"title":"Frame Range"},"fp_frame_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fp Frame Index"},"mer_frame_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mer Frame Index"},"br_frame_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Br Frame Index"},"frames":{"items":{"$ref":"#/components/schemas/BiomechBaselineFrame"},"type":"array","maxItems":60000,"minItems":1,"title":"Frames"}},"type":"object","required":["player","num_pitches","num_sessions","frame_range","frames"],"title":"BiomechBaseline"},"BiomechBaselineFrame":{"properties":{"frame":{"type":"integer","title":"Frame"},"metric":{"type":"string","enum":["shoulder_abduction","shoulder_horizontal_abduction","shoulder_external_rotation","elbow_flexion","left_hip_flexion","right_hip_flexion","left_knee_flexion","right_knee_flexion","stride_length","pelvis_rotation","torso_rotation","hip_shoulder_separation","elbow_varus_torque","trunk_anterior_tilt","trunk_lateral_tilt"],"title":"Metric"},"mean":{"type":"number","title":"Mean"},"std":{"type":"number","minimum":0.0,"title":"Std"},"sample_count":{"type":"integer","minimum":1.0,"title":"Sample Count"}},"type":"object","required":["frame","metric","mean","std","sample_count"],"title":"BiomechBaselineFrame"},"BiomechBaselineItemResponse":{"properties":{"player_id":{"type":"string","title":"Player Id"},"frames":{"type":"integer","title":"Frames"},"skipped":{"type":"boolean","title":"Skipped","default":false}},"type":"object","required":["player_id","frames"],"title":"BiomechBaselineItemResponse"},"BiomechBaselineRecomputeRequest":{"properties":{"player":{"$ref":"#/components/schemas/PlayerRef"},"skip_existing":{"type":"boolean","title":"Skip Existing","default":false}},"type":"object","required":["player"],"title":"BiomechBaselineRecomputeRequest"},"BiomechBaselineRecomputeResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"player_id":{"type":"string","title":"Player Id"},"skipped":{"type":"boolean","title":"Skipped"},"num_pitches":{"type":"integer","title":"Num Pitches"},"num_sessions":{"type":"integer","title":"Num Sessions"},"frames_inserted":{"type":"integer","title":"Frames Inserted"}},"type":"object","required":["success","player_id","skipped","num_pitches","num_sessions","frames_inserted"],"title":"BiomechBaselineRecomputeResponse"},"BiomechBaselinesDeleteRequest":{"properties":{"players":{"items":{"$ref":"#/components/schemas/PlayerRef"},"type":"array","maxItems":10,"minItems":1,"title":"Players"}},"type":"object","required":["players"],"title":"BiomechBaselinesDeleteRequest"},"BiomechBaselinesDeleteResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"players_deleted":{"type":"integer","title":"Players Deleted"},"player_ids":{"items":{"type":"string"},"type":"array","title":"Player Ids"}},"type":"object","required":["success","players_deleted","player_ids"],"title":"BiomechBaselinesDeleteResponse"},"BiomechBaselinesRequest":{"properties":{"baselines":{"items":{"$ref":"#/components/schemas/BiomechBaseline"},"type":"array","maxItems":10,"minItems":1,"title":"Baselines"},"skip_existing":{"type":"boolean","title":"Skip Existing","description":"Leave an existing player baseline unchanged.","default":false},"replace_existing":{"type":"boolean","title":"Replace Existing","description":"Explicitly allow replacement of an existing player baseline and all of its frames.","default":false}},"type":"object","required":["baselines"],"title":"BiomechBaselinesRequest"},"BiomechBaselinesResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"players_upserted":{"type":"integer","title":"Players Upserted"},"players_skipped":{"type":"integer","title":"Players Skipped","default":0},"frames_inserted":{"type":"integer","title":"Frames Inserted"},"items":{"items":{"$ref":"#/components/schemas/BiomechBaselineItemResponse"},"type":"array","title":"Items"}},"type":"object","required":["success","players_upserted","frames_inserted","items"],"title":"BiomechBaselinesResponse"},"BiomechFrame":{"properties":{"frame":{"type":"integer","title":"Frame"},"shoulder_abduction":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Shoulder Abduction"},"shoulder_horizontal_abduction":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Shoulder Horizontal Abduction"},"shoulder_external_rotation":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Shoulder External Rotation"},"elbow_flexion":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Elbow Flexion"},"left_hip_flexion":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Left Hip Flexion"},"right_hip_flexion":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Right Hip Flexion"},"left_knee_flexion":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Left Knee Flexion"},"right_knee_flexion":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Right Knee Flexion"},"stride_length":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stride Length"},"pelvis_rotation":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pelvis Rotation"},"torso_rotation":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Torso Rotation"},"hip_shoulder_separation":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hip Shoulder Separation"},"elbow_varus_torque":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Elbow Varus Torque"},"trunk_anterior_tilt":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Trunk Anterior Tilt"},"trunk_lateral_tilt":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Trunk Lateral Tilt"}},"type":"object","required":["frame"],"title":"BiomechFrame"},"BiomechHistoricalStat":{"properties":{"player":{"$ref":"#/components/schemas/PlayerRef"},"stage":{"type":"string","enum":["fp","mer","br"],"title":"Stage"},"metric":{"type":"string","enum":["shoulder_abduction","shoulder_horizontal_abduction","shoulder_external_rotation","elbow_flexion","left_hip_flexion","right_hip_flexion","left_knee_flexion","right_knee_flexion","stride_length","pelvis_rotation","torso_rotation","hip_shoulder_separation","elbow_varus_torque","trunk_anterior_tilt","trunk_lateral_tilt"],"title":"Metric"},"value":{"type":"number","title":"Value"},"captured_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Captured At"},"pitch_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pitch Id"}},"type":"object","required":["player","stage","metric","value"],"title":"BiomechHistoricalStat"},"BiomechHistoricalStatKey":{"properties":{"player":{"$ref":"#/components/schemas/PlayerRef"},"stage":{"type":"string","enum":["fp","mer","br"],"title":"Stage"},"metric":{"type":"string","enum":["shoulder_abduction","shoulder_horizontal_abduction","shoulder_external_rotation","elbow_flexion","left_hip_flexion","right_hip_flexion","left_knee_flexion","right_knee_flexion","stride_length","pelvis_rotation","torso_rotation","hip_shoulder_separation","elbow_varus_torque","trunk_anterior_tilt","trunk_lateral_tilt"],"title":"Metric"},"captured_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Captured At"},"pitch_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pitch Id"}},"type":"object","required":["player","stage","metric"],"title":"BiomechHistoricalStatKey"},"BiomechHistoricalStatsDeleteRequest":{"properties":{"stats":{"items":{"$ref":"#/components/schemas/BiomechHistoricalStatKey"},"type":"array","maxItems":5000,"minItems":1,"title":"Stats"}},"type":"object","required":["stats"],"title":"BiomechHistoricalStatsDeleteRequest"},"BiomechHistoricalStatsDeleteResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"rows_deleted":{"type":"integer","title":"Rows Deleted"}},"type":"object","required":["success","rows_deleted"],"title":"BiomechHistoricalStatsDeleteResponse"},"BiomechHistoricalStatsRequest":{"properties":{"stats":{"items":{"$ref":"#/components/schemas/BiomechHistoricalStat"},"type":"array","maxItems":5000,"minItems":1,"title":"Stats"}},"type":"object","required":["stats"],"title":"BiomechHistoricalStatsRequest"},"BiomechHistoricalStatsResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"rows_upserted":{"type":"integer","title":"Rows Upserted"}},"type":"object","required":["success","rows_upserted"],"title":"BiomechHistoricalStatsResponse"},"BiomechPitch":{"properties":{"source_pitch_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Pitch Id","description":"Stable physical-pitch identifier used for updates and retries."},"pitch_index":{"type":"integer","minimum":1.0,"title":"Pitch Index","description":"Display sequence within the session. It is not part of the identity when source_pitch_id is provided."},"fp_frame":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fp Frame"},"mer_frame":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mer Frame"},"br_frame":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Br Frame"},"frames":{"items":{"$ref":"#/components/schemas/BiomechFrame"},"type":"array","maxItems":2500,"minItems":1,"title":"Frames"}},"type":"object","required":["pitch_index","frames"],"title":"BiomechPitch"},"BiomechSession":{"properties":{"session_id":{"type":"string","title":"Session Id"},"player":{"$ref":"#/components/schemas/PlayerRef"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id"},"session_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Session Date"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"pitches":{"items":{"$ref":"#/components/schemas/BiomechPitch"},"type":"array","maxItems":200,"minItems":1,"title":"Pitches"}},"type":"object","required":["session_id","player","pitches"],"title":"BiomechSession"},"BiomechSessionItemResponse":{"properties":{"session_id":{"type":"string","title":"Session Id"},"player_id":{"type":"string","title":"Player Id"},"pitches":{"type":"integer","title":"Pitches"},"frames":{"type":"integer","title":"Frames"}},"type":"object","required":["session_id","player_id","pitches","frames"],"title":"BiomechSessionItemResponse"},"BiomechSessionsDeleteRequest":{"properties":{"session_ids":{"items":{"type":"string"},"type":"array","maxItems":20,"minItems":1,"title":"Session Ids"}},"type":"object","required":["session_ids"],"title":"BiomechSessionsDeleteRequest"},"BiomechSessionsDeleteResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"sessions_deleted":{"type":"integer","title":"Sessions Deleted"},"session_ids":{"items":{"type":"string"},"type":"array","title":"Session Ids"}},"type":"object","required":["success","sessions_deleted","session_ids"],"title":"BiomechSessionsDeleteResponse"},"BiomechSessionsRequest":{"properties":{"sessions":{"items":{"$ref":"#/components/schemas/BiomechSession"},"type":"array","maxItems":20,"minItems":1,"title":"Sessions"},"sync_mode":{"type":"string","enum":["snapshot","upsert"],"title":"Sync Mode","description":"snapshot treats every submitted session as complete and removes omitted pitches/frames. upsert keeps omitted rows.","default":"snapshot"}},"type":"object","required":["sessions"],"title":"BiomechSessionsRequest"},"BiomechSessionsResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"sessions_upserted":{"type":"integer","title":"Sessions Upserted"},"pitches_upserted":{"type":"integer","title":"Pitches Upserted"},"frames_upserted":{"type":"integer","title":"Frames Upserted"},"items":{"items":{"$ref":"#/components/schemas/BiomechSessionItemResponse"},"type":"array","title":"Items"}},"type":"object","required":["success","sessions_upserted","pitches_upserted","frames_upserted","items"],"title":"BiomechSessionsResponse"},"CompetitionCreateRequest":{"properties":{"season":{"type":"string","maxLength":50,"minLength":1,"title":"Season"},"competition_id":{"type":"string","maxLength":100,"minLength":1,"title":"Competition Id"},"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"}},"type":"object","required":["season","competition_id"],"title":"CompetitionCreateRequest"},"CompetitionListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CompetitionResponse"},"type":"array","title":"Data"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"count":{"type":"integer","title":"Count"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["data","limit","offset","count","total"],"title":"CompetitionListResponse"},"CompetitionResponse":{"properties":{"season":{"type":"string","title":"Season"},"competition_id":{"type":"string","title":"Competition Id"},"name":{"type":"string","title":"Name"},"active":{"type":"boolean","title":"Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["season","competition_id","name","active","created_at","updated_at"],"title":"CompetitionResponse"},"CompetitionUpdateRequest":{"properties":{"new_competition_id":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"New Competition Id"},"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},"type":"object","title":"CompetitionUpdateRequest"},"DetectedClip":{"properties":{"video_id":{"type":"string","title":"Video Id"},"jersey_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jersey Number"},"team":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team"},"play_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Play Type"},"play_type_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Play Type Name"},"video_start_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Start Time"},"video_end_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video End Time"},"video_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Link"},"exact_timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exact Timestamp"}},"type":"object","required":["video_id"],"title":"DetectedClip"},"DetectedClipsResponse":{"properties":{"clips":{"items":{"$ref":"#/components/schemas/DetectedClip"},"type":"array","title":"Clips"}},"type":"object","required":["clips"],"title":"DetectedClipsResponse"},"GLAccountLookupRequest":{"anyOf":[{"required":["user_id"]},{"required":["email"]},{"required":["org_id"]}],"properties":{"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id","description":"Glory League user UUID and current billing key. Send this to create or read the same wallet used by POST /videos."},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"Optional end-user email retained as a lookup handle for legacy accounts. Matched case-insensitively."},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id","description":"Legacy wallet id accepted for backward compatibility. New clients must use user_id; organization metadata does not control billing."},"jwt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jwt","description":"Short-lived token Glory League issued for this user; stored for reference when the account is first created."},"video_uuid":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Video Uuid","description":"Optional video UUID. When supplied, the response includes the return URL previously bound to this user and video, if any."}},"type":"object","title":"GLAccountLookupRequest","description":"Request schema for account lookup (POST /api/v1/accounts/lookup)."},"GLAccountResponse":{"properties":{"user_id":{"type":"string","title":"User Id","description":"User UUID — send this as user_id on POST /videos and in the JWT"},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id","description":"Deprecated wallet-id alias retained for legacy clients"},"org_name":{"type":"string","title":"Org Name","description":"Legacy account handle; normally blank for user-id wallets"},"video_quota":{"type":"integer","title":"Video Quota","description":"Credits ever granted to this account"},"video_usage":{"type":"integer","title":"Video Usage","description":"Credits finalized and already spent"},"video_reserved":{"type":"integer","title":"Video Reserved","description":"Credits temporarily held by videos awaiting game info; these are not spent yet but are unavailable to another concurrent upload"},"remaining":{"type":"integer","title":"Remaining","description":"Unspent and unreserved credits left (never negative)"},"can_upload":{"type":"boolean","title":"Can Upload","description":"False means the next POST /videos returns payment_required — send the user to the purchase page first"},"return_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Url","description":"HTTPS return URL bound to the requested user and video UUID, if one was supplied with POST /videos."}},"type":"object","required":["user_id","org_name","video_quota","video_usage","video_reserved","remaining","can_upload"],"title":"GLAccountResponse","description":"An account's identity + credit balance."},"GLRosterItem":{"properties":{"jersey_number":{"type":"string","title":"Jersey Number","description":"Player jersey number"}},"type":"object","required":["jersey_number"],"title":"GLRosterItem","description":"Roster entry for Glory League — jersey number only."},"GLVideoCancelResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the cancellation was accepted"},"video_uuid":{"type":"string","title":"Video Uuid","description":"The video UUID"},"status":{"type":"string","title":"Status","description":"Resulting status (always 'cancelled' on success)"},"message":{"type":"string","title":"Message","description":"Human-readable detail"},"credit_refunded":{"type":"boolean","title":"Credit Refunded","description":"True only when cancellation happened before game info was submitted and the reserved credit is available again"}},"type":"object","required":["success","video_uuid","status","message","credit_refunded"],"title":"GLVideoCancelResponse","description":"Response schema for Glory League video cancellation."},"GLVideoInfoSubmitRequest":{"properties":{"home_team_name":{"type":"string","minLength":1,"title":"Home Team Name","description":"Home team name"},"away_team_name":{"type":"string","minLength":1,"title":"Away Team Name","description":"Away team name"},"home_team_color":{"type":"string","minLength":1,"title":"Home Team Color","description":"Home team jersey color (hex, e.g. '#FF0000')"},"away_team_color":{"type":"string","minLength":1,"title":"Away Team Color","description":"Away team jersey color (hex, e.g. '#0000FF')"},"game_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Game Date","description":"Game date (YYYY-MM-DD)"},"description":{"type":"string","title":"Description","description":"Game/venue description","default":""},"home_team_uuid":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Home Team Uuid","description":"Home team UUID (kept from submit when omitted)"},"away_team_uuid":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Away Team Uuid","description":"Away team UUID (kept from submit when omitted)"},"home_team_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Home Team Score","description":"Home team score"},"away_team_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Away Team Score","description":"Away team score"},"home_team_roster":{"anyOf":[{"items":{"$ref":"#/components/schemas/GLRosterItem"},"type":"array"},{"type":"null"}],"title":"Home Team Roster","description":"Home team roster"},"away_team_roster":{"anyOf":[{"items":{"$ref":"#/components/schemas/GLRosterItem"},"type":"array"},{"type":"null"}],"title":"Away Team Roster","description":"Away team roster"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"End-user id (overrides the one stored at submit)"}},"type":"object","required":["home_team_name","away_team_name","home_team_color","away_team_color"],"title":"GLVideoInfoSubmitRequest","description":"Request schema for completing a submission's game info\n(POST /api/v1/videos/{video_uuid}/info).\n\nSent by the Preciser Stats Breakdown page (via its JWT-gated BFF) after the\nend user fills the video info form. Processing (PBP-AI) starts only once\nthis info lands."},"GLVideoSubmitRequest":{"anyOf":[{"required":["user_id"]},{"required":["org_id"]}],"properties":{"video_uuid":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Video Uuid","description":"Client-provided video UUID (auto-generated if omitted)"},"org_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Org Id","description":"Optional organization id retained for future organization-level billing. It is not the billing key while billing is per user."},"org_name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Org Name","description":"Optional organization or account display name retained for future organization-level billing."},"jwt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jwt","description":"Short-lived token Glory League issued for this user; stored for reference when the account is first seen."},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id","description":"Glory League user UUID. This is the current billing key: the user's wallet is charged and topped up using this value. New integrations must send it; org_id-only requests remain accepted temporarily for backward compatibility."},"video_url":{"type":"string","title":"Video Url","description":"Downloadable HTTP(S) source URL. The API copies this source into Mux and uses the Mux rendition for all subsequent processing."},"return_url":{"anyOf":[{"type":"string","maxLength":2048,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Return Url","description":"Optional absolute HTTPS URL to return the user to after a successful Stripe credits purchase. It is bound to this user and video UUID."},"home_team_uuid":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Home Team Uuid","description":"Home team UUID (optional for URL-only submissions)"},"home_team_name":{"type":"string","title":"Home Team Name","description":"Home team name","default":""},"home_team_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Home Team Score","description":"Home team score"},"home_team_roster":{"anyOf":[{"items":{"$ref":"#/components/schemas/GLRosterItem"},"type":"array"},{"type":"null"}],"title":"Home Team Roster","description":"Home team roster"},"away_team_uuid":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Away Team Uuid","description":"Away team UUID (optional for URL-only submissions)"},"away_team_name":{"type":"string","title":"Away Team Name","description":"Away team name","default":""},"away_team_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Away Team Score","description":"Away team score"},"away_team_roster":{"anyOf":[{"items":{"$ref":"#/components/schemas/GLRosterItem"},"type":"array"},{"type":"null"}],"title":"Away Team Roster","description":"Away team roster"},"billing_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Tier","description":"Billing tier identifier"},"game_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Game Date","description":"Game date (YYYY-MM-DD)"},"description":{"type":"string","title":"Description","description":"Game/venue description","default":""},"home_team_color":{"type":"string","title":"Home Team Color","description":"Home team jersey color (hex, e.g. '#FF0000')","default":""},"away_team_color":{"type":"string","title":"Away Team Color","description":"Away team jersey color (hex, e.g. '#0000FF')","default":""}},"type":"object","required":["video_url"],"title":"GLVideoSubmitRequest","description":"Request schema for Glory League video submission (POST /api/v1/videos)."},"GLVideoSubmitResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the submission was successful"},"video_uuid":{"type":"string","title":"Video Uuid","description":"Stable video identifier for status/results calls. Echoes the caller's video_uuid, or contains the server-generated UUID when it was omitted."},"message":{"type":"string","title":"Message","description":"Status message"},"status":{"type":"string","title":"Status","description":"Current processing/routing status. `payment_required` means no submission was created and Stats Breakdown should show checkout."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Timestamp of submission"}},"type":"object","required":["success","video_uuid","message","status","created_at"],"title":"GLVideoSubmitResponse","description":"Response schema for Glory League video submission."},"GameBulkDeleteRequest":{"properties":{"game_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":1000,"minItems":1,"title":"Game Ids","description":"List of game IDs to delete (must be valid UUIDs)"}},"type":"object","required":["game_ids"],"title":"GameBulkDeleteRequest","description":"Request schema for bulk deleting games.","example":{"game_ids":["550e8400-e29b-41d4-a716-446655440000","660e8400-e29b-41d4-a716-446655440001"]}},"GameBulkDeleteResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the operation was successful"},"message":{"type":"string","title":"Message","description":"Status message"},"deleted_count":{"type":"integer","title":"Deleted Count","description":"Number of records deleted"},"requested_count":{"type":"integer","title":"Requested Count","description":"Number of game IDs requested for deletion"}},"type":"object","required":["success","message","deleted_count","requested_count"],"title":"GameBulkDeleteResponse","description":"Response schema for bulk game delete operation."},"GameDeleteResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the operation was successful"},"message":{"type":"string","title":"Message","description":"Status message"},"deleted_count":{"type":"integer","title":"Deleted Count","description":"Number of records deleted"}},"type":"object","required":["success","message","deleted_count"],"title":"GameDeleteResponse","description":"Response schema for game delete operation."},"GameDetailResponse":{"properties":{"season":{"type":"string","title":"Season"},"competition_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Competition Id"},"season_type":{"type":"string","title":"Season Type"},"game_id":{"type":"string","title":"Game Id"},"game_game_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Game Game Id"},"home_team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Home Team Id"},"home_team_alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Home Team Alias"},"away_team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Away Team Id"},"away_team_alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Away Team Alias"},"scheduled_date_time":{"type":"string","format":"date-time","title":"Scheduled Date Time"},"venue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Venue"},"game_status":{"type":"string","title":"Game Status"}},"type":"object","required":["season","season_type","game_id","scheduled_date_time","game_status"],"title":"GameDetailResponse","description":"Game metadata returned by direct lookup."},"GameQuarterStats":{"properties":{"quarter":{"type":"string","title":"Quarter","description":"Quarter identifier (e.g., 'Q1', 'Q2', 'OT1')"},"home_team":{"$ref":"#/components/schemas/TeamGameStats","description":"Home team statistics for this quarter"},"away_team":{"$ref":"#/components/schemas/TeamGameStats","description":"Away team statistics for this quarter"}},"type":"object","required":["quarter","home_team","away_team"],"title":"GameQuarterStats","description":"Per-quarter team statistics for a single game."},"GameQuarterSummaryResponse":{"properties":{"game_id":{"type":"string","title":"Game Id","description":"Game identifier"},"competition_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Competition Id","description":"Stable league/competition identifier for the game"},"quarters":{"items":{"$ref":"#/components/schemas/GameQuarterStats"},"type":"array","title":"Quarters","description":"Per-quarter team statistics, ordered by quarter"}},"type":"object","required":["game_id","quarters"],"title":"GameQuarterSummaryResponse","description":"Response schema for per-quarter game summary endpoint."},"GameScheduleItem":{"properties":{"season":{"type":"string","title":"Season"},"competition_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Competition Id"},"season_type":{"type":"string","title":"Season Type"},"game_id":{"type":"string","title":"Game Id"},"game_game_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Game Game Id"},"home_team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Home Team Id"},"home_team_alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Home Team Alias"},"away_team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Away Team Id"},"away_team_alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Away Team Alias"},"scheduled_date_time":{"type":"string","format":"date-time","title":"Scheduled Date Time"},"venue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Venue"},"game_status":{"type":"string","title":"Game Status"}},"type":"object","required":["season","season_type","game_id","scheduled_date_time","game_status"],"title":"GameScheduleItem","description":"A game returned by the schedule endpoint."},"GameScheduleResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/GameScheduleItem"},"type":"array","title":"Data"},"pagination":{"$ref":"#/components/schemas/PaginationMetadata"}},"type":"object","required":["data","pagination"],"title":"GameScheduleResponse"},"GameSummaryResponse":{"properties":{"game_id":{"type":"string","title":"Game Id","description":"Game identifier"},"competition_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Competition Id","description":"Stable league/competition identifier for the game"},"home_team":{"$ref":"#/components/schemas/TeamGameStats","description":"Home team statistics"},"away_team":{"$ref":"#/components/schemas/TeamGameStats","description":"Away team statistics"}},"type":"object","required":["game_id","home_team","away_team"],"title":"GameSummaryResponse","description":"Response schema for game summary endpoint."},"GameUpsertRequest":{"properties":{"game_id":{"type":"string","format":"uuid","title":"Game Id","description":"Game ID (must be a valid UUID)"},"home_team_id":{"type":"string","format":"uuid","title":"Home Team Id","description":"Home team identifier (must be a valid UUID)"},"away_team_id":{"type":"string","format":"uuid","title":"Away Team Id","description":"Away team identifier (must be a valid UUID)"},"season":{"type":"string","title":"Season","description":"Season (e.g., '2026')"},"competition_id":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Competition Id","description":"Stable league/competition identifier within the season (e.g., 'VIC'). Required for competition-scoped leagues such as AABL."},"season_type":{"type":"string","title":"Season Type","description":"Season type (e.g., 'regular season', 'playoffs')"},"scheduled_date_time":{"type":"string","format":"date-time","title":"Scheduled Date Time","description":"Scheduled game date and time (must include timezone, e.g., '2026-02-01T19:00:00+11:00' for Australia/Melbourne)"},"venue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Venue","description":"Game venue"},"game_status":{"type":"string","title":"Game Status","description":"Game status (e.g., 'scheduled', 'in progress', 'completed')"}},"type":"object","required":["game_id","home_team_id","away_team_id","season","season_type","scheduled_date_time","game_status"],"title":"GameUpsertRequest","description":"Request schema for upserting a game record.","example":{"away_team_id":"7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d","competition_id":"VIC","game_id":"550e8400-e29b-41d4-a716-446655440000","game_status":"scheduled","home_team_id":"60959335-3173-45b4-b656-276a05b22011","scheduled_date_time":"2026-02-01T19:00:00+11:00","season":"2026","season_type":"regular season","venue":"Arena Center"}},"GameUpsertResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the operation was successful"},"message":{"type":"string","title":"Message","description":"Status message"},"video_id":{"type":"string","title":"Video Id","description":"The internal identifier of the created game record"},"competition_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Competition Id","description":"Stable league/competition identifier for the game"},"webhooks_triggered":{"type":"integer","title":"Webhooks Triggered","description":"Number of newly reserved webhook deliveries. This is zero for non-terminal updates and already-delivered terminal events.","default":0}},"type":"object","required":["success","message","video_id"],"title":"GameUpsertResponse","description":"Response schema for game upsert operation."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InstaStatsRosterItem":{"properties":{"name":{"type":"string","title":"Name","description":"Player display name / alias"},"number":{"type":"integer","title":"Number","description":"Jersey number"}},"type":"object","required":["name","number"],"title":"InstaStatsRosterItem"},"JobResultsResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"completed":{"type":"integer","title":"Completed"},"failed":{"type":"integer","title":"Failed"},"tasks":{"items":{"$ref":"#/components/schemas/VideoClipResult"},"type":"array","title":"Tasks"}},"type":"object","required":["job_id","completed","failed","tasks"],"title":"JobResultsResponse"},"JobStatusResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"state":{"type":"string","title":"State"},"start_of_play":{"type":"string","title":"Start Of Play","description":"Actual game start time from dms_main.videos.actual_game_start_time formatted as a video timestamp; empty until it is available.","default":""},"completed_at":{"anyOf":[{"type":"string","pattern":"^\\d{2,}:[0-5]\\d:[0-5]\\d$"},{"type":"null"}],"title":"Completed At","description":"Final worker-start-to-status-complete duration formatted as hh:mm:ss; null until processing is complete."},"processing_started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processing Started At","description":"UTC (+00:00) timestamp when the worker started processing; null until processing has started."},"video_quality":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Video Quality","description":"Objective video-quality measurements (resolution and frame_rate) with per-component 0-1 scores. Unknown metadata is represented by null component scores. No grade or show/hide decision is implied."}},"type":"object","required":["job_id","state"],"title":"JobStatusResponse"},"JobSubmitRequest":{"properties":{"video_url":{"type":"string","title":"Video Url","description":"Single video URL (.mp4 or downloadable HTTP(S) source)"},"game_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Game Id","description":"Optional. The game_id of an existing scheduled game to attach this video to. When provided, the uploaded video is linked to that game so the resulting stats appear under the same game. Returns 409 if the game already has a video uploaded. Omit to upload a standalone video with no schedule linkage."},"home_team_name":{"type":"string","title":"Home Team Name","description":"Home team name","default":""},"away_team_name":{"type":"string","title":"Away Team Name","description":"Away team name","default":""},"home_team_color":{"type":"string","title":"Home Team Color","description":"Home team jersey color (hex, e.g. '#FF0000')"},"away_team_color":{"type":"string","title":"Away Team Color","description":"Away team jersey color (hex, e.g. '#0000FF')"},"home_team_roster":{"items":{"$ref":"#/components/schemas/InstaStatsRosterItem"},"type":"array","title":"Home Team Roster","description":"Home team roster (list of {name, number}). Stored on video_info; downstream automation backfills video_team_roster after the video reaches the processed state."},"away_team_roster":{"items":{"$ref":"#/components/schemas/InstaStatsRosterItem"},"type":"array","title":"Away Team Roster","description":"Away team roster (list of {name, number})."},"game_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Game Date","description":"Game date (ISO 8601 timestamp). Defaults to current time if omitted."},"video_mode":{"type":"string","enum":["instant","accuracy"],"title":"Video Mode","description":"Processing mode for the uploaded video. Use 'instant' for faster turnaround, or 'accuracy' for higher-quality results. Defaults to 'instant' when omitted. Only applicable to organizations that have been enabled for mode selection; otherwise the value is ignored.","default":"instant"}},"type":"object","required":["video_url","home_team_color","away_team_color"],"title":"JobSubmitRequest"},"JobSubmitResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"status":{"type":"string","title":"Status"}},"type":"object","required":["job_id","status"],"title":"JobSubmitResponse"},"PaginationMetadata":{"properties":{"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"count":{"type":"integer","title":"Count"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["limit","offset","count","total"],"title":"PaginationMetadata"},"PitchMeasurement":{"properties":{"sourcePitchId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcepitchid","description":"Stable identifier for this physical pitch. Preferred identity for updates and idempotent retries."},"pitchNo":{"type":"integer","minimum":1.0,"title":"Pitchno","description":"Display sequence within the session. It is not used as the identity when sourcePitchId, capturedAt, or time is present."},"capturedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Capturedat","description":"Exact pitch timestamp. Used for stable matching and chronological order."},"time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Time","description":"Local pitch time in HH:MM or HH:MM:SS format. Used for stable matching and chronological order when capturedAt is omitted."},"velocity":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Velocity","description":"Pitch velocity in velocityUnit."},"exitVelocity":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Exitvelocity","description":"Exit velocity in velocityUnit."},"horizontalBreak":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Horizontalbreak","description":"Horizontal break from the source system."},"verticalBreak":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Verticalbreak","description":"Vertical break from the source system."},"strikeZone":{"anyOf":[{"$ref":"#/components/schemas/StrikeZonePoint"},{"type":"null"}],"description":"Pitch location at the plate."},"normalizedPlateX":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Normalizedplatex","description":"Optional normalized plate x value from 0 to 1."},"normalizedPlateZ":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Normalizedplatez","description":"Optional normalized plate z value from 0 to 1."},"spin":{"anyOf":[{"$ref":"#/components/schemas/PitchSpin"},{"type":"null"}],"description":"Spin measurements, if available."},"pitchType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pitchtype","description":"Pitch type label, if available."},"verticalApproachAngle":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Verticalapproachangle"},"horizontalApproachAngle":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Horizontalapproachangle"},"sswVerticalBreak":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sswverticalbreak"},"sswHorizontalBreak":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sswhorizontalbreak"},"videoUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Videourl","description":"Optional video URL for this pitch."}},"type":"object","required":["pitchNo"],"title":"PitchMeasurement"},"PitchSession":{"properties":{"sourceSessionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcesessionid","description":"Stable session identifier from your system. Recommended for idempotent retries."},"session":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session","description":"Session label shown to users."},"sessionDate":{"type":"string","format":"date","title":"Sessiondate","description":"Session date."},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduledat","description":"Optional exact session timestamp."},"team":{"$ref":"#/components/schemas/PitchTrackingEntity"},"pitcher":{"$ref":"#/components/schemas/PitchTrackingEntity"},"pitches":{"items":{"$ref":"#/components/schemas/PitchMeasurement"},"type":"array","maxItems":500,"minItems":1,"title":"Pitches","description":"Pitch measurements in this session."}},"type":"object","required":["sessionDate","team","pitcher","pitches"],"title":"PitchSession"},"PitchSessionImportItem":{"properties":{"sourceSessionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcesessionid"},"gameId":{"type":"string","title":"Gameid"},"teamId":{"type":"string","title":"Teamid"},"pitcherId":{"type":"string","title":"Pitcherid"},"pitchesAccepted":{"type":"integer","title":"Pitchesaccepted"},"pitchesSkipped":{"type":"integer","title":"Pitchesskipped"}},"type":"object","required":["gameId","teamId","pitcherId","pitchesAccepted","pitchesSkipped"],"title":"PitchSessionImportItem"},"PitchSessionsRequest":{"properties":{"season":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Season","description":"Optional season label. When omitted, each session uses the year from scheduledAt or sessionDate, so one request may span calendar years."},"seasonType":{"type":"string","minLength":1,"title":"Seasontype","description":"Season type.","default":"regular season"},"gameTier":{"type":"string","minLength":1,"title":"Gametier","description":"Competition tier.","default":"1"},"venue":{"type":"string","minLength":1,"title":"Venue","description":"Venue or source label.","default":"PitchData"},"velocityUnit":{"type":"string","enum":["kph","mph"],"title":"Velocityunit","description":"Input unit used by velocity and exitVelocity. Defaults to kph, meaning kilometres per hour (km/h). Preciser tracking responses are also returned in km/h.","default":"kph"},"syncMode":{"type":"string","enum":["snapshot","upsert"],"title":"Syncmode","description":"snapshot treats every submitted session as its complete current state and removes previously stored pitches that are omitted. upsert keeps omitted pitches.","default":"snapshot"},"maxExitVelocity":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Maxexitvelocity","description":"Ignore exit velocity values above this source-unit threshold. Set null to keep all values.","default":250.0},"strikeZoneBounds":{"anyOf":[{"$ref":"#/components/schemas/StrikeZoneBounds"},{"type":"null"}],"description":"Optional source coordinate bounds for consistent normalization."},"sessions":{"items":{"$ref":"#/components/schemas/PitchSession"},"type":"array","maxItems":50,"minItems":1,"title":"Sessions","description":"Pitch sessions to create or update."}},"type":"object","required":["sessions"],"title":"PitchSessionsRequest"},"PitchSessionsResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"summary":{"$ref":"#/components/schemas/PitchSessionsSummary"},"items":{"items":{"$ref":"#/components/schemas/PitchSessionImportItem"},"type":"array","title":"Items"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"type":"object","required":["success","summary","items"],"title":"PitchSessionsResponse"},"PitchSessionsSummary":{"properties":{"sessions":{"type":"integer","title":"Sessions"},"pitches":{"type":"integer","title":"Pitches"},"teams":{"type":"integer","title":"Teams"},"pitchers":{"type":"integer","title":"Pitchers"}},"type":"object","required":["sessions","pitches","teams","pitchers"],"title":"PitchSessionsSummary"},"PitchSpin":{"properties":{"total":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Total","description":"Spin rate, if available."},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction","description":"Measured spin direction as a clock-face value in H:MM format, for example 12:45."},"tiltHhmm":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tilthhmm","description":"Deprecated alias for direction. Clock-face value in H:MM format, for example 12:45."}},"type":"object","title":"PitchSpin"},"PitchTrackingEntity":{"properties":{"externalId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Externalid","description":"Stable identifier from your system. If omitted, name is used for matching."},"name":{"type":"string","minLength":1,"title":"Name","description":"Display name."},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color","description":"Optional hex color for team display."}},"type":"object","required":["name"],"title":"PitchTrackingEntity"},"PitchTrajectoryBatchRequest":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PitchTrajectoryItem"},"type":"array","maxItems":500,"minItems":1,"title":"Items"}},"type":"object","required":["items"],"title":"PitchTrajectoryBatchRequest"},"PitchTrajectoryBatchResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"rows_inserted":{"type":"integer","title":"Rows Inserted"},"source_ids":{"items":{"type":"string"},"type":"array","title":"Source Ids"}},"type":"object","required":["success","rows_inserted","source_ids"],"title":"PitchTrajectoryBatchResponse"},"PitchTrajectoryDeleteRequest":{"properties":{"source_ids":{"items":{"type":"string"},"type":"array","maxItems":500,"minItems":1,"title":"Source Ids"}},"type":"object","required":["source_ids"],"title":"PitchTrajectoryDeleteRequest"},"PitchTrajectoryDeleteResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"rows_deleted":{"type":"integer","title":"Rows Deleted"},"source_ids":{"items":{"type":"string"},"type":"array","title":"Source Ids"}},"type":"object","required":["success","rows_deleted","source_ids"],"title":"PitchTrajectoryDeleteResponse"},"PitchTrajectoryItem":{"properties":{"source_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Id","description":"Stable physical-pitch identifier. When omitted, the normalized timestamp is used as the update identity."},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"pitch_trajectory":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","maxItems":200,"minItems":2,"title":"Pitch Trajectory"},"strike_zone_point":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Strike Zone Point"},"pitch_velocity":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Pitch Velocity","description":"Pitch velocity in kilometres per hour (km/h)."},"exit_velocity":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Exit Velocity","description":"Exit velocity in kilometres per hour (km/h)."},"horizontal_offset":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Horizontal Offset"},"vertical_offset":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Vertical Offset"},"y_range":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Y Range"},"x_coefficients":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"X Coefficients"},"z_coefficients":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Z Coefficients"},"x_r_squared":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"X R Squared"},"z_r_squared":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Z R Squared"},"rpm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Rpm"},"spin_dir":{"anyOf":[{"$ref":"#/components/schemas/SpinDescriptor"},{"type":"null"}]},"spin_tilt":{"anyOf":[{"$ref":"#/components/schemas/SpinDescriptor"},{"type":"null"}]}},"type":"object","required":["timestamp","pitch_trajectory"],"title":"PitchTrajectoryItem"},"PlayerRef":{"properties":{"player_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Player Id","description":"Canonical player_id"},"alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Alias","description":"Pitchbio player alias, for example pitcher_001"}},"type":"object","title":"PlayerRef","description":"Reference a player either by canonical player_id or pitchbio alias."},"RosterDeleteResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the operation was successful"},"message":{"type":"string","title":"Message","description":"Status message"},"deleted_count":{"type":"integer","title":"Deleted Count","description":"Number of records deleted"}},"type":"object","required":["success","message","deleted_count"],"title":"RosterDeleteResponse","description":"Response schema for roster delete operation."},"RosterEntryRequest":{"properties":{"player_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Player Id","description":"Player identifier. Auto-resolved from jersey number if not provided. Required when updating a player who changed jersey number—otherwise a duplicate player record will be created."},"team_id":{"type":"string","title":"Team Id","description":"Team identifier"},"jersey_number":{"type":"integer","title":"Jersey Number","description":"Player's jersey number"},"season":{"type":"string","title":"Season","description":"Season identifier (e.g. '2024-25')"},"competition_id":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Competition Id","description":"Stable league/competition identifier within the season (e.g. 'VIC'). Required for competition-scoped leagues such as AABL."},"player_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Player Name","description":"Player's name (can be filled in later)"}},"type":"object","required":["team_id","jersey_number","season"],"title":"RosterEntryRequest","description":"Request schema for a single roster entry."},"RosterEntryResponse":{"properties":{"id":{"type":"integer","title":"Id","description":"Unique identifier of the roster entry"},"player_id":{"type":"string","title":"Player Id","description":"Player identifier"},"team_id":{"type":"string","title":"Team Id","description":"Team identifier"},"jersey_number":{"type":"integer","title":"Jersey Number","description":"Player's jersey number"},"player_name":{"type":"string","title":"Player Name","description":"Player's name"},"season":{"type":"string","title":"Season","description":"Season identifier"},"competition_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Competition Id","description":"Stable league/competition identifier for this assignment"}},"type":"object","required":["id","player_id","team_id","jersey_number","player_name","season"],"title":"RosterEntryResponse","description":"Response schema for a single roster entry."},"RosterListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/RosterEntryResponse"},"type":"array","title":"Data"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"count":{"type":"integer","title":"Count"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["data","limit","offset","count","total"],"title":"RosterListResponse","description":"Paginated roster assignments."},"RosterUpsertRequest":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/RosterEntryRequest"},"type":"array","title":"Entries","description":"List of roster entries to upsert"}},"type":"object","required":["entries"],"title":"RosterUpsertRequest","description":"Request schema for upserting roster entries (batch support).","example":{"entries":[{"competition_id":"VIC","jersey_number":23,"player_name":"John Doe","season":"2024-25","team_id":"60959335-3173-45b4-b656-276a05b22011"},{"competition_id":"NSW","jersey_number":7,"player_id":"1b58990c-9591-49b6-951f-6b573a111583","player_name":"Jane Smith","season":"2024-25","team_id":"60959335-3173-45b4-b656-276a05b22011"}]}},"RosterUpsertResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the operation was successful"},"message":{"type":"string","title":"Message","description":"Status message"},"entries":{"items":{"$ref":"#/components/schemas/RosterEntryResponse"},"type":"array","title":"Entries","description":"List of upserted roster entries"}},"type":"object","required":["success","message","entries"],"title":"RosterUpsertResponse","description":"Response schema for roster upsert operation."},"SpinDescriptor":{"properties":{"hhmm":{"type":"string","title":"Hhmm"},"degrees":{"type":"number","title":"Degrees"}},"type":"object","required":["hhmm","degrees"],"title":"SpinDescriptor"},"StrikeZoneBounds":{"properties":{"xMin":{"type":"number","title":"Xmin"},"xMax":{"type":"number","title":"Xmax"},"zMin":{"type":"number","title":"Zmin"},"zMax":{"type":"number","title":"Zmax"}},"type":"object","required":["xMin","xMax","zMin","zMax"],"title":"StrikeZoneBounds"},"StrikeZonePoint":{"properties":{"x":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"X","description":"Horizontal plate location from the source system."},"y":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Y","description":"Depth value from the source system."},"z":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Z","description":"Vertical plate location from the source system."}},"type":"object","title":"StrikeZonePoint"},"SwingMeasurement":{"properties":{"sourceSwingId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceswingid","description":"Stable identifier for this physical swing. Preferred identity for updates and idempotent retries."},"swingNo":{"type":"integer","minimum":1.0,"title":"Swingno","description":"Display sequence within the session. It is not used as the identity when sourceSwingId, capturedAt, or time is present."},"capturedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Capturedat","description":"Exact swing timestamp. Used for stable matching and chronological order."},"time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Time","description":"Local swing time in HH:MM or HH:MM:SS format. Used for stable matching and chronological order when capturedAt is omitted."},"batSpeed":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Batspeed","description":"Bat speed in speedUnit."},"attackAngle":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Attackangle","description":"Attack angle in degrees."},"attackDirection":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Attackdirection","description":"Attack direction in degrees; positive values indicate pull side."},"exitVelocity":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Exitvelocity","description":"Batted-ball exit velocity in speedUnit. Omit for a swing and miss."},"launchAngle":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Launchangle","description":"Batted-ball launch angle in degrees."},"hitDistance":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Hitdistance","description":"Hit distance in distanceUnit."},"result":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result","description":"Optional result label."},"videoUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Videourl","description":"Optional video URL for this swing."}},"type":"object","required":["swingNo"],"title":"SwingMeasurement"},"TeamDeleteResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the operation was successful"},"message":{"type":"string","title":"Message","description":"Status message"},"deleted_count":{"type":"integer","title":"Deleted Count","description":"Number of records deleted"}},"type":"object","required":["success","message","deleted_count"],"title":"TeamDeleteResponse","description":"Response schema for team delete operation."},"TeamGameStats":{"properties":{"team_id":{"type":"string","title":"Team Id","description":"Team identifier"},"score":{"type":"integer","title":"Score","description":"Total points scored"},"rebound":{"type":"integer","title":"Rebound","description":"Total rebounds"},"offensive_rebound":{"type":"integer","title":"Offensive Rebound","description":"Offensive rebounds"},"defensive_rebound":{"type":"integer","title":"Defensive Rebound","description":"Defensive rebounds"},"assist":{"type":"integer","title":"Assist","description":"Total assists"},"steal":{"type":"integer","title":"Steal","description":"Total steals"},"block":{"type":"integer","title":"Block","description":"Total blocks"},"turnover":{"type":"integer","title":"Turnover","description":"Total turnovers"},"pf":{"type":"integer","title":"Pf","description":"Personal fouls"},"two_points_made":{"type":"integer","title":"Two Points Made","description":"Two-pointers made"},"two_points_attempt":{"type":"integer","title":"Two Points Attempt","description":"Two-pointers attempted"},"two_points_percentage":{"type":"number","title":"Two Points Percentage","description":"Two-point field goal percentage"},"three_points_made":{"type":"integer","title":"Three Points Made","description":"Three-pointers made"},"three_points_attempt":{"type":"integer","title":"Three Points Attempt","description":"Three-pointers attempted"},"three_points_percentage":{"type":"number","title":"Three Points Percentage","description":"Three-point field goal percentage"},"free_throw_made":{"type":"integer","title":"Free Throw Made","description":"Free throws made"},"free_throw_attempt":{"type":"integer","title":"Free Throw Attempt","description":"Free throws attempted"},"free_throw_percentage":{"type":"number","title":"Free Throw Percentage","description":"Free throw percentage"},"seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seconds","description":"Total seconds played"}},"type":"object","required":["team_id","score","rebound","offensive_rebound","defensive_rebound","assist","steal","block","turnover","pf","two_points_made","two_points_attempt","two_points_percentage","three_points_made","three_points_attempt","three_points_percentage","free_throw_made","free_throw_attempt","free_throw_percentage"],"title":"TeamGameStats","description":"Team statistics for a single game."},"TeamUpsertRequest":{"properties":{"team_id":{"type":"string","format":"uuid","title":"Team Id","description":"Team ID (must be a valid UUID)"},"name":{"type":"string","title":"Name","description":"Team name (used for alias, market, and name)"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color","description":"Team color (hex code), defaults to #424242 if not provided"}},"type":"object","required":["team_id","name"],"title":"TeamUpsertRequest","description":"Request schema for upserting a team record.","example":{"color":"#552583","name":"Lakers","team_id":"60959335-3173-45b4-b656-276a05b22011"}},"TeamUpsertResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the operation was successful"},"message":{"type":"string","title":"Message","description":"Status message"},"team_id":{"type":"string","title":"Team Id","description":"The team_id of the upserted team"}},"type":"object","required":["success","message","team_id"],"title":"TeamUpsertResponse","description":"Response schema for team upsert operation."},"TrackingSessionsDeleteRequest":{"properties":{"gameIds":{"items":{"type":"string"},"type":"array","maxItems":50,"minItems":1,"title":"Gameids","description":"gameId values returned by previous session uploads."}},"type":"object","required":["gameIds"],"title":"TrackingSessionsDeleteRequest"},"TrackingSessionsDeleteResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"sessionsDeleted":{"type":"integer","title":"Sessionsdeleted"},"gameIds":{"items":{"type":"string"},"type":"array","title":"Gameids"}},"type":"object","required":["success","sessionsDeleted","gameIds"],"title":"TrackingSessionsDeleteResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VideoClipResult":{"properties":{"jersey_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jersey Number"},"team":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team"},"play_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Play Type"},"play_type_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Play Type Name"},"exact_timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exact Timestamp"}},"type":"object","title":"VideoClipResult"},"VideoEventItem":{"properties":{"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type","description":"Event type"},"occurred_time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Occurred Time","description":"Timestamp in seconds"},"jersey_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jersey Number","description":"Player jersey number"},"position_x":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Position X","description":"Court position X"},"position_y":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Position Y","description":"Court position Y"},"team_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Uuid","description":"Team UUID"}},"type":"object","title":"VideoEventItem","description":"Single event in Glory League results response."},"VideoNotifyRequest":{"properties":{"status":{"type":"string","enum":["completed","failed"],"title":"Status","description":"Video processing status"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Additional message (e.g., error details for failed status)"}},"type":"object","required":["status"],"title":"VideoNotifyRequest","description":"Request schema for triggering video completion webhooks.","example":{"status":"completed"}},"VideoNotifyResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the operation was successful"},"message":{"type":"string","title":"Message","description":"Status message"},"webhooks_triggered":{"type":"integer","title":"Webhooks Triggered","description":"Number of webhook deliveries initiated"}},"type":"object","required":["success","message","webhooks_triggered"],"title":"VideoNotifyResponse","description":"Response schema for video notify endpoint."},"VideoResultsResponse":{"properties":{"video_uuid":{"type":"string","title":"Video Uuid","description":"The video UUID"},"events":{"items":{"$ref":"#/components/schemas/VideoEventItem"},"type":"array","title":"Events","description":"List of detected events"}},"type":"object","required":["video_uuid"],"title":"VideoResultsResponse","description":"Response schema for Glory League video results (GET /api/v1/videos/{video_uuid}/results)."},"VideoStatus":{"type":"string","enum":["pending","processing","completed","failed"],"title":"VideoStatus","description":"Enum for video processing status."},"VideoStatusResponse":{"properties":{"video_id":{"type":"string","title":"Video Id","description":"Partner-supplied video UUID echoed from the request path"},"status":{"$ref":"#/components/schemas/VideoStatus","description":"Current processing status"},"progress":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Progress","description":"Processing progress percentage (0-100)"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Status message or error details"},"info_required":{"type":"boolean","title":"Info Required","description":"True when the submission was accepted (credit reserved) but the game info has not been provided yet — processing starts only after POST /videos/{video_uuid}/info.","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Timestamp of submission"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Timestamp of last update"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At","description":"Timestamp when processing completed"}},"type":"object","required":["video_id","status","created_at","updated_at"],"title":"VideoStatusResponse","description":"Response schema for video processing status check."},"WebhookEventType":{"type":"string","enum":["video.completed","video.failed"],"title":"WebhookEventType","description":"Supported webhook event types."},"WebhookListResponse":{"properties":{"subscriptions":{"items":{"$ref":"#/components/schemas/WebhookSubscriptionResponse"},"type":"array","title":"Subscriptions","description":"List of webhook subscriptions"}},"type":"object","required":["subscriptions"],"title":"WebhookListResponse","description":"Response schema for listing webhook subscriptions."},"WebhookPayload":{"properties":{"event":{"$ref":"#/components/schemas/WebhookEventType","description":"The terminal event type"},"video_id":{"type":"string","title":"Video Id","description":"The video ID"},"game_id":{"type":"string","title":"Game Id","description":"The game ID"},"status":{"type":"string","enum":["COMPLETED","FAILED"],"title":"Status","description":"Terminal processing status"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp","description":"Event timestamp"},"data":{"additionalProperties":true,"type":"object","title":"Data","description":"Additional event data (scores, stats availability, etc.)"}},"type":"object","required":["event","video_id","game_id","status","timestamp","data"],"title":"WebhookPayload","description":"Payload sent to webhook endpoints.","example":{"data":{"away_score":108,"away_team":"Warriors","home_score":112,"home_team":"Lakers","stats_available":true},"event":"video.completed","game_id":"abc123-uuid","status":"COMPLETED","timestamp":"2026-02-01T10:00:00Z","video_id":"abc123-uuid"}},"WebhookSubscriptionRequest":{"properties":{"event_type":{"$ref":"#/components/schemas/WebhookEventType","description":"The event type to subscribe to"},"webhook_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Webhook Url","description":"The public HTTPS URL to send webhook payloads to"}},"type":"object","required":["event_type","webhook_url"],"title":"WebhookSubscriptionRequest","description":"Request schema for creating a webhook subscription.","example":{"event_type":"video.completed","webhook_url":"https://example.com/webhooks/video"}},"WebhookSubscriptionResponse":{"properties":{"id":{"type":"integer","title":"Id","description":"Webhook subscription ID"},"event_type":{"$ref":"#/components/schemas/WebhookEventType","description":"The subscribed event type"},"webhook_url":{"type":"string","title":"Webhook Url","description":"The webhook URL"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret","description":"Auto-generated secret for signature verification (only shown on creation)"},"is_active":{"type":"boolean","title":"Is Active","description":"Whether the subscription is active"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the subscription was created"}},"type":"object","required":["id","event_type","webhook_url","is_active","created_at"],"title":"WebhookSubscriptionResponse","description":"Response schema for webhook subscription operations."},"WebhookTestResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the test delivery was successful"},"message":{"type":"string","title":"Message","description":"Status message"},"http_status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Http Status Code","description":"HTTP status code from the webhook endpoint"}},"type":"object","required":["success","message"],"title":"WebhookTestResponse","description":"Response schema for webhook test endpoint."}}}}