Skip to content
ToolsOnDuty - free online tools
ToolsOnDuty / docs
Browse documentation

Reference / Health & Fitness

Health & Fitness API

7 endpoints for health & fitness workflows. Every call requires bearer authentication and uses the standard ToolsOnDuty response envelope.

Try it

Runs a real request from your browser to your own ToolsOnDuty account. Your key is only kept in this page and is never stored.

POST/v1/health/bmi1 credit / call

BMI calculator

Body Mass Index and category from weight (kg) and height (cm).

ParameterTypeRequiredDescription
weightKgnumberYesWeight in kilograms.
heightCmnumberYesHeight in centimeters.

Request

curl -X POST https://toolsonduty.com/api/v1/health/bmi \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"weightKg":70,"heightCm":175}'

Response

{
  "ok": true,
  "data": {
    "bmi": 22.86,
    "category": "Normal weight"
  }
}
POST/v1/health/bmr1 credit / call

BMR / TDEE calculator

Mifflin-St Jeor basal metabolic rate (kcal/day) and total daily energy expenditure for an activity level, with calorie goals.

ParameterTypeRequiredDescription
weightKgnumberYesWeight in kilograms.
heightCmnumberYesHeight in centimeters.
agenumberYesAge in years.
sexstringYesmale | female.
activitystringNoActivity level: sedentary, light, moderate, active, extra. Default: sedentary.

Request

curl -X POST https://toolsonduty.com/api/v1/health/bmr \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"weightKg":70,"heightCm":175,"age":30,"sex":"male","activity":"moderate"}'

Response

{
  "ok": true,
  "data": {
    "bmr": 1649,
    "tdee": 2556
  }
}
POST/v1/health/body-fat1 credit / call

Body fat percentage (US Navy method)

Estimate body fat percentage from height, neck and waist (and hip, for females) measurements in cm.

ParameterTypeRequiredDescription
sexstringYesmale | female.
heightCmnumberYesHeight in centimeters.
neckCmnumberYesNeck circumference in centimeters.
waistCmnumberYesWaist circumference in centimeters.
hipCmnumberNoHip circumference in centimeters (required for female). Default: 0.

Request

curl -X POST https://toolsonduty.com/api/v1/health/body-fat \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"sex":"male","heightCm":180,"neckCm":38,"waistCm":85}'

Response

{
  "ok": true,
  "data": {
    "bodyFatPercent": 15.1,
    "category": "Fitness"
  }
}
POST/v1/health/ideal-weight1 credit / call

Ideal body weight

Ideal body weight in kg by four common formulas (Devine, Robinson, Miller, Hamwi) from height and sex.

ParameterTypeRequiredDescription
heightCmnumberYesHeight in centimeters.
sexstringYesmale | female.

Request

curl -X POST https://toolsonduty.com/api/v1/health/ideal-weight \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"heightCm":175,"sex":"male"}'

Response

{
  "ok": true,
  "data": {
    "Devine": 71.6,
    "Robinson": 71.3
  }
}
POST/v1/health/heart-rate-zones1 credit / call

Heart rate training zones

Estimated maximum heart rate and training zones (recovery through VO2 max) from age, and optionally resting heart rate.

ParameterTypeRequiredDescription
agenumberYesAge in years.
restingnumberNoResting heart rate (bpm), for the Karvonen method.

Request

curl -X POST https://toolsonduty.com/api/v1/health/heart-rate-zones \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"age":30}'

Response

{
  "ok": true,
  "data": {
    "max": 190
  }
}
POST/v1/health/one-rep-max1 credit / call

One-rep max estimator

Estimate a one-rep max (Epley and Brzycki formulas) from a weight and rep count.

ParameterTypeRequiredDescription
weightnumberYesWeight lifted.
repsnumberYesRepetitions performed.

Request

curl -X POST https://toolsonduty.com/api/v1/health/one-rep-max \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"weight":100,"reps":5}'

Response

{
  "ok": true,
  "data": {
    "epley": 116.67,
    "brzycki": 112.5
  }
}
POST/v1/health/pace1 credit / call

Running pace calculator

Pace (seconds per distance unit) and speed (units per hour) from a distance and total time.

ParameterTypeRequiredDescription
distancenumberYesDistance (e.g. km or miles).
totalSecondsnumberYesTotal time in seconds.

Request

curl -X POST https://toolsonduty.com/api/v1/health/pace \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"distance":5,"totalSeconds":1500}'

Response

{
  "ok": true,
  "data": {
    "secPerUnit": 300,
    "speed": 12
  }
}