Activities
Activities represent individual training sessions or races. Each activity belongs to an athlete and can have a nutrition prescription, selected products, and post-activity feedback attached.
Activity lifecycle
Create activity -> Calculate prescription -> (Optional) Add products -> (Optional) Submit feedback
- Create the activity with type, duration, and optional intensity/thermal stress
- Calculate a nutrition prescription for it
- Add products the athlete plans to use (optional — for preparation planning)
- Submit feedback after the activity (optional — improves future prescriptions)
Creating an activity
import requests
response = requests.post(
"https://api.saturday.fit/v1/athletes/ath_abc123/activities",
headers={"Authorization": "Bearer sk_test_abc123def456"},
json={
"type": "run",
"name": "Saturday long run",
"duration_min": 120,
"intensity_level": 5,
"scheduled_at": "2025-01-15T07:00:00Z",
"thermal_stress_level": 4,
},
)
activity = response.json()
print(f"Activity ID: {activity['id']}")
Activity fields
| Field | Type | Required | Description |
|---|
type | string | Yes | Activity type (see supported types) |
duration_min | integer | Yes | Expected duration in minutes |
intensity_level | integer | No | 1-9 scale |
thermal_stress_level | integer | No | 1-9 scale |
is_race_event | boolean | No | Whether this is a race |
name | string | No | Human-readable label |
scheduled_at | string | No | ISO 8601 datetime |
Multi-sport activities
For triathlons and brick workouts, specify sub-activities:
{
"type": "bike",
"name": "Olympic distance race",
"duration_min": 165,
"intensity_level": 8,
"is_race_event": true
}
Saturday calculates prescriptions tailored to the activity type — you fuel differently on the bike than on a run.
Calculating a prescription
POST /v1/athletes/{athlete_id}/activities/{activity_id}/prescription
This uses the activity’s parameters and the athlete’s profile to generate a personalized prescription. Recalculating overwrites the previous prescription — use this when activity parameters change (e.g., updated weather forecast).
Getting an activity with prescription
GET /v1/athletes/{athlete_id}/activities/{activity_id}
The activity response includes the prescription, safety metadata, and any attached products.
Listing activities
GET /v1/athletes/{athlete_id}/activities?from=2025-01-01&to=2025-01-31&type=running
Supports filtering by date range and type.
Submitting feedback
Post-activity feedback improves future prescriptions:
response = requests.post(
"https://api.saturday.fit/v1/athletes/ath_abc123/activities/act_xyz789/feedback",
headers={"Authorization": "Bearer sk_test_abc123def456"},
json={
"gi_comfort": "good",
"energy_level": "adequate",
"hydration_feel": "slightly_dehydrated",
"notes": "Felt good until mile 18, then energy dropped",
"actual_intake": {
"carbs_grams": 100,
"fluid_ml": 900,
"sodium_mg": 800,
},
},
)
Feedback fields
| Field | Values | Description |
|---|
gi_comfort | excellent, good, fair, poor | GI comfort during activity |
energy_level | surplus, adequate, low, bonked | Energy levels throughout |
hydration_feel | over_hydrated, well_hydrated, slightly_dehydrated, dehydrated | Perceived hydration |
actual_intake | object | What the athlete actually consumed |
Feedback is the single most valuable signal for improving future prescriptions. The more activities with feedback, the more personalized Saturday becomes. Encourage athletes to submit feedback — even simple ratings help.
Activity type inference
If your platform has activity metadata but not a clean type, Saturday can infer it:
POST /v1/inference/activity-type
{
"title": "Morning jog around Green Lake",
"description": "Easy recovery after yesterday's intervals",
"tags": ["recovery", "outdoor"]
}
Response:
{
"inferred_type": "run",
"confidence": 0.95,
"intensity_hint": "easy"
}
For multi-sport titles like “Bike/run brick”, use POST /v1/inference/activity-type/brick.