API Reference

Overview

Use the Point API to integrate a web application with the Point ecosystem. Using it you are able to get user data, like all the data generated by the Point Health Data Service. Additionally, you can perform mutations to create or update user data and settings.

Note: All features listed here are present in the SDKs. Just use the API if you are integrating a web application.

You must provide a valid user token as an Authorization header for all api requests. Refer to Registering Users to know how to get a token.

You can use our Graphql Playground for testing, but you still need to provide a valid user token for each request.

Tip: By integrating Fitbit with your web application you can start using the API to get all the generated metrics and insights for your users without the need of a mobile application. Check Fitbit Integration for more information.

Table of Contents

Query

FieldArgumentTypeDescription
lastSampleHealthSample!Returns the date of the last sample uploaded for the given user
sampleTypeHealthSampleType!
oldestSampleDateDateTime!Returns the date of the oldest sample uploaded for the given user
sampleTypeHealthSampleType!
healthMetrics[HealthMetricPayload!]!Fetches latest health metrics based on the users filters
filter[HealthMetricType!]!
workoutIdInt
dateDateTime
workouts[Workout!]!Get a list of the user's workouts, based on the input
inputGetWorkoutsInput
workoutWorkout!Get a specific workout, based on the user ID
idID!
dailyHistory[DailyHistoryItem!]!Retrieves a list of the User's last 16 days worth of DailyHistoryItem, in descending order. The DailyHistoryItem is composed of daily total calories, exertion rate and total workout duration. The offset is meant to be used as a pagination, and if no value is passed, it is defaulted to 0.
inputGetDailyHistoryInput!
userUserFetch user information based on its authorization headers
workoutRecommendations[WorkoutRecommendations]!Retrieve recommendations from the beginning of the week of the date until the date.
dateDateTimeDate format: yyyy-mm-dd
insights[Insight!]!Get a list of the generated insights, based on the input. The return is limited to 16 insights.
inputInsightsInput

Mutation

FieldArgumentTypeDescription
createHealthSampleCreateHealthSamplePayload!Store a user health sample
inputCreateHealthSampleInput!
rateWorkoutRateWorkoutPayload!Rate a single workout, based on the user input
inputRateWorkoutInput!
setUserGoalUserGoalPayload!Set or update the user goal
goalGoalAnswers!
setUserSpecificGoalUserGoalPayload!Set or update the user specific goal
specificGoalSpecificGoalAnswers!
setUserBirthdayUserBirthdayPayload!Set or update the user birthday
dateDateTime!
saveWorkoutRecommendationsWorkoutRecommendationsUpdatedPayload!Save a workout recommendation for the user from the user's workout recommendations list.
idID!
saveWorkoutRecommendationWorkoutRecommendationsUpdatedPayload!Alias for saveWorkoutRecommendations
idID!

Objects

CreateHealthSamplePayload

FieldTypeDescription
successBoolean!

DailyHistoryItem

FieldTypeDescription
dateDateTime!
metrics[DailyHistoryPayload!]!

DailyHistoryPayload

FieldTypeDescription
typeHealthMetricType!The metric type. Can be "daily total calorie"s, "exertion rate" or "total workout duration".
dateDateTime!
valueString
varianceIntThe variance from the last value.

GoalProgressItem

FieldTypeDescription
valueFloat!A score between 0 - 100. Refer to Health Scores for more details.
varianceFloat!The variance from the last value.

GoalProgressPayload

FieldTypeDescription
overallGoalProgressItem!A score between 0 - 100. Refer to Health Scores for more details.
enduranceGoalProgressItem!A score between 0 - 100. Refer to Health Scores for more details.
recoveryGoalProgressItem!A score between 0 - 100. Refer to Health Scores for more details.
strengthGoalProgressItem!A score between 0 - 100. Refer to Health Scores for more details.

HealthMetric

FieldTypeDescription
dateDateTime!
valueString

HealthMetricPayload

