{"openapi": "3.1.0", "info": {"title": "TopSpin Club API", "version": "1.0.0", "description": "Club-scoped API. Money uses decimal strings. Timestamps use ISO 8601. Collection reads use stable ID cursors. Request examples are available in the club integration guide."}, "paths": {"/api/v1/clubs/{slug}/data/members/": {"get": {"summary": "List members", "description": "Required scope: members:read", "operationId": "list_members", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50}}, {"name": "after", "in": "query", "schema": {"type": "integer", "minimum": 0}}], "responses": {"200": {"description": "Paginated collection. next_after is null at the end."}}, "security": [{"bearerAuth": []}]}}, "/api/v1/clubs/{slug}/data/courts/": {"get": {"summary": "List courts", "description": "Required scope: schedule:read", "operationId": "list_courts", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50}}, {"name": "after", "in": "query", "schema": {"type": "integer", "minimum": 0}}], "responses": {"200": {"description": "Paginated collection. next_after is null at the end."}}, "security": [{"bearerAuth": []}]}}, "/api/v1/clubs/{slug}/data/reservation-types/": {"get": {"summary": "List reservation-types", "description": "Required scope: schedule:read", "operationId": "list_reservation_types", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50}}, {"name": "after", "in": "query", "schema": {"type": "integer", "minimum": 0}}], "responses": {"200": {"description": "Paginated collection. next_after is null at the end."}}, "security": [{"bearerAuth": []}]}}, "/api/v1/clubs/{slug}/data/reservations/": {"get": {"summary": "List reservations", "description": "Required scope: schedule:read", "operationId": "list_reservations", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50}}, {"name": "after", "in": "query", "schema": {"type": "integer", "minimum": 0}}], "responses": {"200": {"description": "Paginated collection. next_after is null at the end."}}, "security": [{"bearerAuth": []}]}}, "/api/v1/clubs/{slug}/data/court-holds/": {"get": {"summary": "List court-holds", "description": "Required scope: schedule:read", "operationId": "list_court_holds", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50}}, {"name": "after", "in": "query", "schema": {"type": "integer", "minimum": 0}}], "responses": {"200": {"description": "Paginated collection. next_after is null at the end."}}, "security": [{"bearerAuth": []}]}}, "/api/v1/clubs/{slug}/data/programs/": {"get": {"summary": "List programs", "description": "Required scope: schedule:read", "operationId": "list_programs", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50}}, {"name": "after", "in": "query", "schema": {"type": "integer", "minimum": 0}}], "responses": {"200": {"description": "Paginated collection. next_after is null at the end."}}, "security": [{"bearerAuth": []}]}}, "/api/v1/clubs/{slug}/data/plans/": {"get": {"summary": "List plans", "description": "Required scope: members:read", "operationId": "list_plans", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50}}, {"name": "after", "in": "query", "schema": {"type": "integer", "minimum": 0}}], "responses": {"200": {"description": "Paginated collection. next_after is null at the end."}}, "security": [{"bearerAuth": []}]}}, "/api/v1/clubs/{slug}/data/memberships/": {"get": {"summary": "List memberships", "description": "Required scope: members:read", "operationId": "list_memberships", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50}}, {"name": "after", "in": "query", "schema": {"type": "integer", "minimum": 0}}], "responses": {"200": {"description": "Paginated collection. next_after is null at the end."}}, "security": [{"bearerAuth": []}]}}, "/api/v1/clubs/{slug}/data/invoices/": {"get": {"summary": "List invoices", "description": "Required scope: finance:read", "operationId": "list_invoices", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50}}, {"name": "after", "in": "query", "schema": {"type": "integer", "minimum": 0}}], "responses": {"200": {"description": "Paginated collection. next_after is null at the end."}}, "security": [{"bearerAuth": []}]}}, "/api/v1/clubs/{slug}/data/payments/": {"get": {"summary": "List payments", "description": "Required scope: finance:read", "operationId": "list_payments", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50}}, {"name": "after", "in": "query", "schema": {"type": "integer", "minimum": 0}}], "responses": {"200": {"description": "Paginated collection. next_after is null at the end."}}, "security": [{"bearerAuth": []}]}}, "/api/v1/clubs/{slug}/data/ledger/": {"get": {"summary": "List ledger", "description": "Required scope: finance:read", "operationId": "list_ledger", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50}}, {"name": "after", "in": "query", "schema": {"type": "integer", "minimum": 0}}], "responses": {"200": {"description": "Paginated collection. next_after is null at the end."}}, "security": [{"bearerAuth": []}]}}, "/api/v1/clubs/{slug}/data/registrations/": {"get": {"summary": "List registrations", "description": "Required scope: desk:read", "operationId": "list_registrations", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50}}, {"name": "after", "in": "query", "schema": {"type": "integer", "minimum": 0}}], "responses": {"200": {"description": "Paginated collection. next_after is null at the end."}}, "security": [{"bearerAuth": []}]}}, "/api/v1/clubs/{slug}/data/work/": {"get": {"summary": "List work", "description": "Required scope: operations:read", "operationId": "list_work", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50}}, {"name": "after", "in": "query", "schema": {"type": "integer", "minimum": 0}}], "responses": {"200": {"description": "Paginated collection. next_after is null at the end."}}, "security": [{"bearerAuth": []}]}}, "/api/v1/clubs/{slug}/booking-rules/{pk}/": {"get": {"summary": "Booking Rules", "description": "Owner access with booking-rules:read. Durations and notice are in minutes, cancellation windows in hours.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "pk", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "booking_rules_get", "x-required-scope": "booking-rules:read"}, "post": {"summary": "Booking Rules", "description": "Owner access with booking-rules:write. Durations and notice are in minutes, cancellation windows in hours.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "pk", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}, "409": {"description": "Refresh the current rules and preview again."}}, "security": [{"bearerAuth": []}], "operationId": "booking_rules_post", "x-required-scope": "booking-rules:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"revision": {"type": "string", "pattern": "^[0-9a-f]{64}$"}, "max_duration": {"type": "integer", "minimum": 1, "maximum": 1440, "description": "Maximum booking duration in minutes."}, "min_notice": {"type": "integer", "minimum": 0, "maximum": 525600, "description": "Minimum advance notice in minutes."}, "cancellation_window": {"type": "integer", "minimum": 0, "maximum": 8760, "description": "Cancellation window in hours."}}, "required": ["revision"], "additionalProperties": false, "minProperties": 2}}}}}}, "/api/v1/clubs/{slug}/branding/": {"get": {"summary": "Club Branding", "description": "Requires an active club owner and branding:read.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "The current club branding and its revision.", "content": {"application/json": {"schema": {"type": "object", "properties": {"revision": {"type": "string", "pattern": "^[0-9a-f]{64}$"}, "branding": {"type": "object", "properties": {"brand_logo_url": {"type": "string", "maxLength": 200, "description": "A public HTTPS image URL, a /static/ asset path or an empty string to clear."}, "brand_favicon_url": {"type": "string", "maxLength": 200, "description": "A public HTTPS image URL, a /static/ asset path or an empty string to clear."}, "brand_primary_color": {"type": "string", "pattern": "^#[0-9a-fA-F]{6}$"}, "brand_accent_color": {"type": "string", "pattern": "^#[0-9a-fA-F]{6}$"}}, "required": ["brand_logo_url", "brand_favicon_url", "brand_primary_color", "brand_accent_color"]}}, "required": ["branding", "revision"]}}}}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "club_branding_get", "x-required-scope": "branding:read"}, "post": {"summary": "Club Branding", "description": "Requires an active club owner and branding:write.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "The current club branding and its revision.", "content": {"application/json": {"schema": {"type": "object", "properties": {"revision": {"type": "string", "pattern": "^[0-9a-f]{64}$"}, "branding": {"type": "object", "properties": {"brand_logo_url": {"type": "string", "maxLength": 200, "description": "A public HTTPS image URL, a /static/ asset path or an empty string to clear."}, "brand_favicon_url": {"type": "string", "maxLength": 200, "description": "A public HTTPS image URL, a /static/ asset path or an empty string to clear."}, "brand_primary_color": {"type": "string", "pattern": "^#[0-9a-fA-F]{6}$"}, "brand_accent_color": {"type": "string", "pattern": "^#[0-9a-fA-F]{6}$"}}, "required": ["brand_logo_url", "brand_favicon_url", "brand_primary_color", "brand_accent_color"]}}, "required": ["branding", "revision"]}}}}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}, "409": {"description": "Branding has changed since the specified revision."}}, "security": [{"bearerAuth": []}], "operationId": "club_branding_post", "x-required-scope": "branding:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"revision": {"type": "string", "pattern": "^[0-9a-f]{64}$"}, "brand_logo_url": {"type": "string", "maxLength": 200, "description": "A public HTTPS image URL, a /static/ asset path or an empty string to clear."}, "brand_favicon_url": {"type": "string", "maxLength": 200, "description": "A public HTTPS image URL, a /static/ asset path or an empty string to clear."}, "brand_primary_color": {"type": "string", "pattern": "^#[0-9a-fA-F]{6}$"}, "brand_accent_color": {"type": "string", "pattern": "^#[0-9a-fA-F]{6}$"}}, "required": ["revision"], "additionalProperties": false, "minProperties": 2}}}}}}, "/api/v1/clubs/{slug}/junior/": {"get": {"summary": "Junior Records", "description": "Required scope: operations:read. ", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "resource", "in": "query", "schema": {"type": "string", "enum": ["evaluations", "players", "rubric"]}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100}}, {"name": "after", "in": "query", "schema": {"type": "integer", "minimum": 0}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "junior_records_get", "x-required-scope": "operations:read"}}, "/api/v1/clubs/{slug}/junior/{pk}/": {"post": {"summary": "Junior Update", "description": "Required scope: operations:write. Edit drafts or submit the saved version for owner review. Approval and delivery are unavailable to integrations.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "pk", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "junior_update_post", "x-required-scope": "operations:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"action": {"type": "string", "enum": ["save", "submit"]}, "version": {"type": "integer", "minimum": 1}, "data": {"type": "object", "additionalProperties": {"type": "string"}}, "scores": {"type": "object", "additionalProperties": {"oneOf": [{"type": "integer", "minimum": 0, "maximum": 4}, {"const": "na"}]}}}, "required": ["action", "version"]}}}}}}, "/api/v1/clubs/{slug}/goals/": {"get": {"summary": "Goals", "description": "Required scope: operations:read. Paginated goal records with latest 20 updates each. Numeric progress is the latest recorded observation, not an automatic calculation. No communication is sent.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "id", "in": "query", "schema": {"type": "integer", "minimum": 1}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100}}, {"name": "after", "in": "query", "schema": {"type": "integer", "minimum": 0}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "goals_get", "x-required-scope": "operations:read"}}, "/api/v1/clubs/{slug}/goals/history/": {"get": {"summary": "Goal History", "description": "Required scope: operations:read. Newest-first relationship/goal history. Supply goal_id or player_id; both intersect. Follow next_before until null for full history. Actor and evidence remain attached to each update. A communication plan is not delivery.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "goal_id", "in": "query", "schema": {"type": "integer", "minimum": 1}}, {"name": "player_id", "in": "query", "schema": {"type": "integer", "minimum": 1}}, {"name": "before", "in": "query", "schema": {"type": "integer", "minimum": 1}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 20}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "goal_history_get", "x-required-scope": "operations:read"}}, "/api/v1/clubs/{slug}/goals/create/": {"post": {"summary": "Create Goal Record", "description": "Required scope: operations:write. Articulate a club outcome. Optional numeric targets require a named measure. A stable request_key prevents duplicate creation.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "create_goal_record_post", "x-required-scope": "operations:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"title": {"type": "string", "minLength": 1, "maxLength": 160}, "outcome": {"type": "string", "minLength": 1, "maxLength": 10000}, "responsible_role": {"type": "string", "maxLength": 100}, "due": {"type": "string", "format": "date"}, "metric": {"type": "string", "maxLength": 100}, "baseline": {"type": "string"}, "target": {"type": "string"}, "request_key": {"type": "string", "minLength": 1, "maxLength": 64, "description": "Stable client request key. Reuse the same value when retrying the same booking."}}, "required": ["title", "outcome", "request_key"]}}}}}}, "/api/v1/clubs/{slug}/goals/{pk}/updates/": {"post": {"summary": "Add Goal Update", "description": "Required scope: operations:write. Append evidence, a decision or a communication plan. Optional player_id links relationship context. This records a plan, never sends a message. Status is explicitly set by the actor; numeric observations do not auto-complete goals.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "pk", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "add_goal_update_post", "x-required-scope": "operations:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"kind": {"type": "string", "enum": ["observation", "decision", "communication_plan"]}, "note": {"type": "string", "minLength": 1, "maxLength": 10000}, "evidence": {"type": "string", "maxLength": 500}, "value": {"type": "string"}, "next_action": {"type": "string", "maxLength": 500}, "next_due": {"type": "string", "format": "date"}, "status": {"type": "string", "enum": ["active", "at_risk", "achieved", "paused"]}, "player_id": {"type": "integer", "minimum": 1}, "request_key": {"type": "string", "minLength": 1, "maxLength": 64, "description": "Stable client request key. Reuse the same value when retrying the same booking."}}, "required": ["kind", "note", "request_key"]}}}}}}, "/api/v1/clubs/{slug}/intelligence/playbooks/": {"get": {"summary": "Intelligence Playbooks", "description": "Required scope: operations:read. ", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "intelligence_playbooks_get", "x-required-scope": "operations:read"}}, "/api/v1/clubs/{slug}/members/{player_id}/profile/": {"get": {"summary": "Member Profile", "description": "Required scope: members:read. ", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "player_id", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "member_profile_get", "x-required-scope": "members:read"}}, "/api/v1/clubs/{slug}/attendance/": {"get": {"summary": "Attendance", "description": "Required scope: desk:read. ", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "date", "in": "query", "schema": {"type": "string", "format": "date"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "attendance_get", "x-required-scope": "desk:read"}}, "/api/v1/clubs/{slug}/programs/{pk}/dates/": {"get": {"summary": "Program Dates", "description": "Required scope: schedule:read. ", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "pk", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "program_dates_get", "x-required-scope": "schedule:read"}}, "/api/v1/clubs/{slug}/quote/": {"post": {"summary": "Booking Quote", "description": "Required scope: schedule:read. Read-only estimate; does not reserve inventory or guarantee eligibility. Availability and booking policy are checked again on creation.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "booking_quote_post", "x-required-scope": "schedule:read", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"court_id": {"type": "integer", "minimum": 1}, "type_id": {"type": "integer", "minimum": 1}, "start": {"type": "string", "format": "date-time"}, "end": {"type": "string", "format": "date-time"}}, "required": ["court_id", "type_id", "start", "end"]}}}}}}, "/api/v1/clubs/{slug}/arrivals/{player_id}/": {"get": {"summary": "Arrivals", "description": "Required scope: desk:read. ", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "player_id", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "arrivals_get", "x-required-scope": "desk:read"}}, "/api/v1/clubs/{slug}/calendar/": {"get": {"summary": "Calendar", "description": "Required scope: schedule:read. ", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "date", "in": "query", "schema": {"type": "string", "format": "date"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "calendar_get", "x-required-scope": "schedule:read"}}, "/api/v1/clubs/{slug}/search/": {"get": {"summary": "Search", "description": "Required scope: members:read. ", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "q", "in": "query", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "search_get", "x-required-scope": "members:read"}}, "/api/v1/clubs/{slug}/reservations/": {"post": {"summary": "Reservations", "description": "Required scope: schedule:write. ", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "reservations_post", "x-required-scope": "schedule:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"court_id": {"type": "integer", "minimum": 1}, "type_id": {"type": "integer", "minimum": 1}, "owner_id": {"type": "integer", "minimum": 1}, "start": {"type": "string", "format": "date-time"}, "end": {"type": "string", "format": "date-time"}, "request_key": {"type": "string", "minLength": 1, "maxLength": 64, "description": "Stable client request key. Reuse the same value when retrying the same booking."}}, "required": ["court_id", "type_id", "owner_id", "start", "end"]}}}}}}, "/api/v1/clubs/{slug}/reservations/{pk}/cancel/": {"post": {"summary": "Cancel", "description": "Required scope: schedule:write. ", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "pk", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "cancel_post", "x-required-scope": "schedule:write", "requestBody": {"required": false, "content": {"application/json": {"schema": {"type": "object", "properties": {}, "required": []}}}}}}, "/api/v1/clubs/{slug}/blocks/": {"post": {"summary": "Blocks", "description": "Required scope: schedule:write. ", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "blocks_post", "x-required-scope": "schedule:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"court_id": {"type": "integer", "minimum": 1}, "start": {"type": "string", "format": "date-time"}, "end": {"type": "string", "format": "date-time"}, "reason": {"type": "string", "minLength": 1}}, "required": ["court_id", "start", "end", "reason"]}}}}}}, "/api/v1/clubs/{slug}/series/": {"post": {"summary": "Series", "description": "Required scope: schedule:write. Preview first with commit omitted. To commit, include commit=true, type_id, owner_id, a stable request_key and the digest returned by the preview. Conflicts or changed inventory reject the whole series.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "series_post", "x-required-scope": "schedule:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"court_ids": {"type": "array", "items": {"type": "integer", "minimum": 1}, "minItems": 1}, "type_id": {"type": "integer", "minimum": 1}, "owner_id": {"type": "integer", "minimum": 1}, "rule": {"type": "string", "example": "FREQ=WEEKLY;BYDAY=MO"}, "start_date": {"type": "string", "format": "date"}, "end_date": {"type": "string", "format": "date"}, "start_time": {"type": "string", "example": "09:00"}, "duration_minutes": {"type": "integer", "minimum": 1, "maximum": 1440}, "commit": {"type": "boolean"}, "digest": {"type": "string"}, "request_key": {"type": "string", "minLength": 1, "maxLength": 64, "description": "Stable client request key. Reuse the same value when retrying the same booking."}}, "required": ["court_ids", "rule", "start_date", "end_date", "start_time", "duration_minutes"]}}}}}}, "/api/v1/clubs/{slug}/work/{pk}/": {"post": {"summary": "Finish", "description": "Required scope: operations:write. Dismissal requires a reason. Snoozing requires a future until timestamp.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "pk", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "finish_post", "x-required-scope": "operations:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"status": {"type": "string", "enum": ["done", "snoozed", "dismissed"]}, "reason": {"type": "string"}, "until": {"type": "string", "format": "date-time"}}, "required": ["status"]}}}}}}, "/api/v1/clubs/{slug}/waivers/{player_id}/": {"get": {"summary": "Waivers", "description": "Required scope: desk:read. ", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "player_id", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "waivers_get", "x-required-scope": "desk:read"}}, "/api/v1/clubs/{slug}/sign/": {"post": {"summary": "Sign", "description": "Required scope: desk:write. The credential actor must be the signer or explicitly authorized guardian. Staff integration access does not itself authorize signing for another person.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "sign_post", "x-required-scope": "desk:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"player_id": {"type": "integer", "minimum": 1}, "waiver_id": {"type": "integer", "minimum": 1}, "signature": {"type": "string", "description": "PNG data URL of the signature captured from the signer."}}, "required": ["player_id", "waiver_id", "signature"]}}}}}}, "/api/v1/clubs/{slug}/check-in/": {"post": {"summary": "Check In", "description": "Required scope: desk:write. Send exactly one reservation_id or registration_id. For a session enrollment, include the dated event_id. The player must have a place and current waivers. Check-in is only available on the club-local date.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "check_in_post", "x-required-scope": "desk:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"player_id": {"type": "integer", "minimum": 1}, "reservation_id": {"type": "integer", "minimum": 1}, "registration_id": {"type": "integer", "minimum": 1}, "event_id": {"type": "integer", "minimum": 1}}, "required": ["player_id"]}}}}}}, "/api/v1/clubs/{slug}/registrations/": {"post": {"summary": "Registration", "description": "Required scope: desk:write. Drop-ins require event_id. Whole-session enrollments omit event_id. The response status is registered or waitlisted.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "registration_post", "x-required-scope": "desk:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"program_id": {"type": "integer", "minimum": 1}, "player_id": {"type": "integer", "minimum": 1}, "event_id": {"type": "integer", "minimum": 1}}, "required": ["program_id", "player_id"]}}}}}}, "/api/v1/clubs/{slug}/ledger.csv": {"get": {"summary": "Ledger Export", "description": "Required scope: finance:read. ", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "ledger_export_get", "x-required-scope": "finance:read"}}, "/api/v1/clubs/{slug}/campaigns/{pk}/": {"post": {"summary": "Campaign", "description": "Required scope: communications:write. POST {} previews eligible recipients. Approval requires approve=true and the preview digest. This endpoint does not send a campaign.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "pk", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "campaign_post", "x-required-scope": "communications:write", "requestBody": {"required": false, "content": {"application/json": {"schema": {"type": "object", "properties": {"approve": {"type": "boolean"}, "digest": {"type": "string"}}, "required": []}}}}}}, "/api/v1/clubs/{slug}/communication-preferences/": {"get": {"summary": "Preferences", "description": "Required scope: communications:read. GET returns club connection setup status, authenticated actor preferences and readiness explanations. POST replaces that actor\u2019s channel choices for one purpose; does not grant consent, link accounts or send messages. Public Facebook/Instagram publishing is a separate capability.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "preferences_get", "x-required-scope": "communications:read"}, "post": {"summary": "Preferences", "description": "Required scope: communications:write. GET returns club connection setup status, authenticated actor preferences and readiness explanations. POST replaces that actor\u2019s channel choices for one purpose; does not grant consent, link accounts or send messages. Public Facebook/Instagram publishing is a separate capability.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "preferences_post", "x-required-scope": "communications:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"purpose": {"type": "string", "enum": ["transactional", "marketing", "reports"]}, "channels": {"type": "array", "items": {"type": "string", "enum": ["email", "sms", "whatsapp", "wechat", "slack"]}}}, "required": ["purpose", "channels"]}}}}}}, "/api/v1/clubs/{slug}/communication-campaigns/": {"get": {"summary": "Campaigns", "description": "Required scope: communications:read. ", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "campaigns_get", "x-required-scope": "communications:read"}, "post": {"summary": "Campaigns", "description": "Required scope: communications:write. ", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "campaigns_post", "x-required-scope": "communications:write"}}, "/api/v1/clubs/{slug}/consent/": {"get": {"summary": "Consent", "description": "Required scope: communications:read. Applies to the authenticated credential actor. GET returns the exact current disclosures; POST must include one unchanged disclosure and explicit agreement. Does not grant consent for arbitrary members.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "consent_get", "x-required-scope": "communications:read"}, "post": {"summary": "Consent", "description": "Required scope: communications:write. Applies to the authenticated credential actor. GET returns the exact current disclosures; POST must include one unchanged disclosure and explicit agreement. Does not grant consent for arbitrary members.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "consent_post", "x-required-scope": "communications:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"channel": {"type": "string", "enum": ["sms", "email"]}, "purpose": {"type": "string", "enum": ["transactional", "marketing"]}, "address": {"type": "string"}, "agreed": {"type": "boolean"}, "disclosure": {"type": "string"}}, "required": ["channel", "purpose", "address", "agreed", "disclosure"]}}}}}}, "/api/v1/clubs/{slug}/invoices/{pk}/checkout/": {"post": {"summary": "Checkout", "description": "Required scope: finance:write. Creates a checkout session in the club merchant account. Returns url. Payment is recorded only after a verified provider webhook.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "pk", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "checkout_post", "x-required-scope": "finance:write", "requestBody": {"required": false, "content": {"application/json": {"schema": {"type": "object", "properties": {}, "required": []}}}}}}, "/api/v1/clubs/{slug}/config/quickbooks-mappings/": {"get": {"summary": "Quickbooks Mappings", "description": "Required scope: finance-config:read.  Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Success"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "quickbooks_mappings_get", "x-required-scope": "finance-config:read"}, "post": {"summary": "Quickbooks Mappings", "description": "Required scope: finance-config:write.  Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}, "409": {"description": "Conflict with the current record or a previous request."}}, "security": [{"bearerAuth": []}], "operationId": "quickbooks_mappings_post", "x-required-scope": "finance-config:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"category": {"type": "string", "minLength": 1, "maxLength": 100}, "account_id": {"type": "string"}, "revision": {"type": "string", "minLength": 1}}, "required": ["category", "account_id", "revision"], "additionalProperties": false}}}}}}, "/api/v1/clubs/{slug}/config/connection-status/": {"get": {"summary": "Connection Status", "description": "Required scope: connections:read.  Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Success"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "connection_status_get", "x-required-scope": "connections:read"}}, "/api/v1/clubs/{slug}/config/staff-schedule/": {"get": {"summary": "Staff Schedule Api", "description": "Required scope: staff-schedule:read.  Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "week", "in": "query", "schema": {"type": "string", "format": "date"}}], "responses": {"200": {"description": "Success"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "staff_schedule_api_get", "x-required-scope": "staff-schedule:read"}, "post": {"summary": "Staff Schedule Api", "description": "Required scope: staff-schedule:write.  Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "week", "in": "query", "schema": {"type": "string", "format": "date"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}, "409": {"description": "Conflict with the current record or a previous request."}}, "security": [{"bearerAuth": []}], "operationId": "staff_schedule_api_post", "x-required-scope": "staff-schedule:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"action": {"type": "string", "enum": ["save", "cancel"]}, "shift_id": {"type": "integer", "minimum": 1}, "version": {"type": "integer", "minimum": 1}, "employee": {"type": "integer", "minimum": 1}, "date": {"type": "string", "format": "date"}, "start": {"type": "string", "pattern": "^[0-2][0-9]:[0-5][0-9]$"}, "end": {"type": "string", "pattern": "^[0-2][0-9]:[0-5][0-9]$"}, "overnight": {"type": "boolean"}}, "required": ["action"], "additionalProperties": false}}}}}}, "/api/v1/clubs/{slug}/config/club/": {"get": {"summary": "Club Profile", "description": "Required scope: config:read.  Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Success"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "club_profile_get", "x-required-scope": "config:read"}, "post": {"summary": "Club Profile", "description": "Required scope: config:write.  Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}, "409": {"description": "Conflict with the current record or a previous request."}}, "security": [{"bearerAuth": []}], "operationId": "club_profile_post", "x-required-scope": "config:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"revision": {"type": "string", "pattern": "^[0-9a-f]{64}$"}, "name": {"type": "string", "minLength": 1, "maxLength": 200}, "timezone": {"type": "string"}, "settings": {"type": "object", "additionalProperties": false, "minProperties": 1, "properties": {"lifecycle": {"type": "object", "additionalProperties": false, "minProperties": 1, "properties": {"drifting_after_days": {"type": "integer", "minimum": 1, "maximum": 3650}, "lapsed_after_days": {"type": "integer", "minimum": 1, "maximum": 3650}, "regular_min_sessions_30d": {"type": "integer", "minimum": 1, "maximum": 3650}, "trial_days": {"type": "integer", "minimum": 1, "maximum": 3650}}}, "coach_capture": {"type": "object", "additionalProperties": false, "minProperties": 1, "properties": {"enabled": {"type": "boolean"}, "max_recording_seconds": {"type": "integer", "minimum": 1, "maximum": 30}, "draft_next_session_plan": {"type": "boolean"}, "flags_enabled": {"type": "array", "uniqueItems": true, "items": {"type": "string", "enum": ["wrong_group", "disengaged", "ready_to_progress"]}}}}, "privacy": {"type": "object", "additionalProperties": false, "minProperties": 1, "properties": {"progress_visible_to": {"type": "string", "enum": ["coaches_and_admins", "coaches_only", "admins_only"]}, "minor_age_threshold": {"type": "integer", "minimum": 1, "maximum": 21}, "share_progress_with_household": {"type": "boolean"}}}, "captains": {"type": "object", "additionalProperties": false, "minProperties": 1, "properties": {"enabled": {"type": "boolean"}, "court_priority": {"type": "boolean"}, "first_pick_league_nights": {"type": "boolean"}}}, "social": {"type": "object", "additionalProperties": false, "minProperties": 1, "properties": {"quiet_hours": {"type": "object", "additionalProperties": false, "minProperties": 1, "properties": {"start": {"type": "string", "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$"}, "end": {"type": "string", "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$"}}}}}, "notifications": {"type": "object", "additionalProperties": false, "minProperties": 1, "properties": {"relay_progress_flags_to_admin": {"type": "boolean"}}}}}}, "required": ["revision"], "additionalProperties": false}}}}}}, "/api/v1/clubs/{slug}/config/website/": {"get": {"summary": "Website Config", "description": "Required scope: website:read.  Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Success"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "website_config_get", "x-required-scope": "website:read"}, "post": {"summary": "Website Config", "description": "Required scope: website:write.  Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}, "409": {"description": "Conflict with the current record or a previous request."}}, "security": [{"bearerAuth": []}], "operationId": "website_config_post", "x-required-scope": "website:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"revision": {"type": "integer", "minimum": 0}, "config": {"type": "object"}}, "required": ["revision", "config"], "additionalProperties": false}}}}}}, "/api/v1/clubs/{slug}/config/website/publish/": {"post": {"summary": "Publish Website", "description": "Required scope: website:publish.  Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}, "409": {"description": "Conflict with the current record or a previous request."}}, "security": [{"bearerAuth": []}], "operationId": "publish_website_post", "x-required-scope": "website:publish", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"revision": {"type": "integer", "minimum": 0}}, "required": ["revision"], "additionalProperties": false}}}}}}, "/api/v1/clubs/{slug}/config/website/unpublish/": {"post": {"summary": "Unpublish Website", "description": "Required scope: website:publish.  Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}, "409": {"description": "Conflict with the current record or a previous request."}}, "security": [{"bearerAuth": []}], "operationId": "unpublish_website_post", "x-required-scope": "website:publish", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"revision": {"type": "integer", "minimum": 0}}, "required": ["revision"], "additionalProperties": false}}}}}}, "/api/v1/clubs/{slug}/access/connections/": {"get": {"summary": "Connections", "description": "Required scope: connections:read.  Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100}}, {"name": "after", "in": "query", "schema": {"type": "integer", "minimum": 0}}], "responses": {"200": {"description": "Success"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "connections_get", "x-required-scope": "connections:read"}}, "/api/v1/clubs/{slug}/access/connections/{pk}/revoke/": {"post": {"summary": "Revoke Connection", "description": "Required scope: connections:revoke.  Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "pk", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}, "409": {"description": "Conflict with the current record or a previous request."}}, "security": [{"bearerAuth": []}], "operationId": "revoke_connection_post", "x-required-scope": "connections:revoke", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"revision": {"type": "string", "pattern": "^[0-9a-f]{64}$"}}, "required": ["revision"], "additionalProperties": false}}}}}}, "/api/v1/clubs/{slug}/staff-access/": {"get": {"summary": "Staff Access List", "description": "Required scope: staff-access:read. List staff membership records by ID. Search a name or source member number with q to find employee candidates. Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "q", "in": "query", "schema": {"type": "string", "minLength": 2, "maxLength": 100}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 25, "default": 10}}, {"name": "after", "in": "query", "schema": {"type": "integer", "minimum": 0}}], "responses": {"200": {"description": "Success"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "staff_access_list_get", "x-required-scope": "staff-access:read"}}, "/api/v1/clubs/{slug}/staff-access/{pk}/": {"get": {"summary": "Staff Access Detail", "description": "Required scope: staff-access:read. Current login state, assigned role, effective Club role, capabilities and expiring revisions. Top-level owner, manager and administrator appointments require separate administration. Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "pk", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Success"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "staff_access_detail_get", "x-required-scope": "staff-access:read"}}, "/api/v1/clubs/{slug}/staff-access/{pk}/role/": {"post": {"summary": "Update Staff Role", "description": "Required scope: staff-access:write. Confirm the identified employee and exact new role. Use member to remove staff access. An individual login must already be available. Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "pk", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}, "409": {"description": "Conflict with the current record or a previous request."}}, "security": [{"bearerAuth": []}], "operationId": "update_staff_role_post", "x-required-scope": "staff-access:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"revision": {"type": "string", "description": "The corresponding revision from current staff detail, valid for 30 minutes."}, "role": {"type": "string", "enum": ["frontdesk", "coach", "member"]}, "employment_confirmed": {"type": "boolean", "const": true}}, "required": ["revision", "role", "employment_confirmed"], "additionalProperties": false}}}}}}, "/api/v1/clubs/{slug}/staff-access/{pk}/collection/": {"post": {"summary": "Update Staff Collection", "description": "Required scope: staff-access:write. Grant or remove permission for an active desk employee to open a payer-entered checkout on an eligible invoice. Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "pk", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}, "409": {"description": "Conflict with the current record or a previous request."}}, "security": [{"bearerAuth": []}], "operationId": "update_staff_collection_post", "x-required-scope": "staff-access:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"revision": {"type": "string", "description": "The corresponding revision from current staff detail, valid for 30 minutes."}, "enabled": {"type": "boolean"}}, "required": ["revision", "enabled"], "additionalProperties": false}}}}}}, "/api/v1/clubs/{slug}/member-access/": {"get": {"summary": "Member Login List", "description": "Required scope: member-access:read. Lists reserved member sign-ins. Search by name or member number. Personal mobile numbers are omitted. Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "q", "in": "query", "schema": {"type": "string", "minLength": 2, "maxLength": 100}}, {"name": "after", "in": "query", "schema": {"type": "integer", "minimum": 0}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 25, "default": 10}}], "responses": {"200": {"description": "Success"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "member_login_list_get", "x-required-scope": "member-access:read"}}, "/api/v1/clubs/{slug}/member-access/{pk}/": {"get": {"summary": "Member Login Access", "description": "Required scope: member-access:read. One existing member's sign-in approval, prior claims and eligibility. Every new sign-in requires a member-entered code. Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "pk", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Success"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "member_login_access_get", "x-required-scope": "member-access:read"}}, "/api/v1/clubs/{slug}/member-access/{pk}/approve/": {"post": {"summary": "Approve Member Login", "description": "Required scope: member-access:write. Owner confirms this member's identity in person and their individual mobile. Each person consents to and completes their own code challenge. Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "pk", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}, "409": {"description": "Conflict with the current record or a previous request."}}, "security": [{"bearerAuth": []}], "operationId": "approve_member_login_post", "x-required-scope": "member-access:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"revision": {"type": "string", "description": "Expiring revision returned by the current member access detail."}, "phone": {"type": "string", "maxLength": 32}, "identity_checked": {"type": "boolean", "const": true}, "personal_mobile_confirmed": {"type": "boolean", "const": true}}, "required": ["revision", "phone", "identity_checked", "personal_mobile_confirmed"], "additionalProperties": false}}}}}}, "/api/v1/clubs/{slug}/member-access/{pk}/revoke/": {"post": {"summary": "Revoke Member Login", "description": "Required scope: member-access:write. Withdraw one reserved Club member's sign-in. Current Club sessions recheck the approval. This does not change their membership or global identity. Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "pk", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}, "409": {"description": "Conflict with the current record or a previous request."}}, "security": [{"bearerAuth": []}], "operationId": "revoke_member_login_post", "x-required-scope": "member-access:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"revision": {"type": "string", "description": "Expiring revision returned by the current member access detail."}, "confirmed": {"type": "boolean", "const": true}}, "required": ["revision", "confirmed"], "additionalProperties": false}}}}}}, "/api/v1/clubs/{slug}/config/courts/": {"get": {"summary": "List Config Courts", "description": "Required scope: config:read. Create with a new UUID request_key; repeat that key when retrying. Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "q", "in": "query", "schema": {"type": "string", "maxLength": 100, "minLength": 0}}, {"name": "after", "in": "query", "schema": {"type": "integer", "minimum": 0, "maximum": 9223372036854775807}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100}}], "responses": {"200": {"description": "Success"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "list_config_courts_get", "x-required-scope": "config:read"}, "post": {"summary": "List Config Courts", "description": "Required scope: config:write. Create with a new UUID request_key; repeat that key when retrying. Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "q", "in": "query", "schema": {"type": "string", "maxLength": 100, "minLength": 0}}, {"name": "after", "in": "query", "schema": {"type": "integer", "minimum": 0, "maximum": 9223372036854775807}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}, "409": {"description": "Conflict with the current record or a previous request."}}, "security": [{"bearerAuth": []}], "operationId": "list_config_courts_post", "x-required-scope": "config:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"request_key": {"type": "string", "format": "uuid"}, "fields": {"type": "object", "minProperties": 1, "additionalProperties": false, "properties": {"name": {"type": "string", "maxLength": 100, "minLength": 1}, "court_type": {"type": "string", "maxLength": 20, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9_-]*$"}, "surface": {"type": "string", "maxLength": 40, "minLength": 0}, "indoor": {"type": "boolean"}, "sort_order": {"type": "integer", "minimum": 0, "maximum": 32767}, "is_active": {"type": "boolean"}}, "required": ["name"]}}, "required": ["request_key", "fields"], "additionalProperties": false}}}}}}, "/api/v1/clubs/{slug}/config/courts/{pk}/": {"get": {"summary": "Config Courts", "description": "Required scope: config:read. Read the current revision before editing. Source-managed records are read-only. Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "pk", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Success"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "config_courts_get", "x-required-scope": "config:read"}, "post": {"summary": "Config Courts", "description": "Required scope: config:write. Read the current revision before editing. Source-managed records are read-only. Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "pk", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}, "409": {"description": "Conflict with the current record or a previous request."}}, "security": [{"bearerAuth": []}], "operationId": "config_courts_post", "x-required-scope": "config:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"revision": {"type": "string", "maxLength": 64, "minLength": 1, "pattern": "^[0-9a-f]{64}$"}, "fields": {"type": "object", "minProperties": 1, "additionalProperties": false, "properties": {"name": {"type": "string", "maxLength": 100, "minLength": 1}, "court_type": {"type": "string", "maxLength": 20, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9_-]*$"}, "surface": {"type": "string", "maxLength": 40, "minLength": 0}, "indoor": {"type": "boolean"}, "sort_order": {"type": "integer", "minimum": 0, "maximum": 32767}, "is_active": {"type": "boolean"}}, "required": []}}, "required": ["revision", "fields"], "additionalProperties": false}}}}}}, "/api/v1/clubs/{slug}/config/rate-cards/": {"get": {"summary": "List Config Rate Cards", "description": "Required scope: config:read. Create with a new UUID request_key; repeat that key when retrying. Rule order matters: the first matching local weekday and time wins; 24:00 ends the day. Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "q", "in": "query", "schema": {"type": "string", "maxLength": 100, "minLength": 0}}, {"name": "after", "in": "query", "schema": {"type": "integer", "minimum": 0, "maximum": 9223372036854775807}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100}}], "responses": {"200": {"description": "Success"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "list_config_rate_cards_get", "x-required-scope": "config:read"}, "post": {"summary": "List Config Rate Cards", "description": "Required scope: config:write. Create with a new UUID request_key; repeat that key when retrying. Rule order matters: the first matching local weekday and time wins; 24:00 ends the day. Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "q", "in": "query", "schema": {"type": "string", "maxLength": 100, "minLength": 0}}, {"name": "after", "in": "query", "schema": {"type": "integer", "minimum": 0, "maximum": 9223372036854775807}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}, "409": {"description": "Conflict with the current record or a previous request."}}, "security": [{"bearerAuth": []}], "operationId": "list_config_rate_cards_post", "x-required-scope": "config:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"request_key": {"type": "string", "format": "uuid"}, "fields": {"type": "object", "minProperties": 1, "additionalProperties": false, "properties": {"name": {"type": "string", "maxLength": 100, "minLength": 1}, "applies_to": {"type": "string", "maxLength": 20, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9_-]*$"}, "rules": {"type": "array", "items": {"type": "object", "minProperties": 1, "additionalProperties": false, "properties": {"weekdays": {"type": "array", "items": {"type": "integer", "minimum": 0, "maximum": 6}, "minItems": 1, "maxItems": 7, "uniqueItems": true}, "start": {"type": "string", "maxLength": 5, "minLength": 1, "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$"}, "end": {"type": "string", "maxLength": 5, "minLength": 1, "pattern": "^(([01][0-9]|2[0-3]):[0-5][0-9]|24:00)$"}, "hourly_price": {"type": "string", "maxLength": 11, "minLength": 1, "pattern": "^(0|[1-9][0-9]{0,7})(\\.[0-9]{1,2})?$"}}, "required": ["weekdays", "start", "end", "hourly_price"]}, "minItems": 1, "maxItems": 128, "uniqueItems": false}}, "required": ["name", "rules"]}}, "required": ["request_key", "fields"], "additionalProperties": false}}}}}}, "/api/v1/clubs/{slug}/config/rate-cards/{pk}/": {"get": {"summary": "Config Rate Cards", "description": "Required scope: config:read. Read the current revision before editing. Source-managed records are read-only. Rule order matters: the first matching local weekday and time wins; 24:00 ends the day. Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "pk", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Success"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "config_rate_cards_get", "x-required-scope": "config:read"}, "post": {"summary": "Config Rate Cards", "description": "Required scope: config:write. Read the current revision before editing. Source-managed records are read-only. Rule order matters: the first matching local weekday and time wins; 24:00 ends the day. Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "pk", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}, "409": {"description": "Conflict with the current record or a previous request."}}, "security": [{"bearerAuth": []}], "operationId": "config_rate_cards_post", "x-required-scope": "config:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"revision": {"type": "string", "maxLength": 64, "minLength": 1, "pattern": "^[0-9a-f]{64}$"}, "fields": {"type": "object", "minProperties": 1, "additionalProperties": false, "properties": {"name": {"type": "string", "maxLength": 100, "minLength": 1}, "applies_to": {"type": "string", "maxLength": 20, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9_-]*$"}, "rules": {"type": "array", "items": {"type": "object", "minProperties": 1, "additionalProperties": false, "properties": {"weekdays": {"type": "array", "items": {"type": "integer", "minimum": 0, "maximum": 6}, "minItems": 1, "maxItems": 7, "uniqueItems": true}, "start": {"type": "string", "maxLength": 5, "minLength": 1, "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$"}, "end": {"type": "string", "maxLength": 5, "minLength": 1, "pattern": "^(([01][0-9]|2[0-3]):[0-5][0-9]|24:00)$"}, "hourly_price": {"type": "string", "maxLength": 11, "minLength": 1, "pattern": "^(0|[1-9][0-9]{0,7})(\\.[0-9]{1,2})?$"}}, "required": ["weekdays", "start", "end", "hourly_price"]}, "minItems": 1, "maxItems": 128, "uniqueItems": false}}, "required": []}}, "required": ["revision", "fields"], "additionalProperties": false}}}}}}, "/api/v1/clubs/{slug}/config/reservation-types/": {"get": {"summary": "List Config Reservation Types", "description": "Required scope: config:read. Create with a new UUID request_key; repeat that key when retrying. Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "q", "in": "query", "schema": {"type": "string", "maxLength": 100, "minLength": 0}}, {"name": "after", "in": "query", "schema": {"type": "integer", "minimum": 0, "maximum": 9223372036854775807}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100}}], "responses": {"200": {"description": "Success"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "list_config_reservation_types_get", "x-required-scope": "config:read"}, "post": {"summary": "List Config Reservation Types", "description": "Required scope: config:write. Create with a new UUID request_key; repeat that key when retrying. Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "q", "in": "query", "schema": {"type": "string", "maxLength": 100, "minLength": 0}}, {"name": "after", "in": "query", "schema": {"type": "integer", "minimum": 0, "maximum": 9223372036854775807}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}, "409": {"description": "Conflict with the current record or a previous request."}}, "security": [{"bearerAuth": []}], "operationId": "list_config_reservation_types_post", "x-required-scope": "config:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"request_key": {"type": "string", "format": "uuid"}, "fields": {"type": "object", "minProperties": 1, "additionalProperties": false, "properties": {"name": {"type": "string", "maxLength": 100, "minLength": 1}, "slug": {"type": "string", "maxLength": 50, "minLength": 1, "pattern": "^[-a-zA-Z0-9_]+$"}, "colour": {"type": "string", "maxLength": 7, "minLength": 1, "pattern": "^#[a-fA-F0-9]{6}$"}, "max_duration": {"type": "integer", "minimum": 1, "maximum": 1440}, "min_notice": {"type": "integer", "minimum": 0, "maximum": 525600}, "cancellation_window": {"type": "integer", "minimum": 0, "maximum": 8760}, "allowed_roles": {"type": "array", "items": {"type": "string", "enum": ["member", "captain", "coach", "frontdesk", "admin", "manager", "owner"]}, "minItems": 0, "maxItems": 7, "uniqueItems": true}, "requires_membership": {"type": "boolean"}, "rate_card_id": {"type": ["integer", "null"], "minimum": 1, "maximum": 9223372036854775807}}, "required": ["name", "slug"]}}, "required": ["request_key", "fields"], "additionalProperties": false}}}}}}, "/api/v1/clubs/{slug}/config/reservation-types/{pk}/": {"get": {"summary": "Config Reservation Types", "description": "Required scope: config:read. Read the current revision before editing. Source-managed records are read-only. Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "pk", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Success"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "config_reservation_types_get", "x-required-scope": "config:read"}, "post": {"summary": "Config Reservation Types", "description": "Required scope: config:write. Read the current revision before editing. Source-managed records are read-only. Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "pk", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}, "409": {"description": "Conflict with the current record or a previous request."}}, "security": [{"bearerAuth": []}], "operationId": "config_reservation_types_post", "x-required-scope": "config:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"revision": {"type": "string", "maxLength": 64, "minLength": 1, "pattern": "^[0-9a-f]{64}$"}, "fields": {"type": "object", "minProperties": 1, "additionalProperties": false, "properties": {"name": {"type": "string", "maxLength": 100, "minLength": 1}, "slug": {"type": "string", "maxLength": 50, "minLength": 1, "pattern": "^[-a-zA-Z0-9_]+$"}, "colour": {"type": "string", "maxLength": 7, "minLength": 1, "pattern": "^#[a-fA-F0-9]{6}$"}, "max_duration": {"type": "integer", "minimum": 1, "maximum": 1440}, "min_notice": {"type": "integer", "minimum": 0, "maximum": 525600}, "cancellation_window": {"type": "integer", "minimum": 0, "maximum": 8760}, "allowed_roles": {"type": "array", "items": {"type": "string", "enum": ["member", "captain", "coach", "frontdesk", "admin", "manager", "owner"]}, "minItems": 0, "maxItems": 7, "uniqueItems": true}, "requires_membership": {"type": "boolean"}, "rate_card_id": {"type": ["integer", "null"], "minimum": 1, "maximum": 9223372036854775807}}, "required": []}}, "required": ["revision", "fields"], "additionalProperties": false}}}}}}, "/api/v1/clubs/{slug}/config/membership-plans/": {"get": {"summary": "List Config Membership Plans", "description": "Required scope: config:read. Create with a new UUID request_key; repeat that key when retrying. Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "q", "in": "query", "schema": {"type": "string", "maxLength": 100, "minLength": 0}}, {"name": "after", "in": "query", "schema": {"type": "integer", "minimum": 0, "maximum": 9223372036854775807}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100}}], "responses": {"200": {"description": "Success"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "list_config_membership_plans_get", "x-required-scope": "config:read"}, "post": {"summary": "List Config Membership Plans", "description": "Required scope: config:write. Create with a new UUID request_key; repeat that key when retrying. Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "q", "in": "query", "schema": {"type": "string", "maxLength": 100, "minLength": 0}}, {"name": "after", "in": "query", "schema": {"type": "integer", "minimum": 0, "maximum": 9223372036854775807}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}, "409": {"description": "Conflict with the current record or a previous request."}}, "security": [{"bearerAuth": []}], "operationId": "list_config_membership_plans_post", "x-required-scope": "config:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"request_key": {"type": "string", "format": "uuid"}, "fields": {"type": "object", "minProperties": 1, "additionalProperties": false, "properties": {"name": {"type": "string", "maxLength": 100, "minLength": 1}, "price": {"type": "string", "maxLength": 11, "minLength": 1, "pattern": "^(0|[1-9][0-9]{0,7})(\\.[0-9]{1,2})?$"}, "period": {"type": "string", "enum": ["annual", "monthly", "season"]}, "booking_horizon_days": {"type": "integer", "minimum": 0, "maximum": 32767}, "courts_per_week": {"type": ["integer", "null"], "minimum": 0, "maximum": 32767}, "cancel_hours": {"type": "integer", "minimum": 0, "maximum": 32767}, "age_restricted": {"type": ["integer", "null"], "minimum": 0, "maximum": 32767}, "is_family": {"type": "boolean"}}, "required": ["name", "price", "period"]}}, "required": ["request_key", "fields"], "additionalProperties": false}}}}}}, "/api/v1/clubs/{slug}/config/membership-plans/{pk}/": {"get": {"summary": "Config Membership Plans", "description": "Required scope: config:read. Read the current revision before editing. Source-managed records are read-only. Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "pk", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Success"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "config_membership_plans_get", "x-required-scope": "config:read"}, "post": {"summary": "Config Membership Plans", "description": "Required scope: config:write. Read the current revision before editing. Source-managed records are read-only. Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "pk", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}, "409": {"description": "Conflict with the current record or a previous request."}}, "security": [{"bearerAuth": []}], "operationId": "config_membership_plans_post", "x-required-scope": "config:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"revision": {"type": "string", "maxLength": 64, "minLength": 1, "pattern": "^[0-9a-f]{64}$"}, "fields": {"type": "object", "minProperties": 1, "additionalProperties": false, "properties": {"name": {"type": "string", "maxLength": 100, "minLength": 1}, "price": {"type": "string", "maxLength": 11, "minLength": 1, "pattern": "^(0|[1-9][0-9]{0,7})(\\.[0-9]{1,2})?$"}, "period": {"type": "string", "enum": ["annual", "monthly", "season"]}, "booking_horizon_days": {"type": "integer", "minimum": 0, "maximum": 32767}, "courts_per_week": {"type": ["integer", "null"], "minimum": 0, "maximum": 32767}, "cancel_hours": {"type": "integer", "minimum": 0, "maximum": 32767}, "age_restricted": {"type": ["integer", "null"], "minimum": 0, "maximum": 32767}, "is_family": {"type": "boolean"}}, "required": []}}, "required": ["revision", "fields"], "additionalProperties": false}}}}}}, "/api/v1/clubs/{slug}/config/programs/": {"get": {"summary": "List Config Programs", "description": "Required scope: config:read. Create with a new UUID request_key; repeat that key when retrying. Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "q", "in": "query", "schema": {"type": "string", "maxLength": 100, "minLength": 0}}, {"name": "after", "in": "query", "schema": {"type": "integer", "minimum": 0, "maximum": 9223372036854775807}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100}}], "responses": {"200": {"description": "Success"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "list_config_programs_get", "x-required-scope": "config:read"}, "post": {"summary": "List Config Programs", "description": "Required scope: config:write. Create with a new UUID request_key; repeat that key when retrying. Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "q", "in": "query", "schema": {"type": "string", "maxLength": 100, "minLength": 0}}, {"name": "after", "in": "query", "schema": {"type": "integer", "minimum": 0, "maximum": 9223372036854775807}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}, "409": {"description": "Conflict with the current record or a previous request."}}, "security": [{"bearerAuth": []}], "operationId": "list_config_programs_post", "x-required-scope": "config:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"request_key": {"type": "string", "format": "uuid"}, "fields": {"type": "object", "minProperties": 1, "additionalProperties": false, "properties": {"name": {"type": "string", "maxLength": 100, "minLength": 1}, "season": {"type": "string", "maxLength": 100, "minLength": 0}, "price": {"type": "string", "maxLength": 11, "minLength": 1, "pattern": "^(0|[1-9][0-9]{0,7})(\\.[0-9]{1,2})?$"}, "member_price": {"type": "string", "maxLength": 11, "minLength": 1, "pattern": "^(0|[1-9][0-9]{0,7})(\\.[0-9]{1,2})?$"}, "capacity": {"type": "integer", "minimum": 0, "maximum": 32767}, "level_min": {"type": ["number", "null"], "minimum": 1, "maximum": 7}, "level_max": {"type": ["number", "null"], "minimum": 1, "maximum": 7}, "registration_opens": {"type": ["string", "null"], "format": "date-time", "maxLength": 50}, "registration_closes": {"type": ["string", "null"], "format": "date-time", "maxLength": 50}, "is_drop_in": {"type": "boolean"}, "assigned_coach_id": {"type": ["integer", "null"], "minimum": 1, "maximum": 9223372036854775807}}, "required": ["name"]}}, "required": ["request_key", "fields"], "additionalProperties": false}}}}}}, "/api/v1/clubs/{slug}/config/programs/{pk}/": {"get": {"summary": "Config Programs", "description": "Required scope: config:read. Read the current revision before editing. Source-managed records are read-only. Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "pk", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Success"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "config_programs_get", "x-required-scope": "config:read"}, "post": {"summary": "Config Programs", "description": "Required scope: config:write. Read the current revision before editing. Source-managed records are read-only. Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "pk", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}, "409": {"description": "Conflict with the current record or a previous request."}}, "security": [{"bearerAuth": []}], "operationId": "config_programs_post", "x-required-scope": "config:write", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"revision": {"type": "string", "maxLength": 64, "minLength": 1, "pattern": "^[0-9a-f]{64}$"}, "fields": {"type": "object", "minProperties": 1, "additionalProperties": false, "properties": {"name": {"type": "string", "maxLength": 100, "minLength": 1}, "season": {"type": "string", "maxLength": 100, "minLength": 0}, "price": {"type": "string", "maxLength": 11, "minLength": 1, "pattern": "^(0|[1-9][0-9]{0,7})(\\.[0-9]{1,2})?$"}, "member_price": {"type": "string", "maxLength": 11, "minLength": 1, "pattern": "^(0|[1-9][0-9]{0,7})(\\.[0-9]{1,2})?$"}, "capacity": {"type": "integer", "minimum": 0, "maximum": 32767}, "level_min": {"type": ["number", "null"], "minimum": 1, "maximum": 7}, "level_max": {"type": ["number", "null"], "minimum": 1, "maximum": 7}, "registration_opens": {"type": ["string", "null"], "format": "date-time", "maxLength": 50}, "registration_closes": {"type": ["string", "null"], "format": "date-time", "maxLength": 50}, "is_drop_in": {"type": "boolean"}, "assigned_coach_id": {"type": ["integer", "null"], "minimum": 1, "maximum": 9223372036854775807}}, "required": []}}, "required": ["revision", "fields"], "additionalProperties": false}}}}}}, "/api/v1/clubs/{slug}/config/waivers/": {"get": {"summary": "Waiver Catalog", "description": "Required scope: waivers:read. Each effective agreement is required separately. A signature covers only its agreement, for 365 days when annual renewal is enabled. Coverage does not compare the version label. Publish only a new independent requirement. Existing agreements cannot be replaced or retired here. Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "after", "in": "query", "schema": {"type": "integer", "minimum": 0}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 25}}], "responses": {"200": {"description": "Success"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "waiver_catalog_get", "x-required-scope": "waivers:read"}, "post": {"summary": "Waiver Catalog", "description": "Required scope: waivers:publish. Each effective agreement is required separately. A signature covers only its agreement, for 365 days when annual renewal is enabled. Coverage does not compare the version label. Publish only a new independent requirement. Existing agreements cannot be replaced or retired here. Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "after", "in": "query", "schema": {"type": "integer", "minimum": 0}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 25}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}, "409": {"description": "Conflict with the current record or a previous request."}}, "security": [{"bearerAuth": []}], "operationId": "waiver_catalog_post", "x-required-scope": "waivers:publish", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"title": {"type": "string", "minLength": 1, "maxLength": 200}, "body": {"type": "string", "minLength": 1, "maxLength": 50000}, "version": {"type": "string", "minLength": 1, "maxLength": 30}, "effective_from": {"type": "string", "format": "date"}, "requires_annual_renewal": {"type": "boolean"}, "confirm_new_requirement": {"type": "boolean", "const": true}, "request_key": {"type": "string", "format": "uuid"}, "revision": {"type": "string", "pattern": "^[0-9a-f]{64}$"}}, "required": ["title", "body", "version", "effective_from", "requires_annual_renewal", "confirm_new_requirement", "request_key", "revision"], "additionalProperties": false}}}}}}, "/api/v1/clubs/{slug}/config/waivers/{pk}/": {"get": {"summary": "Waiver Version", "description": "Required scope: waivers:read. Read one agreement's exact stored text, version and renewal rule. Signing is a separate personal workflow. Requires a current club owner.", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "pk", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Success"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "waiver_version_get", "x-required-scope": "waivers:read"}}, "/api/v1/clubs/{slug}/config/capabilities/": {"get": {"summary": "Capabilities", "description": "Uses the same business rules as the club application. Scope depends on method. ", "parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Success"}, "201": {"description": "Created"}, "400": {"description": "Invalid request"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient access"}}, "security": [{"bearerAuth": []}], "operationId": "capabilities_get"}}}, "components": {"securitySchemes": {"bearerAuth": {"type": "http", "scheme": "bearer"}}}}