Technical integration options for leagues and sportsbooks
π― Integration Options
For League Owners
1. Self-Service Portal (Recommended)
- Best For: Most leagues without technical teams
- Time: 15-30 minutes to submit
- Features: Guided questionnaire, document upload, progress tracking
- Access: portal.altsportsleagues.ai
2. API Integration
- Best For: Leagues with technical teams or existing APIs
- Time: 1-2 hours setup
- Features: Direct API access, webhook notifications, batch processing
- Documentation: See API Reference below
3. Email Submission
- Best For: Quick initial inquiry or document-heavy submissions
- Time: 30 minutes to prepare email
- Features: Automated processing, follow-up support
- Contact: partnerships@altsportsleagues.ai
For Sportsbooks
1. REST API Integration
- Best For: Most sportsbook platforms
- Time: 2-4 weeks implementation
- Cost: $25K one-time integration fee
- Features: Full programmatic access, real-time data, webhooks
2. Webhook Integration
- Best For: Real-time data requirements
- Time: Additional 1-2 days
- Features: Instant notifications, event-driven updates
- Events: League updates, match results, odds changes
3. Batch Processing
- Best For: Bulk data operations
- Time: Minimal additional setup
- Features: Efficient bulk operations, rate limit optimization
π Data Models & Schemas
League Questionnaire Data
When submitting your league for evaluation, provide this core information:
{
"league_name": "World Sevens Football League",
"sport_type": "football",
"contact_name": "Sarah Johnson",
"contact_email": "partnerships@worldsevens.com",
"contact_title": "Director of Business Development",
"participant_count": 8,
"fan_base_size": 500000,
"geographic_scope": "international",
"years_operating": 3,
"has_api": true,
"budget_range": "premium",
"website": "https://worldsevens.com",
"social_media": {
"twitter": "@WorldSevens",
"instagram": "@worldsevensfootball"
}
}Required Fields:
league_name: Official league namesport_type: football, basketball, hockey, etc.contact_email: Primary contact emailparticipant_count: Number of teams/participants
Optional but Recommended:
fan_base_size: Estimated fan basegeographic_scope: local, regional, national, internationalhas_api: Whether you have programmatic data accesswebsite: League website URL
League Assessment Results
After AI evaluation, you'll receive a comprehensive assessment:
{
"league_id": "world-sevens-001",
"assessment_date": "2024-01-27T10:30:00Z",
"overall_score": 87,
"tier_recommendation": "professional",
"revenue_projection": {
"conservative": 300000,
"most_likely": 450000,
"optimistic": 600000
},
"dimension_scores": {
"data_quality": 92,
"api_readiness": 85,
"market_viability": 88,
"operational_readiness": 82,
"compliance": 95
},
"sportsbook_compatibility": {
"draftkings": {
"score": 90,
"timeline_weeks": 4,
"revenue_share": 0.15
},
"fanduel": {
"score": 87,
"timeline_weeks": 5,
"revenue_share": 0.12
}
},
"recommendations": [
"Consider upgrading API documentation for faster integration",
"Historical data completeness is excellent",
"Strong market position in alternative football"
]
}Real-Time Event Data
For live event integration, events follow this structure:
{
"event_id": "match-2024-001",
"league_id": "world-sevens-001",
"event_type": "match_start",
"timestamp": "2024-01-27T15:00:00Z",
"match_data": {
"home_team": "England Sevens",
"away_team": "France Sevens",
"venue": "Wembley Stadium",
"scheduled_start": "2024-01-27T15:00:00Z"
},
"odds": {
"home_win": 2.10,
"away_win": 3.25,
"draw": 3.40
}
}Event Types:
match_start: Match beginsscore_update: Goals/points scoredmatch_end: Match completesodds_update: Odds changesmatch_cancelled: Match cancelled
Historical League Data
For comprehensive league analysis, provide historical data:
{
"league_id": "world-sevens-001",
"seasons": [
{
"year": 2023,
"teams": 8,
"matches": 28,
"total_attendance": 125000,
"champion": "England Sevens",
"top_scorer": {
"name": "Alex Thompson",
"goals": 24
},
"final_standings": [
{"team": "England Sevens", "position": 1, "points": 42},
{"team": "France Sevens", "position": 2, "points": 38}
]
}
]
}π API Reference
Authentication
All API requests require authentication using API keys:
# Include in request headers
Authorization: Bearer YOUR_API_KEY
Content-Type: application/jsonGetting an API Key:
- League owners: Provided during onboarding
- Sportsbooks: Contact partnerships@altsportsleagues.ai
Core Endpoints
Submit League for Assessment
POST /api/leagues/submit
Content-Type: application/json
{
"league_data": {
"name": "Your League",
"sport": "football",
// ... league details
},
"documents": [
{
"type": "questionnaire",
"content": "base64_encoded_content"
}
]
}Response:
{
"pipeline_id": "pipeline-12345",
"status": "processing",
"estimated_completion": "2024-01-29T10:00:00Z"
}Get Assessment Results
GET /api/leagues/assessment/{league_id}
Authorization: Bearer YOUR_API_KEYResponse:
{
"league_id": "your-league-id",
"assessment": { /* full assessment object */ },
"status": "completed",
"completed_at": "2024-01-27T12:00:00Z"
}List Available Leagues (Sportsbooks)
GET /api/leagues
Authorization: Bearer YOUR_API_KEY
Query Parameters:
- sport: Filter by sport type
- tier: Filter by tier (entry, standard, professional, premium)
- limit: Number of results (default: 20)
- include_assessments: Include assessment data (default: false)Response:
{
"leagues": [
{
"id": "world-sevens-001",
"name": "World Sevens Football League",
"sport": "football",
"tier": "professional",
"assessment_score": 87,
"revenue_projection": 450000
}
],
"total": 47,
"has_more": true
}Integrate League (Sportsbooks)
POST /api/leagues/{league_id}/integrate
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"betting_platform": "draftkings",
"markets": ["match_winner", "total_goals"],
"odds_format": "american",
"real_time_updates": true
}Response:
{
"integration_id": "int-12345",
"status": "integrating",
"estimated_completion": "2024-02-03T10:00:00Z",
"pipeline_url": "https://portal.altsportsleagues.ai/integration/int-12345"
}Real-Time Data Endpoints
Webhook Registration
POST /api/webhooks/register
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"url": "https://your-app.com/webhooks/altsports",
"events": ["league.assessed", "match.started", "odds.updated"],
"secret": "your-webhook-secret"
}Event Streaming
GET /api/events/stream
Authorization: Bearer YOUR_API_KEY
Query Parameters:
- leagues: Comma-separated league IDs
- event_types: Comma-separated event types
- since: ISO timestamp for historical eventsπ» Code Examples
JavaScript/TypeScript Integration
League Submission
import { AltSportsDataClient } from '@altsportsdata/sdk';
const client = new AltSportsDataClient({
apiKey: process.env.ALTSportsData_API_KEY
});
async function submitLeague() {
try {
const response = await client.leagues.submit({
name: 'World Sevens Football League',
sport: 'football',
contact_email: 'partnerships@worldsevens.com',
teams_count: 8,
fan_base_size: 500000,
has_api: true
});
console.log('Pipeline created:', response.pipeline_id);
// Monitor progress
const status = await client.leagues.getStatus(response.pipeline_id);
console.log('Status:', status.stage);
} catch (error) {
console.error('Submission failed:', error.message);
}
}Sportsbook League Integration
async function integrateLeague() {
// Get available leagues
const leagues = await client.leagues.list({
sport: 'football',
tier: 'premium',
limit: 10
});
// Select a league
const targetLeague = leagues.find(l => l.name.includes('Sevens'));
// Integrate with your platform
const integration = await client.leagues.integrate(targetLeague.id, {
betting_platform: 'draftkings',
markets: ['match_winner', 'total_goals', 'player_props'],
odds_format: 'american',
real_time_updates: true,
webhook_url: 'https://your-platform.com/webhooks'
});
console.log('Integration started:', integration.integration_id);
}Python Integration
League Assessment Monitoring
import requests
from datetime import datetime
class AltSportsDataClient:
def __init__(self, api_key):
self.api_key = api_key
self.base_url = 'https://api.altsportsdata.com'
def get_assessment(self, league_id):
headers = {
'Authorization': f'Bearer {self.api_key}',
'Content-Type': 'application/json'
}
response = requests.get(
f'{self.base_url}/api/leagues/assessment/{league_id}',
headers=headers
)
return response.json()
# Usage
client = AltSportsDataClient('your-api-key')
assessment = client.get_assessment('world-sevens-001')
print(f"Tier: {assessment['tier_recommendation']}")
print(f"Score: {assessment['overall_score']}/100")
print(f"Revenue: ${assessment['revenue_projection']['most_likely']:,}")Webhook Handler
const express = require('express');
const crypto = require('crypto');
const app = express();
app.use(express.json());
// Webhook secret (set when registering webhook)
const WEBHOOK_SECRET = 'your-webhook-secret';
app.post('/webhooks/altsports', (req, res) => {
// Verify webhook signature
const signature = req.headers['x-altsports-signature'];
const expectedSignature = crypto
.createHmac('sha256', WEBHOOK_SECRET)
.update(JSON.stringify(req.body))
.digest('hex');
if (signature !== expectedSignature) {
return res.status(401).send('Invalid signature');
}
// Process webhook
const { event, data } = req.body;
switch (event) {
case 'league.assessed':
console.log('New league assessed:', data.league_name);
updateBettingMarkets(data);
break;
case 'match.started':
console.log('Match started:', data.match_id);
startLiveBetting(data);
break;
case 'odds.updated':
console.log('Odds updated for match:', data.match_id);
updateOdds(data);
break;
}
res.sendStatus(200);
});
app.listen(3000);π Webhook Events
League Events
league.submitted- New league submitted for assessmentleague.assessed- Assessment completed with tier recommendationleague.integrated- League integrated with sportsbookleague.activated- League live and generating revenue
Match Events
match.scheduled- New match added to schedulematch.started- Match has begunmatch.score_updated- Score changed during live matchmatch.ended- Match completed with final scorematch.cancelled- Match cancelledmatch.postponed- Match postponed to new time
Odds Events
odds.initial- Opening odds set for matchodds.updated- Odds changed (live betting)odds.locked- Odds locked (match started)odds.settled- Final odds for settlement
System Events
system.maintenance- Platform maintenance scheduledsystem.outage- Service disruptionsystem.recovered- Service restored
π Rate Limits & Performance
API Rate Limits
- Authenticated Requests: 1000 per minute
- Webhook Deliveries: 5000 per hour
- File Uploads: 10 per hour (max 10MB each)
- Bulk Operations: 100 items per request
Performance Guarantees
- API Response Time: P95 < 500ms
- Webhook Delivery: < 5 seconds
- Data Freshness: < 30 seconds for live events
- Uptime: 99.9% SLA
Optimization Tips
Batch Operations
// Process multiple leagues efficiently
const leagueIds = ['league-1', 'league-2', 'league-3'];
const batchPromises = leagueIds.map(id =>
client.leagues.getAssessment(id)
);
// Control concurrency
const results = await Promise.all(batchPromises.slice(0, 10)); // Max 10 concurrentCaching Strategy
// Cache assessment results
const assessmentCache = new Map();
async function getCachedAssessment(leagueId) {
if (assessmentCache.has(leagueId)) {
const cached = assessmentCache.get(leagueId);
if (Date.now() - cached.timestamp < 300000) { // 5 min cache
return cached.data;
}
}
const assessment = await client.leagues.getAssessment(leagueId);
assessmentCache.set(leagueId, {
data: assessment,
timestamp: Date.now()
});
return assessment;
}Webhook Reliability
// Implement retry logic for webhooks
async function sendWebhookWithRetry(url, payload, maxRetries = 3) {
for (let attempt = 1; attempt <= maxRetries; attempt++) {
try {
const response = await fetch(url, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload)
});
if (response.ok) return;
// Exponential backoff
await new Promise(resolve =>
setTimeout(resolve, Math.pow(2, attempt) * 1000)
);
} catch (error) {
if (attempt === maxRetries) throw error;
}
}
}π Security & Compliance
Authentication
- API Keys: Unique keys per integration
- Request Signing: HMAC signatures for webhooks
- IP Whitelisting: Optional IP restrictions
- Key Rotation: Automatic rotation every 90 days
Data Protection
- Encryption: All data encrypted in transit and at rest
- GDPR Compliance: Data processing agreements
- Audit Logging: Complete activity tracking
- Data Retention: Configurable retention policies
Error Handling
// Comprehensive error handling
try {
const result = await client.leagues.integrate(leagueId, config);
} catch (error) {
switch (error.code) {
case 'RATE_LIMIT_EXCEEDED':
await delay(error.retry_after);
return retryOperation();
case 'INVALID_LEAGUE':
console.error('League not found or ineligible');
return;
case 'DUPLICATE_INTEGRATION':
console.log('League already integrated');
return;
default:
console.error('Integration failed:', error.message);
throw error;
}
}π Troubleshooting
Common Integration Issues
Authentication Errors
Error: Invalid API key
Solution: Regenerate key at portal.altsportsleagues.aiWebhook Signature Mismatch
Error: Webhook signature verification failed
Solution: Verify webhook secret matches registrationRate Limit Exceeded
Error: Too many requests
Solution: Implement exponential backoff, reduce request frequencyData Format Errors
Error: Invalid league data format
Solution: Validate against schema before submissionSupport Resources
- Technical Documentation: Comprehensive API guides
- Integration Examples: Code samples for common scenarios
- Support Portal: support.altsportsleagues.ai
- Developer Community: Slack channel for peer support
π Getting Started
Quick Start Checklist
For League Owners
- Sign up at portal.altsportsleagues.ai
- Complete league questionnaire
- Upload required documents
- Review assessment results
- Sign partnership agreement
- Begin integration process
For Sportsbooks
- Contact partnerships@altsportsleagues.ai
- Complete partnership agreement
- Receive API credentials
- Set up webhook endpoints
- Browse available leagues
- Start integration process
Need help? Contact integrations@altsportsleagues.ai