Macro Cycling API¶
Generate split-day calorie and macro recommendations tuned to goal and activity profile.
Endpoint¶
GET /api/v1/fitness/macro-cyclingPOST /api/v1/fitness/macro-cycling/post
Parameters¶
| Name | Type | Required | In | Description |
|---|---|---|---|---|
goal | string | Yes | Query/Body | fat_loss,muscle_gain,maintenance,endurance,recomposition. |
weight | number (35-300) | Yes | Query/Body | Body weight in kg. |
activity_level | string | Yes | Query/Body | sedentary,light,moderate,active,athlete. |
lang | string | No | Query | Response language (en,es,de,fr,pt,ja,hi,ar). |
Why Use This Endpoint¶
- Support calorie periodization in consumer and pro coaching tools.
- Separate training-day and rest-day nutrition targets.
- Add enterprise logic blocks for implementation and risk control.
Request Example¶
curl -X GET "https://api.hefitapi.com/api/v1/fitness/macro-cycling?goal=fat_loss&weight=82&activity_level=moderate&lang=en" \
-H "X-API-Key: YOUR_API_KEY"
curl -X POST "https://api.hefitapi.com/api/v1/fitness/macro-cycling/post?lang=en" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{"goal":"muscle_gain","weight":78,"activity_level":"active"}'
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.
{
"goal": "fat_loss",
"goal_label": "Fat Loss",
"weight_kg": 82.0,
"activity_level": "moderate",
"activity_label": "Moderate",
"target_daily_calories": 2544,
"macro_cycling": {
"training_day": {
"calories": 2694,
"protein_g": 229,
"carbs_g": 242,
"fats_g": 90
},
"rest_day": {
"calories": 2394,
"protein_g": 203,
"carbs_g": 168,
"fats_g": 101
}
},
"adjustment_logic": "Lower calories on rest days while preserving protein adequacy.",
"implementation_suggestions": ["Keep weekly average aligned with goal"],
"risk_controls": ["Avoid aggressive day-to-day swings"],
"weekly_checkin_rules": ["Recalibrate if scale trend stalls for 2 weeks"],
"summary": "Macro cycling profile supports steady fat-loss progression.",
"language": "en",
"_enterprise": {
"client": "Acme Health",
"plan": "pro",
"request_id": "e4517ab38f59ed67",
"quota": 120,
"usage_tracking": true
},
"_api_metadata_": {
"endpoint_name": "fitness_macro_cycling",
"response_language": "en"
}
}
Product Positioning¶
Great for advanced nutrition planners, high-touch coaching stacks, and performance apps.
Note
goal and activity_level must be from supported enums or API returns HTTP 400.
Recommended Endpoints¶
GET /api/v1/bmi- Bmi APIGET /api/v1/tdee- Tdee APIGET /api/v1/bmr- Bmr APIGET /api/v1/protein-calculator- Protein Calculator APIGET /api/v1/fitness/heart-rate-zones- Heart Rate Zones APIGET /api/v1/bodyfat- Bodyfat API