Get Heart Rate Time Series by Date
chevron down
 

Get Heart Rate Time Series by Date

Retrieves the heart rate time series data over a period of time by specifying a date and time period. The response will include only the daily summary values.

Scope: heartrate


Request

GET /1/user/[user-id]/activities/heart/date/[date]/[period].json

URI Arguments
user-id required The encoded ID of the user. Use "-" (dash) for current logged-in user.
date required The date in the format yyyy-MM-dd or today.
period required Number of data points to include.
Supported: 1d | 7d | 30d | 1w | 1m

Query Parameters
timezone optional Returns the response from the specified timezone.
Supported: UTC
string

Request Headers
authorization required Specify the token type and Fitbit user’s access token.
Token type: Bearer
accept optional The media type of the response content the client is expecting.
Supported: application/json
accept-language optional The measurement unit system to use for response values. See Localization.
accept-locale optional The locale to use for response values. See Localization.

Examples
GET https://api.fitbit.com/1/user/-/activities/heart/date/today/1d.json
GET https://api.fitbit.com/1/user/GGNJL9/activities/heart/date/today/1d.json
curl -X GET "https://api.fitbit.com/1/user/-/activities/heart/date/today/1d.json" \
-H "accept: application/json" \
-H "authorization: Bearer <access_token>"


Response

Element Name Description
activities-heart : datetime Date of the heart rate log.
activities-heart : value : customHeartRateZone : caloriesOut Number calories burned with the custom heart rate zone.
activities-heart : value : customHeartRateZone : max Maximum range for the custom heart rate zone.
activities-heart : value : customHeartRateZone : min Minimum range for the custom heart rate zone.
activities-heart : value : customHeartRateZone : minutes Number minutes withing the custom heart rate zone.
activities-heart : value : customHeartRateZone : name Name of the custom heart rate zone.
activities-heart : value : HeartRateZone : caloriesOut Number calories burned with the specified heart rate zone.
activities-heart : value : HeartRateZone : max Maximum range for the heart rate zone.
activities-heart : value : HeartRateZone : min Minimum range for the heart rate zone.
activities-heart : value : HeartRateZone : minutes Number minutes withing the specified heart rate zone.
activities-heart : value : HeartRateZone : name Name of the heart rate zone.
activities-heart : value : restingHeartRate The user’s calculated resting heart rate. See Resting Heart Rate.
{
  "activities-heart": [
    {
      "dateTime": "2019-05-08",
      "value": {
        "customHeartRateZones": [
          {
            "caloriesOut": 1164.09312,
            "max": 90,
            "min": 30,
            "minutes": 718,
            "name": "Below"
          },
          {
            "caloriesOut": 203.65344,
            "max": 110,
            "min": 90,
            "minutes": 74,
            "name": "Custom Zone"
          },
          {
            "caloriesOut": 330.76224,
            "max": 220,
            "min": 110,
            "minutes": 42,
            "name": "Above"
          }
        ],
        "heartRateZones": [
          {
            "caloriesOut": 979.43616,
            "max": 86,
            "min": 30,
            "minutes": 626,
            "name": "Out of Range"
          },
          {
            "caloriesOut": 514.16208,
            "max": 121,
            "min": 86,
            "minutes": 185,
            "name": "Fat Burn"
          },
          {
            "caloriesOut": 197.92656,
            "max": 147,
            "min": 121,
            "minutes": 18,
            "name": "Cardio"
          },
          {
            "caloriesOut": 6.984,
            "max": 220,
            "min": 147,
            "minutes": 5,
            "name": "Peak"
          }
        ],
        "restingHeartRate": 76
      }
    }
  ]
}
      

Response Headers
content-type The media type of the response content being sent to the client.
Supported: application/json
fitbit-rate-limit-limit The quota number of calls.
fitbit-rate-limit-remaining The number of calls remaining before hitting the rate limit.
fitbit-rate-limit-reset The number of seconds until the rate limit resets.

Note: The rate limit headers are approximate and asynchronously updated. This means that there may be a minor delay in the decrementing of remaining requests. This could result in your application receiving an unexpected 429 response if you don't track the total number of requests you make yourself.

Response Type

HTTP Status Code HTTP response code. List of codes are found in the Troubleshooting Guide.
Status Message Description of the status code.
Response Body Contains the JSON response to the API call. When errors are returned by the API call, the errorType, fieldName and message text will provide more information to the cause of the failure.

Response Codes
200 A successful request.
400 The request had bad syntax or was inherently impossible to be satisfied.
401 The request requires user authentication.

Note: For a complete list of response codes, please refer to the Troubleshooting Guide.

Additional Information

If you specify earlier dates in the request, the response will retrieve only data since the user's join date or the first log entry date for the requested collection.

Resting Heart Rate

Resting heart rate is a measurement of how many times the person’s heart beats per minute when completely at rest. Typically, resting heart rate ranges from 60-100 bpm, but the rate can vary based on age and fitness level. The best time to get an accurate resting heart rate reading is while the person is asleep. To calculate resting heart rate, the device takes the heart rate measurements throughout the day and focuses on periods when the person is still and well-rested, with a priority for during sleep measurements. If there isn't enough data, a resting heart rate value won't be available for that day.