- Devices API
- Get Body Data
Devices API
Get Body Data
Returns body data from all of the specified users' connected providers.
GET
/body
x-api-key*
curl --request GET \
--url https://api.metriport.com/body \
--header 'x-api-key: AUTH_VALUE'
Query Params
userIdRequired
string
The Metriport user ID to create a session token for.
dateRequired
string
Day for which to pull the data. Formatted YYYY-MM-DD.
For simplicity, all queries assume the UTC timezone for the specified date starting at 00:00 to 23:59.
Response
body
Body[]
An array of body objects for each of the user’s connected providers
import { Metriport } from "@metriport/api";
const metriportClient = new MetriportDevicesApi("YOUR_API_KEY");
const response = await metriportClient.getBodyData(
"metriportUserId",
"date"
);
[
{
"metadata": {
"date": "2022-12-21",
"source": "withings"
},
"body_fat_pct": 9,
"bone_mass_kg": 33,
"height_cm": 189,
"lean_mass_kg": 43,
"muscle_mass_kg": 22,
"weight_kg": 78
}
]
curl --request GET \
--url https://api.metriport.com/body \
--header 'x-api-key: AUTH_VALUE'
import { Metriport } from "@metriport/api";
const metriportClient = new MetriportDevicesApi("YOUR_API_KEY");
const response = await metriportClient.getBodyData(
"metriportUserId",
"date"
);