integrations.sh
← all integrations

Fitbit Plus API

OpenAPI apis-guru support

Overview

The Fitbit Plus API is a RESTful API. The requests and responses are formated according to the specification.

In addition to this documentation, we also provide an "yaml" file describing the API: Fitbit Plus API Specification [blocked].

Authentication

Authentication for the Fitbit Plus API is based on the . Fitbit Plus currently supports grant types of client_credentials and refresh_token.

See 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.

Homepage
https://api.apis.guru/v2/specs/twinehealth.com/v7.78.1.json
Provider
twinehealth.com
OpenAPI version
2.0
Spec (JSON)
https://api.apis.guru/v2/specs/twinehealth.com/v7.78.1/openapi.json
Spec (YAML)
https://api.apis.guru/v2/specs/twinehealth.com/v7.78.1/openapi.yaml

Tools (64)

Extracted live via the executor SDK.

  • action.createAction

    Create a plan action

  • action.fetchAction

    Get a health action from a patient's plan.

  • action.updateAction

    Update a health action from a patient's plan.

  • bundle.createBundle

    Create a bundle in a patient's plan

  • bundle.fetchBundle

    Get a bundle from a patient's plan.

  • bundle.updateBundle

    Updte a bundle from a patient's plan.

  • calendarEvent.createCalendarEvent

    Create a calendar event for a patient. Attribute all_day must be set to true and end_at cannot be set for plan-check-in event type.

  • calendarEvent.deleteCalendarEvent

    Delete a calendar event by id

  • calendarEvent.fetchCalendarEvent

    Get a calendar event by id

  • calendarEvent.fetchCalendarEvents

    Get a list of calendar events

  • calendarEvent.updateCalendarEvent

    Update a calendar event for a patient. Attribute all_day must be true and end_at cannot be specified for plan-check-in event type. To mark a calendar event as 'completed', set completed_at and completed_by to desired values. To mark a completed calendar event as 'not completed', set completed_at and completed_by to null. Attendees can be added or removed, but response status cannot be updated. Use the calendar event response api for response status updates instead.

  • calendarEventResponse.createCalendarEventResponse

    Create a calendar event response for an attendee of a calendar event, the attendee can be a coach or patient. Calendar event responses cannot be fetched, updated nor deleted. Use calendar event api to fetch the response status for attendees.

  • coach.fetchCoach

    Get a coach record by id.

  • coach.fetchCoaches

    Get a list of coaches matching the specified filters.

  • emailHistory.fetchEmailHistories

    Get a list of email histories

  • emailHistory.fetchEmailHistory

    Get an email history by id

  • group.createGroup

    Create a group record.

  • group.fetchGroup

    Get a group record by id.

  • group.fetchGroups

    Get a list of groups matching the specified filters.

  • healthProfile.fetchHealthProfile

    Get a health profile by id

  • healthProfile.fetchHealthProfiles

    Get a list of health profiles

  • healthProfileAnswer.fetchHealthProfileAnswer

    Get a health profile answer by id

  • healthProfileAnswer.fetchHealthProfileAnswers

    Get a list of health profile answers

  • healthProfileQuestion.fetchHealthProfileQuestion

    Get a health profile by id

  • healthProfileQuestion.fetchHealthProfileQuestions

    Get a list of health profile questions

  • healthQuestionDefinition.fetchHealthQuestionDefinition

    Get a health question definition by id

  • healthQuestionDefinition.fetchHealthQuestionDefinitions

    Get a list of all health question definitions

  • metric.createPatientHealthMetric

    Create one or more patient health metrics.

    Example for creating a patient health result with a patient specified using meta.query instead of id:

    JSON
      {    "data": {      "type": "patient_health_metric",       "attributes": {         "code": {           "system": "LOINC",           "value": "13457-7"         },         "type": "ldl_cholesterol",         "occurred_at": "2017-03-14T11:00:57.000Z",         "value": 121,         "unit": "mg/dl"      },      "relationships": {        "patient": {          "data": {            "type": "patient",            "meta": {              "query": {                "identifier": {                  "system": "medical-record-number",                  "value": "121212"                },                "organization": "58c4554710123c5c40dbab81"              }            }          }        }      }    }  }
  • metric.fetchPatientHealthMetric

    Get the plan summary for a patient.

  • metric.fetchPatientHealthMetrics

    Get a list of patient health metrics.

  • oauth.createToken

    Create an OAuth 2.0 Bearer token. A valid bearer token is required for all other API requests.

    Be sure to set the header Content-Type: "application/vnd.api+json". Otherwise, you will get an error 403 Forbidden. Using Content-Type: "application/json" is permitted (to support older oauth clients) but when using application/json the body should have a body in the following format instead of nesting under data.attributes:

    {  "grant_type": "client_credentials",  "client_id": "95c78ab2-167f-40b8-8bec-8398d4b87454",  "client_secret": "35d18dc9-a3dd-4948-b787-063a490b9354"}
  • oauth.fetchTokenGroups

    Get the list of groups a token can be used to access.

  • oauth.fetchTokenOrganization

    Get the organization a token can be used to access.

  • organization.fetchOrganization

    Get an organization record by id.

  • patient.createPatient

    Create a patient record.

    Example for creating a patient with a group specified using meta.query instead of id:

    JSON
    {  "data": {    "type": "patient",    "attributes": {      "first_name": "Andrew",      "last_name": "Smith"    },    "relationships": {      "groups": {        "data": [          {            "type": "group",            "meta": {              "query": {                "organization": "58c88de7c93eb96357a87033",                "name": "Patients Lead"              }            }          }        ]      }    }  }}
  • patient.fetchPatient

    Gets a patient record by id.

  • patient.fetchPatientCoaches

    Get the list of coaches for a patient.

  • patient.fetchPatientGroups

    Get the list of groups for a patient.

  • patient.fetchPatients

    Get a list of patients.

  • patient.updatePatient

    Update a patient record.

  • patient.upsertPatient

    Create a new patient or update an existing patient

  • plan.fetchPatientPlanSummaries

    Get a list of patient plan summaries

  • plan.fetchPatientPlanSummary

    Get the plan summary for a patient.

  • plan.updatePatientPlanSummary

    Update a plan summary record for a patient.

  • result.fetchPatientHealthResult

    Get patient health result by id.

  • result.fetchPatientHealthResults

    Get a list of patient health results.

  • reward.createReward

    Create a reward for a patient.

  • reward.fetchReward

    Get a reward record by id.

  • reward.fetchRewards

    Get a list of rewards matching the specified filters.

  • rewardEarning.createRewardEarning

    Create a reward earning for a reward. There can only be one earning for a reward. It is possilble to create multiple reward earnings simultaneously by providing and array of reward earnings in the data property.

  • rewardEarning.fetchRewardEarning

    Get a reward earning record by id.

  • rewardEarning.fetchRewardEarnings

    Get a list of reward earnings matching the specified filters.

  • rewardEarningFulfillment.createRewardEarningFulfillment

    Create a reward earning fulfillment for a reward earning. There can only be one fulfillment for each earning.

  • rewardEarningFulfillment.fetchRewardEarningFulfillment

    Get a reward earning fulfillment record by id.

  • rewardEarningFulfillment.fetchRewardEarningFulfillments

    Get a list of reward earning fulfillments matching the specified filters.

  • rewardProgram.createRewardProgram

    Create a reward program for a group.

  • rewardProgram.fetchRewardProgram

    Get a reward program record by id.

  • rewardProgram.fetchRewardProgramGroup

    Get the group related to a reward program.

  • rewardProgram.fetchRewardPrograms

    Get a list of reward programs matching the specified filters.

  • rewardProgramActivation.createRewardProgramActivation

    Create a reward program activation for a patient. There can only be one activation for a patient for a given reward program.

  • rewardProgramActivation.fetchRewardProgramActivation

    Get a reward program activationrecord by id.

  • rewardProgramActivation.fetchRewardProgramActivations

    Get a list of reward program activations matching the specified filters.

  • openapi.previewSpec

    Preview an OpenAPI document before adding it as a source

  • openapi.addSource

    Add an OpenAPI source and register its operations as tools