Skip to content

Sellwyse Calculated Scores API

All scores are calculated from raw metrics stored via CRUD endpoints.

Dashboard Endpoints

GET /health/dashboard/overview

Returns all scores in one call.

{
  "readiness": { "score": 71, "status": "Fair", ... },
  "strain": { "score": 12.5, "level": "Moderate", ... },
  "fitness": { "score": 60, "level": "Beginner", ... },
  "body_status": { "current_weight_kg": 75, "bmi": 23.7, ... },
  "training_load": { "weekly_load": 360, "status": "optimal", ... },
  "health_intelligence": { "overall_status": "Good", ... }
}

GET /health/dashboard/readiness

Readiness Score (0-100) - Training readiness based on recovery.

Calculation: - HRV Score (40%) - Resting HR Score (30%) - Sleep Score (30%)

{
  "score": 71,
  "status": "Fair|Good|Excellent|Poor",
  "components": {
    "hrv_score": 60,
    "rhr_score": 75,
    "sleep_score": 85
  },
  "recommendation": "Consider lighter training.",
  "trend": "stable|increasing|decreasing"
}

GET /health/dashboard/strain

Strain Score (0-21) - WHOOP-style cardiovascular load.

Calculation: - Based on HR zones during workouts - Time in each zone weighted by intensity

{
  "score": 12.5,
  "level": "Light|Moderate|High|All Out",
  "cardiovascular_load": 125.0,
  "active_minutes": 60,
  "calories": 500,
  "hr_zones": {
    "zone1_mins": 10,
    "zone2_mins": 20,
    "zone3_mins": 20,
    "zone4_mins": 8,
    "zone5_mins": 2
  }
}

GET /health/dashboard/fitness

Fitness Score - Cumulative training progress.

Calculation: - Based on recent workout history - Decays over time without training

{
  "score": 60,
  "weekly_change": +5,
  "monthly_change": +15,
  "level": "Beginner|Intermediate|Advanced|Elite",
  "activities_count": 6,
  "trend": "increasing"
}

GET /health/dashboard/body-status

Body composition summary.

{
  "current_weight_kg": 75.0,
  "weight_change_7d": -0.5,
  "body_fat_percent": 18.0,
  "muscle_mass_kg": 35.0,
  "bmi": 23.7,
  "bmi_category": "Normal",
  "metabolic_age": 28,
  "body_score": 85,
  "trend": "improving"
}

GET /health/dashboard/training-load

Weekly training load vs optimal range.

{
  "weekly_load": 360,
  "optimal_range_min": 150,
  "optimal_range_max": 300,
  "status": "optimal|undertrained|overtrained",
  "daily_breakdown": [...],
  "recommendation": "Maintain current training volume."
}

GET /health/dashboard/health-intelligence

Overall health summary.

{
  "readiness_score": 85,
  "recovery_score": 78,
  "strain_score": 12.5,
  "sleep_score": 85,
  "hrv_score": 75,
  "stress_level": 3,
  "fitness_age": 25,
  "vo2max": 45,
  "overall_status": "Good|Fair|Excellent|Poor"
}

Insights Endpoints

GET /health/insights/sleep

Sleep analysis and patterns.

GET /health/insights/activity

Activity trends and statistics.

GET /health/insights/heart

Heart rate and HRV analysis.

GET /health/insights/vitals

Vital signs summary.

GET /health/insights/trends?period=week|month

Historical trends.

GET /health/insights/summary

Overall health summary.

GET /health/insights/compare?period1=last_7_days&period2=last_30_days&metric=steps

Compare metrics between two periods.

Supported metrics: steps, calories, distance, sleep, heart_rate


Frontend Calculation Alignment

Frontend Score Backend Endpoint Status
biologicalAge /dashboard/overview
metabolicHealth /dashboard/body-status
cardiovascularFitness /dashboard/fitness
readinessScore /dashboard/readiness
recoveryPotential /dashboard/readiness
sleepPerformance /insights/sleep
stressResilience /dashboard/health-intelligence
strainScore /dashboard/strain
fitnessScore /dashboard/fitness
injuryRiskIndex /dashboard/training-load
overtrainingRisk /dashboard/training-load

Example: Full Dashboard Fetch

curl -H "Authorization: Bearer $TOKEN" \
  "https://api.sellwyse.com/health/dashboard/overview"

Returns all calculated scores in one request for efficient dashboard rendering.