Skip to content

DCN API

Compute daily calorie target using Mifflin or Harris equation, activity multiplier, and goal adjustment.

Endpoint

  • GET /api/v1/dcn
  • POST /api/v1/dcn/post

Parameters

Name Type Required In Description
age integer Yes Query/Body Age in years.
weight number Yes Query/Body Weight in kg.
height number Yes Query/Body Height in cm.
gender string (male,female) Yes Query/Body Biological sex.
activity_level string Yes Query/Body sedentary,lightly_active,moderately_active,very_active,extra_active.
goal string No Query/Body weight_loss,maintenance,weight_gain.
equation string No Query mifflin or harris.
lang string No Query Response language (en,es,de,fr,pt,ja,hi,ar).

Why Use This Endpoint

  • Build robust calorie-target recommendations.
  • Keep formula transparency for compliance and trust.
  • Tie energy targets to user goals in one API call.

Get Started

Request Example

curl -X GET "https://api.hefitapi.com/api/v1/dcn?age=36&weight=81&height=177&gender=male&activity_level=moderately_active&goal=maintenance&equation=mifflin&lang=en" \
  -H "X-API-Key: YOUR_API_KEY"
curl -X POST "https://api.hefitapi.com/api/v1/dcn/post?equation=mifflin&lang=en" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{"age":36,"weight":81,"height":177,"gender":"male","activity_level":"moderately_active","goal":"maintenance"}'

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.

{
  "caloric_needs": {
    "equation": "mifflin",
    "goal": "maintenance",
    "calories": "2762.15 kcal/day"
  },
  "daily_calorie_target_kcal": 2762.15,
  "bmr_kcal_per_day": 1782.03,
  "activity_multiplier": 1.55,
  "profile": {
    "age": 36,
    "weight_kg": 81.0,
    "height_cm": 177.0,
    "gender": "male",
    "activity_level": "moderately_active",
    "goal": "maintenance",
    "equation": "mifflin"
  },
  "energy_band": "high",
  "energy_band_label": "High",
  "risk_signal": "Higher intake precision required.",
  "action_plan": ["Track trend weekly"],
  "monitoring_plan": "Adjust if weight trend drifts.",
  "language": "en",
  "_enterprise": {
    "client": "Acme Health",
    "plan": "pro",
    "request_id": "bc434f88c1116d94",
    "quota": 120,
    "usage_tracking": true
  },
  "_api_metadata_": {
    "endpoint_name": "dcn",
    "response_language": "en"
  }
}

Product Value

Valuable for nutrition planning SaaS, patient care tools, and fitness coaching products with goal-based energy targets.

Note

equation is passed as query parameter even for POST /dcn/post.