Skip to content

Fitbit Plus API API

by twinehealth.com

OAuthHTTPSBusiness
Open documentation ↗

Overview

# Overview The Fitbit Plus API is a RESTful API. The requests and responses are formated according to the [JSON API](http://jsonapi.org/format/1.0/) specification. In addition to this documentation, we also provide an [OpenAPI](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md) "yaml" file describing the API: [Fitbit Plus API Specification](swagger.yaml). # Authentication Authentication for the Fitbit Plus API is based on the [OAuth 2.0 Authorization Framework](https://tools.ietf.org/html/rfc6749). Fitbit Plus currently supports grant types of **client_credentials** and **refresh_token**. See [POST /oauth/token](#operation/createToken) for details on the request and response formats. <!-- ReDoc-Inject: <security-definitions> --> ## Building Integrations We will provide customers with unique client credentials for each application/integration they build, allowing us to enforce appropriate access controls and monitor API usage. The client credentials will be scoped to the organization, and allow full access to all patients and related data within that organization. These credentials are appropriate for creating an integration that does one of the following: - background reporting/analysis - synchronizing data with another system (such as an EMR) The API credentials and oauth flows we currently support are **not** well suited for creating a user-facing application that allows a user (patient, coach, or admin) to login and have access to data which is appropriate to that specific user. It is possible to build such an application, but it is not possible to use Fitbit Plus as a federated identity provider. You would need to have a separate means of verifying a user's identity. We do not currently support the required password-based oauth flow to make this possible. # Paging The Fitbit Plus API supports two different pagination strategies for GET collection endpoints. #### Skip-based paging Skip-based paging uses the query parameters `page[size]` and `page[number]` to specify the max number of resources returned and the page number. We default to skip-based paging if there are no page parameters. The response will include a `links` object containing links to the first, last, prev, and next pages of data. If the contents of the collection change while you are iterating through the collection, you will see duplicate or missing documents. For example, if you are iterating through the `calender_event` resource via `GET /pub/calendar_event?sort=start_at&page[size]=50&page[number]=1`, and a new `calendar_event` is created that has a `start_at` value before the first `calendar_event`, when you fetch the next page at `GET /pub/calendar_event?sort=start_at&page[size]=50&page[number]=2`, the first entry in the second response will be a duplicate of the last entry in the first response. #### Cursor-based paging Cursor-based paging uses the query parameters `page[limit]` and `page[after]` to specify the max number of entries returned and identify where to begin the next page. Add `page[limit]` to the parameters to use cursor-based paging. The response will include a `links` object containing a link to the next page of data, if the next page exists. Cursor-based paging is not subject to duplication if new resources are added to the collection. For example, if you are iterating through the `calender_event` resource via `GET /pub/calendar_event?sort=start_at&page[limit]=50`, and a new `calendar_event` is created that has a `start_at` value before the first `calendar_event`, you will not see a duplicate entry when you fetch the next page at `GET /pub/calendar_event?sort=start_at&page[limit]=50&page[after]=<cursor>`. We encourage the use of cursor-based paging for performance reasons. In either form of paging, you can determine whether any resources were missed by comparing the number of fetched resources against `meta.count`. Set `page[size]` or `page[limit]` to 0 to get only the count. It is not valid to mix the two strategie

Fitbit Plus API is a business API from twinehealth.com. Requests are authenticated with OAuth. It is served over HTTPS. Its OpenAPI description documents 62 endpoints.

At a glance

Authentication
OAuth
HTTPS
Yes
CORS
Unknown
Category
Business
Base URL
https://api.twinehealth.com/pub
Version
v7.78.1
Endpoints
62
Spec updated
2023-03-06

Make a first request

Replace the placeholders; the documentation says exactly where credentials go.

