Body Mass
This resource allows creation and modification of Body Mass entries. Body Mass relates to a user’s weight, mass, fat percentage, and body mass index.
Resource URIs
- Item URI:
/vx/bodymass/{id}/
- Collection URI:
/vx/bodymass/
Item
Item Methods
GET
Retrieve a Body Mass by id
Item properties
Name |
Description |
Type |
Units |
HTTP Support |
datetime_utc |
The instant in time that the body mass measurement was taken by the source system (i.e. the time the user stepped on the scale). |
ISO8601 Datetime |
N/A |
GET: required, PUT: required |
datetime_timezone |
The local timezone where the body mass measurement was recorded (i.e. ‘America/Chicago’) |
String |
N/A |
GET: required, PUT: required |
created_datetime |
The instant in time that the workout was recorded. |
ISO8601 Datetime |
N/A |
GET: required, PUT: required |
updated_datetime |
The instant in time that the workout was last modified. |
ISO8601 Datetime |
N/A |
GET: required, PUT: required |
recorder_type_key |
The recorder model that took the body mass measurement (i.e. ‘withings’, ‘fitbit’, etc) |
String |
N/A |
GET: required, PUT: required |
reference_key |
This is the identifier for the resource in it’s source system. Unique per user_id/recorder_type_key. |
String |
N/A |
GET: required, PUT: optional |
bmi |
The user’s body mass index (BMI). See BMI |
String |
N/A |
GET: optional, PUT: optional |
mass |
The user’s total mass. If lean_mass and fat_mass are present, they should add up to this field. |
String |
Kilogram |
GET: optional, PUT: optional |
fat_percent |
The user’s percent of body mass that consists of fat. For example, “15.738” would mean 15.738% of user’s total mass is fat. |
String |
N/A |
GET: optional, PUT: optional |
lean_mass |
The user’s total mass that is not fat. |
String |
Kilogram |
GET: optional, PUT: optional |
fat_mass |
The user’s total mass that is fat. |
String |
Kilogram |
GET: optional, PUT: optional |
Item links
self
A link to this resource
user
A link to the User resource that owns the Body Mass
Collection
Collection methods
GET
Get a list of Body Masses.
PUT
Update or insert a Body Mass measurement.
Collection query parameters
Name |
Description |
Type |
Required |
target_start_datetime |
Indicates where to start the search. |
ISO8601 Datetime |
Yes |
target_end_datetime |
Indicates where to end the search. Defaults to current time. |
ISO8601 Datetime |
No |
Collection properties
Name |
Description |
Type |
HTTP Support |
total_count |
Total count of entities returned in collection |
integer |
GET: required |
Collection links
self
A link to this resource
Embedded collections
bodymasses
A collection of Body Masses with properties as described under Item properties and links as described under Item links
Usage
GET Body Mass entity
Request GET: /vx/bodymass/{id}/
Response
{
"datetime_utc":"2014-03-01T18:07:02+00:00",
"datetime_timezone":"America/Chicago",
"created_datetime":"2014-03-26T15:02:28+00:00",
"updated_datetime":"2014-04-22T03:58:27+00:00",
"recorder_type_key":"withings",
"reference_key":"187726333",
"mass":"72.940",
"bmi":"21.000",
"fat_percent":"15.738",
"lean_mass":"61.46070280",
"fat_mass":"11.47929720",
"_links":{
"self":[
{
"href":"/vx/bodymass/{bodymass_id}/",
"id":"{bodymass_id}"
}
],
"user":[
{
"href":"/vx/user/{user_id}/",
"id":"{user_id}"
}
]
}
}
PUT Body Mass entity
Request PUT: /vx/bodymass/{id}/
{
"datetime_utc":"2012-12-13T12:00:00Z",
"datetime_timezone":"US/Central",
"recorder_type_key":"foo",
"reference_key":"2012-12-13T12:00:00Z",
"mass":"35",
"fat_percent":"55.5",
"bmi":"27"
}
Response
{
"datetime_utc":"2012-12-13T12:00:00+00:00",
"datetime_timezone":"America/Chicago",
"created_datetime":"2014-03-26T15:02:28+00:00",
"updated_datetime":"2014-04-22T03:58:27+00:00",
"recorder_type_key":"foo",
"reference_key":"2012-12-13T12:00:00Z",
"mass":"35",
"bmi":"27",
"fat_percent":"55.5",
"lean_mass":"61.46070280",
"fat_mass":"11.47929720",
"_links":{
"self":[
{
"href":"/vx/bodymass/{bodymass_id}/",
"id":"{bodymass_id}"
}
],
"user":[
{
"href":"/vx/user/{user_id}/",
"id":"{user_id}"
}
]
}
}
GET Body Mass collection
Request GET: /vx/bodymass/?target_start_datetime=2012-12-12T12%3A12%3A12Z&limit=20&offset=0
Response
{
"_links":{
"self":[
{
"href":"/vx/bodymass/?target_start_datetime=2012-12-12T12%3A12%3A12Z&limit=20&offset=0"
}
],
"documentation":[
{
"href":"https://developer.mapmyfitness.com/docs/"
}
]
},
"_embedded":{
"bodymasses":[
{
"datetime_utc":"2014-03-01T18:07:02+00:00",
"datetime_timezone":"America/Chicago",
"created_datetime":"2014-03-26T15:02:28+00:00",
"updated_datetime":"2014-04-22T03:58:27+00:00",
"recorder_type_key":"foo",
"reference_key":"187726333",
"mass":"72.940",
"bmi":"21.000",
"fat_percent":"15.738",
"lean_mass":"61.46070280",
"fat_mass":"11.47929720",
"_links":{
"self":[
{
"href":"/vx/bodymass/{bodymass_id}/",
"id":"{bodymass_id}"
}
],
"user":[
{
"href":"/vx/user/{user_id}/",
"id":"{user_id}"
}
]
}
}
]
},
"total_count":1
}