Fitbit Plus API
Overview
The Fitbit Plus API is a RESTful API. The requests and responses are formated according to the JSON API specification.
In addition to this documentation, we also provide an OpenAPI "yaml" file describing the API: Fitbit Plus API Specification.
Authentication
Authentication for the Fitbit Plus API is based on the OAuth 2.0 Authorization Framework. Fitbit Plus currently supports grant types of client_credentials and refresh_token.
See POST /oauth/token for details on the request and response formats.
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 strategies.
https://api.twinehealth.com/pubAuth: unknown
Endpoints: 40
Reachable: unknown
CORS: unknown
Topics
Endpoints
| Method | Path | Summary | Auth | Last Status | Latency |
|---|---|---|---|---|---|
GET |
/action/{id} | Get an action | — | — | — |
GET |
/bundle/{id} | Get a bundle | — | — | — |
GET |
/calendar_event | List calendar events | — | — | — |
GET |
/calendar_event/{id} | Get a calendar event | — | — | — |
GET |
/coach | List coaches | — | — | — |
GET |
/coach/{id} | Get a coach | — | — | — |
GET |
/email_history | List email histories | — | — | — |
GET |
/email_history/{id} | Get an email history | — | — | — |
GET |
/group | List groups | — | — | — |
GET |
/group/{id} | Get a group | — | — | — |
GET |
/health_profile | List health profiles | — | — | — |
GET |
/health_profile/{id} | Get a health profile | — | — | — |
GET |
/health_profile_answer | List health profile answers | — | — | — |
GET |
/health_profile_answer/{id} | Get a health profile answer | — | — | — |
GET |
/health_profile_question | List health profile questions | — | — | — |
GET |
/health_profile_question/{id} | Get a health profile question | — | — | — |
GET |
/health_question_definition | List health question definitions | — | — | — |
GET |
/health_question_definition/{id} | Get a health question definition | — | — | — |
GET |
/organization/{id} | Get an organization | — | — | — |
GET |
/patient | List patients | — | — | — |
GET |
/patient/{id} | Get a patient | — | — | — |
GET |
/patient/{id}/coaches | List coaches for a patient | — | — | — |
GET |
/patient/{id}/groups | List groups for a patient | — | — | — |
GET |
/patient_health_metric | List patient health metrics | — | — | — |
GET |
/patient_health_metric/{id} | Get a patient health metric | — | — | — |
GET |
/patient_plan_summary | List patient plan summaries | — | — | — |
GET |
/patient_plan_summary/{id} | Get the plan summary for a patient | — | — | — |
GET |
/result | List patient health results | — | — | — |
GET |
/result/{id} | Get a patient health result | — | — | — |
GET |
/reward | List rewards | — | — | — |
GET |
/reward/{id} | Get a reward | — | — | — |
GET |
/reward_earning | List reward earnings | — | — | — |
GET |
/reward_earning/{id} | Get a reward earning | — | — | — |
GET |
/reward_earning_fulfillment | List reward earning fulfillments | — | — | — |
GET |
/reward_earning_fulfillment/{id} | Get a reward earning fulfillment | — | — | — |
GET |
/reward_program | List reward programs | — | — | — |
GET |
/reward_program/{id} | Get a reward program | — | — | — |
GET |
/reward_program/{id}/group | Get group for a reward program | — | — | — |
GET |
/reward_program_activation | List reward program activations | — | — | — |
GET |
/reward_program_activation/{id} | Get a reward program activation | — | — | — |