cURL
curl -X GET "https://api.twinehealth.com/pub/calendar_event" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN"
JavaScript
const response = await fetch("https://api.twinehealth.com/pub/calendar_event", {
  method: "GET",
  headers: {
    "Accept": "application/json",
    "Authorization": "Bearer YOUR_TOKEN",
  },
});
const data = await response.json();
console.log(data);
Python
import requests

response = requests.request(
    "GET",
    "https://api.twinehealth.com/pub/calendar_event",
    headers={
    "Accept": "application/json",
    "Authorization": "Bearer YOUR_TOKEN",
    },
    timeout=30,
)
print(response.json())

Endpoints

MethodPathWhat it does
POST/actionCreate action
GET/action/{id}Get an action
PATCH/action/{id}Update an action
POST/bundleCreate bundle
GET/bundle/{id}Get a bundle
PATCH/bundle/{id}Update a bundle
GET/calendar_eventList calendar events
POST/calendar_eventCreate calendar event
GET/calendar_event/{id}Get a calendar event
PATCH/calendar_event/{id}Update a calendar event
DELETE/calendar_event/{id}Delete a calendar event
POST/calendar_event_responseCreate calendar event response
GET/coachList coaches
GET/coach/{id}Get a coach
GET/email_historyList email histories
GET/email_history/{id}Get an email history
GET/groupList groups
POST/groupCreate a group
GET/group/{id}Get a group
GET/health_profileList health profiles
GET/health_profile/{id}Get a health profile
GET/health_profile_answerList health profile answers
GET/health_profile_answer/{id}Get a health profile answer
GET/health_profile_questionList health profile questions
GET/health_profile_question/{id}Get a health profile question
GET/health_question_definitionList health question definitions
GET/health_question_definition/{id}Get a health question definition
POST/oauth/tokenCreate an oauth token
GET/oauth/token/{id}/groupsGet the groups for a token
GET/oauth/token/{id}/organizationGet the organization for a token
GET/organization/{id}Get an organization
GET/patientList patients
POST/patientCreate a patient
PUT/patientUpsert patient
GET/patient/{id}Get a patient
PATCH/patient/{id}Update a patient
GET/patient/{id}/coachesList coaches for a patient
GET/patient/{id}/groupsList groups for a patient
GET/patient_health_metricList patient health metrics
POST/patient_health_metricCreate patient health metrics
GET/patient_health_metric/{id}Get a patient health metric
GET/patient_plan_summaryList patient plan summaries
GET/patient_plan_summary/{id}Get the plan summary for a patient
PATCH/patient_plan_summary/{id}Update a plan summary
GET/resultList patient health results
GET/result/{id}Get a patient health result
GET/rewardList rewards
POST/rewardCreate a reward
GET/reward/{id}Get a reward
GET/reward_earningList reward earnings
POST/reward_earningCreate a reward earning
GET/reward_earning/{id}Get a reward earning
GET/reward_earning_fulfillmentList reward earning fulfillments
POST/reward_earning_fulfillmentCreate a reward earning fulfillment
GET/reward_earning_fulfillment/{id}Get a reward earning fulfillment
GET/reward_programList reward programs
POST/reward_programCreate a reward program
GET/reward_program/{id}Get a reward program
GET/reward_program/{id}/groupGet group for a reward program
GET/reward_program_activationList reward program activations
POST/reward_program_activationCreate a reward program activation
GET/reward_program_activation/{id}Get a reward program activation

Questions

Does the Fitbit Plus API API need an API key?

Yes. The Fitbit Plus API API uses OAuth authentication; the documentation explains how to get credentials.

Does the Fitbit Plus API API support HTTPS?

Yes, the Fitbit Plus API API is served over HTTPS.

How many endpoints does the Fitbit Plus API API have?

Its OpenAPI description lists 62 endpoints in version v7.78.1. All of them are shown on this page.

What are alternatives to the Fitbit Plus API API?

Other Business APIs include Gmail, Google Analytics, Apache Superset, Trello, Square.

Compare alternatives →

Listed from APIs.guru (CC0).