Body & Weight

Body Fat

Get Body Fat Logs

The Get Body Fat Logs API retrieves a list of all user's body fat log entries for a given day in the format requested. Body fat log entries are available only to authorized user. If you need to fetch only the most recent entry, you can use the Get Body Measurements endpoint.

Resource URL

There are three acceptable formats for retrieving body fat log data:

GET https://api.fitbit.com/1/user/[user-id]/body/log/fat/date/[date].json
GET https://api.fitbit.com/1/user/[user-id]/body/log/fat/date/[date]/[period].json
GET https://api.fitbit.com/1/user/[user-id]/body/log/fat/date/[base-date]/[end-date].json
user-id The encoded ID of the user. Use "-" (dash) for current logged-in user.
date The date in the format yyyy-MM-dd.
base-date The end date when period is provided; range start date when a date range is provided. In the format yyyy-MM-dd or today.
period The date range period. One 1d, 7d, 1w, 1m.
end-date Range end date when date range is provided. Note: The range should not be longer than 31 days.

Request Headers

Accept-Language optional The measurement unit system to use for response values.

Response Fields

date Log entry date; in the format yyyy-MM-dd.
fat Body fat percentage; in the format X.XX.
logId Body Fat Log IDs are unique to the user, but not globally unique.
time Time of the measurement; hours and minutes in the format HH:mm:ss, set to the last second of the day if not provided.
source The source of the fat log; the field is optional.

Example Response

{
    "fat":[
        {
            "date":"2012-03-05",
            "fat":14,
            "logId":1330991999000,
            "time":"23:59:59",
            "source": "API"
        },
        {
            "date":"2012-03-05",
            "fat":13.5,
            "logId":1330991999000,
            "time":"21:20:59",
            "source":"Aria"
        }
    ]
}

Log Body Fat

The Log Body Fat API creates a log entry for body fat and returns a response in the format requested.

Note: The returned Body Fat Log IDs are unique to the user, but not globally unique.

Resource URL

POST https://api.fitbit.com/1/user/[user-id]/body/log/fat.json
user-id The encoded ID of the user. Use "-" (dash) for current logged-in user.

POST Parameters

fat required Body fat; in the format X.XX, in the unit system that corresponds to the Accept-Language header provided.
date required Log entry date; in the format yyyy-MM-dd.
time optional Time of the measurement; hours and minutes in the format HH:mm:ss, set to the last second of the day if not provided.

Request Headers

Accept-Language optional The measurement unit system to use for response values.
{
    "weightLog": {
        "bmi": 23.57,
        "date": "2012-03-05",
        "fat": 14.5,
        "logId": 1330991999000,
        "time": "23:59:59",
        "source": "API"
    }
}

Delete Body Fat Log

The Delete Body Fat Log API deletes a user's body fat log entry with the given ID.

Note: A successful request returns a 204 status code with an empty response body.

Resource URL

DELETE https://api.fitbit.com/1/user/[user-id]/body/log/fat/[body-fat-log-id].json
user-id The encoded ID of the user. Use "-" (dash) for current logged-in user.
body-fat-log-id The ID of the body fat log entry.

Body Time Series

Get Body Time Series

The Get Body Time Series API returns time series data in the specified range for a given resource in the format requested using units in the unit systems that corresponds to the Accept-Language header provided.

Note: If you provide earlier dates in the request, the response retrieves only data since the user's join date or the first log entry date for the requested collection.

Resource URL

There are two acceptable formats for retrieving time series data:

GET /1/user/[user-id]/body/[resource-path]/date/[date]/[period].json
GET /1/user/[user-id]/body/[resource-path]/date/[base-date]/[end-date].json
api-version The API version. Currently version 1.
user-id The encoded ID of the user. Use "-" (dash) for current logged-in user.
resource-path The resource path. Options are "bmi", "fat", or "weight".
base-date The range start date, in the format yyyy-MM-dd or today.
end-date The end date of the range.
date The end date of the period specified in the format yyyy-MM-dd or today.
period The range for which data will be returned. Options are 1d, 7d, 30d, 1w, 1m, 3m, 6m, 1y, or max.

Request Headers

Accept-Language optional The language to use for response values. Language is used to determine the activity measurement units returned.

Goals

Get Body Goals

The Get Body Goals API retrieves a user's current body fat percentage or weight goal using units in the unit systems that corresponds to the Accept-Language header provided in the format requested.

Resource URL

GET https://api.fitbit.com/1/user/[user-id]/body/log/[goal-type]/goal.json
user-id The encoded ID of the user. Use "-" (dash) for current logged-in user.
goal-type weight or fat

Request Headers

Accept-Language optional The measurement unit system to use for response values.

Example Responses

For Weight

