Devices

Multi-Device Overview

Fitbit allows the concurrent use of multiple activity tracker devices and scales. Fitbit automatically detects when a person switches from one tracker to another throughout their day or week with no buttons to push on the device or the app. This unified data is then presented to users.

Considerations

  • Data provided through the Fitbit API does not necessarily represent a single tracker.

  • Data can change frequently, as trackers sync at different intervals and the unified data is recalculated at each sync.

  • Distance and number of steps are correlated when GPS data is available.

Get Devices

The Get Device endpoint returns a list of the Fitbit devices connected to a user's account.

Knowing when a Fitbit device last synced with the Fitbit server is useful when diagnosing reports that the Fitbit app is showing different values from what the Fitbit Web API returns. Fitbit's own apps use the same Web API available to third-party developers. However, when an active Bluetooth connection is available, Fitbit's apps will show the summary values displayed on the device. Often, this data has not yet synced with Fitbit's servers.

Third-party applications can check when a Fitbit device last synced with Fitbit's servers using this endpoint. Fitbit users can check when their device last synced with Fitbit's servers by following these instructions.

Resource URL

GET https://api.fitbit.com/1/user/-/devices.json

Example Response

[
    {
        "battery": "High",
        "deviceVersion": "Charge HR",
        "id": "27072629",
        "lastSyncTime": "2015-07-27T17:01:39.313",
        "type": "TRACKER"
    },
    {
        "battery": "Empty",
        "deviceVersion": "MobileTrack",
        "id": "29559794",
        "lastSyncTime": "2015-07-19T16:57:59.000",
        "type": "TRACKER"
    },
    {
        "battery": "High",
        "deviceVersion": "Aria",
        "id": "Y1PFEJZGGX8QFYTV",
        "lastSyncTime": "2015-07-27T07:14:34.000",
        "type": "SCALE"
    }
]

Alarms

Fitbit activity trackers (excluding MobileTrack) have the ability to set alarms.

Get Alarms

The Get Alarms endpoint returns a list of the set alarms connected to a user's account.

Resource URL

GET https://api.fitbit.com/1/user/[user-id]/devices/tracker/[tracker-id]/alarms.json
user-id The ID of the user. Use "-" (dash) for current logged-in user.
tracker-id The ID of the tracker for which data is returned. The tracker-id value is found via the Get Devices endpoint.

Example Response

{
    "trackerAlarms": [
        {
            "alarmId": 11426382,
            "deleted": false,
            "enabled": true,
            "recurring": true,
            "snoozeCount": 3,
            "snoozeLength": 9,
            "syncedToDevice": false,
            "time": "07:15-08:00",
            "vibe": "DEFAULT",
            "weekDays": [
                "MONDAY",
                "TUESDAY"
            ]
        }
    ]
}

Add Alarm

The Add Alarm endpoint adds the alarm settings to a given ID for a given device.

Resource URL

POST https://api.fitbit.com/1/user/[user-id]/devices/tracker/[tracker-id]/alarms.json
user-id The ID of the user. Use "-" (dash) for current logged-in user.
tracker-id The ID of the tracker for which data is returned. The tracker-id value is found via the Get Devices endpoint.

POST Parameters

time required Time of day that the alarm vibrates with a UTC timezone offset, e.g. 07:15-08:00
enabled required true or false. If false, alarm does not vibrate until enabled is set to true.
recurring required true or false. If false, the alarm is a single event.
weekDays required Comma separated list of days of the week on which the alarm vibrates, e.g. MONDAY,TUESDAY

Update Alarm

The Update Alarm endpoint updates the alarm entry with a given ID for a given device. It also gets a response in the format requested.

Resource URL

POST https://api.fitbit.com/1/user/[user-id]/devices/tracker/[tracker-id]/alarms/[alarm-id].json
user-id The ID of the user. Use "-" (dash) for current logged-in user.
tracker-id The ID of the tracker whose alarms is managed. The tracker-id value is found via the Get Devices endpoint.
alarm-id The ID of the alarm to be updated. The alarm-id value is found in the response of the Get Alarms endpoint.

Request Headers

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

POST Parameters

time required Time of day that the alarm vibrates with a UTC timezone offset, e.g. 07:15-08:00
enabled required true or false. If false, alarm does not vibrate until enabled is set to true.
recurring required true or false. If false, the alarm is a single event.
weekDays required Comma separated list of days of the week on which the alarm vibrates, e.g. MONDAY,TUESDAY
snoozeLength required Minutes between alarms; integer value.
snoozeCount required Maximum snooze count; integer value.
label optional Label for the alarm; string value.
vibe optional Vibe pattern; only one value for now - DEFAULT.

Example Response

{
    "trackerAlarm":{
        "alarmId": 220962051,
        "deleted": false,
        "enabled": false,
        "label": "",
        "recurring": true,
        "snoozeCount": 3,
        "snoozeLength": 9,
        "syncedToDevice": false,
        "time": "08:00-08:00",
        "vibe": "DEFAULT",
        "weekDays":[
            "MONDAY",
            "TUESDAY"
        ]
    }
}

Delete Alarm

The Delete Alarm API deletes the user's device alarm entry with the given ID for a given device.

Resource URL

DELETE https://api.fitbit.com/1/user/[user-id]/devices/tracker/[tracker-id]/alarms/[alarm-id].json
user-id The ID of the user. Use "-" (dash) for current logged-in user.
tracker-id The ID of the tracker whose alarms is managed. The tracker-id value is found via the Get Devices endpoint.
alarm-id The ID of the alarm that is updated. The alarm-id value is found via the Get Alarms endpoint.

Request Headers

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