{"openapi":"3.1.0","info":{"title":"IrteeraWeb API","version":"1.0.0"},"paths":{"/api/auth/login":{"post":{"tags":["auth"],"summary":"Authenticate and get JWT","description":"Authenticate with email + password and return a JWT.","operationId":"login_api_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/LoginResponse"},{"$ref":"#/components/schemas/Login2FARequired"}],"title":"Response Login Api Auth Login Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/login/2fa":{"post":{"tags":["auth"],"summary":"Complete login with the code emailed after the password step","description":"Authenticate with email + the one-time code sent by ``/login``.\n\nCalled AFTER the initial password check when the user has 2FA enabled.","operationId":"login_2fa_api_auth_login_2fa_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginVerify2FARequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/refresh":{"post":{"tags":["auth"],"summary":"Refresh Token","description":"Re-issue a new JWT with a fresh JTI.\n\nThe old token (from the ``access_token`` field in the request body)\nis revoked so it can no longer be used. A new cookie is set.\n\nSecurity: the token supplied in the request body MUST belong to the\nsame user who is authenticated via the cookie / Bearer header\n(``user[\"email\"]``).  This prevents a user from revoking another\nuser's token by passing an arbitrary JWT in the request body.","operationId":"refresh_token_api_auth_refresh_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenRefreshRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/revoke":{"post":{"tags":["auth"],"summary":"Revoke Token","description":"Revoke a token by its JTI (persisted in SQLite).","operationId":"revoke_token_api_auth_revoke_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Revoke Token Api Auth Revoke Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/me":{"get":{"tags":["auth"],"summary":"Get Current User Info","description":"Return the current authenticated user's email and admin info.","operationId":"get_current_user_info_api_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Current User Info Api Auth Me Get"}}}}}}},"/api/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","description":"Clear the authentication cookie.","operationId":"logout_api_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Logout Api Auth Logout Post"}}}}}}},"/api/auth/admins":{"get":{"tags":["auth"],"summary":"List Admins","description":"Return all active user accounts (no password hashes). Admin-only.","operationId":"list_admins_api_auth_admins_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminListResponse"}}}}}},"post":{"tags":["auth"],"summary":"Create a new user account (administrador or revisor)","description":"Create a new user account. Admin-only.\n\nThe account is created WITHOUT 2FA enabled — it can be turned on\nlater (per-account) via ``/2fa/enable``.","operationId":"create_admin_api_auth_admins_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAdminRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Admin Api Auth Admins Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/admins/{admin_id}/lock":{"post":{"tags":["auth"],"summary":"Lock a user account. Admin-only.","description":"Lock a user account (active=False) and revoke its sessions.","operationId":"lock_admin_api_auth_admins__admin_id__lock_post","parameters":[{"name":"admin_id","in":"path","required":true,"schema":{"type":"string","title":"Admin Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Lock Admin Api Auth Admins  Admin Id  Lock Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/admins/{admin_id}/unlock":{"post":{"tags":["auth"],"summary":"Unlock a user account. Admin-only.","description":"Unlock a previously locked user account.","operationId":"unlock_admin_api_auth_admins__admin_id__unlock_post","parameters":[{"name":"admin_id","in":"path","required":true,"schema":{"type":"string","title":"Admin Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Unlock Admin Api Auth Admins  Admin Id  Unlock Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/admins/{admin_id}/reset-password":{"post":{"tags":["auth"],"summary":"Reset a user's password to a new random one. Admin-only.","description":"Generate and set a new random password, invalidating existing sessions.\n\nThe plaintext password is only ever returned in this response — it\nmust be relayed to the user out-of-band, same as the backup password.","operationId":"reset_admin_password_api_auth_admins__admin_id__reset_password_post","parameters":[{"name":"admin_id","in":"path","required":true,"schema":{"type":"string","title":"Admin Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/admins/{admin_id}/reset-2fa":{"post":{"tags":["auth"],"summary":"Force-disable 2FA for a user (e.g. lost email access). Admin-only.","description":"Disable 2FA for another user's account and revoke its sessions.","operationId":"reset_admin_2fa_api_auth_admins__admin_id__reset_2fa_post","parameters":[{"name":"admin_id","in":"path","required":true,"schema":{"type":"string","title":"Admin Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwoFADisableResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/2fa/status":{"get":{"tags":["auth"],"summary":"Get 2Fa Status","description":"Return whether the current admin has 2FA enabled.\n\nadmin.js's check2FAStatus() has always called this exact path, but\nthe route never existed — the frontend silently treated the 404 as\n\"2FA disabled\" instead of showing the admin's real status.","operationId":"get_2fa_status_api_auth_2fa_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get 2Fa Status Api Auth 2Fa Status Get"}}}}}}},"/api/auth/2fa/enable":{"post":{"tags":["auth"],"summary":"Start 2FA enrollment — emails a confirmation code","description":"Send a confirmation code to the current user's own email.\n\n2FA is not enabled yet — the user must submit the code via\n``/2fa/enable/confirm`` to activate it.","operationId":"enable_2fa_api_auth_2fa_enable_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwoFAEnableResponse"}}}}}}},"/api/auth/2fa/enable/confirm":{"post":{"tags":["auth"],"summary":"Confirm the emailed code and activate 2FA","description":"Verify the emailed code and enable 2FA for the current account.","operationId":"confirm_enable_2fa_api_auth_2fa_enable_confirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwoFAVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Confirm Enable 2Fa Api Auth 2Fa Enable Confirm Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/2fa/disable":{"post":{"tags":["auth"],"summary":"Disable 2FA and invalidate all sessions","description":"Disable email-based 2FA for the account.\n\nIncrements ``auth_version`` to invalidate all existing JWTs for this\nadmin (forcing re-login with 2FA disabled).","operationId":"disable_2fa_api_auth_2fa_disable_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwoFADisableResponse"}}}}}}},"/api/races":{"post":{"tags":["races"],"summary":"Create Race","description":"Create a new race.","operationId":"create_race_api_races_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaceCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RacePublic"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["races"],"summary":"List Races","description":"List races with pagination (public).\n\nWhen ``include_deleted`` is True, authentication is required.\n``public=true`` (sent by the public pages) always hides races marked\nnot visible, even when the browser carries an admin session cookie.","operationId":"list_races_api_races_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Year"}},{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Deleted"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name"}},{"name":"public","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Public"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedRaces"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/search-runner":{"get":{"tags":["races"],"summary":"Search Runner","description":"Find every race a runner appears in, grouped by year.\n\nScans each race's results file for a case-insensitive, word-order\n-independent match on the name column: every word in the query\nmust appear somewhere in the name. Required because source data\nstores names as \"APELLIDO, Nombre\" — a plain substring match on\n\"Diego Cardanha\" would silently miss \"CARDANHA MENDEZ, DIEGO\".\nA live scan (no persistent index) is fast enough here — ~800\nresult files, well under a second.","operationId":"search_runner_api_races_search_runner_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":100,"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Search Runner Api Races Search Runner Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}":{"get":{"tags":["races"],"summary":"Get Race","description":"Get a single race by canonical UUID or public slug.","operationId":"get_race_api_races__race_id__get","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Race Api Races  Race Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["races"],"summary":"Update Race","description":"Partial update of a race.","operationId":"update_race_api_races__race_id__put","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaceUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Race Api Races  Race Id  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["races"],"summary":"Delete Race","description":"Soft-delete a race.","operationId":"delete_race_api_races__race_id__delete","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"},"title":"Response Delete Race Api Races  Race Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/event-siblings":{"get":{"tags":["races"],"summary":"List Event Siblings","description":"Other published distances of the same event (see event_group)\n— powers the distance switcher on the public results page, which\nsends ``public=true`` so hidden races stay hidden for admins too.","operationId":"list_event_siblings_api_races__race_id__event_siblings_get","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}},{"name":"public","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Public"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Event Siblings Api Races  Race Id  Event Siblings Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/finalize":{"post":{"tags":["races"],"summary":"Finalize Race","description":"Freeze a race's results: snapshots the exact current processed\noutput (results_transformer.get_results()) so it keeps serving\nunchanged regardless of later hidden-columns/prize-rule edits, and\nmarks the race finalized so the connector stops overwriting it\n(see connector-side gating in a later task). Reversible — see\n/reopen.","operationId":"finalize_race_api_races__race_id__finalize_post","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Finalize Race Api Races  Race Id  Finalize Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/reopen":{"post":{"tags":["races"],"summary":"Reopen Race","description":"Undo finalize_race() — clears the finalized flag so the race\nresumes normal live behavior. The stored snapshot is left in\nplace, harmlessly, until the next /finalize overwrites it.","operationId":"reopen_race_api_races__race_id__reopen_post","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Reopen Race Api Races  Race Id  Reopen Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/finalize-events":{"get":{"tags":["races"],"summary":"List Finalize Events","description":"Full finalize/reopen audit history for a race, oldest first.","operationId":"list_finalize_events_api_races__race_id__finalize_events_get","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Finalize Events Api Races  Race Id  Finalize Events Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/publication":{"patch":{"tags":["races"],"summary":"Update Publication","description":"Change race publication status.","operationId":"update_publication_api_races__race_id__publication_patch","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}},{"name":"publication","in":"query","required":true,"schema":{"type":"string","title":"Publication"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Publication Api Races  Race Id  Publication Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/logo":{"post":{"tags":["races"],"summary":"Upload Logo","description":"Upload a logo for a race (PNG/JPEG/WebP, max 2 MB).","operationId":"upload_logo_api_races__race_id__logo_post","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_logo_api_races__race_id__logo_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Upload Logo Api Races  Race Id  Logo Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/cover":{"post":{"tags":["races"],"summary":"Upload Cover","description":"Upload a cover image for a race (PNG/JPEG/WebP, max 2 MB).","operationId":"upload_cover_api_races__race_id__cover_post","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_cover_api_races__race_id__cover_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Upload Cover Api Races  Race Id  Cover Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/participants":{"post":{"tags":["races"],"summary":"Upload Participants","description":"Upload a participants file (CSV or Excel, max 10 MB).\n\nCSV files must contain a ``dorsal`` column.\nExcel files (.xlsx) are normalized to standard columns.\nParsed records replace the race's previously stored participant\nlist (full re-import, not a merge) — the connector reads this\nlist back via /api/connector/participants/{race_id} to attach\nnames to MyLaps timing data.","operationId":"upload_participants_api_races__race_id__participants_post","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_participants_api_races__race_id__participants_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Upload Participants Api Races  Race Id  Participants Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["races"],"summary":"List Participants","description":"List every stored participant for a race, for the admin table.","operationId":"list_participants_api_races__race_id__participants_get","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Participants Api Races  Race Id  Participants Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/participants/single":{"post":{"tags":["races"],"summary":"Add Participant","description":"Add one participant by hand — a walk-up registration or a\nrunner missing from the imported file, that doesn't warrant\nre-uploading the whole roster. Additive: existing rows are\nuntouched (unlike the bulk file upload, which replaces\neverything).","operationId":"add_participant_api_races__race_id__participants_single_post","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParticipantUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Participant Api Races  Race Id  Participants Single Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/participants/{participant_id}":{"put":{"tags":["races"],"summary":"Update Participant","description":"Correct one or more fields of a single participant — a typo\nfix that doesn't warrant re-uploading the whole file.","operationId":"update_participant_api_races__race_id__participants__participant_id__put","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}},{"name":"participant_id","in":"path","required":true,"schema":{"type":"integer","title":"Participant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParticipantUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Update Participant Api Races  Race Id  Participants  Participant Id  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/participants/{participant_id}/estado":{"put":{"tags":["races"],"summary":"Set Participant Status","description":"Set or clear a participant's manual Retirado/Descalificado override.","operationId":"set_participant_status_api_races__race_id__participants__participant_id__estado_put","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}},{"name":"participant_id","in":"path","required":true,"schema":{"type":"integer","title":"Participant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParticipantStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Set Participant Status Api Races  Race Id  Participants  Participant Id  Estado Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/participants/{participant_id}/reassign-distance":{"post":{"tags":["races"],"summary":"Reassign Participant Distance","description":"Move a participant to a different distance/race of the same\nevent. See ReassignDistanceRequest.notified for the two distinct\nflows this triggers.","operationId":"reassign_participant_distance_api_races__race_id__participants__participant_id__reassign_distance_post","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}},{"name":"participant_id","in":"path","required":true,"schema":{"type":"integer","title":"Participant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReassignDistanceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Reassign Participant Distance Api Races  Race Id  Participants  Participant Id  Reassign Distance Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/time-corrections":{"get":{"tags":["races"],"summary":"List Time Corrections","description":"List every manual per-dorsal start-time correction for a race.","operationId":"list_time_corrections_api_races__race_id__time_corrections_get","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Time Corrections Api Races  Race Id  Time Corrections Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/time-corrections/{dorsal}":{"put":{"tags":["races"],"summary":"Set Time Correction","description":"Set a runner's manual start-time correction, in milliseconds.","operationId":"set_time_correction_api_races__race_id__time_corrections__dorsal__put","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}},{"name":"dorsal","in":"path","required":true,"schema":{"type":"string","title":"Dorsal"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeCorrectionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Set Time Correction Api Races  Race Id  Time Corrections  Dorsal  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["races"],"summary":"Delete Time Correction","description":"Remove a runner's manual start-time correction.","operationId":"delete_time_correction_api_races__race_id__time_corrections__dorsal__delete","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}},{"name":"dorsal","in":"path","required":true,"schema":{"type":"string","title":"Dorsal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Delete Time Correction Api Races  Race Id  Time Corrections  Dorsal  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/start-overrides":{"get":{"tags":["races"],"summary":"List Start Overrides","description":"List every manual per-dorsal absolute start time for a race.","operationId":"list_start_overrides_api_races__race_id__start_overrides_get","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Start Overrides Api Races  Race Id  Start Overrides Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["races"],"summary":"Set Start Overrides","description":"Set one absolute start time (ms since midnight) for many bibs.\n\nBibs missing from the roster are still stored (the roster may be\nimported later) and reported back as ``unknown_dorsals``.","operationId":"set_start_overrides_api_races__race_id__start_overrides_post","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartOverrideRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Set Start Overrides Api Races  Race Id  Start Overrides Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/finish-overrides":{"get":{"tags":["races"],"summary":"List Finish Overrides","description":"List every manual per-dorsal absolute finish time for a race.","operationId":"list_finish_overrides_api_races__race_id__finish_overrides_get","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Finish Overrides Api Races  Race Id  Finish Overrides Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/finish-overrides/{dorsal}":{"put":{"tags":["races"],"summary":"Set Finish Override","description":"Set the absolute finish time (ms since midnight) of one bib.","operationId":"set_finish_override_api_races__race_id__finish_overrides__dorsal__put","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}},{"name":"dorsal","in":"path","required":true,"schema":{"type":"string","title":"Dorsal"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinishOverrideRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Set Finish Override Api Races  Race Id  Finish Overrides  Dorsal  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["races"],"summary":"Delete Finish Override","description":"Remove one bib's manual finish time.","operationId":"delete_finish_override_api_races__race_id__finish_overrides__dorsal__delete","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}},{"name":"dorsal","in":"path","required":true,"schema":{"type":"string","title":"Dorsal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Finish Override Api Races  Race Id  Finish Overrides  Dorsal  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/start-overrides/delete":{"post":{"tags":["races"],"summary":"Delete Start Overrides","description":"Remove the start override of every bib in the given list.","operationId":"delete_start_overrides_api_races__race_id__start_overrides_delete_post","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartOverrideDeleteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Start Overrides Api Races  Race Id  Start Overrides Delete Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/checkpoint-corrections":{"get":{"tags":["races"],"summary":"List Checkpoint Corrections","description":"List every manual single-checkpoint correction for a race.","operationId":"list_checkpoint_corrections_api_races__race_id__checkpoint_corrections_get","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Checkpoint Corrections Api Races  Race Id  Checkpoint Corrections Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/checkpoint-corrections/{dorsal}/{checkpoint_number}":{"put":{"tags":["races"],"summary":"Set Checkpoint Correction","description":"Correct one specific checkpoint reading for one runner, in\nmilliseconds — independent of their start and every other split.\ncheckpoint_number 0 = Salida, 1-17 = intermediate mats, 18 = Meta.","operationId":"set_checkpoint_correction_api_races__race_id__checkpoint_corrections__dorsal___checkpoint_number__put","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}},{"name":"dorsal","in":"path","required":true,"schema":{"type":"string","title":"Dorsal"}},{"name":"checkpoint_number","in":"path","required":true,"schema":{"type":"integer","title":"Checkpoint Number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckpointCorrectionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Set Checkpoint Correction Api Races  Race Id  Checkpoint Corrections  Dorsal   Checkpoint Number  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["races"],"summary":"Delete Checkpoint Correction","description":"Remove one specific checkpoint's manual correction.","operationId":"delete_checkpoint_correction_api_races__race_id__checkpoint_corrections__dorsal___checkpoint_number__delete","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}},{"name":"dorsal","in":"path","required":true,"schema":{"type":"string","title":"Dorsal"}},{"name":"checkpoint_number","in":"path","required":true,"schema":{"type":"integer","title":"Checkpoint Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Delete Checkpoint Correction Api Races  Race Id  Checkpoint Corrections  Dorsal   Checkpoint Number  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/chip-assignments":{"get":{"tags":["races"],"summary":"List Chip Assignments","description":"List every chip↔dorsal assignment for a race.","operationId":"list_chip_assignments_api_races__race_id__chip_assignments_get","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Chip Assignments Api Races  Race Id  Chip Assignments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/chip-assignments/{dorsal}":{"put":{"tags":["races"],"summary":"Set Chip Assignment","description":"Assign (or reassign) a timing chip to one runner.","operationId":"set_chip_assignment_api_races__race_id__chip_assignments__dorsal__put","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}},{"name":"dorsal","in":"path","required":true,"schema":{"type":"string","title":"Dorsal"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChipAssignmentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Set Chip Assignment Api Races  Race Id  Chip Assignments  Dorsal  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["races"],"summary":"Delete Chip Assignment","description":"Remove a runner's chip assignment.","operationId":"delete_chip_assignment_api_races__race_id__chip_assignments__dorsal__delete","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}},{"name":"dorsal","in":"path","required":true,"schema":{"type":"string","title":"Dorsal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Delete Chip Assignment Api Races  Race Id  Chip Assignments  Dorsal  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/chip-assignments/upload":{"post":{"tags":["races"],"summary":"Upload Chip Assignments","description":"Bulk-load chip↔dorsal assignments from a CSV/Excel file\n(columns \"chip\" and \"dorsal\") — a separate, simpler file from\nthe full participant roster. A full MyLaps Pid in the dorsal column\nis decoded to its bib (see _decode_chip_pids). The file replaces every stored\nassignment of the race (atomically); a file with no usable rows\nis rejected so it can never wipe the existing chips.","operationId":"upload_chip_assignments_api_races__race_id__chip_assignments_upload_post","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_chip_assignments_api_races__race_id__chip_assignments_upload_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Upload Chip Assignments Api Races  Race Id  Chip Assignments Upload Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/blocked-dorsals":{"get":{"tags":["races"],"summary":"List Blocked Dorsals","description":"List every blocked dorsal for a race.","operationId":"list_blocked_dorsals_api_races__race_id__blocked_dorsals_get","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Blocked Dorsals Api Races  Race Id  Blocked Dorsals Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/blocked-dorsals/{dorsal}":{"put":{"tags":["races"],"summary":"Block Dorsal","description":"Block a dorsal so its readings never reach live/final results.","operationId":"block_dorsal_api_races__race_id__blocked_dorsals__dorsal__put","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}},{"name":"dorsal","in":"path","required":true,"schema":{"type":"string","title":"Dorsal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Block Dorsal Api Races  Race Id  Blocked Dorsals  Dorsal  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["races"],"summary":"Unblock Dorsal","description":"Unblock a dorsal.","operationId":"unblock_dorsal_api_races__race_id__blocked_dorsals__dorsal__delete","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}},{"name":"dorsal","in":"path","required":true,"schema":{"type":"string","title":"Dorsal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Unblock Dorsal Api Races  Race Id  Blocked Dorsals  Dorsal  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/blocked-chips":{"get":{"tags":["races"],"summary":"List Blocked Chips","description":"List every blocked chip code for a race.","operationId":"list_blocked_chips_api_races__race_id__blocked_chips_get","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Blocked Chips Api Races  Race Id  Blocked Chips Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/blocked-chips/{chip}":{"put":{"tags":["races"],"summary":"Block Chip","description":"Block a raw chip code so its readings never reach live/final results.","operationId":"block_chip_api_races__race_id__blocked_chips__chip__put","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}},{"name":"chip","in":"path","required":true,"schema":{"type":"string","title":"Chip"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Block Chip Api Races  Race Id  Blocked Chips  Chip  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["races"],"summary":"Unblock Chip","description":"Unblock a chip code.","operationId":"unblock_chip_api_races__race_id__blocked_chips__chip__delete","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}},{"name":"chip","in":"path","required":true,"schema":{"type":"string","title":"Chip"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Unblock Chip Api Races  Race Id  Blocked Chips  Chip  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/results/{race_id}":{"get":{"tags":["results"],"summary":"Get Results","description":"Get race results (public, no auth required).\n\nServes results from connector JSON files in the DataTables aaData format.\n\nArgs:\n    race_id: Race identifier (matches connector's mmrk_{race_id}.json).\n\nReturns:\n    {aaData: [...], raceId: str, updatedAt: str}","operationId":"get_results_api_results__race_id__get","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/results/{race_id}/refresh":{"post":{"tags":["results"],"summary":"Refresh Results","description":"Force re-transform results from connector JSON.\n\nTriggered when admin wants to refresh results without waiting for\nthe connector's polling cycle.\n\nArgs:\n    race_id: Race identifier.\n\nReturns:\n    Updated results dict.","operationId":"refresh_results_api_results__race_id__refresh_post","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Refresh Results Api Results  Race Id  Refresh Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/settings/smtp":{"get":{"tags":["settings"],"summary":"Get Smtp Config","description":"Return the effective SMTP config, with the password masked.","operationId":"get_smtp_config_api_settings_smtp_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Smtp Config Api Settings Smtp Get"}}}}}},"put":{"tags":["settings"],"summary":"Update Smtp Config","description":"Persist new SMTP settings. Omit ``password`` to keep the current one.","operationId":"update_smtp_config_api_settings_smtp_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmtpConfigRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Update Smtp Config Api Settings Smtp Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/settings/smtp/test":{"post":{"tags":["settings"],"summary":"Test Smtp Config","description":"Send a real test email using the currently configured SMTP settings.","operationId":"test_smtp_config_api_settings_smtp_test_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmtpTestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Test Smtp Config Api Settings Smtp Test Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/settings/year":{"get":{"tags":["settings"],"summary":"Get Active Year","description":"Public — the index page needs this to pick which year to show.","operationId":"get_active_year_api_settings_year_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActiveYearResponse"}}}}}}},"/api/settings/year/close":{"post":{"tags":["settings"],"summary":"Close Active Year","description":"Advance the active year by one. Does not touch existing races —\nit only changes which year new races default to going forward.","operationId":"close_active_year_api_settings_year_close_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActiveYearResponse"}}}}}}},"/api/settings/backup":{"post":{"tags":["settings"],"summary":"Create Backup","description":"Build a password-protected ZIP of the SQLite DB and uploads dir.\n\nThe one-time password is returned in the ``X-Backup-Password``\nheader — it isn't stored anywhere, so it must be relayed to\nwhoever needs to restore the backup right away.","operationId":"create_backup_api_settings_backup_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/connector/heartbeat":{"post":{"tags":["connector"],"summary":"Post Heartbeat","description":"Record a connector's status ping.","operationId":"post_heartbeat_api_connector_heartbeat_post","parameters":[{"name":"x-connector-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Connector-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorHeartbeatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Post Heartbeat Api Connector Heartbeat Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/connector/participants/{race_id}":{"get":{"tags":["connector"],"summary":"Get Participants","description":"Return a race's stored participant roster plus its manual\ntiming adjustments (dorsal → identity, per-dorsal start-time\ncorrections, per-checkpoint corrections, official start time),\nits configured checkpoint names, its chip↔dorsal assignments,\nits blocked_dorsals/blocked_chips, and its start_mode.\n\nThe connector calls this every cycle to attach name/sex/category\nto the raw timing data it reads from the MyLaps SQL Server (which\nhas no participant identity fields of its own), to apply the\nsame manual corrections a timing operator would apply through\nkronoak's own Access tooling, to label its timecarreraN\ncolumns with the checkpoint names an organizer actually typed in\n(Carrera → Puntos de control) instead of generic \"Control N\",\nto push chip_assignments into MyLaps' own Chips table (also\npreviously done by hand through that same Access tooling), and\nto filter out blocked_dorsals/blocked_chips before a reading\never reaches live or final results, and to know whether this\nrace has an individual start mat (start_mode \"chip\", default)\nor is a mass start by gun only (start_mode \"gun\", every runner's\nstart recomputed from official_start_ms) — see\nCONNECTOR_BUILD.md.","operationId":"get_participants_api_connector_participants__race_id__get","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}},{"name":"x-connector-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Connector-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Participants Api Connector Participants  Race Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/connector/results/{race_id}":{"post":{"tags":["connector"],"summary":"Post Results","description":"Publish a race's live results, pushed over HTTPS by a connector.\n\nReplaces SFTP file upload for connectors that aren't on the\nserver's own LAN (port 22 isn't reachable from the public\ninternet — see CONNECTOR_BUILD.md). Writes the exact same two\nfiles json_generator.py would have written locally\n(mmrk_{race_id}.json, mmrk_{race_id}prem.json), atomically.\n\nReturns 409 if the race is finalized — a finalized race's\nresults are frozen (server/results/transformer.py serves the\nstored snapshot instead), so a late/stray connector upload must\nnever overwrite it.","operationId":"post_results_api_connector_results__race_id__post","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}},{"name":"x-connector-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Connector-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorResultsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Post Results Api Connector Results  Race Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/connector/reset/{race_id}":{"post":{"tags":["connector"],"summary":"Reset Results","description":"Clear a race's live results JSON — called by the connector when\nit detects MyLaps' own SQL Server data has been genuinely cleared\n(see connector/main.py's consecutive-empty-cycle counter), not just\na momentary empty poll or a race that hasn't started yet. Only the\non-disk live JSON is touched; participants, corrections, chip\nassignments, and blocklists are Irteera-authored and untouched, so\nthey carry over automatically once the connector produces data\nagain.\n\nNo-op if the race is finalized — protects the frozen snapshot from\never being cleared by a stray/late reset signal.","operationId":"reset_results_api_connector_reset__race_id__post","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}},{"name":"x-connector-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Connector-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Reset Results Api Connector Reset  Race Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/connector/official-start/{race_id}":{"put":{"tags":["connector"],"summary":"Put Official Start","description":"Auto-fill a race's official start time from MyLaps' own\nMarkers table (Type='Gunshot') — the connector calls this once\nit detects the gun has actually fired, so an admin doesn't have\nto type it in by hand. Only applied while official_start_ms is\nstill unset — a manual correction (e.g. \"the gun went off a few\nseconds late\") is never overwritten by a later auto-detection\ncycle, enforced server-side regardless of what the connector\ndoes.","operationId":"put_official_start_api_connector_official_start__race_id__put","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}},{"name":"x-connector-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Connector-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfficialStartRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Put Official Start Api Connector Official Start  Race Id  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/connector/{team_id}/{device_id}/assignment":{"get":{"tags":["connector"],"summary":"Get Assignment","description":"Return the race (and MyLaps database) a connector is assigned to.\n\nThis is the authoritative source the connector should poll — not\nits own local config.ini — so an admin controls, from the web,\nwhich race a given timing laptop is actually working on and which\nSQL database to read, and a stale/wrong local config can't\nsilently point it at the wrong one.\n\nAlso reports ``finalized`` (looked up from the assigned race,\ntolerantly — an unassigned or since-deleted race is just\n``finalized: False``, never an error) so the connector can skip\ntouching MyLaps SQL Server entirely once the race is frozen,\nwithout waiting on the separate server-side hard gate in\npost_results().\n\nAlso reports ``sql_reset_requested`` — set by an admin via\nrequest-sql-reset — so the connector knows to run its\ndestructive MyLaps SQL reset (a separate later task) on its\nnext cycle, then acknowledge via sql-reset-ack.\n\nAlso reports ``has_results`` — whether Irteera currently holds\nnon-empty live results for the assigned race (see\n_has_live_results) — so the connector's empty-cycle auto-reset\ncounter survives a connector restart instead of depending only\non its own process memory of having seen data.","operationId":"get_assignment_api_connector__team_id___device_id__assignment_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"device_id","in":"path","required":true,"schema":{"type":"string","title":"Device Id"}},{"name":"x-connector-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Connector-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Assignment Api Connector  Team Id   Device Id  Assignment Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["connector"],"summary":"Put Assignment","description":"Assign a race (and its MyLaps database name) to a connector, from the admin panel.","operationId":"put_assignment_api_connector__team_id___device_id__assignment_put","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"device_id","in":"path","required":true,"schema":{"type":"string","title":"Device Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorAssignmentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Put Assignment Api Connector  Team Id   Device Id  Assignment Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/connector/{team_id}/{device_id}/alias":{"put":{"tags":["connector"],"summary":"Put Alias","description":"Label a self-registered connector with a human-readable name.\n\nteam_id/device_id are a machine fingerprint the connector\ngenerates on its own (see connector/config.py) — this alias is\nhow a technician actually recognizes which laptop is which in\nthe registry table.","operationId":"put_alias_api_connector__team_id___device_id__alias_put","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"device_id","in":"path","required":true,"schema":{"type":"string","title":"Device Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorAliasRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Put Alias Api Connector  Team Id   Device Id  Alias Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/connector/{team_id}/{device_id}":{"delete":{"tags":["connector"],"summary":"Delete Connector","description":"Remove a stale connector from the registry (e.g. a duplicate\nleft by a changed machine fingerprint). A running connector simply\nre-registers on its next heartbeat.","operationId":"delete_connector_api_connector__team_id___device_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"device_id","in":"path","required":true,"schema":{"type":"string","title":"Device Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Delete Connector Api Connector  Team Id   Device Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/connector/{team_id}/{device_id}/request-sql-reset":{"post":{"tags":["connector"],"summary":"Request Sql Reset","description":"Flag a connector to wipe MyLaps' own Results/Times tables for\nits currently assigned race on its next cycle — a real, irreversible\ndelete against the timing company's own database, not just\nIrteera's copy. The confirming UI (a separate task) requires typing\nthe connector/race name before calling this; this route itself\nperforms no further confirmation.","operationId":"request_sql_reset_api_connector__team_id___device_id__request_sql_reset_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"device_id","in":"path","required":true,"schema":{"type":"string","title":"Device Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Request Sql Reset Api Connector  Team Id   Device Id  Request Sql Reset Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/connector/{team_id}/{device_id}/sql-reset-ack":{"post":{"tags":["connector"],"summary":"Sql Reset Ack","description":"Connector calls this once it has actually executed the SQL\nreset, clearing the pending flag so it doesn't re-trigger every\nsubsequent cycle.","operationId":"sql_reset_ack_api_connector__team_id___device_id__sql_reset_ack_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"device_id","in":"path","required":true,"schema":{"type":"string","title":"Device Id"}},{"name":"x-connector-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Connector-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Sql Reset Ack Api Connector  Team Id   Device Id  Sql Reset Ack Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/connector/status":{"get":{"tags":["connector"],"summary":"Get Connectors","description":"List every registered connector with a computed connected flag.","operationId":"get_connectors_api_connector_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Connectors Api Connector Status Get"}}}}}}},"/api/races/{race_id}/visible-columns":{"get":{"summary":"Get Visible Columns","description":"Return the visible columns for a race.","operationId":"get_visible_columns_api_races__race_id__visible_columns_get","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Visible Columns Api Races  Race Id  Visible Columns Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Set Visible Columns","description":"Save the visible columns for a race.","operationId":"set_visible_columns_api_races__race_id__visible_columns_post","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Set Visible Columns Api Races  Race Id  Visible Columns Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/hidden-result-columns":{"get":{"summary":"Get Hidden Result Columns","description":"Return which public-results columns are hidden for a race.\n\nAn empty list (the default) means nothing is hidden — everything\nthe connector generates shows on the public page.","operationId":"get_hidden_result_columns_api_races__race_id__hidden_result_columns_get","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Hidden Result Columns Api Races  Race Id  Hidden Result Columns Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Set Hidden Result Columns","description":"Save which public-results columns are hidden for a race.\n\nAn empty list is valid here (unlike visible-columns) — it means\n\"show everything\", the common case.","operationId":"set_hidden_result_columns_api_races__race_id__hidden_result_columns_post","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Set Hidden Result Columns Api Races  Race Id  Hidden Result Columns Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/column-catalog":{"get":{"summary":"Get Column Catalog","description":"Return this race's column catalog (COL-1): every column that\nhas real data for it, from participants, results, and chip\nassignments — see server.results.column_catalog. Feeds COL-2's\ncolumn_config editor and defaults; no public output changes.","operationId":"get_column_catalog_api_races__race_id__column_catalog_get","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Column Catalog Api Races  Race Id  Column Catalog Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/column-config":{"get":{"summary":"Get Column Config","description":"Return this race's unified column_config (COL-2/COL-2b): one\nordered list of {key, label, live} driving ONLY the public live\ntable — no judges/athletes destinations (COL-2b, 2026-09-28 user\ndecision: a later \"Exportaciones\" section picks/orders columns\nper export on demand instead, independent of this setting).\n\nWhen unset, a default is computed on the fly from this race's\ncolumn catalog + current hidden_result_columns (server.results.\ncolumn_config.compute_default_column_config) and returned WITHOUT\nbeing persisted — is_default distinguishes the two cases. Existing\nraces get their default persisted once by a startup migration\n(server.results.column_config.backfill_column_config_defaults),\nso this live-compute fallback mainly covers races created since.\n\nA stored config is normalized to the current shape before being\nreturned (server.results.column_config.normalize_column_config)\n— back-compat for any row still carrying the pre-COL-2b judges/\nathletes fields.","operationId":"get_column_config_api_races__race_id__column_config_get","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Column Config Api Races  Race Id  Column Config Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Set Column Config","description":"Save this race's unified column_config (COL-2/COL-2b) — order\nand the live flag (no judges/athletes, see get_column_config).\nEach key is validated against this race's CURRENT column\ncatalog; an unknown key is rejected (422) rather than silently\naccepted, since a stale/typo'd key would otherwise render as\nnothing everywhere it's used.\n\nNo finalized-race lock: same rule the existing visible-columns/\nhidden-result-columns endpoints above already follow — REF-5's\nfinalized-write lock only applies to RaceStore.update_race, which\nnone of these column settings go through.","operationId":"set_column_config_api_races__race_id__column_config_put","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Set Column Config Api Races  Race Id  Column Config Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/prize-values":{"get":{"summary":"Get Prize Values","description":"Distinct raw values of a prize rule's field for this race,\nwith runner counts, sorted by count desc — feeds the rule\neditor's value checklist (server.results.prize_values;\nPrizeRule.field: location/provincia/pais/club/procedencia).","operationId":"get_prize_values_api_races__race_id__prize_values_get","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}},{"name":"field","in":"query","required":true,"schema":{"type":"string","title":"Field"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Prize Values Api Races  Race Id  Prize Values Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/prize-values/suggest":{"post":{"summary":"Post Prize Values Suggest","description":"Every distinct value of ``body[\"field\"]``, flagged with\nwhether it should be suggested as a match for ``body[\"seeds\"]``\n(a rule's label text and/or already-confirmed values) and why\n(server.results.value_matching: \"normalized\"/\"dictionary\"/\n\"fuzzy\") — the organizer still confirms explicitly, this only\npre-checks likely matches.","operationId":"post_prize_values_suggest_api_races__race_id__prize_values_suggest_post","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Post Prize Values Suggest Api Races  Race Id  Prize Values Suggest Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/prize-rules/unreviewed":{"get":{"summary":"Get Prize Rules Unreviewed","description":"Per stored custom prize rule (keyed by rule id), the distinct\nvalues of its field that are neither confirmed (``values``) nor\nrejected (``excluded_values``) yet, but ARE suggested for it —\nfeature doc's \"N valores nuevos sin revisar\" flag. A rule with\nnothing unreviewed is omitted (empty list would be noise for\nevery rule on every race — the editor only cares about the ones\nthat actually have something new).","operationId":"get_prize_rules_unreviewed_api_races__race_id__prize_rules_unreviewed_get","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Prize Rules Unreviewed Api Races  Race Id  Prize Rules Unreviewed Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/export-columns":{"get":{"summary":"Get Export Columns","description":"COL-5/COL-7/PRZ-4: this race's remembered custom-export\nselection for the admin results page's \"Exportaciones\" section,\nor null if never saved — an ordered list of catalog keys for\n\"clasificacion\"/\"inscritos\", or of prize group ids for \"podio\"\n(PRZ-4: which podiums are checked in the group picker). Persisted\nby POST /export/custom on every successful export — see there.\nEach export \"kind\" (\"clasificacion\", the default, \"inscritos\",\nor \"podio\") remembers its own selection independently\n(server.db.Database.get_race_export_columns).","operationId":"get_export_columns_api_races__race_id__export_columns_get","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","default":"clasificacion","title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Export Columns Api Races  Race Id  Export Columns Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/races/{race_id}/export/custom":{"post":{"summary":"Export Custom","description":"COL-5/COL-7: unify Clasificación/Inscritos/Podio in one\nendpoint — ``body[\"kind\"]`` picks which:\n\n- \"clasificacion\" (default, back-compat with COL-5): an Excel or\n  PDF export from an organizer-picked, ordered set of catalog\n  columns — timing (results, incl. checkpoint names),\n  participant, derived (\"procedencia\"), and chip columns alike,\n  exactly like the public live table (COL-3) but independently\n  orderable/selectable per export, driven by ``body[\"columns\"]``\n  instead of column_config. Reuses project_public_results() for\n  row-building (same enrichment/chip-lookup/raw-timing-value\n  rules as the live table).\n- \"inscritos\" (COL-7): the full REGISTERED ROSTER, independent\n  of results — one row per participant regardless of whether\n  they have any result at all. Only participant/derived catalog\n  columns are selectable (422 naming a purely timing-sourced\n  key, e.g. \"finish_time\"). Reuses project_participant_roster()\n  for row-building.\n- \"podio\" (COL-7 + PRZ-4): Excel or PDF, no COLUMN picker but a\n  GROUP picker instead — ``body[\"groups\"]`` (prize group ids,\n  e.g. \"category-SENM\" or a custom rule's \"custom-<id>[-<sex>]\"/\n  \"custom-<id>-<category>[-<sex>]\", see server.results.\n  prize_groups) selects which of this race's prize groups to\n  include; every id must be one of this race's CURRENT prize\n  groups (422 naming an unknown one). Omitting ``groups``\n  entirely exports every group (back-compat with pre-PRZ-4\n  callers). Reuses build_podium_pdf/build_podium_excel, same\n  prize data as Clasificación's own \"Incluir podio\" checkbox.\n\nBody: {\"format\": \"excel\"|\"pdf\", \"kind\": \"clasificacion\"|\n\"inscritos\"|\"podio\", \"columns\": [key, ...] (required for\n\"clasificacion\"/\"inscritos\"), \"groups\": [group_id, ...]\n(optional, \"podio\" only), \"include_podium\": bool,\n\"order_by\": \"net\"|\"official\", \"statuses\": [code, ...]} — order_by (default \"net\", 422 on\nanything else) only affects \"clasificacion\": \"official\" orders\nand re-ranks by the Tiempo Oficial column (no-op without it).\nstatuses (only \"clasificacion\"; ignored for \"inscritos\"/\"podio\")\nlists the runner status codes to export (\"0\" Finalizado, \"1\"\nCorriendo, \"2\" Retirado, \"3\" Descalificado, \"4\" Sin salir, \"5\"\nSin finalizar). Omitted: every status but \"4\". An empty list or\nan unknown code is a 422. Rows are filtered by their status cell\nBEFORE the official reorder, so official ranks are consecutive\namong the exported rows; with order_by \"net\" the rank cells keep\ntheir values (no renumbering). Rows without a status column are\nnever filtered.\ninclude_podium only affects \"clasificacion\" + \"pdf\"\n(build_complete_pdf vs. build_results_pdf); ignored for\n\"inscritos\"/\"podio\".\n\nFor \"clasificacion\"/\"inscritos\", keys are validated against this\nrace's CURRENT column catalog (422 on an unknown key, naming\nit) — same rule as PUT /column-config; \"inscritos\" additionally\nrejects a catalog key that isn't participant/derived-sourced.\nOn a successful export, the selection is persisted as this\nrace's remembered choice FOR THAT KIND (db.set_race_export_columns)\n— keys in order for \"clasificacion\"/\"inscritos\", the resolved\nlist of included group ids for \"podio\" (even when ``groups`` was\nomitted, so a later GET reflects what was actually exported);\neach kind remembers its own selection independently. A failed\nexport (e.g. no results/no participants/no prize data yet)\npersists nothing.","operationId":"export_custom_api_races__race_id__export_custom_post","parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health":{"get":{"summary":"Health","description":"Health-check endpoint used by load balancers and monitoring.","operationId":"health_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/connector/build-exists":{"get":{"summary":"Connector Build Exists","description":"Whether a build is currently available to download — lets the\nConector page show the download link on load without re-fetching\nthe whole zip just to check.","operationId":"connector_build_exists_api_admin_connector_build_exists_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Response Connector Build Exists Api Admin Connector Build Exists Get"}}}}}}},"/api/admin/connector/download":{"get":{"summary":"Download Connector Executable","description":"Download the built connector as a .zip (the .exe plus its\ndependency folder — a lone .exe won't run standalone).","operationId":"download_connector_executable_api_admin_connector_download_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/connector/upload":{"post":{"summary":"Upload Connector Executable","description":"Upload a pre-built connector as a .zip of its whole build folder.","operationId":"upload_connector_executable_api_admin_connector_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_connector_executable_api_admin_connector_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/connector/status":{"get":{"summary":"Get Connector Status","description":"Get current connector status from the status file.\n\nReturns:\n    Connector status including team_id, device_id, race_id, connection_status, etc.","operationId":"get_connector_status_api_admin_connector_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Connector Status Api Admin Connector Status Get"}}}}}}},"/uxue-trail.html":{"get":{"summary":"Redirect Uxue Trail","description":"Redirect legacy uxue-trail.html to the Uxue Trail public URL.\n\nFinds the first non-deleted race named \"Uxue Trail\" and prefers its\nslug as the public reference, with the UUID retained as a fallback.\nIf no such race exists, redirects to /results.html without an id.","operationId":"redirect_uxue_trail_uxue_trail_html_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"ActiveYearResponse":{"properties":{"active_year":{"type":"integer","title":"Active Year"}},"type":"object","required":["active_year"],"title":"ActiveYearResponse","description":"Current active year for new race creation."},"AdminListResponse":{"properties":{"admins":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Admins"}},"type":"object","required":["admins"],"title":"AdminListResponse","description":"List of active admins."},"Body_upload_chip_assignments_api_races__race_id__chip_assignments_upload_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_chip_assignments_api_races__race_id__chip_assignments_upload_post"},"Body_upload_connector_executable_api_admin_connector_upload_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_connector_executable_api_admin_connector_upload_post"},"Body_upload_cover_api_races__race_id__cover_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_cover_api_races__race_id__cover_post"},"Body_upload_logo_api_races__race_id__logo_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_logo_api_races__race_id__logo_post"},"Body_upload_participants_api_races__race_id__participants_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_participants_api_races__race_id__participants_post"},"CategoryAgeRange":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"min_age":{"type":"integer","maximum":150.0,"minimum":0.0,"title":"Min Age"},"max_age":{"anyOf":[{"type":"integer","maximum":150.0,"minimum":0.0},{"type":"null"}],"title":"Max Age"},"acronym":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Acronym"}},"type":"object","required":["name","min_age"],"title":"CategoryAgeRange","description":"One age range used to compute a runner's category from the birth\ndate (server.results.age_categories). ``max_age`` None = open-ended\n(e.g. Veteranos 40+). Ages are the age reached in the race year.\n``acronym`` (optional) replaces the automatic category acronym shown\nin \"Pos. Categoría\" (server.results.category_rank), e.g. \"V40\"."},"CheckpointCorrectionRequest":{"properties":{"correction_ms":{"type":"integer","maximum":3600000.0,"minimum":-3600000.0,"title":"Correction Ms"}},"type":"object","required":["correction_ms"],"title":"CheckpointCorrectionRequest","description":"Admin request to correct one specific checkpoint reading for one\nrunner, independent of their start and every other checkpoint.\n\nUnlike TimeCorrectionRequest (which shifts a runner's whole race by\nadjusting their start), this only touches the one timecarreraN the\noperator identifies as wrong — a bad mat read at km 10 doesn't mean\nthe runner's start or their other splits need touching too.\nMilliseconds, same axis as MyLaps' own timestamps."},"ChipAssignmentRequest":{"properties":{"chip":{"type":"string","maxLength":7,"minLength":1,"title":"Chip"}},"type":"object","required":["chip"],"title":"ChipAssignmentRequest","description":"Admin request to assign (or reassign) a timing chip to a runner.\n\nIrteera is the source of truth for this now — previously done by\nhand through MyLaps' own Access file (see CONNECTOR_BUILD.md). The\nconnector pushes it into MyLaps' Chips table each cycle, upserting\nby Pid (the runner), not by chip — a runner getting a replacement\nchip mid-race just overwrites their own row, no orphaned old chip\nleft behind. max_length=7 matches Chips.Chip's real column width\n(varchar(7)) — MyLaps compares it as an exact string, no\nzero-padding is added on our end."},"ConnectorAliasRequest":{"properties":{"alias":{"type":"string","maxLength":100,"title":"Alias","default":""}},"type":"object","title":"ConnectorAliasRequest","description":"Admin request to label a self-registered connector with a human-readable name."},"ConnectorAssignmentRequest":{"properties":{"race_id":{"type":"string","maxLength":100,"minLength":1,"title":"Race Id"},"database_name":{"type":"string","maxLength":200,"title":"Database Name","default":""}},"type":"object","required":["race_id"],"title":"ConnectorAssignmentRequest","description":"Admin request to assign a race to a registered connector.\n\ndatabase_name is the MyLaps SQL Server database for that race —\nnothing in MyLaps' own schema identifies which race a database\nbelongs to, so this is how the admin (who knows both names) records\nthe mapping. Optional: left blank, the connector keeps using its own\nconfig.ini database."},"ConnectorHeartbeatRequest":{"properties":{"team_id":{"type":"string","maxLength":100,"minLength":1,"title":"Team Id"},"device_id":{"type":"string","maxLength":100,"minLength":1,"title":"Device Id"},"race_id":{"type":"string","maxLength":100,"title":"Race Id","default":""},"participant_count":{"type":"integer","minimum":0.0,"title":"Participant Count","default":0},"message":{"type":"string","maxLength":500,"title":"Message","default":""},"connector_build":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Connector Build"},"start_column":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Start Column"},"finish_column":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Finish Column"},"checkpoint_columns":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":17},{"type":"null"}],"title":"Checkpoint Columns"}},"type":"object","required":["team_id","device_id"],"title":"ConnectorHeartbeatRequest","description":"Status ping a running connector sends periodically."},"ConnectorResultsRequest":{"properties":{"colTypes":{"items":{"type":"string"},"type":"array","maxItems":60,"minItems":1,"title":"Coltypes"},"colNames":{"items":{"type":"string"},"type":"array","maxItems":60,"title":"Colnames"},"colCount":{"type":"integer","maximum":60.0,"minimum":1.0,"title":"Colcount"},"aaData":{"items":{"items":{"type":"string"},"type":"array"},"type":"array","maxItems":20000,"title":"Aadata"},"podium":{"items":{"items":{"type":"string"},"type":"array"},"type":"array","maxItems":500,"title":"Podium"}},"type":"object","required":["colTypes","colNames","colCount","aaData"],"title":"ConnectorResultsRequest","description":"Live results payload a connector pushes over HTTPS.\n\nReplaces SFTP file upload (see CONNECTOR_BUILD.md — port 22 isn't\nreachable from outside the server's own LAN, only 443 is). Writes\ndirectly to a publicly served JSON file, so every field is strictly\nbounded: a compromised or buggy connector can only ever produce a\nwell-shaped results table, never arbitrary content or an\nunreasonably large payload."},"CreateAdminRequest":{"properties":{"email":{"type":"string","maxLength":255,"minLength":1,"title":"Email"},"password":{"type":"string","minLength":8,"title":"Password"},"role":{"type":"string","title":"Role","description":"Either 'administrador' or 'revisor'","default":"revisor"}},"type":"object","required":["email","password"],"title":"CreateAdminRequest","description":"Schema for creating a new user account (without 2FA enabled)."},"FinishOverrideRequest":{"properties":{"finish_ms":{"type":"integer","maximum":86399999.0,"minimum":1.0,"title":"Finish Ms"}},"type":"object","required":["finish_ms"],"title":"FinishOverrideRequest","description":"Admin request to set the Llegada (net time) of one bib.\n\n``finish_ms`` is a DURATION in ms (> 0), not a clock reading."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Login2FARequired":{"properties":{"status":{"type":"string","title":"Status","default":"2fa_required"},"email":{"type":"string","title":"Email"},"session_token":{"type":"string","title":"Session Token"}},"type":"object","required":["email","session_token"],"title":"Login2FARequired","description":"Returned when user has 2FA enabled — a code was emailed to them."},"LoginRequest":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequest","description":"Login credentials."},"LoginResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In","default":86400}},"type":"object","required":["access_token"],"title":"LoginResponse","description":"Successful login response."},"LoginVerify2FARequest":{"properties":{"email":{"type":"string","title":"Email"},"code":{"type":"string","title":"Code"},"session_token":{"type":"string","title":"Session Token"}},"type":"object","required":["email","code","session_token"],"title":"LoginVerify2FARequest","description":"Complete login by submitting the code emailed after the password step."},"OfficialStartRequest":{"properties":{"official_start_ms":{"type":"integer","minimum":0.0,"title":"Official Start Ms"}},"type":"object","required":["official_start_ms"],"title":"OfficialStartRequest","description":"Connector request to auto-fill a race's official start time from\nMyLaps' own Markers table (Type='Gunshot', Location='Timesalida_neta'\n— confirmed against real data to be on the exact same milliseconds\naxis official_start_ms already uses, no conversion needed; that axis\nmay exceed one day, see RaceUpdate.official_start_ms).\n\nThe store only applies this when official_start_ms is currently\nunset — an admin's manual correction (e.g. \"the gun actually went\noff a few seconds late\") must never get silently overwritten by a\nlater auto-detection cycle. Same range as RaceUpdate.official_start_ms."},"PaginatedRaces":{"properties":{"races":{"items":{"$ref":"#/components/schemas/RacePublic"},"type":"array","title":"Races"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"per_page":{"type":"integer","title":"Per Page"},"pages":{"type":"integer","title":"Pages"}},"type":"object","required":["races","total","page","per_page","pages"],"title":"PaginatedRaces","description":"Paginated list of public races."},"ParticipantStatusRequest":{"properties":{"estado":{"anyOf":[{"type":"string","enum":["retirado","descalificado"]},{"type":"null"}],"title":"Estado","description":"None clears the override, returning to the timing-derived estado."}},"type":"object","title":"ParticipantStatusRequest","description":"Admin request to set (or clear) a participant's manual status\noverride — independent of the timing-derived estado (Finalizado/\nCorriendo) the connector computes; this overrides it for display."},"ParticipantUpdateRequest":{"properties":{"dorsal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dorsal"},"nombre":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nombre"},"apellidos":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apellidos"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"telefono":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Telefono"},"genero":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Genero"},"fecha_nacimiento":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fecha Nacimiento"},"edad":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Edad"},"provincia":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provincia"},"poblacion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Poblacion"},"pais":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pais"},"club":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Club"},"tarifa":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tarifa"},"nacimiento":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nacimiento"},"categoria":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Categoria"},"objetivo_marca":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Objetivo Marca"},"licencia":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Licencia"},"direccion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direccion"},"codigo_postal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Codigo Postal"},"talla":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Talla"},"grupo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grupo"},"nombre_grupo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nombre Grupo"},"pais_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pais Code"},"origen":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origen"},"donacion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Donacion"},"grabacion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grabacion"},"federado":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Federado"},"dni":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dni"}},"type":"object","title":"ParticipantUpdateRequest","description":"Correct one or more fields of a single participant already stored from a CSV/Excel import — for a name/dorsal/category typo that doesn't warrant re-uploading the whole file. Every field is optional; only the ones sent are changed. Mirrors PARTICIPANT_COLUMNS so it can never drift out of sync with what the importer accepts."},"PrizeRule":{"properties":{"id":{"type":"string","maxLength":64,"title":"Id"},"label":{"type":"string","maxLength":100,"minLength":1,"title":"Label"},"field":{"type":"string","enum":["location","provincia","pais","club","procedencia"],"title":"Field","default":"location"},"values":{"items":{"type":"string"},"type":"array","maxItems":5000,"title":"Values"},"excluded_values":{"items":{"type":"string"},"type":"array","maxItems":5000,"title":"Excluded Values"},"match_mode":{"type":"string","enum":["contains","exact"],"title":"Match Mode","default":"contains"},"top":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Top","default":3},"split_by_sex":{"type":"boolean","title":"Split By Sex","default":true},"split_by_category":{"type":"boolean","title":"Split By Category","default":false}},"type":"object","required":["id","label"],"title":"PrizeRule","description":"A custom podium definition, e.g. \"top 3 Donostia-resident men/women\".\n\n``field`` picks which datum to compare (see odd/tasks/prize-rules-by-\nfield.md): \"location\" keeps matching the results table's own\nlocation column exactly as before; \"provincia\"/\"pais\"/\"club\"/\n\"procedencia\" match the enriched participant value instead (server.\nresults.enrichment, joined by trimmed dorsal).\n\nBack-compat: a rule stored before this field existed has no\n\"field\"/\"match_mode\" key at all, so it defaults to \"location\" +\n\"contains\" — the exact same matching this class always did. ``values``\nholds organizer-curated accepted spellings (town names are free text\nand get entered inconsistently — e.g. \"DONOSTIA-SAN SEBASTIAN\" vs\n\"DONOSTI\" for the same place); a legacy (\"contains\") rule matches\nthem as a case/accent-insensitive SUBSTRING of the raw value, same as\nalways. A rule created/edited through the new value-discovery UI\n(server.results.value_matching) sets match_mode \"exact\" instead:\n``values`` is then the exact, confirmed list of raw spellings, matched\nby equality after the shared normalization (accent/punctuation/\nBasque-Spanish spelling folding) — no organizer-typed prefix/suffix\ncan accidentally match something else.\n\n``excluded_values`` holds raw spellings the organizer has reviewed\nand explicitly rejected for this rule (a suggested variant that\nturned out to be a different place) — used only for unreviewed-value\ndetection (server.results.prize_values), never for matching."},"PublicationStatus":{"type":"string","enum":["draft","scheduled","published"],"title":"PublicationStatus","description":"Publication states for a race."},"RaceCreate":{"properties":{"name":{"type":"string","maxLength":255,"title":"Name","description":"Unique race name"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","title":"Date","description":"YYYY-MM-DD"},"publication":{"$ref":"#/components/schemas/PublicationStatus","default":"published"},"public_listed":{"type":"boolean","title":"Public Listed","description":"Whether the race appears in the anonymous public selector. New races start hidden while they are being prepared; direct links keep working either way.","default":false},"modality":{"type":"string","maxLength":100,"title":"Modality","description":"e.g. Trail, Carrera urbana"},"distance":{"type":"number","exclusiveMinimum":0.0,"title":"Distance","description":"Distance value"},"distance_unit":{"type":"string","title":"Distance Unit","default":"m"},"location":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Location"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories"},"sexes":{"items":{"type":"string"},"type":"array","title":"Sexes"},"checkpoints":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Checkpoints"},"event_group":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Event Group","description":"Shared label for races that are different distances of the same event day (e.g. '10K Élite', '5K Popular' both set to the same event_group) — see RaceStore.list_event_siblings()."},"bib_group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bib Group","description":"Two-digit MyLaps Pid group (01-99): Pid = group * 100000 + bib. An empty string leaves it unset."}},"type":"object","required":["name","date","modality","distance"],"title":"RaceCreate","description":"Schema for creating a new race.\n\nAll fields except ``categories``, ``sexes``, and ``checkpoints`` are required."},"RacePublic":{"properties":{"id":{"type":"string","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"date":{"type":"string","title":"Date"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"publication":{"type":"string","title":"Publication"},"public_listed":{"type":"boolean","title":"Public Listed","default":true},"finalized_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Finalized At"}},"type":"object","required":["id","slug","name","date","publication"],"title":"RacePublic","description":"Public-facing race representation (no sensitive/internal fields)."},"RaceUpdate":{"properties":{"publication":{"anyOf":[{"$ref":"#/components/schemas/PublicationStatus"},{"type":"null"}]},"public_listed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Public Listed"},"slug":{"anyOf":[{"type":"string","maxLength":96},{"type":"null"}],"title":"Slug"},"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Name"},"date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"title":"Date"},"modality":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Modality"},"distance":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Distance"},"distance_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Distance Unit"},"location":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Location"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"sexes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Sexes"},"checkpoints":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Checkpoints"},"custom_prize_rules":{"anyOf":[{"items":{"$ref":"#/components/schemas/PrizeRule"},"type":"array"},{"type":"null"}],"title":"Custom Prize Rules"},"category_age_ranges":{"anyOf":[{"items":{"$ref":"#/components/schemas/CategoryAgeRange"},"type":"array","maxItems":50},{"type":"null"}],"title":"Category Age Ranges","description":"Age ranges for server-computed categories. An explicit null or an empty list resets the race to the automatic defaults."},"event_group":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Event Group"},"official_start_ms":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Official Start Ms","description":"Official gun-start time on the same milliseconds axis as MyLaps' own timestamps. Usually since midnight, but some MyLaps databases count from an event reference day (real case: 567265880 = 157:34:25.880), so no one-day ceiling applies."},"start_mode":{"anyOf":[{"type":"string","enum":["chip","gun"]},{"type":"null"}],"title":"Start Mode","description":"'gun' = mass start by gun time only, no individual start mat — see connector/participants.py's merge_results_with_participants()."},"bib_group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bib Group","description":"Two-digit MyLaps Pid group (01-99): Pid = group * 100000 + bib. An empty string clears it."}},"type":"object","title":"RaceUpdate","description":"Schema for partial race updates.\n\nAll fields are optional — only provided fields will be changed."},"ReassignDistanceRequest":{"properties":{"target_race_id":{"type":"string","maxLength":100,"minLength":1,"title":"Target Race Id"},"new_dorsal":{"type":"string","maxLength":50,"minLength":1,"title":"New Dorsal"},"notified":{"type":"boolean","title":"Notified","description":"True: planned change, notified ahead of time — the original row is deleted, no Descalificado stigma. False: detected after the fact — the original row is kept, marked Descalificado but still visible."}},"type":"object","required":["target_race_id","new_dorsal","notified"],"title":"ReassignDistanceRequest","description":"Admin request to move a participant from this race/distance to\nanother distance of the same event (see RaceStore.list_event_siblings())."},"ResetPasswordResponse":{"properties":{"password":{"type":"string","title":"Password"}},"type":"object","required":["password"],"title":"ResetPasswordResponse","description":"One-time plaintext password after an admin resets a user's password."},"RevokeRequest":{"properties":{"jti":{"type":"string","title":"Jti"}},"type":"object","required":["jti"],"title":"RevokeRequest","description":"Token revocation request."},"SmtpConfigRequest":{"properties":{"host":{"type":"string","maxLength":255,"title":"Host","default":""},"port":{"type":"integer","maximum":65535.0,"minimum":1.0,"title":"Port","default":587},"username":{"type":"string","maxLength":255,"title":"Username","default":""},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password","description":"Omit to leave unchanged"},"use_tls":{"type":"boolean","title":"Use Tls","default":true},"from_address":{"type":"string","maxLength":255,"title":"From Address","default":""}},"type":"object","title":"SmtpConfigRequest","description":"SMTP settings submitted from the Configuración page."},"SmtpTestRequest":{"properties":{"to_email":{"type":"string","maxLength":255,"minLength":3,"title":"To Email"}},"type":"object","required":["to_email"],"title":"SmtpTestRequest","description":"Request to send a test email using the current SMTP config."},"StartOverrideDeleteRequest":{"properties":{"dorsals":{"type":"string","maxLength":20000,"title":"Dorsals"}},"type":"object","required":["dorsals"],"title":"StartOverrideDeleteRequest","description":"Admin request to remove start overrides for a set of bibs."},"StartOverrideRequest":{"properties":{"dorsals":{"type":"string","maxLength":20000,"title":"Dorsals"},"start_ms":{"type":"integer","maximum":86399999.0,"minimum":0.0,"title":"Start Ms"}},"type":"object","required":["dorsals","start_ms"],"title":"StartOverrideRequest","description":"Admin request to set one absolute start time for many bibs at once.\n\n``dorsals`` is free text parsed by parse_bib_ranges (e.g.\n``\"101-150, 212\"``); ``start_ms`` is milliseconds since midnight, the\nsame axis as MyLaps readings and ``official_start_ms``."},"TimeCorrectionRequest":{"properties":{"correction_ms":{"type":"integer","maximum":3600000.0,"minimum":-3600000.0,"title":"Correction Ms"}},"type":"object","required":["correction_ms"],"title":"TimeCorrectionRequest","description":"Admin request to set a runner's manual start-time correction.\n\nMilliseconds, same axis as MyLaps' own timestamps — matches what a\ntiming operator reads directly off MyLaps when a runner's start needs\na manual fix (see CONNECTOR_BUILD.md). Shifts the runner's whole race\n(every checkpoint + finish move together) — for a single checkpoint\nreading gone bad on its own, see CheckpointCorrectionRequest instead."},"TokenRefreshRequest":{"properties":{"access_token":{"type":"string","title":"Access Token"}},"type":"object","required":["access_token"],"title":"TokenRefreshRequest","description":"Token refresh request."},"TwoFADisableResponse":{"properties":{"status":{"type":"string","title":"Status"},"redirect":{"type":"string","title":"Redirect"}},"type":"object","required":["status","redirect"],"title":"TwoFADisableResponse","description":"Response from 2FA disable."},"TwoFAEnableResponse":{"properties":{"status":{"type":"string","title":"Status","default":"code_sent"},"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"TwoFAEnableResponse","description":"Response from starting 2FA enrollment: confirms a code was emailed."},"TwoFAVerifyRequest":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"TwoFAVerifyRequest","description":"Request to verify an emailed 2FA code (enrollment or login)."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}