Skip to main content

Recovery Endpoints

Endpoints for tracking sleep, energy, and soreness.


Get Recovery Logs

GET /api/recovery

Returns recovery logs for a time period.

Query Parameters

ParameterTypeDefaultDescription
daysnumber7Number of days to fetch
datestring-Get specific date (YYYY-MM-DD)

Response

{
"logs": [
{
"id": "rec123",
"date": "2024-12-22",
"sleepHours": 7.5,
"sleepQuality": 4,
"energyLevel": 4,
"overallSoreness": 2,
"sorenessAreas": ["legs"],
"stressLevel": 3,
"notes": null,
"createdAt": "2024-12-22T08:00:00Z"
}
],
"summary": {
"avgSleep": 7.2,
"avgEnergy": 3.8,
"avgSoreness": 2.3,
"avgStress": 2.9,
"avgQuality": 3.5,
"daysLogged": 5,
"totalDays": 7
}
}

Log Recovery

POST /api/recovery

Logs daily recovery metrics. Updates existing log if one exists for today.

Request Body

{
"sleepHours": 7.5,
"sleepQuality": 4,
"energyLevel": 4,
"overallSoreness": 2,
"sorenessAreas": ["legs", "back"],
"stressLevel": 3,
"notes": "Slept well, feeling good"
}

Field Definitions

FieldTypeRangeDescription
sleepHoursnumber0-24Hours of sleep
sleepQualitynumber1-51=Poor, 5=Excellent
energyLevelnumber1-51=Low, 5=High
overallSorenessnumber1-51=None, 5=Severe
sorenessAreasstring[]-Body parts that are sore
stressLevelnumber1-51=Low, 5=High
notesstring-Optional notes

Response

{
"log": {
"id": "rec123",
"date": "2024-12-22",
"sleepHours": 7.5,
"sleepQuality": 4,
"energyLevel": 4,
"overallSoreness": 2,
"sorenessAreas": ["legs", "back"],
"stressLevel": 3,
"notes": "Slept well, feeling good",
"createdAt": "2024-12-22T08:00:00Z"
},
"isUpdate": false
}

How Recovery Affects Training

Recovery data feeds into the fatigue calculation:

MetricImpact on Fatigue
Sleep < 6 hours+1 fatigue point
Sleep quality < 3+0.5 fatigue point
Energy < 3+1 fatigue point
Soreness > 3+1 fatigue point
Stress > 4+0.5 fatigue point

High recovery debt can:

  • Increase fatigue score
  • Block progression gates
  • Trigger deload recommendations
  • Reduce suggested weights