Hydration Plan API¶
Generate enterprise-ready hydration guidance from body weight, ambient temperature, and training duration.
Endpoint¶
GET /api/v1/fitness/hydration-planPOST /api/v1/fitness/hydration-plan/post
Parameters¶
| Name | Type | Required | In | Description |
|---|---|---|---|---|
weight | number (35-300) | Yes | Query/Body | Body weight in kilograms. |
temperature_c | number (-10 to 55) | Yes | Query/Body | Ambient temperature in celsius. |
training_minutes | integer (0-360) | Yes | Query/Body | Daily training duration. |
lang | string | No | Query | Response language (en,es,de,fr,pt,ja,hi,ar). |
Why Use This Endpoint¶
- Personalize hydration planning for climate and workload.
- Return sodium, potassium, and magnesium targets.
- Provide timing-specific intake protocol for pre/during/post training.
Request Example¶
curl -X GET "https://api.hefitapi.com/api/v1/fitness/hydration-plan?weight=78&temperature_c=31&training_minutes=75&lang=en" \
-H "X-API-Key: YOUR_API_KEY"
curl -X POST "https://api.hefitapi.com/api/v1/fitness/hydration-plan/post?lang=en" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{"weight":78,"temperature_c":31,"training_minutes":75}'
Response Example¶
Info
The response example below is for demonstration purposes only. Make a live request to this endpoint to receive the full, real-time, and potentially richer JSON structure.
{
"weight_kg": 78.0,
"temperature_c": 31.0,
"training_minutes": 75,
"training_load": "moderate",
"training_load_label": "Moderate",
"heat_profile": "high",
"heat_profile_label": "High",
"hydration_plan": {
"baseline_hydration_liters": 2.57,
"workout_hydration_liters": 0.75,
"heat_adjustment_liters": 1.35,
"total_daily_target_liters": 4.67
},
"daily_hydration_baseline_liters": 2.57,
"electrolyte_targets": {
"sodium_mg": 1638,
"potassium_mg": 504,
"magnesium_mg": 116
},
"timing_protocol": {
"pre_training": {"volume_liters": 0.51, "instruction": "Hydrate before session start."},
"during_training": {"volume_liters": 0.72, "instruction": "Use steady fluid intake during training."},
"post_training": {"volume_liters": 1.68, "instruction": "Rehydrate in the first recovery window."}
},
"adjustment_logic": "Increase fluid and sodium as heat and duration rise.",
"scenario_guidance": ["Prioritize cooling and frequent sips"],
"rapid_adjustment_rules": ["Add electrolytes for longer sessions"],
"next_check_protocol": {"window_hours": 24, "metric": "hydration compliance"},
"risk_flags": ["Heat stress risk elevated", "Electrolyte gap risk"],
"summary": "Elevated hydration and electrolyte support advised.",
"recommendations": [
"Increase hydration volumes for moderate training load.",
"Use pre, intra, and post-workout intake timing."
],
"language": "en",
"_enterprise": {
"client": "Acme Health",
"plan": "pro",
"request_id": "fc6d8cc3f0b14fb2",
"quota": 120,
"usage_tracking": true
},
"_api_metadata_": {
"endpoint_name": "fitness_hydration_plan",
"response_language": "en"
}
}
Product Positioning¶
Perfect for sports apps, wellness wearables, and enterprise coaching systems that need climate-aware hydration automation.
Note
training_minutes supports 0-360; values outside range return HTTP 400.
Recommended Endpoints¶
GET /api/v1/fitness/daily-plan- Daily Plan APIGET /api/v1/fitness/deload-plan- Deload Plan APIGET /api/v1/fitness/glycogen-replenishment-plan- Glycogen Replenishment Plan APIGET /api/v1/fitness/reverse-diet-plan- Reverse Diet Plan APIGET /api/v1/fitness/weekly-plan- Weekly Plan APIGET /api/v1/bmi- Bmi API