{
    "goal":{
        "startDate": "2015-01-15",
        "startWeight": "150";,
        "weight": "140";
    }
}

For Fat

{
    "goal":{
        "fat": "12"
    }
}

Update Body Fat Goal

The Update Body Fat Goal API creates or updates user's fat percentage goal.

Resource URL

POST https://api.fitbit.com/1/user/[user-id]/body/log/fat/goal.json
user-id The encoded ID of the user. Use "-" (dash) for current logged-in user.

POST Parameters

fat required Target body fat percentage; in the format X.XX.

Example Response

{
    "goal":{
        "fat": "12"
    }
}

Update Weight Goal

The Update Weight Goal API creates or updates user's fat or weight goal using units in the unit systems that corresponds to the Accept-Language header provided in the format requested.

Resource URL

POST https://api.fitbit.com/1/user/[user-id]/body/log/weight/goal.json
user-id The encoded ID of the user. Use "-" (dash) for current logged-in user.

Request Headers

Accept-Language optional The measurement unit system to use for response values.

POST Parameters

startDate required Weight goal start date; in the format yyyy-MM-dd.
startWeight required Weight goal start weight; in the format X.XX, in the unit systems that corresponds to the Accept-Language header provided.
weight required/optional Weight goal target weight; in the format X.XX, in the unit systems that corresponds to the Accept-Language header provided; required if user doesn't have an existing weight goal.

Example Responses

{
    "goal":{
        "startDate": "2015-01-15",
        "startWeight": "150";,
        "weight": "140";
    }
}

Weight

Get Weight Logs

The Get Weight Logs API retrieves a list of all user's body weight log entries for a given day using units in the unit systems which corresponds to the Accept-Language header provided. Body weight log entries are available only to authorized user. Body weight log entries in response are sorted exactly the same as they are presented on the Fitbit website.

Resource URL

There are three acceptable formats for retrieving weight log data:

GET https://api.fitbit.com/1/user/[user-id]/body/log/weight/date/[date].json
GET https://api.fitbit.com/1/user/[user-id]/body/log/weight/date/[base-date]/[period].json
GET https://api.fitbit.com/1/user/[user-id]/body/log/weight/date/[base-date]/[end-date].json
user-id The encoded ID of the user. Use "-" (dash) for current logged-in user.
date The date in the format yyyy-MM-dd.
base-date The end date when period is provided, in the format yyyy-MM-dd; range start date when a date range is provided.
period The date range period. One of 1d, 7d, 30d, 1w, 1m.
end-date Range end date when date range is provided. Note: The period must not be longer than 31 days.

Request Headers

Accept-Language optional The measurement unit system to use for response values.

Response Fields

bmi Calculated BMI in the format X.XX.
date Log entry date; in the format yyyy-MM-dd.
weight Weight in the format X.XX, in the unit system that corresponds to the Accept-Language header provided or if not provided in metric.
logId Weight Log IDs are unique to the user, but not globally unique.
time Time of the measurement; hours and minutes in the format HH:mm:ss, set to the last second of the day if not provided.
source The source of the weight log; the field is optional.

Example Response

{
    "weight":[
        {
            "bmi":23.57,
            "date":"2015-03-05",
            "logId":1330991999000,
            "time":"23:59:59",
            "weight":73,
            "source": "API"
        },
        {
            "bmi":22.57,
            "date":"2015-03-05",
            "logId":1330991999000,
            "time":"21:10:59",
            "weight":72.5,
            "source": "Aria"
        }
    ]
}

Log Weight

The Log Weight API creates log entry for a body weight using units in the unit systems that corresponds to the Accept-Language header provided and get a response in the format requested.

Note: The returned Weight Log IDs are unique to the user, but not globally unique.

Resource URL

POST https://api.fitbit.com/1/user/[user-id]/body/log/weight.json
user-id The encoded ID of the user. Use "-" for current logged-in user.

POST Parameters

weight required Weight - in the format X.XX.
date required Log entry date - in the format yyyy-MM-dd.
time optional Time of the measurement - hours and minutes in the format HH:mm:ss, which is set to the last second of the day if time is not provided.

Request Headers

Accept-Language optional The measurement unit system to use for response values.

Example Response

{
    "weightLog": [
        {
            "bmi": 23.57,
            "date": "2012-03-05",
            "logId": 1330991999000,
            "time": "23:59:59",
            "weight": 73,
            "source": "API"
        }
    ]
}

Delete Weight Log

The Delete Weight Log API deletes a user's body weight log entry with the given ID.

Note: A successful request returns a 204 status code with an empty response body.

Resource URL

DELETE https://api.fitbit.com/1/user/[user-id]/body/log/weight/[body-weight-log-id].json
user-id The encoded ID of the user. Use "-" (dash) for current logged-in user.
body-weight-log-id The ID of the body weight log entry.