FieldTypeDescription
typeHealthMetricType!
dateDateTime!
valueString
varianceInt
workoutIdIntThe workout ID of this metric. Can be nil if the metric is not related to a specific workout.

HealthSample

FieldTypeDescription
createdAtDateTime

Insight

FieldTypeDescription
additionalFieldsString!The insight metadata. Refer to Health Insights for more information.
createdAtDateTime!
idInt!
typeInsightType!

RateWorkoutPayload

FieldTypeDescription
successBoolean!

User

FieldTypeDescription
idString!
emailString
firstNameString
goalGoalAnswers
specificGoalSpecificGoalAnswers
birthdayDateTime
goalProgressGoalProgressPayload!
lastWorkoutWorkout

UserBirthdayPayload

FieldTypeDescription
successBoolean!

UserGoalPayload

FieldTypeDescription
successBoolean!

Workout

FieldTypeDescription
idInt!
caloriesFloat!
distanceFloat!
durationFloat!
startDateTime!
endDateTime!
activityNameString!
activityIdInt
ratingsWorkoutRatings

WorkoutRatings

FieldTypeDescription
difficultyIntA rating that ranges from 0 to 5.
energyIntA rating that ranges from 0 to 5
instructorIntA rating that ranges from 0 to 5

WorkoutRecommendations

FieldTypeDescription
idInt!
dateDateTime
activityIdInt
activityNameString
savedAtDateTime
workoutIdInt
completedAtDateTime
createdAtDateTime
updatedAtDateTime

WorkoutRecommendationsUpdatedPayload

FieldTypeDescription
successBoolean!

Inputs

CreateHealthSampleInput

FieldTypeDescription
dataString!A JSON with the samples to be created. All samples must be from the same type.
sampleTypeHealthSampleType!The sample type.

GetDailyHistoryInput

FieldTypeDescription
offsetInt!An offset to be used for pagination. This function has a return limit of 16, so use this parameter to query beyond the first 16 entries. Defaults to 0 if not provided.

GetWorkoutsInput

FieldTypeDescription
offsetInt!An offset to be used for pagination. This function has a return limit of 16, so use this parameter to query beyond the first 16 entries. Defaults to 0 if not provided.

RateWorkoutInput

FieldTypeDescription
idInt!The workout ID to be rated.
difficultyInt!A rating that ranges from 1 to 5 and defaults to 0 when no value is provided.
energyInt!A rating that ranges from 1 to 5 and defaults to 0 when no value is provided.
instructorInt!A rating that ranges from 1 to 5 and defaults to 0 when no value is provided.

InsightsInput

FieldTypeDescription
intervalIntervalThe date interval to get insights. Will return all insights if no interval is provided.
offsetIntAn offset to be used for pagination. This function has a return limit of 16 insights, so use this parameter to query beyond the first 16 insights. Defaults to 0 if not provided.
type[InsightType]!The set of types you wish to query. You must provide at least one type.

Interval

FieldTypeDescription
fromDateTime!A starting date limit to the query. Setting this parameter will make the function return only insights created after or at this date.
toDateTime!A ending date limit to the query. Setting this parameter will make the function return only insights created before or at this date.

Enums

HealthSampleType

See Sample Types for a full list of supported HealthSampleTypes.

HealthMetricType

See Metric Types for a full list of supported HealthMetricTypes.

InsightType

See Insight Types for a full list of supported InsightTypes.

GoalAnswers

ValueDescription
athleticPerformance
weightLoss

SpecificGoalAnswers

ValueDescription
buildLeanMuscle
loseWeight
prepareForEvent
accomplishMore
maintainHealth

Errors

CodeMessageReason
UNAUTHENTICATEDNot authorizedInvalid bearer token
AUTH0_TOO_MANY_REQUESTSToo many requestsUnable to validate token

Scalars

Boolean

The Boolean scalar type represents true or false.

DateTime

--

Float

The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.

ID

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.

Int

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

String

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

Void

--

Download our App

Download the app on App Store

Connect with Us

Terms & Conditions | Privacy Policy © 2022 Point® (Key Point Technologies, Inc.)