The aim of the documentation is to give a map for endpoints and explain response codes. In every endpoint, there are 3 important titles that are
##/bmi
###What is the goal of using BMI?
The BMI value refers to the body mass index of a person. It is calculated by using the mass(weight) and height of him/her. The unit of weight is kg while height is cm. The main goal of using it is to decide whether a person is overweight, normal-weight, or underweight.
###What are the Parameters of The /bmi?
There are three parameters of ‘bmi endpoint’.
It should use to input the user’s age. It must be number. It cannot be negative or bigger than 80.
It should use to input the user’s mass. It must be number. It cannot be smaller than 40 or bigger than 160. The unit of weight is in kg.
It should use to input the user’s age. It must be number. It cannot be smaller than 130 or bigger than 230. The unit of weight is in cm.
The structure of the request body should be like /bmi?age=ageValue&weight=weightValue&height=heightValue
An example of the request is /bmi?age=30&weight=80&height=178
##/bodyfat
Knowing the body fat percentage of the body would be helpful to make a well-prepared fitness program. In this endpoint, two methods are used to calculate body fat percentage. These are US Navy and BMI methods. Additionally, Jackson & Pollard’s ideal body fat percentage table is used to show the user’s health status.
There are 7 parameters of the endpoint.
It should use to input the user’s age. It must be number. It cannot be negative or bigger than 80.
####2.gender(Required)
It should use to input the user’s gender. It must be string. It can only be male or female.
It should use to input the user’s mass. It must be number. It cannot be smaller than 40 or bigger than 160. The unit of weight is in kg.
It should use to input the user’s height. It must be number. It cannot be smaller than 130 or bigger than 230. The unit of weight is in cm.
It should use to input the user’s neck circumference. It must be number. It cannot be smaller than 20 or bigger than 80. The unit of weight is in cm.
It should use to input the user’s waist circumference. It must be number. It cannot be smaller than 40 or bigger than 130. The unit of weight is in cm.
It should use to input the user’s hip circumference. It must be number. It cannot be smaller than 40 or bigger than 130. The unit of weight is in cm.
The structure of the request body should be like /bodyfat?age=ageValue&gender=genderValue&weight=weightValue&height=heightValue&neck=neckValue&waist=waistValue&hip=hipValue
An example of the request is /bodyfat?age=30&gender=male&weight=80&height=178&neck=50&waist=96&hip=99
##/dailycalorie
###What is the goal of using dailycalorie?
Our body is burning calories every day with respect to activity level. Knowing your daily calorie requirements is important to achieve your final goal. You can calculate your daily calorie req. for 7 different goals. These goals are maintain, mild-lose, normal-lose, extreme loss, mild-gain, normal-gain, extreme gain weight.
There are 5 parameters of the endpoint.
It should use to input the user’s age. It must be number. It cannot be negative or bigger than 80.
####2.gender(Required)
It should use to input the user’s gender. It must be string. It can only be male or female.
It should use to input the user’s mass. It must be number. It cannot be smaller than 40 or bigger than 160. The unit of weight is in kg.
It should use to input the user’s height. It must be number. It cannot be smaller than 130 or bigger than 230. The unit of weight is in cm.
####5.activitylevel(Required)
activitylevel represent that an activity’s value how much bigger than the basal metabolic rate (BMR). There are six possible activity levels which are
{
‘level _ 1’ : “Sedentary: little or no exercise”,
‘level _ 2’ : “Exercise 1-3 times/week”,
‘level _ 3’ : “Exercise 4-5 times/week”,
‘level _ 4’ : “Daily exercise or intense exercise 3-4 times/week”,
‘level _ 5’ : “Intense exercise 6-7 times/week”,
‘level _ 6’ : “Very intense exercise daily, or physical job”
}
The structure of the request body should be like /bodyfat?age=ageValue&gender=genderValue&weight=weightValue&height=heightValue&activitylevel=level
An example of the request is /bodyfat?age=30&gender=male&weight=80&height=178&activitylevel=level_1
##/idealweight
###What is the goal of using idealweight?
Find four different ideal weight scores according to four different well-known equations which are Hamwi, Devine, Miller, Robinson
####1.gender(Required)
It should use to input the user’s gender. It must be string. It can only be male or female.
It should use to input the user’s height. It must be number. It cannot be smaller than 130 or bigger than 230. The unit of weight is in cm.
The structure of the request body should be like /idealweight?gender=genderValue&height=heightValue
An example of the request is /idealweight?gender=male&height=178
##/ macrocalculator
###What is the goal of using macrocalculator?
Find the amount of macronutrients in four different categories which are balanced, low-fat, low-carbs, and high-protein for a specific calorie burned.
###What are the parameters of /macrocalculator?
There are 6 inputs which are age, gender, height, weight, activity level and goal.
It should use to input the user’s age. It must be number. It cannot be negative or bigger than 80.
####2.gender(Required)
It should use to input the user’s gender. It must be string. It can only be male or female.
It should use to input the user’s mass. It must be number. It cannot be smaller than 40 or bigger than 160. The unit of weight is in kg.
It should use to input the user’s height. It must be number. It cannot be smaller than 130 or bigger than 230. The unit of weight is in cm.
"1" : "BMR",
"2" : "Sedentary: little or no exercise",
"3" : "Exercise 1-3 times/week",
"4" : "Exercise 4-5 times/week",
"5" : "Daily exercise or intense exercise 3-4 times/week",
"6" : "Intense exercise 6-7 times/week",
"7" : "Very intense exercise daily, or physical job"
"maintain" : "maintain weight",
"mildlose" : "Mild weight loss",
"weightlose" : "Weight loss",
"extremelose" : "Extreme weight loss",
"mildgain" : "Mild weight gain",
"weightgain" : "Weight gain",
"extremegain" : "Extreme weight gain"
The structure of the request body should be like /macrocalculator?age=ageValue&gender=genderValue&height=heightValue&weight=weightValue&activitylevel=level&goal=goal
An example of the request is /macrocalculator?age=25&gender=male&height=180&weight=90&activitylevel=5&goal=extremelose
##/burnedcalorie
###What is the goal of using /burnedcalorie endpoint?
The goal is to calculate the burned calorie after an activity.
###What are the parameters of /burnedcalorie?
There are 3 required parameters to use this endpoint.
####1. activityid(required)
Use the /activities endpoint to find activityid values.
####2. activitymin(required)
It refers to how many minutes were spent on the activity. It must be numeric and cannot be negative value.
It should use to input the user’s mass. It must be number. It cannot be smaller than 40 or bigger than 160. The unit of weight is in kg.
The structure of the request body should be like /burnedcalorie?activityid=ID&acitivitymin=MIN&weight=weightValue
An example of the request is /burnedcalorie?activityid=bi_1&acitivitymin=20&weight=75
##/food
###What is the goal of using food?
Every exercise plan comes with a diet plan. To prepare a beneficial diet plan, you need to know foods ingredients, their nutrition values, and calorie facts.
###What is the parameter of the /food endpoint?
There is only one required variable for the food endpoint which is the food_id
####food_id (required)
It should use to call the food information in the food database for a specific food. To find food_id values use the foodids endpoint.
The structure of the request body should be like /food?foodid=idValue
An example of the request is /food?foodid=SR25 _ 1 _ 1
##/foodids
###What is the goal of using foodids?
The aim is to find food id values for a specific subtable name.
###What is the parameter of the /foodids endpoint?
There is only one required variable for the foodids endpoint which is the subtablename
####subtablename (required)
It should use to call the food id values in the food database for a specific food sub-table. To find sub-table names values use the foodids/subtablenames endpoint.
The structure of the request body should be like /foodids?subtablename=subtablename
An example of the request is /foodids?subtablename=SR25 _ 1
##foodids/subtablenames
The aim is to find sub-table name values for a specific table name in the food database.
###What is the parameter of the /foodids/subtablenames endpoint?
There is only one required variable for the endpoint which is the tablename
####tablename (required)
It should use to call the sub-table name values in the food database for a specific food table. To find table names values use the foodids/tablenames endpoint.
The structure of the request body should be like /foodids/subtablenames?tablename=tablename
An example of the request is /foodids/subtablenames?tablename=SR25
##foodids/tablenames
The aim is to find table names values in the food database. There are no required parameters.
The structure of the request body should be like /foodids/tablenames
An example of the request is /foodids/tablenames
##/activities
Each activity in our life has different MET values. In other words, they burn different calories at the same time. To find the most relevant activity according to your goal, you need to know their MET values.
###What is the parameter of the /activities endpoint?
There is only one required variable for the activities endpoint which is the intensitylevel
####intensitylevel (required)
It should use to call the activities whose intensity level values are desired from the activity database. intensitylevel variable must be numeric and can only be one of ‘1,2,3,4,5,6,7,8,9’.
The structure of the request body should be like /activities?intensitylevel=intensityValue
An example of the request is /activities?intensitylevel=5