{"openapi":"3.1.0","info":{"title":"Trackie API","description":"Trackie backend API for equipment and inventory workflows.","version":"0.1.0"},"paths":{"/v1/":{"get":{"tags":["root"],"summary":"Get API root","description":"Return top-level Trackie API metadata and useful links.","operationId":"getRoot","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RootResponse"}}}}}}},"/v1/health":{"get":{"tags":["health"],"summary":"Get health status","description":"Return the API health status and database connectivity state.","operationId":"getHealth","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/v1/dashboard":{"get":{"tags":["dashboard"],"summary":"Get dashboard stats","description":"Return role-scoped summary stats for the authenticated user's home screen. Inventory tenants receive the Inventory snapshot variant.","operationId":"getDashboard","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Maximum number of recent activity items to include. Defaults to 25 and caps at 100.","default":25,"title":"Limit"},"description":"Maximum number of recent activity items to include. Defaults to 25 and caps at 100."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardResponse"},{"$ref":"#/components/schemas/InventoryDashboardResponse"}],"title":"Response Getdashboard"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/activity":{"get":{"tags":["activity"],"summary":"List activity","description":"List paginated role-scoped activity events for the authenticated user's school.","operationId":"listActivity","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityEventListResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/auth/director-signup":{"post":{"tags":["auth"],"summary":"Create a director account","description":"Create a school workspace and sign up its first director.","operationId":"directorSignup","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DirectorSignupRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DirectorSignupResponse"}}}},"409":{"description":"A user with the same email already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"duplicate_email","message":"A user with that email already exists."}}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/auth/login":{"post":{"tags":["auth"],"summary":"Log in","description":"Authenticate a user with email and password and return token pair.","operationId":"login","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"401":{"description":"The provided email or password is incorrect.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"invalid_credentials","message":"Invalid email or password."}}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/auth/password-reset/request":{"post":{"tags":["auth"],"summary":"Request a password reset","description":"Request a password reset email for an active account. The response is generic and never includes reset tokens or reset URLs.","operationId":"requestPasswordReset","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetRequestResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/auth/password-reset/confirm":{"post":{"tags":["auth"],"summary":"Confirm a password reset","description":"Set a new password using a valid password reset token.","operationId":"confirmPasswordReset","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetConfirmRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"400":{"description":"The password reset token is invalid, expired, or already used.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"invalid_password_reset_token","message":"Password reset link is invalid or expired."}}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/auth/refresh":{"post":{"tags":["auth"],"summary":"Refresh tokens","description":"Exchange a valid refresh token for a new access and refresh token pair.","operationId":"refreshToken","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenPairResponse"}}}},"401":{"description":"The provided token is invalid or expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"examples":{"invalidToken":{"summary":"Invalid token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}},"wrongTokenType":{"summary":"Wrong token type","value":{"error":{"code":"invalid_token","message":"Invalid token type."}}}}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/auth/logout":{"post":{"tags":["auth"],"summary":"Log out","description":"Revoke the refresh session associated with the provided refresh token.","operationId":"logout","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogoutRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/auth/me":{"get":{"tags":["auth"],"summary":"Get current user","description":"Return the authenticated user derived from the bearer token, with the effective capabilities and the organization summary.","operationId":"getCurrentUser","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/invitations":{"post":{"tags":["invitations"],"summary":"Create a coach invitation","description":"Create an invitation for a coach to join the current school workspace.","operationId":"createInvitation","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationCreateResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"400":{"description":"The provided assigned team is invalid for the current school.","content":{"application/json":{"example":{"error":{"code":"invalid_assigned_team","message":"Assigned team must belong to the same active school workspace."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"409":{"description":"The invitation cannot be created because of a conflicting active record.","content":{"application/json":{"examples":{"duplicateEmail":{"summary":"Email already belongs to a user","value":{"error":{"code":"duplicate_email","message":"A user with that email already exists."}}},"duplicateActiveInvitation":{"summary":"Active invitation already exists","value":{"error":{"code":"duplicate_active_invitation","message":"An active invitation already exists for that email and role."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}},"get":{"tags":["invitations"],"summary":"List invitations","description":"List invitations in the current director's school workspace.","operationId":"listInvitations","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/InvitationStatus"},{"type":"null"}],"description":"Optional invitation status filter.","title":"Status"},"description":"Optional invitation status filter."},{"name":"include_expired","in":"query","required":false,"schema":{"type":"boolean","description":"Include expired invitations when no status filter is provided.","default":true,"title":"Include Expired"},"description":"Include expired invitations when no status filter is provided."},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional case-insensitive email or full-name search.","title":"Search"},"description":"Optional case-insensitive email or full-name search."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of invitations to return. Defaults to 50 and caps at 100.","default":50,"title":"Limit"},"description":"Maximum number of invitations to return. Defaults to 50 and caps at 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Zero-based offset into the filtered invitation result set.","default":0,"title":"Offset"},"description":"Zero-based offset into the filtered invitation result set."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationListResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/invitations/accept":{"post":{"tags":["invitations"],"summary":"Accept an invitation","description":"Accept a coach invitation token and create the invited user account.","operationId":"acceptInvitation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationAcceptRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"400":{"description":"The invitation token cannot be accepted in its current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"examples":{"invalidInvitation":{"summary":"Unknown invitation token","value":{"error":{"code":"invalid_invitation","message":"Invitation is invalid."}}},"expiredInvitation":{"summary":"Expired invitation","value":{"error":{"code":"expired_invitation","message":"Invitation has expired."}}},"alreadyAcceptedInvitation":{"summary":"Already accepted invitation","value":{"error":{"code":"already_accepted_invitation","message":"Invitation has already been accepted."}}}}}}},"409":{"description":"The invitation cannot be accepted because of a conflicting active record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"examples":{"duplicateEmail":{"summary":"Email already belongs to a user","value":{"error":{"code":"duplicate_email","message":"A user with that email already exists."}}},"assignedTeamAlreadyHasCoach":{"summary":"Assigned team already has a coach","value":{"error":{"code":"assigned_team_already_has_coach","message":"Assigned team already has a responsible coach."}}}}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/invitations/{invitation_id}/revoke":{"patch":{"tags":["invitations"],"summary":"Revoke an invitation","description":"Revoke a pending or expired invitation without deleting it.","operationId":"revokeInvitation","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invitation Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvitationRevokeRequest"},{"type":"null"}],"description":"Optional revoke payload for frontend compatibility.","title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"409":{"description":"The invitation cannot be revoked because it has already been accepted.","content":{"application/json":{"example":{"error":{"code":"invitation_already_accepted","message":"Accepted invitations cannot be revoked."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/coaches":{"get":{"tags":["coaches"],"summary":"List coaches","description":"List coaches in the current director's school workspace.","operationId":"listCoaches","security":[{"HTTPBearer":[]}],"parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","description":"Include inactive or archived coaches in the result set.","default":false,"title":"Include Archived"},"description":"Include inactive or archived coaches in the result set."},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional case-insensitive email or full-name search.","title":"Search"},"description":"Optional case-insensitive email or full-name search."},{"name":"team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional team filter for coaches assigned to a specific team.","title":"Team Id"},"description":"Optional team filter for coaches assigned to a specific team."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of coaches to return. Defaults to 50 and caps at 100.","default":50,"title":"Limit"},"description":"Maximum number of coaches to return. Defaults to 50 and caps at 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Zero-based offset into the filtered coach result set.","default":0,"title":"Offset"},"description":"Zero-based offset into the filtered coach result set."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoachListResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/coaches/{coach_id}":{"patch":{"tags":["coaches"],"summary":"Update a coach","description":"Update editable coach fields and responsible team assignments.","operationId":"updateCoach","security":[{"HTTPBearer":[]}],"parameters":[{"name":"coach_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Coach Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoachUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoachResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"400":{"description":"The provided coach team assignments are invalid for the current school.","content":{"application/json":{"example":{"error":{"code":"invalid_coach_assignment","message":"Assigned teams must belong to the same active school workspace."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"409":{"description":"The requested team assignment cannot be applied to an inactive coach.","content":{"application/json":{"example":{"error":{"code":"inactive_coach_assignment","message":"Cannot assign teams to an inactive coach."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/teams":{"post":{"tags":["teams"],"summary":"Create a team","description":"Create a team in the current school workspace.","operationId":"createTeam","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"400":{"description":"The provided team payload is semantically invalid.","content":{"application/json":{"example":{"error":{"code":"invalid_responsible_coach","message":"Responsible coach must be an active coach in the same school."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"409":{"description":"A team with the same name already exists in the current school.","content":{"application/json":{"example":{"error":{"code":"duplicate_team_name","message":"A team with that name already exists in this school."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}},"get":{"tags":["teams"],"summary":"List teams","description":"List teams available to the authenticated user within their school.","operationId":"listTeams","security":[{"HTTPBearer":[]}],"parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","description":"Include archived teams in the result set.","default":false,"title":"Include Archived"},"description":"Include archived teams in the result set."},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional case-insensitive name search.","title":"Search"},"description":"Optional case-insensitive name search."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of teams to return. Defaults to 50 and caps at 100.","default":50,"title":"Limit"},"description":"Maximum number of teams to return. Defaults to 50 and caps at 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Zero-based offset into the filtered team result set.","default":0,"title":"Offset"},"description":"Zero-based offset into the filtered team result set."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamListResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/teams/{team_id}":{"get":{"tags":["teams"],"summary":"Get a team","description":"Fetch a single team visible to the authenticated user.","operationId":"getTeam","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}},"patch":{"tags":["teams"],"summary":"Update a team","description":"Update editable team fields for the current school workspace.","operationId":"updateTeam","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"400":{"description":"The provided team payload is semantically invalid.","content":{"application/json":{"example":{"error":{"code":"invalid_responsible_coach","message":"Responsible coach must be an active coach in the same school."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"409":{"description":"A team with the same name already exists in the current school.","content":{"application/json":{"example":{"error":{"code":"duplicate_team_name","message":"A team with that name already exists in this school."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}},"delete":{"tags":["teams"],"summary":"Archive a team","description":"Archive a team so it no longer appears in default list responses.","operationId":"archiveTeam","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/seasons":{"post":{"tags":["seasons"],"summary":"Create a season","description":"Create a season in the current school workspace.","operationId":"createSeason","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeasonCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeasonResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"400":{"description":"The provided season dates are semantically invalid.","content":{"application/json":{"example":{"error":{"code":"invalid_season_dates","message":"Season end_date cannot be before start_date."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"409":{"description":"A season with the same name already exists in the current school.","content":{"application/json":{"example":{"error":{"code":"duplicate_season_name","message":"A season with that name already exists in this school."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}},"get":{"tags":["seasons"],"summary":"List seasons","description":"List seasons available to the authenticated user within their school.","operationId":"listSeasons","security":[{"HTTPBearer":[]}],"parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","description":"Include archived seasons in the result set.","default":false,"title":"Include Archived"},"description":"Include archived seasons in the result set."},{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","description":"Limit results to active seasons only.","default":false,"title":"Active Only"},"description":"Limit results to active seasons only."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of seasons to return. Defaults to 50 and caps at 100.","default":50,"title":"Limit"},"description":"Maximum number of seasons to return. Defaults to 50 and caps at 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Zero-based offset into the filtered season result set.","default":0,"title":"Offset"},"description":"Zero-based offset into the filtered season result set."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeasonListResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/seasons/{season_id}":{"get":{"tags":["seasons"],"summary":"Get a season","description":"Fetch a single season visible to the authenticated user.","operationId":"getSeason","security":[{"HTTPBearer":[]}],"parameters":[{"name":"season_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Season Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeasonResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}},"patch":{"tags":["seasons"],"summary":"Update a season","description":"Update editable season fields for the current school workspace.","operationId":"updateSeason","security":[{"HTTPBearer":[]}],"parameters":[{"name":"season_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Season Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeasonUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeasonResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"400":{"description":"The provided season dates are semantically invalid.","content":{"application/json":{"example":{"error":{"code":"invalid_season_dates","message":"Season end_date cannot be before start_date."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"409":{"description":"A season with the same name already exists in the current school.","content":{"application/json":{"example":{"error":{"code":"duplicate_season_name","message":"A season with that name already exists in this school."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}},"delete":{"tags":["seasons"],"summary":"Archive a season","description":"Archive a season so it no longer appears in default list responses.","operationId":"archiveSeason","security":[{"HTTPBearer":[]}],"parameters":[{"name":"season_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Season Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeasonResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/seasons/{season_id}/make-current":{"post":{"tags":["seasons"],"summary":"Make a season current","description":"Mark a season as the school's current season. At most one season is current per school; team-level overrides take precedence where set.","operationId":"makeSeasonCurrent","security":[{"HTTPBearer":[]}],"parameters":[{"name":"season_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Season Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeasonResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/players":{"post":{"tags":["players"],"summary":"Create a player","description":"Create a school-level player record in the director's school.","operationId":"createPlayer","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"409":{"description":"A player with the same student email already exists in the current school.","content":{"application/json":{"example":{"error":{"code":"duplicate_player_email","message":"A player with that student email already exists in this school."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}},"get":{"tags":["players"],"summary":"List players","description":"List players visible to the authenticated user within their school.","operationId":"listPlayers","security":[{"HTTPBearer":[]}],"parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","description":"Include archived players in the result set.","default":false,"title":"Include Archived"},"description":"Include archived players in the result set."},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional case-insensitive search across name and emails.","title":"Search"},"description":"Optional case-insensitive search across name and emails."},{"name":"team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional team filter.","title":"Team Id"},"description":"Optional team filter."},{"name":"season_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional season filter.","title":"Season Id"},"description":"Optional season filter."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of players to return. Defaults to 50 and caps at 100.","default":50,"title":"Limit"},"description":"Maximum number of players to return. Defaults to 50 and caps at 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Zero-based offset into the filtered player result set.","default":0,"title":"Offset"},"description":"Zero-based offset into the filtered player result set."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerListResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/players/{player_id}":{"get":{"tags":["players"],"summary":"Get a player","description":"Fetch a single player visible to the authenticated user.","operationId":"getPlayer","security":[{"HTTPBearer":[]}],"parameters":[{"name":"player_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Player Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}},"patch":{"tags":["players"],"summary":"Update a player","description":"Update editable player profile fields within the current school.","operationId":"updatePlayer","security":[{"HTTPBearer":[]}],"parameters":[{"name":"player_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Player Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"409":{"description":"A player with the same student email already exists in the current school.","content":{"application/json":{"example":{"error":{"code":"duplicate_player_email","message":"A player with that student email already exists in this school."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}},"delete":{"tags":["players"],"summary":"Archive a player","description":"Soft archive a player so they disappear from default list responses.","operationId":"archivePlayer","security":[{"HTTPBearer":[]}],"parameters":[{"name":"player_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Player Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/roster-memberships":{"post":{"tags":["roster-memberships"],"summary":"Create a roster membership","description":"Attach an existing player to a team and season within the same school.","operationId":"createRosterMembership","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterMembershipCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterMembershipResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"400":{"description":"The provided player, team, and season relationship is invalid.","content":{"application/json":{"example":{"error":{"code":"invalid_roster_membership","message":"Player, team, and season must belong to the same active school workspace."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"409":{"description":"An active roster membership already exists for the same player, team, and season.","content":{"application/json":{"example":{"error":{"code":"duplicate_roster_membership","message":"An active roster membership already exists for this player, team, and season."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}},"get":{"tags":["roster-memberships"],"summary":"List roster memberships","description":"List roster memberships visible to the authenticated user.","operationId":"listRosterMemberships","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional team filter.","title":"Team Id"},"description":"Optional team filter."},{"name":"season_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional season filter.","title":"Season Id"},"description":"Optional season filter."},{"name":"player_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional player filter.","title":"Player Id"},"description":"Optional player filter."},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","description":"Include archived roster memberships in the result set.","default":false,"title":"Include Archived"},"description":"Include archived roster memberships in the result set."},{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","description":"Limit results to active roster memberships only.","default":false,"title":"Active Only"},"description":"Limit results to active roster memberships only."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of roster memberships to return. Defaults to 50 and caps at 100.","default":50,"title":"Limit"},"description":"Maximum number of roster memberships to return. Defaults to 50 and caps at 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Zero-based offset into the filtered roster membership result set.","default":0,"title":"Offset"},"description":"Zero-based offset into the filtered roster membership result set."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterMembershipListResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/roster-memberships/{membership_id}":{"get":{"tags":["roster-memberships"],"summary":"Get a roster membership","description":"Fetch a single roster membership visible to the authenticated user.","operationId":"getRosterMembership","security":[{"HTTPBearer":[]}],"parameters":[{"name":"membership_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Membership Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterMembershipResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}},"patch":{"tags":["roster-memberships"],"summary":"Update a roster membership","description":"Update editable roster membership fields for a visible team roster.","operationId":"updateRosterMembership","security":[{"HTTPBearer":[]}],"parameters":[{"name":"membership_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Membership Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterMembershipUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterMembershipResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"409":{"description":"An active roster membership already exists for the same player, team, and season.","content":{"application/json":{"example":{"error":{"code":"duplicate_roster_membership","message":"An active roster membership already exists for this player, team, and season."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}},"delete":{"tags":["roster-memberships"],"summary":"Archive a roster membership","description":"Soft archive a roster membership so it disappears from default lists.","operationId":"archiveRosterMembership","security":[{"HTTPBearer":[]}],"parameters":[{"name":"membership_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Membership Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterMembershipResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/roster-imports/preview":{"post":{"tags":["roster-imports"],"summary":"Preview a roster CSV import","description":"Parse a roster CSV and return the planned player and membership actions without writing data.","operationId":"previewRosterImport","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterImportPreviewRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterImportPreviewResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"not_found","message":"Resource not found."}}}}},"400":{"description":"The roster import request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"examples":{"invalidCsv":{"summary":"Invalid CSV payload","value":{"error":{"code":"invalid_csv","message":"CSV text must not be blank."}}},"invalidColumnMapping":{"summary":"Invalid column mapping","value":{"error":{"code":"invalid_column_mapping","message":"Mapped column 'Name' does not exist in the CSV header."}}}}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/roster-imports/commit":{"post":{"tags":["roster-imports"],"summary":"Commit a roster CSV import","description":"Re-parse, re-plan, validate, and apply a roster CSV import for a team and season.","operationId":"commitRosterImport","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterImportCommitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterImportCommitResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"not_found","message":"Resource not found."}}}}},"400":{"description":"The roster import contains row-level errors and cannot be committed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"roster_import_has_errors","message":"Roster import contains rows with errors."}}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/equipment/categories":{"get":{"tags":["equipment"],"summary":"List equipment categories","description":"List enabled system and school equipment categories visible in the current school.","operationId":"listEquipmentCategories","security":[{"HTTPBearer":[]}],"parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","description":"Include archived categories in the result set.","default":false,"title":"Include Archived"},"description":"Include archived categories in the result set."},{"name":"include_disabled","in":"query","required":false,"schema":{"type":"boolean","description":"Include disabled categories in the result set.","default":false,"title":"Include Disabled"},"description":"Include disabled categories in the result set."},{"name":"module","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional module filter. Defaults to the tenant's product module (athletics or inventory).","title":"Module"},"description":"Optional module filter. Defaults to the tenant's product module (athletics or inventory)."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of categories to return. Defaults to 50 and caps at 100.","default":50,"title":"Limit"},"description":"Maximum number of categories to return. Defaults to 50 and caps at 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Zero-based offset into the filtered category result set.","default":0,"title":"Offset"},"description":"Zero-based offset into the filtered category result set."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetCategoryListResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}},"post":{"tags":["equipment"],"summary":"Create an equipment category","description":"Create a custom equipment category for the director's school.","operationId":"createEquipmentCategory","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetCategoryCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetCategoryResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"409":{"description":"An equipment category with the same name already exists in the current school.","content":{"application/json":{"example":{"error":{"code":"duplicate_equipment_category","message":"An equipment category with that name already exists in this school."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/equipment/categories/{category_id}":{"patch":{"tags":["equipment"],"summary":"Update an equipment category","description":"Update a custom school-owned equipment category.","operationId":"updateEquipmentCategory","security":[{"HTTPBearer":[]}],"parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Category Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetCategoryUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetCategoryResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"400":{"description":"The provided equipment category is invalid for this school.","content":{"application/json":{"examples":{"invalidCategory":{"summary":"Unavailable category","value":{"error":{"code":"invalid_equipment_category","message":"Equipment category must be an enabled system category or a custom category in the same school."}}},"systemCategoryMutation":{"summary":"System category cannot be edited","value":{"error":{"code":"invalid_equipment_category","message":"System equipment categories cannot be modified."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"409":{"description":"An equipment category with the same name already exists in the current school.","content":{"application/json":{"example":{"error":{"code":"duplicate_equipment_category","message":"An equipment category with that name already exists in this school."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}},"delete":{"tags":["equipment"],"summary":"Archive an equipment category","description":"Soft archive a custom school-owned equipment category.","operationId":"archiveEquipmentCategory","security":[{"HTTPBearer":[]}],"parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Category Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetCategoryResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"400":{"description":"The provided equipment category is invalid for this school.","content":{"application/json":{"examples":{"invalidCategory":{"summary":"Unavailable category","value":{"error":{"code":"invalid_equipment_category","message":"Equipment category must be an enabled system category or a custom category in the same school."}}},"systemCategoryMutation":{"summary":"System category cannot be edited","value":{"error":{"code":"invalid_equipment_category","message":"System equipment categories cannot be modified."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/equipment":{"post":{"tags":["equipment"],"summary":"Create equipment","description":"Create an equipment asset in the current school for a valid category and optional team assignment.","operationId":"createEquipment","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AssetResponse"},{"$ref":"#/components/schemas/InventoryAssetResponse"}],"title":"Response Createequipment"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"400":{"description":"The QR tag cannot be linked because of its current lifecycle state.","content":{"application/json":{"example":{"error":{"code":"qr_tag_not_linkable","message":"This QR tag cannot be linked in its current state."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"409":{"description":"The equipment asset already has an active QR tag.","content":{"application/json":{"example":{"error":{"code":"asset_already_has_qr_tag","message":"Equipment already has an active QR tag."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}},"get":{"tags":["equipment"],"summary":"List equipment","description":"List equipment assets visible to the authenticated user within their school.","operationId":"listEquipment","security":[{"HTTPBearer":[]}],"parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","description":"Include archived equipment in the result set.","default":false,"title":"Include Archived"},"description":"Include archived equipment in the result set."},{"name":"category_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional equipment category filter.","title":"Category Id"},"description":"Optional equipment category filter."},{"name":"team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional team filter.","title":"Team Id"},"description":"Optional team filter."},{"name":"season_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional season filter.","title":"Season Id"},"description":"Optional season filter."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AssetStatus"},{"type":"null"}],"description":"Optional equipment status filter.","title":"Status"},"description":"Optional equipment status filter."},{"name":"condition_status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AssetConditionStatus"},{"type":"null"}],"description":"Optional condition status filter.","title":"Condition Status"},"description":"Optional condition status filter."},{"name":"needs_director_review","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Optional director review filter.","title":"Needs Director Review"},"description":"Optional director review filter."},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional case-insensitive search across labels and notes.","title":"Search"},"description":"Optional case-insensitive search across labels and notes."},{"name":"location_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional home-location filter. Matches the location and all of its descendants unless exact is true.","title":"Location Id"},"description":"Optional home-location filter. Matches the location and all of its descendants unless exact is true."},{"name":"exact","in":"query","required":false,"schema":{"type":"boolean","description":"Restrict the location filter to the given location itself.","default":false,"title":"Exact"},"description":"Restrict the location filter to the given location itself."},{"name":"missing","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Return only equipment lacking the given field. One of: location_id, purchase_date, serial_number.","title":"Missing"},"description":"Return only equipment lacking the given field. One of: location_id, purchase_date, serial_number."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of equipment items to return. Defaults to 50 and caps at 100.","default":50,"title":"Limit"},"description":"Maximum number of equipment items to return. Defaults to 50 and caps at 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Zero-based offset into the filtered equipment result set.","default":0,"title":"Offset"},"description":"Zero-based offset into the filtered equipment result set."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetListResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"400":{"description":"The provided missing filter value is not supported.","content":{"application/json":{"example":{"error":{"code":"invalid_missing_filter","message":"missing must be one of: location_id, purchase_date, serial_number."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/equipment/export.csv":{"get":{"tags":["equipment","exports"],"summary":"Export equipment as CSV","description":"Stream the school-wide equipment list as a CSV download honoring the equipment list filters. Directors and holders of the inventory.export capability only.","operationId":"exportEquipmentCsv","security":[{"HTTPBearer":[]}],"parameters":[{"name":"category_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional equipment category filter.","title":"Category Id"},"description":"Optional equipment category filter."},{"name":"team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional team filter.","title":"Team Id"},"description":"Optional team filter."},{"name":"season_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional season filter.","title":"Season Id"},"description":"Optional season filter."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AssetStatus"},{"type":"null"}],"description":"Optional equipment status filter.","title":"Status"},"description":"Optional equipment status filter."},{"name":"condition_status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AssetConditionStatus"},{"type":"null"}],"description":"Optional condition status filter.","title":"Condition Status"},"description":"Optional condition status filter."},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional case-insensitive search across labels and notes.","title":"Search"},"description":"Optional case-insensitive search across labels and notes."},{"name":"location_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional home-location filter. Matches the location and all of its descendants unless exact is true.","title":"Location Id"},"description":"Optional home-location filter. Matches the location and all of its descendants unless exact is true."},{"name":"exact","in":"query","required":false,"schema":{"type":"boolean","description":"Restrict the location filter to the given location itself.","default":false,"title":"Exact"},"description":"Restrict the location filter to the given location itself."},{"name":"missing","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Export only equipment lacking the given field. One of: location_id, purchase_date, serial_number.","title":"Missing"},"description":"Export only equipment lacking the given field. One of: location_id, purchase_date, serial_number."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"400":{"description":"The provided missing filter value is not supported.","content":{"application/json":{"example":{"error":{"code":"invalid_missing_filter","message":"missing must be one of: location_id, purchase_date, serial_number."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/equipment/{equipment_id}":{"get":{"tags":["equipment"],"summary":"Get equipment","description":"Fetch a single equipment asset visible to the authenticated user.","operationId":"getEquipment","security":[{"HTTPBearer":[]}],"parameters":[{"name":"equipment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Equipment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AssetResponse"},{"$ref":"#/components/schemas/InventoryAssetResponse"}],"title":"Response Getequipment"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}},"patch":{"tags":["equipment"],"summary":"Update equipment","description":"Update editable equipment fields for an asset visible to the authenticated user.","operationId":"updateEquipment","security":[{"HTTPBearer":[]}],"parameters":[{"name":"equipment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Equipment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AssetResponse"},{"$ref":"#/components/schemas/InventoryAssetResponse"}],"title":"Response Updateequipment"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"400":{"description":"The provided equipment team or season assignment is invalid.","content":{"application/json":{"example":{"error":{"code":"invalid_equipment_assignment","message":"Equipment team and season must belong to the same active school workspace."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"409":{"description":"The equipment asset already has an active checkout.","content":{"application/json":{"example":{"error":{"code":"asset_already_checked_out","message":"Equipment is already checked out."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}},"delete":{"tags":["equipment"],"summary":"Archive equipment","description":"Soft archive an equipment asset so it disappears from default list responses.","operationId":"archiveEquipment","security":[{"HTTPBearer":[]}],"parameters":[{"name":"equipment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Equipment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AssetResponse"},{"$ref":"#/components/schemas/InventoryAssetResponse"}],"title":"Response Archiveequipment"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"409":{"description":"The equipment asset already has an active checkout.","content":{"application/json":{"example":{"error":{"code":"asset_already_checked_out","message":"Equipment is already checked out."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/equipment/{equipment_id}/review":{"patch":{"tags":["equipment"],"summary":"Review equipment","description":"Clear the director review flag for school-scoped equipment and optionally mark eligible equipment as verified.","operationId":"reviewEquipment","security":[{"HTTPBearer":[]}],"parameters":[{"name":"equipment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Equipment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetReviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AssetResponse"},{"$ref":"#/components/schemas/InventoryAssetResponse"}],"title":"Response Reviewequipment"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"409":{"description":"The equipment asset already has an active checkout.","content":{"application/json":{"example":{"error":{"code":"asset_already_checked_out","message":"Equipment is already checked out."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}},"x-trackie-product":"athletics"}},"/v1/equipment/{equipment_id}/activity":{"get":{"tags":["equipment"],"summary":"List equipment activity","description":"List durable activity events for a single equipment item.","operationId":"listEquipmentActivity","security":[{"HTTPBearer":[]}],"parameters":[{"name":"equipment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Equipment Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of activity events to return. Defaults to 50 and caps at 100.","default":50,"title":"Limit"},"description":"Maximum number of activity events to return. Defaults to 50 and caps at 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Zero-based offset into the equipment activity result set.","default":0,"title":"Offset"},"description":"Zero-based offset into the equipment activity result set."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityEventListResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/equipment/{equipment_id}/transfer":{"post":{"tags":["equipment"],"summary":"Transfer equipment","description":"Move an equipment asset's home location; allowed while the asset is checked out.","operationId":"transferEquipment","security":[{"HTTPBearer":[]}],"parameters":[{"name":"equipment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Equipment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EquipmentTransferRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AssetResponse"},{"$ref":"#/components/schemas/InventoryAssetResponse"}],"title":"Response Transferequipment"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"400":{"description":"The provided location is invalid for this organization.","content":{"application/json":{"example":{"error":{"code":"invalid_location","message":"Location must be an active location in the same organization."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}},"x-trackie-product":"inventory"}},"/v1/equipment/{equipment_id}/checkout":{"post":{"tags":["equipment"],"summary":"Check out equipment","description":"Check out a school equipment asset to a roster membership.","operationId":"checkoutEquipment","security":[{"HTTPBearer":[]}],"parameters":[{"name":"equipment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Equipment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CheckoutResponse"},{"$ref":"#/components/schemas/InventoryCheckoutResponse"}],"title":"Response Checkoutequipment"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"400":{"description":"The requested equipment, player, team, or season assignment is invalid.","content":{"application/json":{"example":{"error":{"code":"invalid_checkout_assignment","message":"Equipment must be assigned to a team before checkout."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"409":{"description":"The selected roster membership is not active.","content":{"application/json":{"example":{"error":{"code":"roster_membership_not_active","message":"Roster membership is not active."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/equipment/{equipment_id}/checkin":{"post":{"tags":["equipment"],"summary":"Check in equipment","description":"Return a checked-out equipment asset.","operationId":"checkinEquipment","security":[{"HTTPBearer":[]}],"parameters":[{"name":"equipment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Equipment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutCheckinRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CheckoutResponse"},{"$ref":"#/components/schemas/InventoryCheckoutResponse"}],"title":"Response Checkinequipment"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"409":{"description":"The equipment asset does not have an active checkout.","content":{"application/json":{"example":{"error":{"code":"asset_not_checked_out","message":"Equipment is not currently checked out."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/equipment/{equipment_id}/replace-qr":{"post":{"tags":["equipment"],"summary":"Replace equipment QR tag","description":"Replace the active QR tag linked to an equipment asset.","operationId":"replaceEquipmentQrTag","security":[{"HTTPBearer":[]}],"parameters":[{"name":"equipment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Equipment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EquipmentQrReplaceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EquipmentQrReplaceResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"400":{"description":"The QR tag cannot be linked because of its current lifecycle state.","content":{"application/json":{"example":{"error":{"code":"qr_tag_not_linkable","message":"This QR tag cannot be linked in its current state."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"409":{"description":"The equipment asset already has an active QR tag.","content":{"application/json":{"example":{"error":{"code":"asset_already_has_qr_tag","message":"Equipment already has an active QR tag."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/equipment/{equipment_id}/damage-reports":{"post":{"tags":["equipment"],"summary":"Create an equipment damage report","description":"Create a damage report for a single equipment item.","operationId":"createEquipmentDamageReport","security":[{"HTTPBearer":[]}],"parameters":[{"name":"equipment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Equipment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DamageReportCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DamageReportResponse"},{"$ref":"#/components/schemas/InventoryDamageReportResponse"}],"title":"Response Createequipmentdamagereport"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"400":{"description":"The damage report payload is semantically invalid for the current equipment state.","content":{"application/json":{"examples":{"descriptionRequired":{"summary":"Description is required","value":{"error":{"code":"invalid_damage_report","message":"Damage report description must be provided."}}},"statusChangeWhileCheckedOut":{"summary":"Checked-out equipment status change","value":{"error":{"code":"invalid_damage_report","message":"Equipment status cannot be changed while equipment is checked out."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}},"get":{"tags":["equipment"],"summary":"List equipment damage reports","description":"List damage reports for a single equipment item.","operationId":"listEquipmentDamageReports","security":[{"HTTPBearer":[]}],"parameters":[{"name":"equipment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Equipment Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of damage reports to return. Defaults to 50 and caps at 100.","default":50,"title":"Limit"},"description":"Maximum number of damage reports to return. Defaults to 50 and caps at 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Zero-based offset into the equipment damage report result set.","default":0,"title":"Offset"},"description":"Zero-based offset into the equipment damage report result set."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DamageReportListResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/damage-reports/{damage_report_id}":{"get":{"tags":["equipment"],"summary":"Get a damage report","description":"Fetch a single equipment damage report.","operationId":"getDamageReport","security":[{"HTTPBearer":[]}],"parameters":[{"name":"damage_report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Damage Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DamageReportResponse"},{"$ref":"#/components/schemas/InventoryDamageReportResponse"}],"title":"Response Getdamagereport"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}},"patch":{"tags":["equipment"],"summary":"Update a damage report","description":"Update a damage report's workflow and resolution fields.","operationId":"updateDamageReport","security":[{"HTTPBearer":[]}],"parameters":[{"name":"damage_report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Damage Report Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DamageReportUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DamageReportResponse"},{"$ref":"#/components/schemas/InventoryDamageReportResponse"}],"title":"Response Updatedamagereport"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"400":{"description":"The damage report payload is semantically invalid for the current equipment state.","content":{"application/json":{"examples":{"descriptionRequired":{"summary":"Description is required","value":{"error":{"code":"invalid_damage_report","message":"Damage report description must be provided."}}},"statusChangeWhileCheckedOut":{"summary":"Checked-out equipment status change","value":{"error":{"code":"invalid_damage_report","message":"Equipment status cannot be changed while equipment is checked out."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/damage-reports/{damage_report_id}/photos":{"post":{"tags":["equipment"],"summary":"Upload a damage report photo","description":"Upload a photo attachment for a single open damage report.","operationId":"uploadDamageReportPhoto","security":[{"HTTPBearer":[]}],"parameters":[{"name":"damage_report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Damage Report Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_uploadDamageReportPhoto"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DamageReportPhotoResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"400":{"description":"The damage report photo payload is invalid for the current report state.","content":{"application/json":{"examples":{"invalidContentType":{"summary":"Unsupported image type","value":{"error":{"code":"invalid_damage_report_photo","message":"Damage report photos must be JPEG, PNG, or WebP images."}}},"reportNotOpen":{"summary":"Report must be open","value":{"error":{"code":"invalid_damage_report_photo","message":"Damage report photos can only be added to open reports."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}},"get":{"tags":["equipment"],"summary":"List damage report photos","description":"List active photos attached to a single damage report.","operationId":"listDamageReportPhotos","security":[{"HTTPBearer":[]}],"parameters":[{"name":"damage_report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Damage Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DamageReportPhotoListResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/damage-report-photos/{photo_id}/content":{"get":{"tags":["equipment"],"summary":"Get damage report photo content","description":"Return photo content for an authorized damage report photo.","operationId":"getDamageReportPhotoContent","security":[{"HTTPBearer":[]}],"parameters":[{"name":"photo_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Photo Id"}}],"responses":{"200":{"description":"Binary photo content for an authorized damage report photo.","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}},"image/png":{"schema":{"type":"string","format":"binary"}},"image/webp":{"schema":{"type":"string","format":"binary"}},"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"307":{"description":"Temporary redirect to authorized photo content."},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/damage-report-photos/{photo_id}":{"delete":{"tags":["equipment"],"summary":"Archive a damage report photo","description":"Archive a damage report photo record after authorization checks.","operationId":"deleteDamageReportPhoto","security":[{"HTTPBearer":[]}],"parameters":[{"name":"photo_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Photo Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/equipment-imports/preview":{"post":{"tags":["equipment-imports"],"summary":"Preview an equipment CSV import","description":"Parse an equipment CSV and return the planned asset, category, and QR actions without writing data.","operationId":"previewEquipmentImport","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EquipmentImportPreviewRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EquipmentImportPreviewResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"not_found","message":"Resource not found."}}}}},"400":{"description":"The equipment import request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"examples":{"invalidCsv":{"summary":"Invalid CSV payload","value":{"error":{"code":"invalid_csv","message":"CSV text must not be blank."}}},"invalidColumnMapping":{"summary":"Invalid column mapping","value":{"error":{"code":"invalid_column_mapping","message":"Mapped column 'Label' does not exist in the CSV header."}}}}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/equipment-imports/commit":{"post":{"tags":["equipment-imports"],"summary":"Commit an equipment CSV import","description":"Re-parse, re-plan, validate, and apply an equipment CSV import for the selected team and optional season.","operationId":"commitEquipmentImport","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EquipmentImportCommitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EquipmentImportCommitResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"not_found","message":"Resource not found."}}}}},"400":{"description":"The equipment import contains row-level errors and cannot be committed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"equipment_import_has_errors","message":"Equipment import contains rows with errors."}}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/checkouts":{"get":{"tags":["checkouts"],"summary":"List equipment checkouts","description":"List equipment checkouts visible to the authenticated user.","operationId":"listCheckouts","security":[{"HTTPBearer":[]}],"parameters":[{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","description":"Return only active non-returned checkouts when true. Defaults to true.","default":true,"title":"Active Only"},"description":"Return only active non-returned checkouts when true. Defaults to true."},{"name":"overdue","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Optional computed overdue-state filter.","title":"Overdue"},"description":"Optional computed overdue-state filter."},{"name":"equipment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional equipment filter.","title":"Equipment Id"},"description":"Optional equipment filter."},{"name":"player_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional player filter.","title":"Player Id"},"description":"Optional player filter."},{"name":"team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional team filter.","title":"Team Id"},"description":"Optional team filter."},{"name":"season_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional season filter.","title":"Season Id"},"description":"Optional season filter."},{"name":"due_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Optional due-date upper bound filter.","title":"Due Before"},"description":"Optional due-date upper bound filter."},{"name":"due_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Optional due-date lower bound filter.","title":"Due After"},"description":"Optional due-date lower bound filter."},{"name":"location_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional equipment home-location filter. Matches the location and all of its descendants unless exact is true.","title":"Location Id"},"description":"Optional equipment home-location filter. Matches the location and all of its descendants unless exact is true."},{"name":"exact","in":"query","required":false,"schema":{"type":"boolean","description":"Restrict the location filter to the given location itself.","default":false,"title":"Exact"},"description":"Restrict the location filter to the given location itself."},{"name":"holder_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional holder user filter (Inventory checkouts).","title":"Holder User Id"},"description":"Optional holder user filter (Inventory checkouts)."},{"name":"mine","in":"query","required":false,"schema":{"type":"boolean","description":"Restrict to the caller's own checkouts: held by them for Inventory users, created by them for athletics users.","default":false,"title":"Mine"},"description":"Restrict to the caller's own checkouts: held by them for Inventory users, created by them for athletics users."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of checkouts to return. Defaults to 50 and caps at 100.","default":50,"title":"Limit"},"description":"Maximum number of checkouts to return. Defaults to 50 and caps at 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Zero-based offset into the filtered checkout result set.","default":0,"title":"Offset"},"description":"Zero-based offset into the filtered checkout result set."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutListResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/checkouts/overdue":{"get":{"tags":["checkouts"],"summary":"List overdue checkouts","description":"List active checkouts whose due date is in the past.","operationId":"listOverdueCheckouts","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional team filter.","title":"Team Id"},"description":"Optional team filter."},{"name":"season_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional season filter.","title":"Season Id"},"description":"Optional season filter."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of overdue checkouts to return. Defaults to 50 and caps at 100.","default":50,"title":"Limit"},"description":"Maximum number of overdue checkouts to return. Defaults to 50 and caps at 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Zero-based offset into the filtered overdue checkout result set.","default":0,"title":"Offset"},"description":"Zero-based offset into the filtered overdue checkout result set."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutListResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/checkouts/export.csv":{"get":{"tags":["checkouts","exports"],"summary":"Export checkouts as CSV","description":"Stream the filtered checkouts as CSV. Directors or the inventory.export capability.","operationId":"exportCheckoutsCsv","security":[{"HTTPBearer":[]}],"parameters":[{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","description":"Restrict to active checkouts.","default":false,"title":"Active Only"},"description":"Restrict to active checkouts."},{"name":"overdue","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Optional overdue filter.","title":"Overdue"},"description":"Optional overdue filter."},{"name":"equipment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional equipment filter.","title":"Equipment Id"},"description":"Optional equipment filter."},{"name":"player_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional player filter.","title":"Player Id"},"description":"Optional player filter."},{"name":"team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional team filter.","title":"Team Id"},"description":"Optional team filter."},{"name":"season_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional season filter.","title":"Season Id"},"description":"Optional season filter."},{"name":"due_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Optional due-date upper bound filter.","title":"Due Before"},"description":"Optional due-date upper bound filter."},{"name":"due_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Optional due-date lower bound filter.","title":"Due After"},"description":"Optional due-date lower bound filter."},{"name":"location_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional equipment home-location filter.","title":"Location Id"},"description":"Optional equipment home-location filter."},{"name":"exact","in":"query","required":false,"schema":{"type":"boolean","description":"Restrict the location filter to the node itself.","default":false,"title":"Exact"},"description":"Restrict the location filter to the node itself."},{"name":"holder_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional holder user filter (Inventory checkouts).","title":"Holder User Id"},"description":"Optional holder user filter (Inventory checkouts)."},{"name":"mine","in":"query","required":false,"schema":{"type":"boolean","description":"Restrict to the caller's own checkouts.","default":false,"title":"Mine"},"description":"Restrict to the caller's own checkouts."}],"responses":{"200":{"description":"CSV export of the filtered checkouts.","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/checkouts/{checkout_id}":{"get":{"tags":["checkouts"],"summary":"Get checkout details","description":"Fetch a single checkout visible to the authenticated user.","operationId":"getCheckout","security":[{"HTTPBearer":[]}],"parameters":[{"name":"checkout_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Checkout Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CheckoutResponse"},{"$ref":"#/components/schemas/InventoryCheckoutResponse"}],"title":"Response Getcheckout"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/qr-tags/generate":{"post":{"tags":["qr-tags"],"summary":"Generate QR tags","description":"Generate a batch of Trackie QR tags and return CSV export text.","operationId":"generateQrTags","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QrTagGenerateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QrTagGenerateResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/qr-tags":{"get":{"tags":["qr-tags"],"summary":"List QR tags","description":"List QR tags visible to the current director for admin and export workflows.","operationId":"listQrTags","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/QrTagStatus"},{"type":"null"}],"description":"Optional QR tag status filter.","title":"Status"},"description":"Optional QR tag status filter."},{"name":"linked","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Optional filter for tags linked to an asset.","title":"Linked"},"description":"Optional filter for tags linked to an asset."},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional search across tag codes and linked asset labels.","title":"Search"},"description":"Optional search across tag codes and linked asset labels."},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","description":"Include archived QR tags in the result set.","default":false,"title":"Include Archived"},"description":"Include archived QR tags in the result set."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of QR tags to return. Defaults to 50 and caps at 100.","default":50,"title":"Limit"},"description":"Maximum number of QR tags to return. Defaults to 50 and caps at 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Zero-based offset into the filtered QR tag result set.","default":0,"title":"Offset"},"description":"Zero-based offset into the filtered QR tag result set."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QrTagListResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/qr-tags/export.csv":{"get":{"tags":["qr-tags"],"summary":"Export QR tags as CSV","description":"Export visible QR tag rows as CSV for label and admin workflows.","operationId":"exportQrTagsCsv","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/QrTagStatus"},{"type":"null"}],"description":"Optional QR tag status filter.","title":"Status"},"description":"Optional QR tag status filter."},{"name":"unclaimed_only","in":"query","required":false,"schema":{"type":"boolean","description":"Export only unclaimed QR tags.","default":false,"title":"Unclaimed Only"},"description":"Export only unclaimed QR tags."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"minimum":1,"description":"Maximum number of QR tag rows to export. Defaults to 1000 and caps at 5000.","default":1000,"title":"Limit"},"description":"Maximum number of QR tag rows to export. Defaults to 1000 and caps at 5000."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Zero-based offset into the filtered QR tag export rows.","default":0,"title":"Offset"},"description":"Zero-based offset into the filtered QR tag export rows."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/qr-tags/resolve":{"post":{"tags":["qr-tags"],"summary":"Resolve a scanned QR tag","description":"Normalize a QR payload and return scanner-compatible equipment resolution states.","operationId":"resolveQrTag","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QrTagResolveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QrTagResolveResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}}}}},"400":{"description":"The provided QR payload cannot be normalized into a valid Trackie tag code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"invalid_qr_code","message":"QR code must match the expected Trackie tag format."}}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/qr-tags/{tag_code}/link":{"post":{"tags":["qr-tags"],"summary":"Link a QR tag to equipment","description":"Create or claim a QR tag and link it to an equipment asset.","operationId":"linkQrTag","security":[{"HTTPBearer":[]}],"parameters":[{"name":"tag_code","in":"path","required":true,"schema":{"type":"string","title":"Tag Code"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QrTagLinkRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QrTagLinkResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"400":{"description":"The QR tag cannot be linked because of its current lifecycle state.","content":{"application/json":{"example":{"error":{"code":"qr_tag_not_linkable","message":"This QR tag cannot be linked in its current state."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"409":{"description":"The equipment asset already has an active QR tag.","content":{"application/json":{"example":{"error":{"code":"asset_already_has_qr_tag","message":"Equipment already has an active QR tag."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/public/codes/{code}":{"get":{"tags":["public"],"summary":"Look up a public Trackie code","description":"Return limited lost-and-found contact information for a physical Trackie code without exposing private equipment details.","operationId":"lookupPublicCode","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCodeLookupResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/player-imports/preview":{"post":{"tags":["player-imports"],"summary":"Preview a player CSV import","description":"Parse a player CSV and return the planned player creation or match actions without writing data.","operationId":"previewPlayerImport","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerImportPreviewRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerImportPreviewResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}}}}},"400":{"description":"The player import request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"examples":{"invalidCsv":{"summary":"Invalid CSV payload","value":{"error":{"code":"invalid_csv","message":"CSV text must not be blank."}}},"invalidColumnMapping":{"summary":"Invalid column mapping","value":{"error":{"code":"invalid_column_mapping","message":"Mapped column 'Name' does not exist in the CSV header."}}}}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/player-imports/commit":{"post":{"tags":["player-imports"],"summary":"Commit a player CSV import","description":"Re-parse, re-plan, validate, and apply a player CSV import. Creates school-level player records with no team or season assignment.","operationId":"commitPlayerImport","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerImportCommitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerImportCommitResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}}}}},"400":{"description":"The player import contains row-level errors and cannot be committed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"player_import_has_errors","message":"Player import contains rows with errors."}}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/downloads/templates/roster.csv":{"get":{"tags":["downloads"],"summary":"Download the roster CSV import template","description":"Returns the roster CSV template file with the correct header row.","operationId":"downloadRosterTemplate","responses":{"200":{"description":"Successful Response"}}}},"/v1/downloads/templates/equipment.csv":{"get":{"tags":["downloads"],"summary":"Download the equipment CSV import template","description":"Returns the equipment CSV template file with the correct header row.","operationId":"downloadEquipmentTemplate","responses":{"200":{"description":"Successful Response"}}}},"/v1/downloads/templates/players.csv":{"get":{"tags":["downloads"],"summary":"Download the player CSV import template","description":"Returns the player CSV template file with the correct header row.","operationId":"downloadPlayersTemplate","responses":{"200":{"description":"Successful Response"}}}},"/v1/organization":{"get":{"tags":["organization"],"summary":"Get the organization","description":"Return the caller's organization settings.","operationId":"getOrganization","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["organization"],"summary":"Update the organization","description":"Update organization settings: name, timezone, public lookup copy and contact fields, and the OIDC group lists.","operationId":"updateOrganization","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/users":{"get":{"tags":["users"],"summary":"List organization members","description":"List the active members of the caller's organization, for holder display and checkout-on-behalf pickers.","operationId":"listUsers","security":[{"HTTPBearer":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Match against member name or email.","title":"Search"},"description":"Match against member name or email."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of members to return.","default":50,"title":"Limit"},"description":"Maximum number of members to return."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Zero-based offset into the filtered member result set.","default":0,"title":"Offset"},"description":"Zero-based offset into the filtered member result set."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserListResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/locations":{"get":{"tags":["locations"],"summary":"List locations","description":"List active locations in the caller's organization as a flat page.","operationId":"listLocations","security":[{"HTTPBearer":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional case-insensitive search across name and code.","title":"Search"},"description":"Optional case-insensitive search across name and code."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of locations to return. Defaults to 50 and caps at 100.","default":50,"title":"Limit"},"description":"Maximum number of locations to return. Defaults to 50 and caps at 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Zero-based offset into the filtered location result set.","default":0,"title":"Offset"},"description":"Zero-based offset into the filtered location result set."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationListResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}},"post":{"tags":["locations"],"summary":"Create a location","description":"Create a location, optionally nested under an existing parent.","operationId":"createLocation","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"400":{"description":"The location payload is semantically invalid.","content":{"application/json":{"examples":{"invalidParent":{"summary":"Invalid parent location","value":{"error":{"code":"invalid_parent_location","message":"Parent must be an active location in the same organization."}}},"depthExceeded":{"summary":"Tree depth exceeded","value":{"error":{"code":"location_depth_exceeded","message":"Locations cannot be nested more than 5 levels deep."}}},"cycle":{"summary":"Move would create a cycle","value":{"error":{"code":"location_cycle","message":"A location cannot be moved under itself or one of its descendants."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"409":{"description":"A location with the same name already exists under the same parent.","content":{"application/json":{"example":{"error":{"code":"duplicate_location_name","message":"A location with that name already exists at this level."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/locations/tree":{"get":{"tags":["locations"],"summary":"Get the location tree","description":"Return all active locations as a nested tree, children ordered by name.","operationId":"listLocationTree","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/LocationTreeNode"},"type":"array","title":"Response Listlocationtree"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"not_found","message":"Resource not found."}}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/locations/{location_id}":{"get":{"tags":["locations"],"summary":"Get a location","description":"Fetch a single active location in the caller's organization.","operationId":"getLocation","security":[{"HTTPBearer":[]}],"parameters":[{"name":"location_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Location Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}},"patch":{"tags":["locations"],"summary":"Update a location","description":"Update location fields or move the location to another parent; an explicit null parent_id moves it to the root level.","operationId":"updateLocation","security":[{"HTTPBearer":[]}],"parameters":[{"name":"location_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Location Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"400":{"description":"The location payload is semantically invalid.","content":{"application/json":{"examples":{"invalidParent":{"summary":"Invalid parent location","value":{"error":{"code":"invalid_parent_location","message":"Parent must be an active location in the same organization."}}},"depthExceeded":{"summary":"Tree depth exceeded","value":{"error":{"code":"location_depth_exceeded","message":"Locations cannot be nested more than 5 levels deep."}}},"cycle":{"summary":"Move would create a cycle","value":{"error":{"code":"location_cycle","message":"A location cannot be moved under itself or one of its descendants."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"409":{"description":"A location with the same name already exists under the same parent.","content":{"application/json":{"example":{"error":{"code":"duplicate_location_name","message":"A location with that name already exists at this level."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}},"delete":{"tags":["locations"],"summary":"Archive a location","description":"Soft archive an empty location; refused while it still has child locations or equipment.","operationId":"archiveLocation","security":[{"HTTPBearer":[]}],"parameters":[{"name":"location_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Location Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"409":{"description":"The location still contains child locations or equipment.","content":{"application/json":{"example":{"error":{"code":"location_not_empty","message":"Location still contains child locations."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/equipment/{equipment_id}/maintenance":{"get":{"tags":["maintenance"],"summary":"Get the maintenance plan of an asset","description":"The asset's maintenance interval, anchor and next due date, plus the open maintenance record if one exists.","operationId":"getEquipmentMaintenance","security":[{"HTTPBearer":[]}],"parameters":[{"name":"equipment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Equipment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenancePlanResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/equipment/{equipment_id}/maintenance/plan":{"put":{"tags":["maintenance"],"summary":"Set the maintenance plan of an asset","description":"Set or clear the maintenance interval and anchor date. Fields left out keep their value; an explicit null interval removes the plan.","operationId":"updateEquipmentMaintenancePlan","security":[{"HTTPBearer":[]}],"parameters":[{"name":"equipment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Equipment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenancePlanUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenancePlanResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/equipment/{equipment_id}/maintenance/records":{"get":{"tags":["maintenance"],"summary":"List the maintenance records of an asset","description":"Newest first; open and completed records alike.","operationId":"listEquipmentMaintenanceRecords","security":[{"HTTPBearer":[]}],"parameters":[{"name":"equipment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Equipment Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of items to return. Defaults to 50 and caps at 100.","default":50,"title":"Limit"},"description":"Maximum number of items to return. Defaults to 50 and caps at 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Zero-based offset into the result set.","default":0,"title":"Offset"},"description":"Zero-based offset into the result set."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenanceRecordListResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}},"post":{"tags":["maintenance"],"summary":"Open a maintenance record","description":"Start maintenance on an asset that is on the shelf. While the record is open, Inventory checkouts of the asset answer 409 asset_in_maintenance. The asset status itself does not change.","operationId":"openMaintenanceRecord","security":[{"HTTPBearer":[]}],"parameters":[{"name":"equipment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Equipment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenanceRecordCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenanceRecordResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"409":{"description":"The maintenance record cannot be opened in the asset's current state.","content":{"application/json":{"examples":{"alreadyOpen":{"summary":"An open record already exists","value":{"error":{"code":"maintenance_already_open","message":"Equipment already has an open maintenance record."}}},"notMaintainable":{"summary":"Asset is checked out, lost or retired","value":{"error":{"code":"asset_not_maintainable","message":"Equipment cannot enter maintenance in its current state."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/equipment/{equipment_id}/maintenance/records/{record_id}/complete":{"post":{"tags":["maintenance"],"summary":"Complete a maintenance record","description":"Close the open record, move the asset's maintenance anchor to the completion date and recompute the next due date. Status changes after a repair go through the equipment or damage report routes.","operationId":"completeMaintenanceRecord","security":[{"HTTPBearer":[]}],"parameters":[{"name":"equipment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Equipment Id"}},{"name":"record_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Record Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenanceRecordCompleteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenanceRecordResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"400":{"description":"The completion date lies in the future.","content":{"application/json":{"example":{"error":{"code":"invalid_completion_date","message":"Completion date cannot be in the future."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"409":{"description":"The maintenance record has already been completed.","content":{"application/json":{"example":{"error":{"code":"maintenance_not_open","message":"Maintenance record is not open."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/maintenance/records":{"get":{"tags":["maintenance"],"summary":"List maintenance records across the organization","description":"Newest first. Filter by status and by location subtree.","operationId":"listMaintenanceRecords","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/MaintenanceRecordStatus"},{"type":"null"}],"description":"Only records in this status.","title":"Status"},"description":"Only records in this status."},{"name":"location_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Restrict to assets at this location and its descendants (exact=true restricts to the node itself).","title":"Location Id"},"description":"Restrict to assets at this location and its descendants (exact=true restricts to the node itself)."},{"name":"exact","in":"query","required":false,"schema":{"type":"boolean","description":"With location_id: match the node only, not its descendants.","default":false,"title":"Exact"},"description":"With location_id: match the node only, not its descendants."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of items to return. Defaults to 50 and caps at 100.","default":50,"title":"Limit"},"description":"Maximum number of items to return. Defaults to 50 and caps at 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Zero-based offset into the result set.","default":0,"title":"Offset"},"description":"Zero-based offset into the result set."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenanceRecordListResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/maintenance/due":{"get":{"tags":["maintenance"],"summary":"List assets whose maintenance is due","description":"Assets with a plan whose next due date falls within the window, overdue ones first. within_days=0 lists only what is due today or overdue.","operationId":"listMaintenanceDue","security":[{"HTTPBearer":[]}],"parameters":[{"name":"within_days","in":"query","required":false,"schema":{"type":"integer","maximum":3650,"minimum":0,"description":"Window in days from today (tenant timezone). Default 30.","default":30,"title":"Within Days"},"description":"Window in days from today (tenant timezone). Default 30."},{"name":"location_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Restrict to assets at this location and its descendants (exact=true restricts to the node itself).","title":"Location Id"},"description":"Restrict to assets at this location and its descendants (exact=true restricts to the node itself)."},{"name":"exact","in":"query","required":false,"schema":{"type":"boolean","description":"With location_id: match the node only, not its descendants.","default":false,"title":"Exact"},"description":"With location_id: match the node only, not its descendants."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of items to return. Defaults to 50 and caps at 100.","default":50,"title":"Limit"},"description":"Maximum number of items to return. Defaults to 50 and caps at 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Zero-based offset into the result set.","default":0,"title":"Offset"},"description":"Zero-based offset into the result set."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenanceDueListResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/equipment/{equipment_id}/photos":{"post":{"tags":["equipment"],"summary":"Upload an equipment photo","description":"Upload a photo attachment for a single equipment item.","operationId":"uploadEquipmentPhoto","security":[{"HTTPBearer":[]}],"parameters":[{"name":"equipment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Equipment Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_uploadEquipmentPhoto"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetPhotoResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"400":{"description":"The equipment photo payload is invalid for the current equipment state.","content":{"application/json":{"examples":{"invalidContentType":{"summary":"Unsupported image type","value":{"error":{"code":"invalid_asset_photo","message":"Equipment photos must be JPEG, PNG, or WebP images."}}},"photoLimitReached":{"summary":"Photo limit reached","value":{"error":{"code":"asset_photo_limit_reached","message":"Equipment has reached the maximum number of photos."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}},"get":{"tags":["equipment"],"summary":"List equipment photos","description":"List active photos attached to a single equipment item.","operationId":"listEquipmentPhotos","security":[{"HTTPBearer":[]}],"parameters":[{"name":"equipment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Equipment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetPhotoListResponse"}}}},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/equipment-photos/{photo_id}/content":{"get":{"tags":["equipment"],"summary":"Get equipment photo content","description":"Return photo content for an authorized equipment photo.","operationId":"getEquipmentPhotoContent","security":[{"HTTPBearer":[]}],"parameters":[{"name":"photo_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Photo Id"}}],"responses":{"200":{"description":"Binary photo content for an authorized equipment photo.","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}},"image/png":{"schema":{"type":"string","format":"binary"}},"image/webp":{"schema":{"type":"string","format":"binary"}},"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"307":{"description":"Temporary redirect to authorized photo content."},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}},"/v1/equipment-photos/{photo_id}":{"delete":{"tags":["equipment"],"summary":"Archive an equipment photo","description":"Archive an equipment photo record after authorization checks.","operationId":"deleteEquipmentPhoto","security":[{"HTTPBearer":[]}],"parameters":[{"name":"photo_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Photo Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Authentication is required or the bearer token is invalid.","content":{"application/json":{"examples":{"missingAuth":{"summary":"Missing bearer token","value":{"error":{"code":"authentication_required","message":"Authentication required."}}},"invalidToken":{"summary":"Invalid bearer token","value":{"error":{"code":"invalid_token","message":"Invalid or expired token."}}}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"403":{"description":"The current user is not allowed to perform this action.","content":{"application/json":{"example":{"error":{"code":"forbidden","message":"You do not have permission to perform this action."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"404":{"description":"The requested resource was not found or is not accessible.","content":{"application/json":{"example":{"error":{"code":"not_found","message":"Resource not found."}},"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"},"example":{"error":{"code":"validation_error","message":"Request validation failed."},"errors":[]}}}}}}}},"components":{"schemas":{"ActivityEventListResponse":{"properties":{"limit":{"type":"integer","title":"Limit","description":"Maximum number of items returned in this page."},"offset":{"type":"integer","title":"Offset","description":"Zero-based offset applied to the full result set."},"total":{"type":"integer","title":"Total","description":"Total number of items matching the same filters."},"items":{"items":{"$ref":"#/components/schemas/ActivityEventResponse"},"type":"array","title":"Items"}},"type":"object","required":["limit","offset","total","items"],"title":"ActivityEventListResponse","example":{"items":[{"actor_name_snapshot":"Marcus Williams","actor_role_snapshot":"director","actor_user_id":"11111111-1111-1111-1111-111111111111","asset_id":"88888888-8888-8888-8888-888888888888","created_at":"2026-05-07T10:00:00Z","details":{"asset_label":"Jersey #24","category_name":"Jersey","condition_status":"good","status":"available","team_name_snapshot":"Varsity Football"},"event_type":"equipment_created","id":"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","season_id":"44444444-4444-4444-4444-444444444444","summary":"Created equipment 'Jersey #24'.","team_id":"33333333-3333-3333-3333-333333333333"}],"limit":50,"offset":0,"total":123}},"ActivityEventResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"school_id":{"type":"string","format":"uuid","title":"School Id"},"actor_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Actor User Id"},"actor_role_snapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Role Snapshot"},"actor_name_snapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Name Snapshot"},"asset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Asset Id"},"team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"},"season_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Season Id"},"roster_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Roster Membership Id"},"checkout_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Checkout Id"},"qr_tag_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Qr Tag Id"},"event_type":{"$ref":"#/components/schemas/AuditEventType"},"summary":{"type":"string","title":"Summary"},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","school_id","actor_user_id","actor_role_snapshot","actor_name_snapshot","asset_id","team_id","season_id","roster_membership_id","checkout_id","qr_tag_id","event_type","summary","details","created_at"],"title":"ActivityEventResponse","example":{"actor_name_snapshot":"Marcus Williams","actor_role_snapshot":"director","actor_user_id":"11111111-1111-1111-1111-111111111111","asset_id":"88888888-8888-8888-8888-888888888888","created_at":"2026-05-07T10:00:00Z","details":{"asset_label":"Jersey #24","category_name":"Jersey","condition_status":"good","status":"available","team_name_snapshot":"Varsity Football"},"event_type":"equipment_created","id":"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","season_id":"44444444-4444-4444-4444-444444444444","summary":"Created equipment 'Jersey #24'.","team_id":"33333333-3333-3333-3333-333333333333"}},"ApplicationError":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"}},"type":"object","required":["code","message"],"title":"ApplicationError"},"ApplicationErrorResponse":{"properties":{"error":{"$ref":"#/components/schemas/ApplicationError"}},"type":"object","required":["error"],"title":"ApplicationErrorResponse","example":{"error":{"code":"duplicate_team_name","message":"A team with this name already exists."}}},"AssetCategoryCreateRequest":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"Display name for the category."},"icon":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Icon","description":"Optional icon key for frontend presentation."},"default_replacement_cost":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Default Replacement Cost","description":"Optional default replacement cost for new equipment."}},"type":"object","required":["name"],"title":"AssetCategoryCreateRequest","example":{"default_replacement_cost":95.0,"icon":"shirt","name":"Practice Jersey"}},"AssetCategoryListResponse":{"properties":{"limit":{"type":"integer","title":"Limit","description":"Maximum number of items returned in this page."},"offset":{"type":"integer","title":"Offset","description":"Zero-based offset applied to the full result set."},"total":{"type":"integer","title":"Total","description":"Total number of items matching the same filters."},"items":{"items":{"$ref":"#/components/schemas/AssetCategoryResponse"},"type":"array","title":"Items"}},"type":"object","required":["limit","offset","total","items"],"title":"AssetCategoryListResponse","example":{"items":[{"created_at":"2026-05-07T10:00:00Z","default_replacement_cost":95.0,"icon":"shirt","id":"77777777-7777-7777-7777-777777777777","is_enabled":true,"is_system":true,"module":"athletics","name":"Jersey","updated_at":"2026-05-07T10:00:00Z"}],"limit":50,"offset":0,"total":123}},"AssetCategoryResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"school_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"School Id"},"module":{"type":"string","title":"Module"},"name":{"type":"string","title":"Name"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"default_replacement_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Default Replacement Cost"},"is_system":{"type":"boolean","title":"Is System"},"is_enabled":{"type":"boolean","title":"Is Enabled"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"}},"type":"object","required":["id","school_id","module","name","icon","default_replacement_cost","is_system","is_enabled","created_at","updated_at"],"title":"AssetCategoryResponse","example":{"created_at":"2026-05-07T10:00:00Z","default_replacement_cost":95.0,"icon":"shirt","id":"77777777-7777-7777-7777-777777777777","is_enabled":true,"is_system":true,"module":"athletics","name":"Jersey","updated_at":"2026-05-07T10:00:00Z"}},"AssetCategorySummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"module":{"type":"string","title":"Module"},"is_system":{"type":"boolean","title":"Is System"}},"type":"object","required":["id","name","icon","module","is_system"],"title":"AssetCategorySummary"},"AssetCategoryUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Name","description":"Updated display name for the category."},"icon":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Icon","description":"Updated icon key, or null to clear it."},"default_replacement_cost":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Default Replacement Cost","description":"Updated default replacement cost, or null to clear it."},"is_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Enabled","description":"Whether the category can be used for new equipment."}},"type":"object","title":"AssetCategoryUpdateRequest","example":{"default_replacement_cost":110.0,"icon":"shirt","is_enabled":true,"name":"Game Jersey"}},"AssetConditionStatus":{"type":"string","enum":["good","damaged","needs_repair","retired","unknown"],"title":"AssetConditionStatus"},"AssetCreateRequest":{"properties":{"category_id":{"type":"string","format":"uuid","title":"Category Id"},"asset_label":{"type":"string","minLength":1,"title":"Asset Label","description":"Primary equipment label used for identification."},"display_name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Display Name","description":"Optional user-facing display name."},"replacement_cost":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Replacement Cost","description":"Optional replacement cost override."},"team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id","description":"Optional team assignment for the equipment."},"season_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Season Id","description":"Optional season assignment for the equipment."},"status":{"anyOf":[{"$ref":"#/components/schemas/AssetWriteStatus"},{"type":"null"}],"description":"Optional initial equipment status. Defaults to available."},"condition_status":{"anyOf":[{"$ref":"#/components/schemas/AssetConditionStatus"},{"type":"null"}],"description":"Optional initial condition status. Defaults to good."},"notes":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Notes","description":"Optional operational notes."},"qr_tag_code":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Qr Tag Code","description":"Optional QR tag code to link during equipment creation."},"location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id","description":"Optional home location for the equipment."},"serial_number":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Serial Number","description":"Optional product identifier or serial number."},"purchase_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Purchase Date","description":"Optional purchase date."},"purchase_cost":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Purchase Cost","description":"Optional net purchase price."},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Attributes","description":"Optional category-specific equipment attributes."}},"type":"object","required":["category_id","asset_label"],"title":"AssetCreateRequest","example":{"asset_label":"Jersey #24","attributes":{"number":"24","series":"2026-A","size":"L","type":"Home"},"category_id":"77777777-7777-7777-7777-777777777777","condition_status":"good","display_name":"Home Jersey #24","notes":"Blue home jersey","qr_tag_code":"4F9X2A","replacement_cost":95.0,"season_id":"44444444-4444-4444-4444-444444444444","status":"available","team_id":"33333333-3333-3333-3333-333333333333"}},"AssetImportStatus":{"type":"string","enum":["imported","verified","available","damaged","needs_repair","lost","retired"],"title":"AssetImportStatus"},"AssetListResponse":{"properties":{"limit":{"type":"integer","title":"Limit","description":"Maximum number of items returned in this page."},"offset":{"type":"integer","title":"Offset","description":"Zero-based offset applied to the full result set."},"total":{"type":"integer","title":"Total","description":"Total number of items matching the same filters."},"items":{"items":{"anyOf":[{"$ref":"#/components/schemas/AssetResponse"},{"$ref":"#/components/schemas/InventoryAssetResponse"}]},"type":"array","title":"Items"}},"type":"object","required":["limit","offset","total","items"],"title":"AssetListResponse","example":{"items":[{"asset_label":"Jersey #24","attributes":{"number":"24","series":"2026-A","size":"L","type":"Home"},"category":{"icon":"shirt","id":"77777777-7777-7777-7777-777777777777","is_system":true,"module":"athletics","name":"Jersey"},"category_id":"77777777-7777-7777-7777-777777777777","category_name":"Jersey","condition_status":"good","created_at":"2026-05-07T10:00:00Z","created_by_user_id":"11111111-1111-1111-1111-111111111111","current_season_id":"44444444-4444-4444-4444-444444444444","current_season_name":"Fall 2026","current_team_id":"33333333-3333-3333-3333-333333333333","current_team_name":"Varsity Football","display_name":"Home Jersey #24","effective_status":"available","id":"88888888-8888-8888-8888-888888888888","location_id":"bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb","needs_director_review":false,"notes":"Blue home jersey","purchase_cost":79.9,"purchase_date":"2026-01-15","qr_tag_code":"4F9X2A","qr_tag_id":"99999999-9999-9999-9999-999999999999","replacement_cost":95.0,"school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","serial_number":"SN-2026-0042","status":"available","updated_at":"2026-05-07T10:00:00Z"}],"limit":50,"offset":0,"total":123}},"AssetPhotoListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AssetPhotoResponse"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"AssetPhotoListResponse","example":{"items":[{"asset_id":"88888888-8888-8888-8888-888888888888","caption":"Front view with lens cap","content_type":"image/jpeg","created_at":"2026-05-10T18:05:00Z","id":"eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee","original_filename":"camera_front.jpg","size_bytes":245120,"sort_order":0}]}},"AssetPhotoResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"asset_id":{"type":"string","format":"uuid","title":"Asset Id"},"original_filename":{"type":"string","title":"Original Filename"},"content_type":{"type":"string","title":"Content Type"},"size_bytes":{"type":"integer","title":"Size Bytes"},"caption":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caption"},"sort_order":{"type":"integer","title":"Sort Order"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","asset_id","original_filename","content_type","size_bytes","caption","sort_order","created_at"],"title":"AssetPhotoResponse","example":{"asset_id":"88888888-8888-8888-8888-888888888888","caption":"Front view with lens cap","content_type":"image/jpeg","created_at":"2026-05-10T18:05:00Z","id":"eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee","original_filename":"camera_front.jpg","size_bytes":245120,"sort_order":0}},"AssetResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"school_id":{"type":"string","format":"uuid","title":"School Id"},"category_id":{"type":"string","format":"uuid","title":"Category Id"},"category":{"$ref":"#/components/schemas/AssetCategorySummary"},"category_name":{"type":"string","title":"Category Name"},"asset_label":{"type":"string","title":"Asset Label"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"status":{"$ref":"#/components/schemas/AssetStatus"},"effective_status":{"$ref":"#/components/schemas/AssetStatus"},"condition_status":{"$ref":"#/components/schemas/AssetConditionStatus"},"replacement_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Replacement Cost"},"current_holder_player_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Current Holder Player Id"},"current_holder_player_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Holder Player Name"},"current_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Current Team Id"},"current_team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Team Name"},"current_season_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Current Season Id"},"current_season_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Season Name"},"current_roster_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Current Roster Membership Id"},"current_checkout_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Current Checkout Id"},"created_by_user_id":{"type":"string","format":"uuid","title":"Created By User Id"},"needs_director_review":{"type":"boolean","title":"Needs Director Review"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id"},"serial_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serial Number"},"purchase_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Purchase Date"},"purchase_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Purchase Cost"},"qr_tag_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Qr Tag Id"},"qr_tag_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qr Tag Code"},"attributes":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object","title":"Attributes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"}},"type":"object","required":["id","school_id","category_id","category","category_name","asset_label","display_name","status","effective_status","condition_status","replacement_cost","current_holder_player_id","current_holder_player_name","current_team_id","current_team_name","current_season_id","current_season_name","current_roster_membership_id","current_checkout_id","created_by_user_id","needs_director_review","notes","location_id","serial_number","purchase_date","purchase_cost","qr_tag_id","qr_tag_code","attributes","created_at","updated_at"],"title":"AssetResponse","example":{"asset_label":"Jersey #24","attributes":{"number":"24","series":"2026-A","size":"L","type":"Home"},"category":{"icon":"shirt","id":"77777777-7777-7777-7777-777777777777","is_system":true,"module":"athletics","name":"Jersey"},"category_id":"77777777-7777-7777-7777-777777777777","category_name":"Jersey","condition_status":"good","created_at":"2026-05-07T10:00:00Z","created_by_user_id":"11111111-1111-1111-1111-111111111111","current_season_id":"44444444-4444-4444-4444-444444444444","current_season_name":"Fall 2026","current_team_id":"33333333-3333-3333-3333-333333333333","current_team_name":"Varsity Football","display_name":"Home Jersey #24","effective_status":"available","id":"88888888-8888-8888-8888-888888888888","location_id":"bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb","needs_director_review":false,"notes":"Blue home jersey","purchase_cost":79.9,"purchase_date":"2026-01-15","qr_tag_code":"4F9X2A","qr_tag_id":"99999999-9999-9999-9999-999999999999","replacement_cost":95.0,"school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","serial_number":"SN-2026-0042","status":"available","updated_at":"2026-05-07T10:00:00Z"}},"AssetReviewRequest":{"properties":{"review_note":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Review Note","description":"Optional short director note for the review action."},"mark_verified":{"type":"boolean","title":"Mark Verified","description":"When true, promote imported or available equipment to verified during review."}},"type":"object","required":["mark_verified"],"title":"AssetReviewRequest","example":{"mark_verified":true,"review_note":"Imported by coach and spot-checked by director."}},"AssetStatus":{"type":"string","enum":["imported","verified","available","checked_out","overdue","damaged","needs_repair","lost","retired","archived"],"title":"AssetStatus"},"AssetUpdateRequest":{"properties":{"category_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Category Id","description":"Updated category identifier."},"asset_label":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Asset Label","description":"Updated equipment label."},"display_name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Display Name","description":"Updated display name, or null to clear it."},"replacement_cost":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Replacement Cost","description":"Updated replacement cost, or null to clear it."},"team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id","description":"Updated team assignment, or null to clear it if allowed."},"season_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Season Id","description":"Updated season assignment, or null to clear it."},"status":{"anyOf":[{"$ref":"#/components/schemas/AssetWriteStatus"},{"type":"null"}],"description":"Updated equipment status."},"condition_status":{"anyOf":[{"$ref":"#/components/schemas/AssetConditionStatus"},{"type":"null"}],"description":"Updated condition status."},"notes":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Notes","description":"Updated notes, or null to clear them."},"needs_director_review":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Needs Director Review","description":"Director review flag. Coaches may not set this to false."},"location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id","description":"Updated home location, or null to clear it."},"serial_number":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Serial Number","description":"Updated product identifier or serial number, or null to clear it."},"purchase_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Purchase Date","description":"Updated purchase date, or null to clear it."},"purchase_cost":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Purchase Cost","description":"Updated net purchase price, or null to clear it."},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Attributes","description":"Replacement attribute map for the equipment."}},"type":"object","title":"AssetUpdateRequest","example":{"asset_label":"Jersey #24","attributes":{"number":"24","size":"XL","type":"Home"},"category_id":"77777777-7777-7777-7777-777777777777","condition_status":"good","display_name":"Home Jersey #24","needs_director_review":false,"notes":"Updated note","replacement_cost":95.0,"season_id":"44444444-4444-4444-4444-444444444444","status":"available","team_id":"33333333-3333-3333-3333-333333333333"}},"AssetWriteStatus":{"type":"string","enum":["imported","available","damaged","needs_repair","lost","retired"],"title":"AssetWriteStatus"},"AuditEventType":{"type":"string","enum":["equipment_created","equipment_imported","equipment_updated","equipment_reviewed","equipment_archived","damage_report_created","damage_report_updated","damage_report_resolved","damage_report_dismissed","damage_report_photo_added","damage_report_photo_removed","qr_tag_linked","qr_tag_replaced","checkout_created","checkin_completed","equipment_transferred","equipment_photo_added","equipment_photo_removed","location_created","location_updated","location_archived","maintenance_plan_updated","maintenance_opened","maintenance_completed"],"title":"AuditEventType"},"AuthResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type"},"user":{"$ref":"#/components/schemas/UserResponse"}},"type":"object","required":["access_token","refresh_token","token_type","user"],"title":"AuthResponse","example":{"access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.access","refresh_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.refresh","token_type":"bearer","user":{"email":"coach.rivera@example.edu","full_name":"Coach Rivera","id":"11111111-1111-1111-1111-111111111111","role":"coach","school_code":"A1B2C3","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"}}},"Body_uploadDamageReportPhoto":{"properties":{"photo":{"type":"string","contentMediaType":"application/octet-stream","title":"Photo"},"caption":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caption"}},"type":"object","required":["photo"],"title":"Body_uploadDamageReportPhoto"},"Body_uploadEquipmentPhoto":{"properties":{"photo":{"type":"string","contentMediaType":"application/octet-stream","title":"Photo"},"caption":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caption"}},"type":"object","required":["photo"],"title":"Body_uploadEquipmentPhoto"},"CheckinDamageReportRequest":{"properties":{"severity":{"$ref":"#/components/schemas/DamageReportSeverity"},"description":{"type":"string","maxLength":2000,"minLength":1,"title":"Description"}},"type":"object","required":["severity","description"],"title":"CheckinDamageReportRequest"},"CheckoutCheckinRequest":{"properties":{"checkin_notes":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Checkin Notes"},"condition_status":{"anyOf":[{"$ref":"#/components/schemas/AssetConditionStatus"},{"type":"null"}],"description":"Optional updated condition status during check-in."},"location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id","description":"Inventory only: the asset was returned somewhere else; its home location moves to this active location of the organization."},"damage_report":{"anyOf":[{"$ref":"#/components/schemas/CheckinDamageReportRequest"},{"type":"null"}],"description":"Optionally file a damage report for the item in the same call."}},"type":"object","title":"CheckoutCheckinRequest","example":{"checkin_notes":"Returned after final game","condition_status":"good"}},"CheckoutCreateRequest":{"properties":{"roster_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Roster Membership Id","description":"Athletics only: the roster membership receiving the equipment. Required for athletics schools, rejected for Inventory tenants."},"holder_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Holder User Id","description":"Inventory only: check out on behalf of this user (requires the inventory.checkout_on_behalf capability). Defaults to the caller."},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"checkout_notes":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Checkout Notes"}},"type":"object","title":"CheckoutCreateRequest","example":{"checkout_notes":"Issued at kit day","due_date":"2026-12-05","roster_membership_id":"66666666-6666-6666-6666-666666666666"}},"CheckoutEffectiveStatus":{"type":"string","enum":["active","overdue","returned","lost","conflicted"],"title":"CheckoutEffectiveStatus"},"CheckoutListResponse":{"properties":{"limit":{"type":"integer","title":"Limit","description":"Maximum number of items returned in this page."},"offset":{"type":"integer","title":"Offset","description":"Zero-based offset applied to the full result set."},"total":{"type":"integer","title":"Total","description":"Total number of items matching the same filters."},"items":{"items":{"anyOf":[{"$ref":"#/components/schemas/CheckoutResponse"},{"$ref":"#/components/schemas/InventoryCheckoutResponse"}]},"type":"array","title":"Items"}},"type":"object","required":["limit","offset","total","items"],"title":"CheckoutListResponse","example":{"items":[{"asset":{"asset_label":"Jersey #24","attributes":{"number":"24","series":"2026-A","size":"L","type":"Home"},"category":{"icon":"shirt","id":"77777777-7777-7777-7777-777777777777","is_system":true,"module":"athletics","name":"Jersey"},"category_id":"77777777-7777-7777-7777-777777777777","category_name":"Jersey","condition_status":"good","created_at":"2026-05-07T10:00:00Z","created_by_user_id":"11111111-1111-1111-1111-111111111111","current_season_id":"44444444-4444-4444-4444-444444444444","current_season_name":"Fall 2026","current_team_id":"33333333-3333-3333-3333-333333333333","current_team_name":"Varsity Football","display_name":"Home Jersey #24","effective_status":"available","id":"88888888-8888-8888-8888-888888888888","location_id":"bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb","needs_director_review":false,"notes":"Blue home jersey","purchase_cost":79.9,"purchase_date":"2026-01-15","qr_tag_code":"4F9X2A","qr_tag_id":"99999999-9999-9999-9999-999999999999","replacement_cost":95.0,"school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","serial_number":"SN-2026-0042","status":"checked_out","updated_at":"2026-05-07T10:00:00Z"},"asset_id":"88888888-8888-8888-8888-888888888888","category_id":"77777777-7777-7777-7777-777777777777","category_name":"Jersey","checked_out_at":"2026-08-15T16:00:00Z","checked_out_by_name":"Marcus Williams","checked_out_by_user_id":"11111111-1111-1111-1111-111111111111","checkout_notes":"Issued at kit day","condition_status":"good","created_at":"2026-08-15T16:00:00Z","due_date":"2026-12-05","effective_status":"active","equipment_display_name":"Home Jersey #24","equipment_id":"88888888-8888-8888-8888-888888888888","equipment_label":"Jersey #24","equipment_status":"checked_out","id":"12121212-1212-1212-1212-121212121212","is_overdue":false,"player":{"created_at":"2026-05-06T18:00:00Z","full_name":"Devon Carter","id":"55555555-5555-5555-5555-555555555555","parent_email":"parent.carter@example.com","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","student_email":"devon.carter@example.edu","updated_at":"2026-05-06T18:00:00Z"},"player_id":"55555555-5555-5555-5555-555555555555","player_name":"Devon Carter","roster_membership_id":"66666666-6666-6666-6666-666666666666","roster_number":"24","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","season_id":"44444444-4444-4444-4444-444444444444","season_name":"Fall 2026","status":"active","team_id":"33333333-3333-3333-3333-333333333333","team_name":"Varsity Football","updated_at":"2026-08-15T16:00:00Z"}],"limit":50,"offset":0,"total":123}},"CheckoutResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"school_id":{"type":"string","format":"uuid","title":"School Id"},"equipment_id":{"type":"string","format":"uuid","title":"Equipment Id"},"asset_id":{"type":"string","format":"uuid","title":"Asset Id"},"equipment_label":{"type":"string","title":"Equipment Label"},"equipment_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equipment Display Name"},"equipment_status":{"$ref":"#/components/schemas/AssetStatus"},"condition_status":{"$ref":"#/components/schemas/AssetConditionStatus"},"category_id":{"type":"string","format":"uuid","title":"Category Id"},"category_name":{"type":"string","title":"Category Name"},"player_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Player Id"},"player_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Player Name"},"roster_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Roster Membership Id"},"team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"},"team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Name"},"season_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Season Id"},"season_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Season Name"},"holder_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Holder User Id"},"holder_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Holder Name"},"from_location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"From Location Id"},"checked_out_by_user_id":{"type":"string","format":"uuid","title":"Checked Out By User Id"},"checked_out_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checked Out By Name"},"checked_out_at":{"type":"string","format":"date-time","title":"Checked Out At"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"returned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Returned At"},"checked_in_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Checked In By User Id"},"status":{"$ref":"#/components/schemas/CheckoutStatus"},"effective_status":{"$ref":"#/components/schemas/CheckoutEffectiveStatus"},"is_overdue":{"type":"boolean","title":"Is Overdue"},"days_overdue":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days Overdue"},"checkout_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkout Notes"},"checkin_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkin Notes"},"roster_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Roster Number"},"asset":{"$ref":"#/components/schemas/AssetResponse"},"player":{"anyOf":[{"$ref":"#/components/schemas/PlayerResponse"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"}},"type":"object","required":["id","school_id","equipment_id","asset_id","equipment_label","equipment_display_name","equipment_status","condition_status","category_id","category_name","player_id","player_name","roster_membership_id","team_id","team_name","season_id","season_name","holder_user_id","holder_name","from_location_id","checked_out_by_user_id","checked_out_by_name","checked_out_at","due_date","returned_at","checked_in_by_user_id","status","effective_status","is_overdue","days_overdue","checkout_notes","checkin_notes","roster_number","asset","player","created_at","updated_at","archived_at"],"title":"CheckoutResponse","example":{"asset":{"asset_label":"Jersey #24","attributes":{"number":"24","series":"2026-A","size":"L","type":"Home"},"category":{"icon":"shirt","id":"77777777-7777-7777-7777-777777777777","is_system":true,"module":"athletics","name":"Jersey"},"category_id":"77777777-7777-7777-7777-777777777777","category_name":"Jersey","condition_status":"good","created_at":"2026-05-07T10:00:00Z","created_by_user_id":"11111111-1111-1111-1111-111111111111","current_season_id":"44444444-4444-4444-4444-444444444444","current_season_name":"Fall 2026","current_team_id":"33333333-3333-3333-3333-333333333333","current_team_name":"Varsity Football","display_name":"Home Jersey #24","effective_status":"available","id":"88888888-8888-8888-8888-888888888888","location_id":"bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb","needs_director_review":false,"notes":"Blue home jersey","purchase_cost":79.9,"purchase_date":"2026-01-15","qr_tag_code":"4F9X2A","qr_tag_id":"99999999-9999-9999-9999-999999999999","replacement_cost":95.0,"school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","serial_number":"SN-2026-0042","status":"checked_out","updated_at":"2026-05-07T10:00:00Z"},"asset_id":"88888888-8888-8888-8888-888888888888","category_id":"77777777-7777-7777-7777-777777777777","category_name":"Jersey","checked_out_at":"2026-08-15T16:00:00Z","checked_out_by_name":"Marcus Williams","checked_out_by_user_id":"11111111-1111-1111-1111-111111111111","checkout_notes":"Issued at kit day","condition_status":"good","created_at":"2026-08-15T16:00:00Z","due_date":"2026-12-05","effective_status":"active","equipment_display_name":"Home Jersey #24","equipment_id":"88888888-8888-8888-8888-888888888888","equipment_label":"Jersey #24","equipment_status":"checked_out","id":"12121212-1212-1212-1212-121212121212","is_overdue":false,"player":{"created_at":"2026-05-06T18:00:00Z","full_name":"Devon Carter","id":"55555555-5555-5555-5555-555555555555","parent_email":"parent.carter@example.com","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","student_email":"devon.carter@example.edu","updated_at":"2026-05-06T18:00:00Z"},"player_id":"55555555-5555-5555-5555-555555555555","player_name":"Devon Carter","roster_membership_id":"66666666-6666-6666-6666-666666666666","roster_number":"24","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","season_id":"44444444-4444-4444-4444-444444444444","season_name":"Fall 2026","status":"active","team_id":"33333333-3333-3333-3333-333333333333","team_name":"Varsity Football","updated_at":"2026-08-15T16:00:00Z"}},"CheckoutStatus":{"type":"string","enum":["active","returned","lost","conflicted"],"title":"CheckoutStatus"},"CoachListResponse":{"properties":{"limit":{"type":"integer","title":"Limit","description":"Maximum number of items returned in this page."},"offset":{"type":"integer","title":"Offset","description":"Zero-based offset applied to the full result set."},"total":{"type":"integer","title":"Total","description":"Total number of items matching the same filters."},"items":{"items":{"$ref":"#/components/schemas/CoachResponse"},"type":"array","title":"Items"}},"type":"object","required":["limit","offset","total","items"],"title":"CoachListResponse","example":{"items":[{"assigned_team_ids":["33333333-3333-3333-3333-333333333333"],"assigned_teams":[{"id":"33333333-3333-3333-3333-333333333333","name":"Varsity Football","sport":"Football"}],"created_at":"2026-05-06T18:00:00Z","email":"coach.rivera@example.edu","full_name":"Coach Rivera","id":"11111111-1111-1111-1111-111111111111","is_active":true,"role":"coach","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","updated_at":"2026-05-06T18:00:00Z"}],"limit":50,"offset":0,"total":123}},"CoachResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","format":"email","title":"Email"},"full_name":{"type":"string","title":"Full Name"},"role":{"$ref":"#/components/schemas/UserRole"},"school_id":{"type":"string","format":"uuid","title":"School Id"},"is_active":{"type":"boolean","title":"Is Active"},"assigned_team_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Assigned Team Ids"},"assigned_teams":{"items":{"$ref":"#/components/schemas/CoachTeamSummary"},"type":"array","title":"Assigned Teams"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"}},"type":"object","required":["id","email","full_name","role","school_id","is_active","assigned_team_ids","assigned_teams","created_at","updated_at"],"title":"CoachResponse","example":{"assigned_team_ids":["33333333-3333-3333-3333-333333333333"],"assigned_teams":[{"id":"33333333-3333-3333-3333-333333333333","name":"Varsity Football","sport":"Football"}],"created_at":"2026-05-06T18:00:00Z","email":"coach.rivera@example.edu","full_name":"Coach Rivera","id":"11111111-1111-1111-1111-111111111111","is_active":true,"role":"coach","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","updated_at":"2026-05-06T18:00:00Z"}},"CoachTeamSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"sport":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sport"}},"type":"object","required":["id","name","sport"],"title":"CoachTeamSummary","example":{"id":"33333333-3333-3333-3333-333333333333","name":"Varsity Football","sport":"Football"}},"CoachUpdateRequest":{"properties":{"full_name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Full Name","description":"Updated coach display name."},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","description":"Whether the coach account is active."},"assigned_team_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Assigned Team Ids","description":"Replacement list of teams for which this coach is responsible."}},"type":"object","title":"CoachUpdateRequest","example":{"assigned_team_ids":["33333333-3333-3333-3333-333333333333"],"full_name":"Coach Rivera","is_active":true}},"DamageReportCreateEquipmentStatus":{"type":"string","enum":["damaged","needs_repair","lost"],"title":"DamageReportCreateEquipmentStatus"},"DamageReportCreateRequest":{"properties":{"severity":{"$ref":"#/components/schemas/DamageReportSeverity"},"description":{"type":"string","minLength":1,"title":"Description","description":"Plain-language description of the damage or loss issue."},"new_condition_status":{"anyOf":[{"$ref":"#/components/schemas/AssetConditionStatus"},{"type":"null"}],"description":"Optional equipment condition status to apply immediately."},"new_equipment_status":{"anyOf":[{"$ref":"#/components/schemas/DamageReportCreateEquipmentStatus"},{"type":"null"}],"description":"Optional equipment status to apply for the damage workflow."},"estimated_repair_cost":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Estimated Repair Cost","description":"Optional estimated repair cost."}},"type":"object","required":["severity","description"],"title":"DamageReportCreateRequest","example":{"description":"Torn seam on the left shoulder.","estimated_repair_cost":18.5,"new_condition_status":"damaged","new_equipment_status":"damaged","severity":"moderate"}},"DamageReportListResponse":{"properties":{"limit":{"type":"integer","title":"Limit","description":"Maximum number of items returned in this page."},"offset":{"type":"integer","title":"Offset","description":"Zero-based offset applied to the full result set."},"total":{"type":"integer","title":"Total","description":"Total number of items matching the same filters."},"items":{"items":{"anyOf":[{"$ref":"#/components/schemas/DamageReportResponse"},{"$ref":"#/components/schemas/InventoryDamageReportResponse"}]},"type":"array","title":"Items"}},"type":"object","required":["limit","offset","total","items"],"title":"DamageReportListResponse","example":{"items":[{"condition_status_after":"damaged","condition_status_before":"good","created_at":"2026-05-10T18:00:00Z","description":"Torn seam on the left shoulder.","equipment_id":"88888888-8888-8888-8888-888888888888","equipment_status_after":"damaged","equipment_status_before":"available","estimated_repair_cost":18.5,"id":"dddddddd-dddd-dddd-dddd-dddddddddddd","photo_count":0,"reported_by_user_id":"11111111-1111-1111-1111-111111111111","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","severity":"moderate","status":"open","updated_at":"2026-05-10T18:00:00Z"}],"limit":50,"offset":0,"total":123}},"DamageReportPhotoListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DamageReportPhotoResponse"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"DamageReportPhotoListResponse","example":{"items":[{"asset_id":"88888888-8888-8888-8888-888888888888","caption":"Left shoulder seam","checksum_sha256":"2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824","content_type":"image/jpeg","created_at":"2026-05-10T18:05:00Z","damage_report_id":"dddddddd-dddd-dddd-dddd-dddddddddddd","id":"eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee","original_filename":"jersey_damage.jpg","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","size_bytes":245120,"uploaded_by_user_id":"11111111-1111-1111-1111-111111111111"}]}},"DamageReportPhotoResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"school_id":{"type":"string","format":"uuid","title":"School Id"},"damage_report_id":{"type":"string","format":"uuid","title":"Damage Report Id"},"asset_id":{"type":"string","format":"uuid","title":"Asset Id"},"uploaded_by_user_id":{"type":"string","format":"uuid","title":"Uploaded By User Id"},"original_filename":{"type":"string","title":"Original Filename"},"content_type":{"type":"string","title":"Content Type"},"size_bytes":{"type":"integer","title":"Size Bytes"},"checksum_sha256":{"type":"string","title":"Checksum Sha256"},"caption":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caption"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","school_id","damage_report_id","asset_id","uploaded_by_user_id","original_filename","content_type","size_bytes","checksum_sha256","caption","created_at"],"title":"DamageReportPhotoResponse","example":{"asset_id":"88888888-8888-8888-8888-888888888888","caption":"Left shoulder seam","checksum_sha256":"2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824","content_type":"image/jpeg","created_at":"2026-05-10T18:05:00Z","damage_report_id":"dddddddd-dddd-dddd-dddd-dddddddddddd","id":"eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee","original_filename":"jersey_damage.jpg","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","size_bytes":245120,"uploaded_by_user_id":"11111111-1111-1111-1111-111111111111"}},"DamageReportResolveEquipmentStatus":{"type":"string","enum":["available","damaged","needs_repair","lost"],"title":"DamageReportResolveEquipmentStatus"},"DamageReportResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"school_id":{"type":"string","format":"uuid","title":"School Id"},"equipment_id":{"type":"string","format":"uuid","title":"Equipment Id"},"reported_by_user_id":{"type":"string","format":"uuid","title":"Reported By User Id"},"checkout_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Checkout Id"},"roster_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Roster Membership Id"},"player_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Player Id"},"severity":{"$ref":"#/components/schemas/DamageReportSeverity"},"status":{"$ref":"#/components/schemas/DamageReportStatus"},"description":{"type":"string","title":"Description"},"repair_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repair Notes"},"condition_status_before":{"$ref":"#/components/schemas/AssetConditionStatus"},"condition_status_after":{"$ref":"#/components/schemas/AssetConditionStatus"},"equipment_status_before":{"$ref":"#/components/schemas/AssetStatus"},"equipment_status_after":{"$ref":"#/components/schemas/AssetStatus"},"estimated_repair_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimated Repair Cost"},"photo_count":{"type":"integer","title":"Photo Count"},"resolved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolved At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"}},"type":"object","required":["id","school_id","equipment_id","reported_by_user_id","checkout_id","roster_membership_id","player_id","severity","status","description","repair_notes","condition_status_before","condition_status_after","equipment_status_before","equipment_status_after","estimated_repair_cost","photo_count","resolved_at","created_at","updated_at"],"title":"DamageReportResponse","example":{"condition_status_after":"damaged","condition_status_before":"good","created_at":"2026-05-10T18:00:00Z","description":"Torn seam on the left shoulder.","equipment_id":"88888888-8888-8888-8888-888888888888","equipment_status_after":"damaged","equipment_status_before":"available","estimated_repair_cost":18.5,"id":"dddddddd-dddd-dddd-dddd-dddddddddddd","photo_count":0,"reported_by_user_id":"11111111-1111-1111-1111-111111111111","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","severity":"moderate","status":"open","updated_at":"2026-05-10T18:00:00Z"}},"DamageReportSeverity":{"type":"string","enum":["minor","moderate","severe"],"title":"DamageReportSeverity"},"DamageReportStatus":{"type":"string","enum":["open","resolved","dismissed"],"title":"DamageReportStatus"},"DamageReportUpdateRequest":{"properties":{"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Description","description":"Updated description for an open report."},"severity":{"anyOf":[{"$ref":"#/components/schemas/DamageReportSeverity"},{"type":"null"}],"description":"Updated severity classification."},"status":{"anyOf":[{"$ref":"#/components/schemas/DamageReportStatus"},{"type":"null"}],"description":"Updated workflow status for the damage report."},"repair_notes":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Repair Notes","description":"Optional repair or resolution notes."},"new_condition_status":{"anyOf":[{"$ref":"#/components/schemas/AssetConditionStatus"},{"type":"null"}],"description":"Optional equipment condition status to apply."},"new_equipment_status":{"anyOf":[{"$ref":"#/components/schemas/DamageReportResolveEquipmentStatus"},{"type":"null"}],"description":"Optional equipment status to apply during resolution."},"estimated_repair_cost":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Estimated Repair Cost","description":"Optional updated estimated repair cost."}},"type":"object","title":"DamageReportUpdateRequest","example":{"estimated_repair_cost":22.0,"new_condition_status":"good","new_equipment_status":"available","repair_notes":"Seam reinforced and inspected.","status":"resolved"}},"DashboardCheckoutResponse":{"properties":{"active":{"type":"integer","title":"Active"},"overdue":{"type":"integer","title":"Overdue"},"due_soon":{"type":"integer","title":"Due Soon"}},"type":"object","required":["active","overdue","due_soon"],"title":"DashboardCheckoutResponse"},"DashboardDamageReportResponse":{"properties":{"open":{"type":"integer","title":"Open"},"resolved":{"type":"integer","title":"Resolved"},"dismissed":{"type":"integer","title":"Dismissed"}},"type":"object","required":["open","resolved","dismissed"],"title":"DashboardDamageReportResponse"},"DashboardEquipmentResponse":{"properties":{"total":{"type":"integer","title":"Total"},"available":{"type":"integer","title":"Available"},"checked_out":{"type":"integer","title":"Checked Out"},"overdue":{"type":"integer","title":"Overdue"},"damaged":{"type":"integer","title":"Damaged"},"needs_repair":{"type":"integer","title":"Needs Repair"},"lost":{"type":"integer","title":"Lost"},"retired":{"type":"integer","title":"Retired"},"needs_director_review":{"type":"integer","title":"Needs Director Review"}},"type":"object","required":["total","available","checked_out","overdue","damaged","needs_repair","lost","retired","needs_director_review"],"title":"DashboardEquipmentResponse"},"DashboardRecentActivityResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"event_type":{"$ref":"#/components/schemas/AuditEventType"},"actor_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Actor User Id"},"actor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Name"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"entity_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Entity Id"},"message":{"type":"string","title":"Message"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","event_type","actor_user_id","actor_name","entity_type","entity_id","message","created_at"],"title":"DashboardRecentActivityResponse"},"DashboardResponse":{"properties":{"scope":{"$ref":"#/components/schemas/DashboardScopeResponse"},"equipment":{"$ref":"#/components/schemas/DashboardEquipmentResponse"},"checkouts":{"$ref":"#/components/schemas/DashboardCheckoutResponse"},"damage_reports":{"$ref":"#/components/schemas/DashboardDamageReportResponse"},"teams":{"$ref":"#/components/schemas/DashboardTeamResponse"},"roster":{"$ref":"#/components/schemas/DashboardRosterResponse"},"recent_activity":{"items":{"$ref":"#/components/schemas/DashboardRecentActivityResponse"},"type":"array","title":"Recent Activity"}},"type":"object","required":["scope","equipment","checkouts","damage_reports","teams","roster","recent_activity"],"title":"DashboardResponse","example":{"checkouts":{"active":4,"due_soon":2,"overdue":1},"damage_reports":{"dismissed":1,"open":2,"resolved":5},"equipment":{"available":10,"checked_out":4,"damaged":2,"lost":1,"needs_director_review":3,"needs_repair":1,"overdue":1,"retired":0,"total":18},"recent_activity":[{"actor_name":"Marcus Williams","actor_user_id":"11111111-1111-1111-1111-111111111111","created_at":"2026-05-07T10:00:00Z","entity_id":"88888888-8888-8888-8888-888888888888","entity_type":"equipment","event_type":"equipment_created","id":"99999999-9999-9999-9999-999999999999","message":"Created equipment 'Jersey #24'."}],"roster":{"active_roster_memberships":28,"players":26},"scope":{"role":"director","school_code":"A1B2C3","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","school_name":"Lincoln High","team_ids":["33333333-3333-3333-3333-333333333333","55555555-5555-5555-5555-555555555555"]},"teams":{"assigned":2,"total":3}}},"DashboardRosterResponse":{"properties":{"players":{"type":"integer","title":"Players"},"active_roster_memberships":{"type":"integer","title":"Active Roster Memberships"}},"type":"object","required":["players","active_roster_memberships"],"title":"DashboardRosterResponse"},"DashboardScopeResponse":{"properties":{"school_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"School Id"},"school_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"School Name"},"school_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"School Code"},"role":{"$ref":"#/components/schemas/UserRole"},"team_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Team Ids"}},"type":"object","required":["school_id","school_name","school_code","role","team_ids"],"title":"DashboardScopeResponse"},"DashboardTeamResponse":{"properties":{"total":{"type":"integer","title":"Total"},"assigned":{"type":"integer","title":"Assigned"}},"type":"object","required":["total","assigned"],"title":"DashboardTeamResponse"},"DirectorSignupRequest":{"properties":{"school_name":{"type":"string","minLength":1,"title":"School Name","description":"School workspace name."},"full_name":{"type":"string","minLength":1,"title":"Full Name","description":"Full name of the director creating the school workspace."},"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","minLength":8,"title":"Password"}},"type":"object","required":["school_name","full_name","email","password"],"title":"DirectorSignupRequest","example":{"email":"marcus@example.edu","full_name":"Marcus Williams","password":"example-password-123","school_name":"Lincoln High"}},"DirectorSignupResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type"},"user":{"$ref":"#/components/schemas/UserResponse"},"school":{"$ref":"#/components/schemas/SchoolResponse"}},"type":"object","required":["access_token","refresh_token","token_type","user","school"],"title":"DirectorSignupResponse","example":{"access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.access","refresh_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.refresh","school":{"id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","name":"Lincoln High","school_code":"A1B2C3"},"token_type":"bearer","user":{"email":"marcus@example.edu","full_name":"Marcus Williams","id":"11111111-1111-1111-1111-111111111111","role":"director","school_code":"A1B2C3","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"}}},"EquipmentImportColumnMapping":{"properties":{"asset_label":{"type":"string","minLength":1,"title":"Asset Label"},"category":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Category"},"team":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Team"},"replacement_cost":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Replacement Cost"},"qr_tag_code":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Qr Tag Code"},"notes":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Notes"},"display_name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Display Name"},"serial_number":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Serial Number"},"purchase_date":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Purchase Date"},"purchase_cost":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Purchase Cost"},"location":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Location"},"attributes":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["asset_label"],"title":"EquipmentImportColumnMapping","example":{"asset_label":"Label","attributes":{"number":"Number","series":"Series","size":"Size","type":"Variant"},"category":"Category","display_name":"Display Name","notes":"Notes","qr_tag_code":"QR","replacement_cost":"Cost","team":"Team"}},"EquipmentImportCommitRequest":{"properties":{"team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"},"season_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Season Id"},"csv_text":{"type":"string","minLength":1,"title":"Csv Text"},"column_mapping":{"$ref":"#/components/schemas/EquipmentImportColumnMapping"},"options":{"$ref":"#/components/schemas/EquipmentImportOptions"}},"type":"object","required":["csv_text","column_mapping","options"],"title":"EquipmentImportCommitRequest","example":{"column_mapping":{"asset_label":"Label","attributes":{"number":"Number","series":"Series","size":"Size","type":"Variant"},"category":"Category","display_name":"Display Name","notes":"Notes","qr_tag_code":"QR","replacement_cost":"Cost","team":"Team"},"csv_text":"Label,Display Name,Category,Team,Cost,QR,Number,Size,Variant,Series,Notes\nJersey #24,Home Jersey #24,Jersey,Varsity Football,95,4F9X2A,24,L,Home,2026-A,Blue home jersey","options":{"create_missing_categories":false,"create_missing_locations":false,"default_status":"imported","skip_rows_with_errors":true},"season_id":"44444444-4444-4444-4444-444444444444","team_id":"33333333-3333-3333-3333-333333333333"}},"EquipmentImportCommitResponse":{"properties":{"summary":{"$ref":"#/components/schemas/EquipmentImportSummary"},"warnings":{"items":{"$ref":"#/components/schemas/EquipmentImportRowIssue"},"type":"array","title":"Warnings"},"created_assets":{"items":{"$ref":"#/components/schemas/EquipmentImportCreatedAsset"},"type":"array","title":"Created Assets"},"created_categories":{"items":{"$ref":"#/components/schemas/AssetCategoryResponse"},"type":"array","title":"Created Categories"},"rows":{"items":{"$ref":"#/components/schemas/EquipmentImportCommitRow"},"type":"array","title":"Rows"}},"type":"object","required":["summary","created_assets","created_categories","rows"],"title":"EquipmentImportCommitResponse","example":{"created_assets":[{"asset_label":"Jersey #24","category_id":"77777777-7777-7777-7777-777777777777","id":"88888888-8888-8888-8888-888888888888","needs_director_review":false,"qr_tag_code":"4F9X2A","qr_tag_id":"99999999-9999-9999-9999-999999999999","season_id":"44444444-4444-4444-4444-444444444444","status":"imported","team_id":"33333333-3333-3333-3333-333333333333","team_name":"Varsity Football"}],"created_categories":[],"rows":[{"action":"create_equipment","asset_id":"88888888-8888-8888-8888-888888888888","errors":[],"qr_tag_id":"99999999-9999-9999-9999-999999999999","row_number":2,"status":"imported","warnings":[]}],"summary":{"assets_created":1,"categories_created":0,"error_rows":0,"qr_tags_created":1,"qr_tags_linked":1,"rows_skipped":0,"total_rows":1,"warning_rows":0}}},"EquipmentImportCommitRow":{"properties":{"row_number":{"type":"integer","title":"Row Number"},"status":{"type":"string","title":"Status"},"action":{"type":"string","title":"Action"},"asset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Asset Id"},"qr_tag_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Qr Tag Id"},"warnings":{"items":{"$ref":"#/components/schemas/EquipmentImportRowIssue"},"type":"array","title":"Warnings"},"errors":{"items":{"$ref":"#/components/schemas/EquipmentImportRowIssue"},"type":"array","title":"Errors"}},"type":"object","required":["row_number","status","action","warnings","errors"],"title":"EquipmentImportCommitRow"},"EquipmentImportCreatedAsset":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"asset_label":{"type":"string","title":"Asset Label"},"category_id":{"type":"string","format":"uuid","title":"Category Id"},"team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"},"team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Name"},"season_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Season Id"},"status":{"type":"string","title":"Status"},"needs_director_review":{"type":"boolean","title":"Needs Director Review"},"qr_tag_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Qr Tag Id"},"qr_tag_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qr Tag Code"}},"type":"object","required":["id","asset_label","category_id","team_id","season_id","status","needs_director_review"],"title":"EquipmentImportCreatedAsset"},"EquipmentImportOptions":{"properties":{"skip_rows_with_errors":{"type":"boolean","title":"Skip Rows With Errors","default":true},"default_category_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Default Category Id"},"create_missing_categories":{"type":"boolean","title":"Create Missing Categories","default":false},"create_missing_locations":{"type":"boolean","title":"Create Missing Locations","default":false},"default_status":{"$ref":"#/components/schemas/AssetImportStatus","default":"imported"}},"type":"object","title":"EquipmentImportOptions","example":{"create_missing_categories":false,"create_missing_locations":false,"default_status":"imported","skip_rows_with_errors":true}},"EquipmentImportPreviewInput":{"properties":{"asset_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Label"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"category_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Name"},"category_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Category Id"},"replacement_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Replacement Cost"},"qr_tag_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qr Tag Code"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"serial_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serial Number"},"purchase_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Purchase Date"},"purchase_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Purchase Cost"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id"},"attributes":{"additionalProperties":{"type":"string"},"type":"object","title":"Attributes"}},"type":"object","required":["asset_label","display_name","category_name","category_id","replacement_cost","qr_tag_code","notes","attributes"],"title":"EquipmentImportPreviewInput","example":{"asset_label":"Jersey #24","attributes":{"number":"24","series":"2026-A","size":"L","type":"Home"},"category_id":"77777777-7777-7777-7777-777777777777","category_name":"Jersey","display_name":"Home Jersey #24","notes":"Blue home jersey","qr_tag_code":"4F9X2A","replacement_cost":95.0}},"EquipmentImportPreviewRequest":{"properties":{"team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"},"season_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Season Id"},"csv_text":{"type":"string","minLength":1,"title":"Csv Text"},"column_mapping":{"$ref":"#/components/schemas/EquipmentImportColumnMapping"},"options":{"anyOf":[{"$ref":"#/components/schemas/EquipmentImportOptions"},{"type":"null"}]}},"type":"object","required":["csv_text","column_mapping"],"title":"EquipmentImportPreviewRequest","example":{"column_mapping":{"asset_label":"Label","attributes":{"number":"Number","series":"Series","size":"Size","type":"Variant"},"category":"Category","display_name":"Display Name","notes":"Notes","qr_tag_code":"QR","replacement_cost":"Cost","team":"Team"},"csv_text":"Label,Display Name,Category,Team,Cost,QR,Number,Size,Variant,Series,Notes\nJersey #24,Home Jersey #24,Jersey,Varsity Football,95,4F9X2A,24,L,Home,2026-A,Blue home jersey","options":{"create_missing_categories":false,"default_status":"imported","skip_rows_with_errors":true},"season_id":"44444444-4444-4444-4444-444444444444","team_id":"33333333-3333-3333-3333-333333333333"}},"EquipmentImportPreviewResponse":{"properties":{"summary":{"$ref":"#/components/schemas/EquipmentImportSummary"},"warnings":{"items":{"$ref":"#/components/schemas/EquipmentImportRowIssue"},"type":"array","title":"Warnings"},"rows":{"items":{"$ref":"#/components/schemas/EquipmentImportPreviewRow"},"type":"array","title":"Rows"}},"type":"object","required":["summary","rows"],"title":"EquipmentImportPreviewResponse","example":{"rows":[{"action":"create_equipment","errors":[],"input":{"asset_label":"Jersey #24","attributes":{"number":"24","series":"2026-A","size":"L","type":"Home"},"category_id":"77777777-7777-7777-7777-777777777777","category_name":"Jersey","display_name":"Home Jersey #24","notes":"Blue home jersey","qr_tag_code":"4F9X2A","replacement_cost":95.0},"row_number":2,"status":"valid","team_id":"33333333-3333-3333-3333-333333333333","team_name":"Varsity Football","warnings":[]},{"action":"skipped_due_to_error","errors":[{"code":"invalid_replacement_cost","column":"Cost","field":"replacement_cost","message":"Replacement cost must be a numeric value.","original_value":"abc","severity":"error"}],"input":{"asset_label":"Jersey #25","attributes":{"number":"24","series":"2026-A","size":"L","type":"Home"},"category_id":"77777777-7777-7777-7777-777777777777","category_name":"Jersey","display_name":"Home Jersey #24","notes":"Blue home jersey","qr_tag_code":"4F9X2A"},"row_number":3,"status":"error","team_id":"33333333-3333-3333-3333-333333333333","team_name":"Varsity Football","warnings":[]}],"summary":{"error_rows":0,"total_rows":1,"valid_rows":1,"warning_rows":0}}},"EquipmentImportPreviewRow":{"properties":{"row_number":{"type":"integer","title":"Row Number"},"status":{"type":"string","title":"Status"},"action":{"type":"string","title":"Action"},"input":{"$ref":"#/components/schemas/EquipmentImportPreviewInput"},"team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"},"team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Name"},"warnings":{"items":{"$ref":"#/components/schemas/EquipmentImportRowIssue"},"type":"array","title":"Warnings"},"errors":{"items":{"$ref":"#/components/schemas/EquipmentImportRowIssue"},"type":"array","title":"Errors"}},"type":"object","required":["row_number","status","action","input","warnings","errors"],"title":"EquipmentImportPreviewRow"},"EquipmentImportRowIssue":{"properties":{"severity":{"type":"string","title":"Severity"},"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field"},"column":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Column"},"original_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Value"}},"type":"object","required":["severity","code","message"],"title":"EquipmentImportRowIssue","example":{"code":"invalid_replacement_cost","column":"Cost","field":"replacement_cost","message":"Replacement cost must be a numeric value.","original_value":"abc","severity":"error"}},"EquipmentImportSummary":{"properties":{"total_rows":{"type":"integer","title":"Total Rows"},"valid_rows":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Valid Rows"},"warning_rows":{"type":"integer","title":"Warning Rows"},"error_rows":{"type":"integer","title":"Error Rows"},"assets_created":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assets Created"},"categories_created":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Categories Created"},"qr_tags_linked":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Qr Tags Linked"},"qr_tags_created":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Qr Tags Created"},"rows_skipped":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rows Skipped"}},"type":"object","required":["total_rows","warning_rows","error_rows"],"title":"EquipmentImportSummary"},"EquipmentQrReplaceRequest":{"properties":{"new_code":{"type":"string","minLength":1,"title":"New Code"}},"type":"object","required":["new_code"],"title":"EquipmentQrReplaceRequest","example":{"new_code":"4F9X2A"}},"EquipmentQrReplaceResponse":{"properties":{"old_tag":{"anyOf":[{"$ref":"#/components/schemas/QrTagResponse"},{"type":"null"}]},"new_tag":{"$ref":"#/components/schemas/QrTagResponse"},"asset":{"anyOf":[{"$ref":"#/components/schemas/AssetResponse"},{"$ref":"#/components/schemas/InventoryAssetResponse"}],"title":"Asset"}},"type":"object","required":["old_tag","new_tag","asset"],"title":"EquipmentQrReplaceResponse","example":{"asset":{"asset_label":"Jersey #24","attributes":{"number":"24","series":"2026-A","size":"L","type":"Home"},"category":{"icon":"shirt","id":"77777777-7777-7777-7777-777777777777","is_system":true,"module":"athletics","name":"Jersey"},"category_id":"77777777-7777-7777-7777-777777777777","category_name":"Jersey","condition_status":"good","created_at":"2026-05-07T10:00:00Z","created_by_user_id":"11111111-1111-1111-1111-111111111111","current_season_id":"44444444-4444-4444-4444-444444444444","current_season_name":"Fall 2026","current_team_id":"33333333-3333-3333-3333-333333333333","current_team_name":"Varsity Football","display_name":"Home Jersey #24","effective_status":"available","id":"88888888-8888-8888-8888-888888888888","location_id":"bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb","needs_director_review":false,"notes":"Blue home jersey","purchase_cost":79.9,"purchase_date":"2026-01-15","qr_tag_code":"4F9X2A","qr_tag_id":"99999999-9999-9999-9999-999999999999","replacement_cost":95.0,"school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","serial_number":"SN-2026-0042","status":"available","updated_at":"2026-05-07T10:00:00Z"},"new_tag":{"asset_id":"88888888-8888-8888-8888-888888888888","claimed_at":"2026-05-07T10:05:00Z","created_at":"2026-05-07T10:00:00Z","generated_by_user_id":"11111111-1111-1111-1111-111111111111","id":"99999999-9999-9999-9999-999999999999","linked_at":"2026-05-07T10:05:00Z","qr_payload":"https://at.trackie-app.com/A1B2C34F9X2A","school_code":"A1B2C3","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","status":"linked","tag_code":"4F9X2A","updated_at":"2026-05-07T10:05:00Z"},"old_tag":{"asset_id":"88888888-8888-8888-8888-888888888888","claimed_at":"2026-05-07T10:05:00Z","created_at":"2026-05-07T10:00:00Z","generated_by_user_id":"11111111-1111-1111-1111-111111111111","id":"99999999-9999-9999-9999-999999999999","linked_at":"2026-05-07T10:05:00Z","qr_payload":"https://at.trackie-app.com/A1B2C38K2P7Q","school_code":"A1B2C3","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","status":"replaced","tag_code":"8K2P7Q","updated_at":"2026-05-07T10:05:00Z"}}},"EquipmentTransferRequest":{"properties":{"location_id":{"type":"string","format":"uuid","title":"Location Id","description":"Target home location for the equipment."},"notes":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Notes","description":"Optional note about the transfer."}},"type":"object","required":["location_id"],"title":"EquipmentTransferRequest","example":{"location_id":"bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb","notes":"Moved to the new storage room."}},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status"},"database":{"type":"string","title":"Database"}},"type":"object","required":["status","database"],"title":"HealthResponse"},"InventoryAssetResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"school_id":{"type":"string","format":"uuid","title":"School Id"},"category_id":{"type":"string","format":"uuid","title":"Category Id"},"category":{"$ref":"#/components/schemas/AssetCategorySummary"},"category_name":{"type":"string","title":"Category Name"},"asset_label":{"type":"string","title":"Asset Label"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"status":{"$ref":"#/components/schemas/AssetStatus"},"effective_status":{"$ref":"#/components/schemas/AssetStatus"},"condition_status":{"$ref":"#/components/schemas/AssetConditionStatus"},"replacement_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Replacement Cost"},"current_checkout_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Current Checkout Id"},"current_holder_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Current Holder User Id"},"current_holder_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Holder Name"},"created_by_user_id":{"type":"string","format":"uuid","title":"Created By User Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id"},"serial_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serial Number"},"purchase_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Purchase Date"},"purchase_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Purchase Cost"},"qr_tag_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Qr Tag Id"},"qr_tag_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qr Tag Code"},"attributes":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object","title":"Attributes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"}},"type":"object","required":["id","school_id","category_id","category","category_name","asset_label","display_name","status","effective_status","condition_status","replacement_cost","current_checkout_id","current_holder_user_id","current_holder_name","created_by_user_id","notes","location_id","serial_number","purchase_date","purchase_cost","qr_tag_id","qr_tag_code","attributes","created_at","updated_at"],"title":"InventoryAssetResponse","description":"The Inventory product's view of an asset: the core fields plus the\ninventory attachment (location, serial, purchase data, holder user).\nAthletics custody (player, team, season, director review) is not part\nof it. Shared routes answer with this model for Inventory tenants.","example":{"asset_label":"Sony FX6 #2","attributes":{"brand":"Sony","product_url":"https://example.com/fx6"},"category":{"icon":"camera","id":"77777777-7777-7777-7777-777777777777","is_system":false,"module":"inventory","name":"Cameras"},"category_id":"77777777-7777-7777-7777-777777777777","category_name":"Cameras","condition_status":"good","created_at":"2026-05-07T10:00:00Z","created_by_user_id":"11111111-1111-1111-1111-111111111111","effective_status":"available","id":"88888888-8888-8888-8888-888888888888","location_id":"bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb","notes":"Second body, usually in Studio 2.","purchase_cost":4890.0,"purchase_date":"2026-01-15","qr_tag_code":"4F9X2A","qr_tag_id":"99999999-9999-9999-9999-999999999999","replacement_cost":5200.0,"school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","serial_number":"FX6-000123","status":"available","updated_at":"2026-05-07T10:00:00Z"}},"InventoryCheckoutResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"school_id":{"type":"string","format":"uuid","title":"School Id"},"equipment_id":{"type":"string","format":"uuid","title":"Equipment Id"},"asset_id":{"type":"string","format":"uuid","title":"Asset Id"},"equipment_label":{"type":"string","title":"Equipment Label"},"equipment_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equipment Display Name"},"equipment_status":{"$ref":"#/components/schemas/AssetStatus"},"condition_status":{"$ref":"#/components/schemas/AssetConditionStatus"},"category_id":{"type":"string","format":"uuid","title":"Category Id"},"category_name":{"type":"string","title":"Category Name"},"holder_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Holder User Id"},"holder_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Holder Name"},"from_location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"From Location Id"},"checked_out_by_user_id":{"type":"string","format":"uuid","title":"Checked Out By User Id"},"checked_out_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checked Out By Name"},"checked_out_at":{"type":"string","format":"date-time","title":"Checked Out At"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"returned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Returned At"},"checked_in_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Checked In By User Id"},"status":{"$ref":"#/components/schemas/CheckoutStatus"},"effective_status":{"$ref":"#/components/schemas/CheckoutEffectiveStatus"},"is_overdue":{"type":"boolean","title":"Is Overdue"},"days_overdue":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days Overdue"},"checkout_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkout Notes"},"checkin_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkin Notes"},"asset":{"$ref":"#/components/schemas/InventoryAssetResponse"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"}},"type":"object","required":["id","school_id","equipment_id","asset_id","equipment_label","equipment_display_name","equipment_status","condition_status","category_id","category_name","holder_user_id","holder_name","from_location_id","checked_out_by_user_id","checked_out_by_name","checked_out_at","due_date","returned_at","checked_in_by_user_id","status","effective_status","is_overdue","days_overdue","checkout_notes","checkin_notes","asset","created_at","updated_at","archived_at"],"title":"InventoryCheckoutResponse","description":"The Inventory product's view of a checkout: custody by holder user and\nhome location, no roster, team or season. Shared routes answer with this\nmodel for Inventory tenants.","example":{"asset":{"asset_label":"Sony FX6 #2","attributes":{"brand":"Sony","product_url":"https://example.com/fx6"},"category":{"icon":"camera","id":"77777777-7777-7777-7777-777777777777","is_system":false,"module":"inventory","name":"Cameras"},"category_id":"77777777-7777-7777-7777-777777777777","category_name":"Cameras","condition_status":"good","created_at":"2026-05-07T10:00:00Z","created_by_user_id":"11111111-1111-1111-1111-111111111111","current_checkout_id":"12121212-1212-1212-1212-121212121212","current_holder_name":"Mika Member","current_holder_user_id":"22222222-2222-2222-2222-222222222222","effective_status":"available","id":"88888888-8888-8888-8888-888888888888","location_id":"bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb","notes":"Second body, usually in Studio 2.","purchase_cost":4890.0,"purchase_date":"2026-01-15","qr_tag_code":"4F9X2A","qr_tag_id":"99999999-9999-9999-9999-999999999999","replacement_cost":5200.0,"school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","serial_number":"FX6-000123","status":"checked_out","updated_at":"2026-05-07T10:00:00Z"},"asset_id":"88888888-8888-8888-8888-888888888888","category_id":"77777777-7777-7777-7777-777777777777","category_name":"Cameras","checked_out_at":"2026-08-15T16:00:00Z","checked_out_by_name":"Mika Member","checked_out_by_user_id":"22222222-2222-2222-2222-222222222222","checkout_notes":"Shoot in Hamburg","condition_status":"good","created_at":"2026-08-15T16:00:00Z","due_date":"2026-08-22","effective_status":"active","equipment_id":"88888888-8888-8888-8888-888888888888","equipment_label":"Sony FX6 #2","equipment_status":"checked_out","from_location_id":"bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb","holder_name":"Mika Member","holder_user_id":"22222222-2222-2222-2222-222222222222","id":"12121212-1212-1212-1212-121212121212","is_overdue":false,"school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","status":"active","updated_at":"2026-08-15T16:00:00Z"}},"InventoryDamageReportResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"school_id":{"type":"string","format":"uuid","title":"School Id"},"equipment_id":{"type":"string","format":"uuid","title":"Equipment Id"},"reported_by_user_id":{"type":"string","format":"uuid","title":"Reported By User Id"},"checkout_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Checkout Id"},"severity":{"$ref":"#/components/schemas/DamageReportSeverity"},"status":{"$ref":"#/components/schemas/DamageReportStatus"},"description":{"type":"string","title":"Description"},"repair_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repair Notes"},"condition_status_before":{"$ref":"#/components/schemas/AssetConditionStatus"},"condition_status_after":{"$ref":"#/components/schemas/AssetConditionStatus"},"equipment_status_before":{"$ref":"#/components/schemas/AssetStatus"},"equipment_status_after":{"$ref":"#/components/schemas/AssetStatus"},"estimated_repair_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimated Repair Cost"},"photo_count":{"type":"integer","title":"Photo Count"},"resolved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolved At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"}},"type":"object","required":["id","school_id","equipment_id","reported_by_user_id","checkout_id","severity","status","description","repair_notes","condition_status_before","condition_status_after","equipment_status_before","equipment_status_after","estimated_repair_cost","photo_count","resolved_at","created_at","updated_at"],"title":"InventoryDamageReportResponse","description":"The Inventory product's view of a damage report: no roster or player\nreferences. Shared routes answer with this model for Inventory tenants.","example":{"condition_status_after":"damaged","condition_status_before":"good","created_at":"2026-05-10T18:00:00Z","description":"Torn seam on the left shoulder.","equipment_id":"88888888-8888-8888-8888-888888888888","equipment_status_after":"damaged","equipment_status_before":"available","estimated_repair_cost":18.5,"id":"dddddddd-dddd-dddd-dddd-dddddddddddd","photo_count":0,"reported_by_user_id":"11111111-1111-1111-1111-111111111111","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","severity":"moderate","status":"open","updated_at":"2026-05-10T18:00:00Z"}},"InventoryDashboardCheckoutResponse":{"properties":{"active":{"type":"integer","title":"Active"},"overdue":{"type":"integer","title":"Overdue"}},"type":"object","required":["active","overdue"],"title":"InventoryDashboardCheckoutResponse"},"InventoryDashboardEquipmentResponse":{"properties":{"total":{"type":"integer","title":"Total"},"by_status":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Status"}},"type":"object","required":["total","by_status"],"title":"InventoryDashboardEquipmentResponse"},"InventoryDashboardLocationResponse":{"properties":{"total":{"type":"integer","title":"Total"}},"type":"object","required":["total"],"title":"InventoryDashboardLocationResponse"},"InventoryDashboardMaintenanceResponse":{"properties":{"open":{"type":"integer","title":"Open"},"due":{"type":"integer","title":"Due"}},"type":"object","required":["open","due"],"title":"InventoryDashboardMaintenanceResponse"},"InventoryDashboardMemberResponse":{"properties":{"total":{"type":"integer","title":"Total"}},"type":"object","required":["total"],"title":"InventoryDashboardMemberResponse"},"InventoryDashboardResponse":{"properties":{"product":{"type":"string","const":"inventory","title":"Product"},"equipment":{"$ref":"#/components/schemas/InventoryDashboardEquipmentResponse"},"checkouts":{"$ref":"#/components/schemas/InventoryDashboardCheckoutResponse"},"locations":{"$ref":"#/components/schemas/InventoryDashboardLocationResponse"},"members":{"$ref":"#/components/schemas/InventoryDashboardMemberResponse"},"maintenance":{"$ref":"#/components/schemas/InventoryDashboardMaintenanceResponse"}},"type":"object","required":["product","equipment","checkouts","locations","members","maintenance"],"title":"InventoryDashboardResponse","example":{"checkouts":{"active":8,"overdue":2},"equipment":{"by_status":{"available":30,"checked_out":8,"lost":3,"retired":1},"total":42},"locations":{"total":12},"maintenance":{"due":3,"open":1},"members":{"total":9},"product":"inventory"}},"InvitationAcceptRequest":{"properties":{"token":{"type":"string","title":"Token"},"full_name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Full Name"},"password":{"type":"string","minLength":8,"title":"Password"}},"type":"object","required":["token","password"],"title":"InvitationAcceptRequest","example":{"password":"example-password-123","token":"sample-trackie-token"}},"InvitationCreateRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"role":{"$ref":"#/components/schemas/UserRole"},"full_name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Full Name"},"assigned_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned Team Id"},"permissions":{"anyOf":[{"additionalProperties":{"type":"boolean"},"type":"object"},{"type":"null"}],"title":"Permissions","description":"Stored invitation permission toggles for future use. The current MVP backend does not enforce these flags yet."}},"type":"object","required":["email","role"],"title":"InvitationCreateRequest","example":{"assigned_team_id":"33333333-3333-3333-3333-333333333333","email":"coach.rivera@example.edu","full_name":"Coach Rivera","permissions":{"can_manage_equipment":true,"can_manage_roster":true,"can_view_reports":false},"role":"coach"}},"InvitationCreateResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","format":"email","title":"Email"},"role":{"$ref":"#/components/schemas/UserRole"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"assigned_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned Team Id"},"permissions":{"anyOf":[{"additionalProperties":{"type":"boolean"},"type":"object"},{"type":"null"}],"title":"Permissions","description":"Stored invitation permission toggles for future use. The current MVP backend does not enforce these flags yet."},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"acceptance_token":{"type":"string","title":"Acceptance Token"},"acceptance_url":{"type":"string","title":"Acceptance Url"}},"type":"object","required":["id","email","role","full_name","assigned_team_id","permissions","expires_at","acceptance_token","acceptance_url"],"title":"InvitationCreateResponse","example":{"acceptance_token":"sample-trackie-token","acceptance_url":"https://app.trackie.example/accept-invite?token=sample-trackie-token","assigned_team_id":"33333333-3333-3333-3333-333333333333","email":"coach.rivera@example.edu","expires_at":"2026-05-13T18:00:00Z","full_name":"Coach Rivera","id":"22222222-2222-2222-2222-222222222222","permissions":{"can_manage_equipment":true,"can_manage_roster":true,"can_view_reports":false},"role":"coach"}},"InvitationListResponse":{"properties":{"limit":{"type":"integer","title":"Limit","description":"Maximum number of items returned in this page."},"offset":{"type":"integer","title":"Offset","description":"Zero-based offset applied to the full result set."},"total":{"type":"integer","title":"Total","description":"Total number of items matching the same filters."},"items":{"items":{"$ref":"#/components/schemas/InvitationResponse"},"type":"array","title":"Items"}},"type":"object","required":["limit","offset","total","items"],"title":"InvitationListResponse","example":{"items":[{"acceptance_url":"https://app.trackie.example/accept-invite?token=sample-trackie-token","assigned_team":{"id":"33333333-3333-3333-3333-333333333333","name":"Varsity Football","sport":"Football"},"assigned_team_id":"33333333-3333-3333-3333-333333333333","created_at":"2026-05-06T18:00:00Z","email":"coach.rivera@example.edu","expires_at":"2026-05-13T18:00:00Z","full_name":"Coach Rivera","id":"22222222-2222-2222-2222-222222222222","permissions":{"can_manage_equipment":true,"can_manage_roster":true,"can_view_reports":false},"role":"coach","status":"pending","updated_at":"2026-05-06T18:00:00Z"}],"limit":50,"offset":0,"total":123}},"InvitationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","format":"email","title":"Email"},"role":{"$ref":"#/components/schemas/UserRole"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"assigned_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned Team Id"},"assigned_team":{"anyOf":[{"$ref":"#/components/schemas/InvitationTeamSummary"},{"type":"null"}]},"permissions":{"anyOf":[{"additionalProperties":{"type":"boolean"},"type":"object"},{"type":"null"}],"title":"Permissions","description":"Stored invitation permission toggles for future use. The current MVP backend does not enforce these flags yet."},"status":{"$ref":"#/components/schemas/InvitationStatus"},"acceptance_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Acceptance Url"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"accepted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Accepted At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","email","role","full_name","assigned_team_id","assigned_team","permissions","status","acceptance_url","expires_at","accepted_at","revoked_at","created_at","updated_at"],"title":"InvitationResponse","example":{"acceptance_url":"https://app.trackie.example/accept-invite?token=sample-trackie-token","assigned_team":{"id":"33333333-3333-3333-3333-333333333333","name":"Varsity Football","sport":"Football"},"assigned_team_id":"33333333-3333-3333-3333-333333333333","created_at":"2026-05-06T18:00:00Z","email":"coach.rivera@example.edu","expires_at":"2026-05-13T18:00:00Z","full_name":"Coach Rivera","id":"22222222-2222-2222-2222-222222222222","permissions":{"can_manage_equipment":true,"can_manage_roster":true,"can_view_reports":false},"role":"coach","status":"pending","updated_at":"2026-05-06T18:00:00Z"}},"InvitationRevokeRequest":{"properties":{"reason":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Reason","description":"Optional human-readable revoke note for future frontend use."}},"type":"object","title":"InvitationRevokeRequest","example":{"reason":"Created by mistake"}},"InvitationStatus":{"type":"string","enum":["pending","accepted","revoked","expired"],"title":"InvitationStatus"},"InvitationTeamSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"sport":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sport"}},"type":"object","required":["id","name","sport"],"title":"InvitationTeamSummary","example":{"id":"33333333-3333-3333-3333-333333333333","name":"Varsity Football","sport":"Football"}},"LocationCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Display name, unique among siblings."},"kind":{"$ref":"#/components/schemas/LocationKind","description":"Descriptive kind; the tree enforces no nesting rules."},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id","description":"Optional parent location; omit or null for a root location."},"code":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Code","description":"Optional short label for signage."},"notes":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Notes","description":"Optional operational notes."}},"type":"object","required":["name","kind"],"title":"LocationCreateRequest","example":{"code":"S2","kind":"room","name":"Studio 2","notes":"Second floor, left corridor.","parent_id":"cccccccc-cccc-cccc-cccc-cccccccccccc"}},"LocationKind":{"type":"string","enum":["country","city","site","room","shelf","other"],"title":"LocationKind","description":"Purely descriptive; the tree enforces no nesting rules between kinds."},"LocationListResponse":{"properties":{"limit":{"type":"integer","title":"Limit","description":"Maximum number of items returned in this page."},"offset":{"type":"integer","title":"Offset","description":"Zero-based offset applied to the full result set."},"total":{"type":"integer","title":"Total","description":"Total number of items matching the same filters."},"items":{"items":{"$ref":"#/components/schemas/LocationResponse"},"type":"array","title":"Items"}},"type":"object","required":["limit","offset","total","items"],"title":"LocationListResponse","example":{"items":[{"code":"S2","created_at":"2026-08-31T10:00:00Z","id":"bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb","kind":"room","name":"Studio 2","notes":"Second floor, left corridor.","parent_id":"cccccccc-cccc-cccc-cccc-cccccccccccc","updated_at":"2026-08-31T10:00:00Z"}],"limit":50,"offset":0,"total":12}},"LocationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"},"kind":{"$ref":"#/components/schemas/LocationKind"},"name":{"type":"string","title":"Name"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","parent_id","kind","name","code","notes","created_at","updated_at"],"title":"LocationResponse","example":{"code":"S2","created_at":"2026-08-31T10:00:00Z","id":"bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb","kind":"room","name":"Studio 2","notes":"Second floor, left corridor.","parent_id":"cccccccc-cccc-cccc-cccc-cccccccccccc","updated_at":"2026-08-31T10:00:00Z"}},"LocationTreeNode":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"},"kind":{"$ref":"#/components/schemas/LocationKind"},"name":{"type":"string","title":"Name"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"children":{"items":{"$ref":"#/components/schemas/LocationTreeNode"},"type":"array","title":"Children"}},"type":"object","required":["id","parent_id","kind","name","code","children"],"title":"LocationTreeNode"},"LocationUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name","description":"Updated display name, unique among siblings."},"kind":{"anyOf":[{"$ref":"#/components/schemas/LocationKind"},{"type":"null"}],"description":"Updated descriptive kind."},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id","description":"Updated parent location; explicit null moves the location to the root level."},"code":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Code","description":"Updated short label, or null to clear it."},"notes":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Notes","description":"Updated notes, or null to clear them."}},"type":"object","title":"LocationUpdateRequest","example":{"code":"S2B","kind":"room","name":"Studio 2b","notes":"Renamed after the rebuild."}},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequest","example":{"email":"marcus@example.edu","password":"example-password-123"}},"LogoutRequest":{"properties":{"refresh_token":{"type":"string","title":"Refresh Token"}},"type":"object","required":["refresh_token"],"title":"LogoutRequest"},"MaintenanceDueItemResponse":{"properties":{"asset_id":{"type":"string","format":"uuid","title":"Asset Id"},"asset_label":{"type":"string","title":"Asset Label"},"serial_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serial Number"},"location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id"},"interval_days":{"type":"integer","title":"Interval Days"},"last_maintained_at":{"type":"string","format":"date","title":"Last Maintained At"},"next_due":{"type":"string","format":"date","title":"Next Due"},"days_until_due":{"type":"integer","title":"Days Until Due","description":"Negative when the maintenance is overdue."}},"type":"object","required":["asset_id","asset_label","serial_number","location_id","interval_days","last_maintained_at","next_due","days_until_due"],"title":"MaintenanceDueItemResponse","example":{"asset_id":"88888888-8888-8888-8888-888888888888","asset_label":"Sony FX6 #2","days_until_due":-6,"interval_days":180,"last_maintained_at":"2026-03-01","location_id":"bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb","next_due":"2026-08-28","serial_number":"FX6-000123"}},"MaintenanceDueListResponse":{"properties":{"limit":{"type":"integer","title":"Limit","description":"Maximum number of items returned in this page."},"offset":{"type":"integer","title":"Offset","description":"Zero-based offset applied to the full result set."},"total":{"type":"integer","title":"Total","description":"Total number of items matching the same filters."},"items":{"items":{"$ref":"#/components/schemas/MaintenanceDueItemResponse"},"type":"array","title":"Items"}},"type":"object","required":["limit","offset","total","items"],"title":"MaintenanceDueListResponse","example":{"items":[{"asset_id":"88888888-8888-8888-8888-888888888888","asset_label":"Sony FX6 #2","days_until_due":-6,"interval_days":180,"last_maintained_at":"2026-03-01","location_id":"bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb","next_due":"2026-08-28","serial_number":"FX6-000123"}],"limit":50,"offset":0,"total":1}},"MaintenanceKind":{"type":"string","enum":["inspection","service","calibration","cleaning","repair"],"title":"MaintenanceKind"},"MaintenancePlanResponse":{"properties":{"asset_id":{"type":"string","format":"uuid","title":"Asset Id"},"asset_label":{"type":"string","title":"Asset Label"},"interval_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval Days","description":"Days between maintenances; null when the asset has no plan."},"last_maintained_at":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Last Maintained At","description":"Anchor date of the plan, moved forward by each completion."},"next_due":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Next Due","description":"last_maintained_at plus interval_days; null without a plan."},"is_due":{"type":"boolean","title":"Is Due","description":"True when next_due is today or in the past (tenant timezone)."},"open_record":{"anyOf":[{"$ref":"#/components/schemas/MaintenanceRecordResponse"},{"type":"null"}],"description":"The open maintenance record, if any. While one exists, Inventory checkouts of the asset answer 409 asset_in_maintenance."}},"type":"object","required":["asset_id","asset_label","interval_days","last_maintained_at","next_due","is_due","open_record"],"title":"MaintenancePlanResponse","example":{"asset_id":"88888888-8888-8888-8888-888888888888","asset_label":"Sony FX6 #2","interval_days":180,"is_due":true,"last_maintained_at":"2026-03-01","next_due":"2026-08-28","open_record":{"asset_id":"88888888-8888-8888-8888-888888888888","asset_label":"Sony FX6 #2","created_at":"2026-09-03T10:00:00Z","id":"dddddddd-dddd-dddd-dddd-dddddddddddd","kind":"service","notes":"Sensor cleaning and firmware update.","opened_by_user_id":"11111111-1111-1111-1111-111111111111","performed_by":"Sony Pro Service Berlin","scheduled_for":"2026-09-15","status":"open","updated_at":"2026-09-03T10:00:00Z"}}},"MaintenancePlanUpdateRequest":{"properties":{"interval_days":{"anyOf":[{"type":"integer","maximum":3650.0,"minimum":1.0},{"type":"null"}],"title":"Interval Days","description":"Days between maintenances. Explicit null removes the plan; omit the field to keep the current interval."},"last_maintained_at":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Last Maintained At","description":"Anchor date for the next due date. Omit to keep the current value; when an interval is set without an anchor, the purchase date is used, or today when there is none."}},"type":"object","title":"MaintenancePlanUpdateRequest","example":{"interval_days":180,"last_maintained_at":"2026-03-01"}},"MaintenanceRecordCompleteRequest":{"properties":{"completed_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Completed On","description":"Defaults to today in the tenant timezone; never in the future."},"cost":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Cost"},"performed_by":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Performed By"},"notes":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Notes"}},"type":"object","title":"MaintenanceRecordCompleteRequest","example":{"completed_on":"2026-09-16","cost":189.0,"notes":"Sensor cleaned, firmware 3.01.","performed_by":"Sony Pro Service Berlin"}},"MaintenanceRecordCreateRequest":{"properties":{"kind":{"$ref":"#/components/schemas/MaintenanceKind"},"scheduled_for":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Scheduled For","description":"Planned date, informational; the record is open regardless."},"performed_by":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Performed By","description":"Who does the work: a vendor or a colleague, free text."},"notes":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Notes"}},"type":"object","required":["kind"],"title":"MaintenanceRecordCreateRequest","example":{"kind":"service","notes":"Sensor cleaning and firmware update.","performed_by":"Sony Pro Service Berlin","scheduled_for":"2026-09-15"}},"MaintenanceRecordListResponse":{"properties":{"limit":{"type":"integer","title":"Limit","description":"Maximum number of items returned in this page."},"offset":{"type":"integer","title":"Offset","description":"Zero-based offset applied to the full result set."},"total":{"type":"integer","title":"Total","description":"Total number of items matching the same filters."},"items":{"items":{"$ref":"#/components/schemas/MaintenanceRecordResponse"},"type":"array","title":"Items"}},"type":"object","required":["limit","offset","total","items"],"title":"MaintenanceRecordListResponse","example":{"items":[{"asset_id":"88888888-8888-8888-8888-888888888888","asset_label":"Sony FX6 #2","created_at":"2026-09-03T10:00:00Z","id":"dddddddd-dddd-dddd-dddd-dddddddddddd","kind":"service","notes":"Sensor cleaning and firmware update.","opened_by_user_id":"11111111-1111-1111-1111-111111111111","performed_by":"Sony Pro Service Berlin","scheduled_for":"2026-09-15","status":"open","updated_at":"2026-09-03T10:00:00Z"}],"limit":50,"offset":0,"total":1}},"MaintenanceRecordResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"asset_id":{"type":"string","format":"uuid","title":"Asset Id"},"asset_label":{"type":"string","title":"Asset Label"},"kind":{"$ref":"#/components/schemas/MaintenanceKind"},"status":{"$ref":"#/components/schemas/MaintenanceRecordStatus"},"scheduled_for":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Scheduled For"},"completed_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Completed On"},"opened_by_user_id":{"type":"string","format":"uuid","title":"Opened By User Id"},"completed_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Completed By User Id"},"performed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Performed By"},"cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","asset_id","asset_label","kind","status","scheduled_for","completed_on","opened_by_user_id","completed_by_user_id","performed_by","cost","notes","created_at","updated_at"],"title":"MaintenanceRecordResponse","example":{"asset_id":"88888888-8888-8888-8888-888888888888","asset_label":"Sony FX6 #2","created_at":"2026-09-03T10:00:00Z","id":"dddddddd-dddd-dddd-dddd-dddddddddddd","kind":"service","notes":"Sensor cleaning and firmware update.","opened_by_user_id":"11111111-1111-1111-1111-111111111111","performed_by":"Sony Pro Service Berlin","scheduled_for":"2026-09-15","status":"open","updated_at":"2026-09-03T10:00:00Z"}},"MaintenanceRecordStatus":{"type":"string","enum":["open","completed"],"title":"MaintenanceRecordStatus"},"MeResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","format":"email","title":"Email"},"full_name":{"type":"string","title":"Full Name"},"role":{"$ref":"#/components/schemas/UserRole"},"school_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"School Id"},"school_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"School Code"},"capabilities":{"items":{"type":"string"},"type":"array","title":"Capabilities"},"organization":{"anyOf":[{"$ref":"#/components/schemas/OrganizationSummary"},{"type":"null"}]}},"type":"object","required":["id","email","full_name","role","school_id","school_code","capabilities","organization"],"title":"MeResponse"},"OrganizationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"product":{"$ref":"#/components/schemas/Product"},"timezone":{"type":"string","title":"Timezone"},"return_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Instructions"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Phone"},"show_equipment_name":{"type":"boolean","title":"Show Equipment Name"},"oidc_admin_groups":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Oidc Admin Groups"},"oidc_member_groups":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Oidc Member Groups"}},"type":"object","required":["id","name","product","timezone","return_instructions","contact_name","contact_email","contact_phone","show_equipment_name","oidc_admin_groups","oidc_member_groups"],"title":"OrganizationResponse"},"OrganizationSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"product":{"$ref":"#/components/schemas/Product"},"timezone":{"type":"string","title":"Timezone"}},"type":"object","required":["id","name","product","timezone"],"title":"OrganizationSummary"},"OrganizationUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"timezone":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Timezone"},"return_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Instructions"},"contact_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Contact Name"},"contact_email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"Contact Email"},"contact_phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Contact Phone"},"show_equipment_name":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Equipment Name"},"oidc_admin_groups":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Oidc Admin Groups"},"oidc_member_groups":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Oidc Member Groups"}},"type":"object","title":"OrganizationUpdateRequest"},"PasswordResetConfirmRequest":{"properties":{"token":{"type":"string","minLength":1,"title":"Token"},"password":{"type":"string","minLength":8,"title":"Password"}},"type":"object","required":["token","password"],"title":"PasswordResetConfirmRequest","example":{"password":"new-example-password-123","token":"sample-token"}},"PasswordResetRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"PasswordResetRequest","example":{"email":"coach.rivera@example.edu"}},"PasswordResetRequestResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"PasswordResetRequestResponse","example":{"message":"If an account exists for that email, a password reset link has been sent."}},"PlayerCreateRequest":{"properties":{"full_name":{"type":"string","minLength":1,"title":"Full Name","description":"Full name of the player."},"student_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Student Email","description":"Optional student email address."},"parent_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Parent Email","description":"Optional parent or guardian email address."}},"type":"object","required":["full_name"],"title":"PlayerCreateRequest","example":{"full_name":"Devon Carter","parent_email":"parent.carter@example.com","student_email":"devon.carter@example.edu"}},"PlayerImportColumnMapping":{"properties":{"full_name":{"type":"string","minLength":1,"title":"Full Name"},"student_email":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Student Email"},"parent_email":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Parent Email"}},"type":"object","required":["full_name"],"title":"PlayerImportColumnMapping","example":{"full_name":"Name","parent_email":"Parent Email","student_email":"Student Email"}},"PlayerImportCommitRequest":{"properties":{"csv_text":{"type":"string","minLength":1,"title":"Csv Text"},"column_mapping":{"$ref":"#/components/schemas/PlayerImportColumnMapping"},"options":{"$ref":"#/components/schemas/PlayerImportOptions"}},"type":"object","required":["csv_text","column_mapping"],"title":"PlayerImportCommitRequest","example":{"column_mapping":{"full_name":"Name","parent_email":"Parent Email","student_email":"Student Email"},"csv_text":"Name,Student Email,Parent Email\nDevon Carter,devon.carter@example.edu,\n","options":{"match_existing_players_by_email":true,"skip_rows_with_errors":true}}},"PlayerImportCommitResponse":{"properties":{"summary":{"$ref":"#/components/schemas/PlayerImportSummary"},"created_players":{"items":{"$ref":"#/components/schemas/PlayerImportCreatedPlayer"},"type":"array","title":"Created Players"},"rows":{"items":{"$ref":"#/components/schemas/PlayerImportCommitRow"},"type":"array","title":"Rows"}},"type":"object","required":["summary","created_players","rows"],"title":"PlayerImportCommitResponse"},"PlayerImportCommitRow":{"properties":{"row_number":{"type":"integer","title":"Row Number"},"status":{"type":"string","title":"Status"},"action":{"type":"string","title":"Action"},"player_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Player Id"},"warnings":{"items":{"$ref":"#/components/schemas/PlayerImportRowIssue"},"type":"array","title":"Warnings"},"errors":{"items":{"$ref":"#/components/schemas/PlayerImportRowIssue"},"type":"array","title":"Errors"}},"type":"object","required":["row_number","status","action","warnings","errors"],"title":"PlayerImportCommitRow"},"PlayerImportCreatedPlayer":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"full_name":{"type":"string","title":"Full Name"},"student_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Student Email"},"parent_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Parent Email"}},"type":"object","required":["id","full_name","student_email","parent_email"],"title":"PlayerImportCreatedPlayer"},"PlayerImportMatchedPlayer":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"full_name":{"type":"string","title":"Full Name"},"student_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Student Email"}},"type":"object","required":["id","full_name","student_email"],"title":"PlayerImportMatchedPlayer"},"PlayerImportOptions":{"properties":{"skip_rows_with_errors":{"type":"boolean","title":"Skip Rows With Errors","default":true},"match_existing_players_by_email":{"type":"boolean","title":"Match Existing Players By Email","default":true}},"type":"object","title":"PlayerImportOptions","example":{"match_existing_players_by_email":true,"skip_rows_with_errors":true}},"PlayerImportPreviewRequest":{"properties":{"csv_text":{"type":"string","minLength":1,"title":"Csv Text"},"column_mapping":{"$ref":"#/components/schemas/PlayerImportColumnMapping"}},"type":"object","required":["csv_text","column_mapping"],"title":"PlayerImportPreviewRequest","example":{"column_mapping":{"full_name":"Name","parent_email":"Parent Email","student_email":"Student Email"},"csv_text":"Name,Student Email,Parent Email\nDevon Carter,devon.carter@example.edu,\nAlex Morgan,,\n"}},"PlayerImportPreviewResponse":{"properties":{"summary":{"$ref":"#/components/schemas/PlayerImportSummary"},"rows":{"items":{"$ref":"#/components/schemas/PlayerImportPreviewRow"},"type":"array","title":"Rows"}},"type":"object","required":["summary","rows"],"title":"PlayerImportPreviewResponse"},"PlayerImportPreviewRow":{"properties":{"row_number":{"type":"integer","title":"Row Number"},"status":{"type":"string","title":"Status"},"action":{"type":"string","title":"Action"},"input":{"$ref":"#/components/schemas/PlayerImportRowInput"},"matched_player":{"anyOf":[{"$ref":"#/components/schemas/PlayerImportMatchedPlayer"},{"type":"null"}]},"warnings":{"items":{"$ref":"#/components/schemas/PlayerImportRowIssue"},"type":"array","title":"Warnings"},"errors":{"items":{"$ref":"#/components/schemas/PlayerImportRowIssue"},"type":"array","title":"Errors"}},"type":"object","required":["row_number","status","action","input","matched_player","warnings","errors"],"title":"PlayerImportPreviewRow"},"PlayerImportRowInput":{"properties":{"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"student_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Student Email"},"parent_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Email"}},"type":"object","required":["full_name","student_email","parent_email"],"title":"PlayerImportRowInput"},"PlayerImportRowIssue":{"properties":{"severity":{"type":"string","title":"Severity"},"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field"},"column":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Column"},"original_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Value"}},"type":"object","required":["severity","code","message"],"title":"PlayerImportRowIssue","example":{"code":"invalid_student_email","column":"Student Email","field":"student_email","message":"Student Email must be a valid email address.","original_value":"not-an-email","severity":"error"}},"PlayerImportSummary":{"properties":{"total_rows":{"type":"integer","title":"Total Rows"},"valid_rows":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Valid Rows"},"warning_rows":{"type":"integer","title":"Warning Rows"},"error_rows":{"type":"integer","title":"Error Rows"},"players_created":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Players Created"},"players_matched":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Players Matched"}},"type":"object","required":["total_rows","warning_rows","error_rows"],"title":"PlayerImportSummary"},"PlayerListResponse":{"properties":{"limit":{"type":"integer","title":"Limit","description":"Maximum number of items returned in this page."},"offset":{"type":"integer","title":"Offset","description":"Zero-based offset applied to the full result set."},"total":{"type":"integer","title":"Total","description":"Total number of items matching the same filters."},"items":{"items":{"$ref":"#/components/schemas/PlayerResponse"},"type":"array","title":"Items"}},"type":"object","required":["limit","offset","total","items"],"title":"PlayerListResponse","example":{"items":[{"created_at":"2026-05-06T18:00:00Z","full_name":"Devon Carter","id":"55555555-5555-5555-5555-555555555555","parent_email":"parent.carter@example.com","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","student_email":"devon.carter@example.edu","updated_at":"2026-05-06T18:00:00Z"}],"limit":50,"offset":0,"total":123}},"PlayerResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"school_id":{"type":"string","format":"uuid","title":"School Id"},"full_name":{"type":"string","title":"Full Name"},"student_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Student Email"},"parent_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Parent Email"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"}},"type":"object","required":["id","school_id","full_name","student_email","parent_email","created_at","updated_at"],"title":"PlayerResponse","example":{"created_at":"2026-05-06T18:00:00Z","full_name":"Devon Carter","id":"55555555-5555-5555-5555-555555555555","parent_email":"parent.carter@example.com","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","student_email":"devon.carter@example.edu","updated_at":"2026-05-06T18:00:00Z"}},"PlayerUpdateRequest":{"properties":{"full_name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Full Name","description":"Updated full name for the player."},"student_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Student Email","description":"Updated student email address, or null to clear it."},"parent_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Parent Email","description":"Updated parent email address, or null to clear it."}},"type":"object","title":"PlayerUpdateRequest","example":{"full_name":"Devon Carter","parent_email":"parent.carter@example.com","student_email":"devon.carter@example.edu"}},"Product":{"type":"string","enum":["athletics","inventory"],"title":"Product"},"PublicCodeLookupResponse":{"properties":{"found":{"type":"boolean","title":"Found"},"code":{"type":"string","title":"Code"},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name"},"return_title":{"type":"string","title":"Return Title"},"return_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Instructions"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Phone"},"equipment_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equipment Name"},"show_equipment_name":{"type":"boolean","title":"Show Equipment Name"}},"type":"object","required":["found","code","organization_name","return_title","return_instructions","contact_name","contact_email","contact_phone","equipment_name","show_equipment_name"],"title":"PublicCodeLookupResponse","example":{"code":"A1B2C34F9X2A","found":true,"organization_name":"Lincoln High","return_instructions":"Bring this item to the athletic department.","return_title":"Return this item","show_equipment_name":false}},"QrRecommendedAction":{"type":"string","enum":["check_out","check_in_later","assign_team","set_up_equipment","replace_tag","no_action"],"title":"QrRecommendedAction"},"QrResolveResult":{"type":"string","enum":["linked","unclaimed","unknown","inactive","replaced","archived"],"title":"QrResolveResult"},"QrTagGenerateRequest":{"properties":{"count":{"type":"integer","maximum":500.0,"minimum":1.0,"title":"Count"},"prefix":{"type":"string","minLength":1,"title":"Prefix","default":"TRK"}},"type":"object","required":["count"],"title":"QrTagGenerateRequest","example":{"count":100}},"QrTagGenerateResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/QrTagResponse"},"type":"array","title":"Items"},"csv_text":{"type":"string","title":"Csv Text"}},"type":"object","required":["items","csv_text"],"title":"QrTagGenerateResponse","example":{"csv_text":"school_code,eq_id,qr_payload,status,asset_id\nA1B2C3,4F9X2A,https://at.trackie-app.com/A1B2C34F9X2A,unclaimed,\n","items":[{"asset_id":"88888888-8888-8888-8888-888888888888","claimed_at":"2026-05-07T10:05:00Z","created_at":"2026-05-07T10:00:00Z","generated_by_user_id":"11111111-1111-1111-1111-111111111111","id":"99999999-9999-9999-9999-999999999999","linked_at":"2026-05-07T10:05:00Z","qr_payload":"https://at.trackie-app.com/A1B2C34F9X2A","school_code":"A1B2C3","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","status":"linked","tag_code":"4F9X2A","updated_at":"2026-05-07T10:05:00Z"}]}},"QrTagLinkRequest":{"properties":{"asset_id":{"type":"string","format":"uuid","title":"Asset Id"}},"type":"object","required":["asset_id"],"title":"QrTagLinkRequest","example":{"asset_id":"88888888-8888-8888-8888-888888888888"}},"QrTagLinkResponse":{"properties":{"tag":{"$ref":"#/components/schemas/QrTagResponse"},"asset":{"anyOf":[{"$ref":"#/components/schemas/AssetResponse"},{"$ref":"#/components/schemas/InventoryAssetResponse"}],"title":"Asset"}},"type":"object","required":["tag","asset"],"title":"QrTagLinkResponse","example":{"asset":{"asset_label":"Jersey #24","attributes":{"number":"24","series":"2026-A","size":"L","type":"Home"},"category":{"icon":"shirt","id":"77777777-7777-7777-7777-777777777777","is_system":true,"module":"athletics","name":"Jersey"},"category_id":"77777777-7777-7777-7777-777777777777","category_name":"Jersey","condition_status":"good","created_at":"2026-05-07T10:00:00Z","created_by_user_id":"11111111-1111-1111-1111-111111111111","current_season_id":"44444444-4444-4444-4444-444444444444","current_season_name":"Fall 2026","current_team_id":"33333333-3333-3333-3333-333333333333","current_team_name":"Varsity Football","display_name":"Home Jersey #24","effective_status":"available","id":"88888888-8888-8888-8888-888888888888","location_id":"bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb","needs_director_review":false,"notes":"Blue home jersey","purchase_cost":79.9,"purchase_date":"2026-01-15","qr_tag_code":"4F9X2A","qr_tag_id":"99999999-9999-9999-9999-999999999999","replacement_cost":95.0,"school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","serial_number":"SN-2026-0042","status":"available","updated_at":"2026-05-07T10:00:00Z"},"tag":{"asset_id":"88888888-8888-8888-8888-888888888888","claimed_at":"2026-05-07T10:05:00Z","created_at":"2026-05-07T10:00:00Z","generated_by_user_id":"11111111-1111-1111-1111-111111111111","id":"99999999-9999-9999-9999-999999999999","linked_at":"2026-05-07T10:05:00Z","qr_payload":"https://at.trackie-app.com/A1B2C34F9X2A","school_code":"A1B2C3","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","status":"linked","tag_code":"4F9X2A","updated_at":"2026-05-07T10:05:00Z"}}},"QrTagListResponse":{"properties":{"limit":{"type":"integer","title":"Limit","description":"Maximum number of items returned in this page."},"offset":{"type":"integer","title":"Offset","description":"Zero-based offset applied to the full result set."},"total":{"type":"integer","title":"Total","description":"Total number of items matching the same filters."},"items":{"items":{"$ref":"#/components/schemas/QrTagResponse"},"type":"array","title":"Items"}},"type":"object","required":["limit","offset","total","items"],"title":"QrTagListResponse","example":{"items":[{"asset_id":"88888888-8888-8888-8888-888888888888","claimed_at":"2026-05-07T10:05:00Z","created_at":"2026-05-07T10:00:00Z","generated_by_user_id":"11111111-1111-1111-1111-111111111111","id":"99999999-9999-9999-9999-999999999999","linked_at":"2026-05-07T10:05:00Z","qr_payload":"https://at.trackie-app.com/A1B2C34F9X2A","school_code":"A1B2C3","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","status":"linked","tag_code":"4F9X2A","updated_at":"2026-05-07T10:05:00Z"}],"limit":50,"offset":0,"total":123}},"QrTagResolveRequest":{"properties":{"code":{"type":"string","minLength":1,"title":"Code"}},"type":"object","required":["code"],"title":"QrTagResolveRequest","example":{"code":"https://at.trackie-app.com/A1B2C34F9X2A"}},"QrTagResolveResponse":{"properties":{"result":{"$ref":"#/components/schemas/QrResolveResult"},"tag":{"anyOf":[{"$ref":"#/components/schemas/QrTagResponse"},{"type":"null"}]},"asset":{"anyOf":[{"$ref":"#/components/schemas/AssetResponse"},{"$ref":"#/components/schemas/InventoryAssetResponse"},{"type":"null"}],"title":"Asset"},"recommended_action":{"$ref":"#/components/schemas/QrRecommendedAction"},"message":{"type":"string","title":"Message"},"active_checkout_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Active Checkout Id"},"active_checkout_effective_status":{"anyOf":[{"$ref":"#/components/schemas/CheckoutEffectiveStatus"},{"type":"null"}]}},"type":"object","required":["result","tag","asset","recommended_action","message"],"title":"QrTagResolveResponse","example":{"active_checkout_effective_status":"active","active_checkout_id":"12121212-1212-1212-1212-121212121212","asset":{"asset_label":"Jersey #24","attributes":{"number":"24","series":"2026-A","size":"L","type":"Home"},"category":{"icon":"shirt","id":"77777777-7777-7777-7777-777777777777","is_system":true,"module":"athletics","name":"Jersey"},"category_id":"77777777-7777-7777-7777-777777777777","category_name":"Jersey","condition_status":"good","created_at":"2026-05-07T10:00:00Z","created_by_user_id":"11111111-1111-1111-1111-111111111111","current_season_id":"44444444-4444-4444-4444-444444444444","current_season_name":"Fall 2026","current_team_id":"33333333-3333-3333-3333-333333333333","current_team_name":"Varsity Football","display_name":"Home Jersey #24","effective_status":"available","id":"88888888-8888-8888-8888-888888888888","location_id":"bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb","needs_director_review":false,"notes":"Blue home jersey","purchase_cost":79.9,"purchase_date":"2026-01-15","qr_tag_code":"4F9X2A","qr_tag_id":"99999999-9999-9999-9999-999999999999","replacement_cost":95.0,"school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","serial_number":"SN-2026-0042","status":"available","updated_at":"2026-05-07T10:00:00Z"},"message":"Equipment found.","recommended_action":"check_out","result":"linked","tag":{"asset_id":"88888888-8888-8888-8888-888888888888","claimed_at":"2026-05-07T10:05:00Z","created_at":"2026-05-07T10:00:00Z","generated_by_user_id":"11111111-1111-1111-1111-111111111111","id":"99999999-9999-9999-9999-999999999999","linked_at":"2026-05-07T10:05:00Z","qr_payload":"https://at.trackie-app.com/A1B2C34F9X2A","school_code":"A1B2C3","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","status":"linked","tag_code":"4F9X2A","updated_at":"2026-05-07T10:05:00Z"}}},"QrTagResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"tag_code":{"type":"string","title":"Tag Code"},"school_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"School Code"},"qr_payload":{"type":"string","title":"Qr Payload"},"status":{"$ref":"#/components/schemas/QrTagStatus"},"school_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"School Id"},"asset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Asset Id"},"generated_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Generated By User Id"},"claimed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Claimed At"},"linked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Linked At"},"deactivated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deactivated At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"}},"type":"object","required":["id","tag_code","school_code","qr_payload","status","school_id","asset_id","generated_by_user_id","claimed_at","linked_at","deactivated_at","created_at","updated_at","archived_at"],"title":"QrTagResponse","example":{"asset_id":"88888888-8888-8888-8888-888888888888","claimed_at":"2026-05-07T10:05:00Z","created_at":"2026-05-07T10:00:00Z","generated_by_user_id":"11111111-1111-1111-1111-111111111111","id":"99999999-9999-9999-9999-999999999999","linked_at":"2026-05-07T10:05:00Z","qr_payload":"https://at.trackie-app.com/A1B2C34F9X2A","school_code":"A1B2C3","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","status":"linked","tag_code":"4F9X2A","updated_at":"2026-05-07T10:05:00Z"}},"QrTagStatus":{"type":"string","enum":["unclaimed","linked","inactive","replaced","archived"],"title":"QrTagStatus"},"RefreshRequest":{"properties":{"refresh_token":{"type":"string","title":"Refresh Token"}},"type":"object","required":["refresh_token"],"title":"RefreshRequest"},"RootResponse":{"properties":{"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"},"docs":{"type":"string","title":"Docs"},"health":{"type":"string","title":"Health"}},"type":"object","required":["name","status","docs","health"],"title":"RootResponse"},"RosterImportColumnMapping":{"properties":{"full_name":{"type":"string","minLength":1,"title":"Full Name"},"student_email":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Student Email"},"parent_email":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Parent Email"},"team":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Team"},"roster_number":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Roster Number"}},"type":"object","required":["full_name"],"title":"RosterImportColumnMapping","example":{"full_name":"Name","parent_email":"Parent Email","roster_number":"Number","student_email":"Email","team":"Team"}},"RosterImportCommitRequest":{"properties":{"team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"},"season_id":{"type":"string","format":"uuid","title":"Season Id"},"csv_text":{"type":"string","minLength":1,"title":"Csv Text"},"column_mapping":{"$ref":"#/components/schemas/RosterImportColumnMapping"},"options":{"$ref":"#/components/schemas/RosterImportOptions"}},"type":"object","required":["season_id","csv_text","column_mapping","options"],"title":"RosterImportCommitRequest","example":{"column_mapping":{"full_name":"Name","parent_email":"Parent Email","roster_number":"Number","student_email":"Email","team":"Team"},"csv_text":"Name,Email,Parent Email,Team,Number\nDevon Carter,devon.carter@example.edu,,Varsity Football,24","options":{"create_missing_players":true,"match_existing_players_by_email":true,"skip_rows_with_errors":true},"season_id":"44444444-4444-4444-4444-444444444444","team_id":"33333333-3333-3333-3333-333333333333"}},"RosterImportCommitResponse":{"properties":{"summary":{"$ref":"#/components/schemas/RosterImportSummary"},"created_players":{"items":{"$ref":"#/components/schemas/RosterImportCreatedPlayer"},"type":"array","title":"Created Players"},"created_memberships":{"items":{"$ref":"#/components/schemas/RosterImportCreatedMembership"},"type":"array","title":"Created Memberships"},"rows":{"items":{"$ref":"#/components/schemas/RosterImportCommitRow"},"type":"array","title":"Rows"}},"type":"object","required":["summary","created_players","created_memberships","rows"],"title":"RosterImportCommitResponse","example":{"created_memberships":[{"id":"66666666-6666-6666-6666-666666666666","player_id":"55555555-5555-5555-5555-555555555555","roster_number":"24","season_id":"44444444-4444-4444-4444-444444444444","team_id":"33333333-3333-3333-3333-333333333333","team_name":"Varsity Football"}],"created_players":[{"full_name":"Devon Carter","id":"55555555-5555-5555-5555-555555555555","student_email":"devon.carter@example.edu"}],"rows":[{"action":"create_player_and_membership","errors":[],"membership_id":"66666666-6666-6666-6666-666666666666","player_id":"55555555-5555-5555-5555-555555555555","row_number":2,"status":"imported","warnings":[]}],"summary":{"error_rows":0,"memberships_created":2,"memberships_skipped":0,"players_created":1,"players_matched":1,"total_rows":2,"warning_rows":1}}},"RosterImportCommitRow":{"properties":{"row_number":{"type":"integer","title":"Row Number"},"status":{"type":"string","title":"Status"},"action":{"type":"string","title":"Action"},"player_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Player Id"},"membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Membership Id"},"warnings":{"items":{"$ref":"#/components/schemas/RosterImportRowIssue"},"type":"array","title":"Warnings"},"errors":{"items":{"$ref":"#/components/schemas/RosterImportRowIssue"},"type":"array","title":"Errors"}},"type":"object","required":["row_number","status","action","warnings","errors"],"title":"RosterImportCommitRow"},"RosterImportCreatedMembership":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"player_id":{"type":"string","format":"uuid","title":"Player Id"},"team_id":{"type":"string","format":"uuid","title":"Team Id"},"team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Name"},"season_id":{"type":"string","format":"uuid","title":"Season Id"},"roster_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Roster Number"}},"type":"object","required":["id","player_id","team_id","season_id","roster_number"],"title":"RosterImportCreatedMembership"},"RosterImportCreatedPlayer":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"full_name":{"type":"string","title":"Full Name"},"student_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Student Email"},"parent_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Parent Email"}},"type":"object","required":["id","full_name","student_email","parent_email"],"title":"RosterImportCreatedPlayer"},"RosterImportMatchedPlayer":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"full_name":{"type":"string","title":"Full Name"},"student_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Student Email"}},"type":"object","required":["id","full_name","student_email"],"title":"RosterImportMatchedPlayer"},"RosterImportOptions":{"properties":{"skip_rows_with_errors":{"type":"boolean","title":"Skip Rows With Errors","default":true},"create_missing_players":{"type":"boolean","title":"Create Missing Players","default":true},"match_existing_players_by_email":{"type":"boolean","title":"Match Existing Players By Email","default":true}},"type":"object","title":"RosterImportOptions","example":{"create_missing_players":true,"match_existing_players_by_email":true,"skip_rows_with_errors":true}},"RosterImportPreviewRequest":{"properties":{"team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"},"season_id":{"type":"string","format":"uuid","title":"Season Id"},"csv_text":{"type":"string","minLength":1,"title":"Csv Text"},"column_mapping":{"$ref":"#/components/schemas/RosterImportColumnMapping"}},"type":"object","required":["season_id","csv_text","column_mapping"],"title":"RosterImportPreviewRequest","example":{"column_mapping":{"full_name":"Name","parent_email":"Parent Email","roster_number":"Number","student_email":"Email","team":"Team"},"csv_text":"Name,Email,Parent Email,Team,Number\nDevon Carter,devon.carter@example.edu,,Varsity Football,24","season_id":"44444444-4444-4444-4444-444444444444","team_id":"33333333-3333-3333-3333-333333333333"}},"RosterImportPreviewResponse":{"properties":{"summary":{"$ref":"#/components/schemas/RosterImportSummary"},"rows":{"items":{"$ref":"#/components/schemas/RosterImportPreviewRow"},"type":"array","title":"Rows"}},"type":"object","required":["summary","rows"],"title":"RosterImportPreviewResponse","example":{"rows":[{"action":"create_player_and_membership","errors":[],"input":{"full_name":"Devon Carter","roster_number":"24","student_email":"devon.carter@example.edu","team_name":"Varsity Football"},"row_number":2,"status":"valid","team_id":"33333333-3333-3333-3333-333333333333","team_name":"Varsity Football","warnings":[]},{"action":"use_existing_player_and_create_membership","errors":[],"input":{"full_name":"Alex Morgan","roster_number":"12","student_email":"alex.morgan@example.edu","team_name":"Varsity Football"},"matched_player":{"full_name":"Alex Morgan","id":"55555555-5555-5555-5555-555555555555","student_email":"alex.morgan@example.edu"},"row_number":3,"status":"warning","team_id":"33333333-3333-3333-3333-333333333333","team_name":"Varsity Football","warnings":[{"code":"existing_player_matched","column":"Email","field":"student_email","message":"Existing player matched by student email.","original_value":"alex.morgan@example.edu","severity":"warning"}]}],"summary":{"error_rows":0,"total_rows":2,"valid_rows":1,"warning_rows":1}}},"RosterImportPreviewRow":{"properties":{"row_number":{"type":"integer","title":"Row Number"},"status":{"type":"string","title":"Status"},"action":{"type":"string","title":"Action"},"input":{"$ref":"#/components/schemas/RosterImportRowInput"},"matched_player":{"anyOf":[{"$ref":"#/components/schemas/RosterImportMatchedPlayer"},{"type":"null"}]},"team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"},"team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Name"},"warnings":{"items":{"$ref":"#/components/schemas/RosterImportRowIssue"},"type":"array","title":"Warnings"},"errors":{"items":{"$ref":"#/components/schemas/RosterImportRowIssue"},"type":"array","title":"Errors"}},"type":"object","required":["row_number","status","action","input","matched_player","warnings","errors"],"title":"RosterImportPreviewRow"},"RosterImportRowInput":{"properties":{"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"student_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Student Email"},"parent_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Email"},"team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Name"},"roster_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Roster Number"}},"type":"object","required":["full_name","student_email","parent_email","roster_number"],"title":"RosterImportRowInput","example":{"full_name":"Devon Carter","roster_number":"24","student_email":"devon.carter@example.edu","team_name":"Varsity Football"}},"RosterImportRowIssue":{"properties":{"severity":{"type":"string","title":"Severity"},"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field"},"column":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Column"},"original_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Value"}},"type":"object","required":["severity","code","message"],"title":"RosterImportRowIssue","example":{"code":"invalid_student_email","column":"Email","field":"student_email","message":"Student Email must be a valid email address.","original_value":"not-an-email","severity":"error"}},"RosterImportSummary":{"properties":{"total_rows":{"type":"integer","title":"Total Rows"},"valid_rows":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Valid Rows"},"warning_rows":{"type":"integer","title":"Warning Rows"},"error_rows":{"type":"integer","title":"Error Rows"},"players_created":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Players Created"},"players_matched":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Players Matched"},"memberships_created":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Memberships Created"},"memberships_skipped":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Memberships Skipped"}},"type":"object","required":["total_rows","warning_rows","error_rows"],"title":"RosterImportSummary"},"RosterMembershipCreateRequest":{"properties":{"player_id":{"type":"string","format":"uuid","title":"Player Id"},"team_id":{"type":"string","format":"uuid","title":"Team Id"},"season_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Season Id","description":"Season for the membership. Defaults to the team's effective current season when omitted."},"roster_number":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Roster Number","description":"Optional jersey or roster number."}},"type":"object","required":["player_id","team_id"],"title":"RosterMembershipCreateRequest","example":{"player_id":"55555555-5555-5555-5555-555555555555","roster_number":"24","season_id":"44444444-4444-4444-4444-444444444444","team_id":"33333333-3333-3333-3333-333333333333"}},"RosterMembershipListResponse":{"properties":{"limit":{"type":"integer","title":"Limit","description":"Maximum number of items returned in this page."},"offset":{"type":"integer","title":"Offset","description":"Zero-based offset applied to the full result set."},"total":{"type":"integer","title":"Total","description":"Total number of items matching the same filters."},"items":{"items":{"$ref":"#/components/schemas/RosterMembershipResponse"},"type":"array","title":"Items"}},"type":"object","required":["limit","offset","total","items"],"title":"RosterMembershipListResponse","example":{"items":[{"created_at":"2026-05-06T18:00:00Z","id":"66666666-6666-6666-6666-666666666666","is_active":true,"player":{"created_at":"2026-05-06T18:00:00Z","full_name":"Devon Carter","id":"55555555-5555-5555-5555-555555555555","parent_email":"parent.carter@example.com","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","student_email":"devon.carter@example.edu","updated_at":"2026-05-06T18:00:00Z"},"player_id":"55555555-5555-5555-5555-555555555555","roster_number":"24","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","season_id":"44444444-4444-4444-4444-444444444444","team_id":"33333333-3333-3333-3333-333333333333","updated_at":"2026-05-06T18:00:00Z"}],"limit":50,"offset":0,"total":123}},"RosterMembershipResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"school_id":{"type":"string","format":"uuid","title":"School Id"},"player_id":{"type":"string","format":"uuid","title":"Player Id"},"team_id":{"type":"string","format":"uuid","title":"Team Id"},"season_id":{"type":"string","format":"uuid","title":"Season Id"},"roster_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Roster Number"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"},"player":{"$ref":"#/components/schemas/PlayerResponse"}},"type":"object","required":["id","school_id","player_id","team_id","season_id","roster_number","is_active","created_at","updated_at","player"],"title":"RosterMembershipResponse","example":{"created_at":"2026-05-06T18:00:00Z","id":"66666666-6666-6666-6666-666666666666","is_active":true,"player":{"created_at":"2026-05-06T18:00:00Z","full_name":"Devon Carter","id":"55555555-5555-5555-5555-555555555555","parent_email":"parent.carter@example.com","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","student_email":"devon.carter@example.edu","updated_at":"2026-05-06T18:00:00Z"},"player_id":"55555555-5555-5555-5555-555555555555","roster_number":"24","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","season_id":"44444444-4444-4444-4444-444444444444","team_id":"33333333-3333-3333-3333-333333333333","updated_at":"2026-05-06T18:00:00Z"}},"RosterMembershipUpdateRequest":{"properties":{"roster_number":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Roster Number","description":"Updated roster number, or null to clear it."},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","description":"Whether the membership is currently active."}},"type":"object","title":"RosterMembershipUpdateRequest","example":{"is_active":true,"roster_number":"24"}},"SchoolResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"school_code":{"type":"string","title":"School Code"}},"type":"object","required":["id","name","school_code"],"title":"SchoolResponse"},"SeasonCreateRequest":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"Display name for the season."},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"},"default_due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Default Due Date"}},"type":"object","required":["name"],"title":"SeasonCreateRequest","example":{"default_due_date":"2026-12-05","end_date":"2026-11-30","name":"Fall 2026","start_date":"2026-08-01"}},"SeasonListResponse":{"properties":{"limit":{"type":"integer","title":"Limit","description":"Maximum number of items returned in this page."},"offset":{"type":"integer","title":"Offset","description":"Zero-based offset applied to the full result set."},"total":{"type":"integer","title":"Total","description":"Total number of items matching the same filters."},"items":{"items":{"$ref":"#/components/schemas/SeasonResponse"},"type":"array","title":"Items"}},"type":"object","required":["limit","offset","total","items"],"title":"SeasonListResponse","example":{"items":[{"created_at":"2026-05-06T18:00:00Z","default_due_date":"2026-12-05","end_date":"2026-11-30","id":"44444444-4444-4444-4444-444444444444","is_active":true,"is_current":true,"name":"Fall 2026","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","start_date":"2026-08-01","updated_at":"2026-05-06T18:00:00Z"}],"limit":50,"offset":0,"total":123}},"SeasonResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"school_id":{"type":"string","format":"uuid","title":"School Id"},"name":{"type":"string","title":"Name"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"},"default_due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Default Due Date"},"is_active":{"type":"boolean","title":"Is Active"},"is_current":{"type":"boolean","title":"Is Current"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"}},"type":"object","required":["id","school_id","name","start_date","end_date","default_due_date","is_active","is_current","created_at","updated_at"],"title":"SeasonResponse","example":{"created_at":"2026-05-06T18:00:00Z","default_due_date":"2026-12-05","end_date":"2026-11-30","id":"44444444-4444-4444-4444-444444444444","is_active":true,"is_current":true,"name":"Fall 2026","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","start_date":"2026-08-01","updated_at":"2026-05-06T18:00:00Z"}},"SeasonUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Name","description":"Updated display name for the season."},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"},"default_due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Default Due Date"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"SeasonUpdateRequest","example":{"default_due_date":"2026-12-05","end_date":"2026-11-30","is_active":true,"name":"Fall 2026","start_date":"2026-08-01"}},"TeamCreateRequest":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"Display name for the team."},"sport":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Sport","description":"Optional sport label shown in the frontend."},"responsible_coach_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Responsible Coach Id"}},"type":"object","required":["name"],"title":"TeamCreateRequest","example":{"name":"Varsity Football","responsible_coach_id":"11111111-1111-1111-1111-111111111111","sport":"Football"}},"TeamListResponse":{"properties":{"limit":{"type":"integer","title":"Limit","description":"Maximum number of items returned in this page."},"offset":{"type":"integer","title":"Offset","description":"Zero-based offset applied to the full result set."},"total":{"type":"integer","title":"Total","description":"Total number of items matching the same filters."},"items":{"items":{"$ref":"#/components/schemas/TeamResponse"},"type":"array","title":"Items"}},"type":"object","required":["limit","offset","total","items"],"title":"TeamListResponse","example":{"items":[{"created_at":"2026-05-06T18:00:00Z","id":"33333333-3333-3333-3333-333333333333","name":"Varsity Football","responsible_coach_id":"11111111-1111-1111-1111-111111111111","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","sport":"Football","updated_at":"2026-05-06T18:00:00Z"}],"limit":50,"offset":0,"total":123}},"TeamResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"school_id":{"type":"string","format":"uuid","title":"School Id"},"name":{"type":"string","title":"Name"},"sport":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sport"},"responsible_coach_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Responsible Coach Id"},"current_season_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Current Season Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"}},"type":"object","required":["id","school_id","name","sport","responsible_coach_id","current_season_id","created_at","updated_at"],"title":"TeamResponse","example":{"created_at":"2026-05-06T18:00:00Z","id":"33333333-3333-3333-3333-333333333333","name":"Varsity Football","responsible_coach_id":"11111111-1111-1111-1111-111111111111","school_id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","sport":"Football","updated_at":"2026-05-06T18:00:00Z"}},"TeamUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Name","description":"Updated display name for the team."},"sport":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Sport","description":"Updated sport label for the team."},"responsible_coach_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Responsible Coach Id"},"current_season_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Current Season Id","description":"Per-team override of the school's current season, or null to clear the override and follow the school-wide current season."}},"type":"object","title":"TeamUpdateRequest","example":{"name":"Varsity Football","responsible_coach_id":"11111111-1111-1111-1111-111111111111","sport":"Football"}},"TokenPairResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type"}},"type":"object","required":["access_token","refresh_token","token_type"],"title":"TokenPairResponse"},"UserListItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"full_name":{"type":"string","title":"Full Name"},"email":{"type":"string","title":"Email"},"role":{"$ref":"#/components/schemas/UserRole"},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen At"}},"type":"object","required":["id","full_name","email","role","last_seen_at"],"title":"UserListItem"},"UserListResponse":{"properties":{"limit":{"type":"integer","title":"Limit","description":"Maximum number of items returned in this page."},"offset":{"type":"integer","title":"Offset","description":"Zero-based offset applied to the full result set."},"total":{"type":"integer","title":"Total","description":"Total number of items matching the same filters."},"items":{"items":{"$ref":"#/components/schemas/UserListItem"},"type":"array","title":"Items"}},"type":"object","required":["limit","offset","total","items"],"title":"UserListResponse"},"UserResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","format":"email","title":"Email"},"full_name":{"type":"string","title":"Full Name"},"role":{"$ref":"#/components/schemas/UserRole"},"school_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"School Id"},"school_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"School Code"}},"type":"object","required":["id","email","full_name","role","school_id","school_code"],"title":"UserResponse"},"UserRole":{"type":"string","enum":["director","coach","admin","member"],"title":"UserRole"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}},"tags":[{"name":"root","description":"Entry point metadata for the Trackie API."},{"name":"health","description":"Runtime health and database connectivity checks."},{"name":"auth","description":"Director signup and token-based authentication flows."},{"name":"dashboard","description":"Role-scoped home screen summary stats for mobile dashboards."},{"name":"activity","description":"Paginated role-scoped activity event feeds."},{"name":"invitations","description":"Coach invitation creation, listing, acceptance, and revocation flows."},{"name":"coaches","description":"Coach listing and management within a school workspace."},{"name":"teams","description":"Team management within a school workspace."},{"name":"seasons","description":"Season management within a school workspace."},{"name":"players","description":"School-level player records and lookup flows."},{"name":"roster-memberships","description":"Roster assignments connecting players, teams, and seasons."},{"name":"roster-imports","description":"Stateless roster CSV preview and commit flows."},{"name":"equipment","description":"Equipment categories and individually accountable assets."},{"name":"equipment-imports","description":"Stateless equipment CSV preview and commit workflows."},{"name":"player-imports","description":"Stateless player CSV preview and commit flows."},{"name":"downloads","description":"Public endpoints for downloading CSV import templates."},{"name":"public","description":"Public lost-and-found lookup for physical Trackie codes."},{"name":"qr-tags","description":"QR tag generation, resolution, linking, and CSV export flows."},{"name":"checkouts","description":"Equipment checkout, return, and overdue lookup workflows."},{"name":"locations","description":"Location tree management for the Inventory product."},{"name":"maintenance","description":"Maintenance plans and records for the Inventory product. An open record makes checkouts of the asset answer 409 asset_in_maintenance."},{"name":"exports","description":"CSV exports of equipment and checkouts."},{"name":"organization","description":"Tenant settings for the Inventory product."},{"name":"users","description":"Organization member listing for the Inventory product."}]}