REST API Reference

Get FHIR Resources
Description

Returns all matching FHIR resources for a resource type

See also:

Path
GET /fhir/{fhirVersion}/{resourceType}
Headers

This endpoint receives authentication in the form of a http bearer authenitcation header.

For example, Authorization: Bearer <user_access_token_here>.

Responses
http status code: 200
A FHIR Bundle containing all the resources that match the query,
application/json
{
  // See the official hl7 FHIR docs (https://www.hl7.org/fhir/bundle.html) for more information on how a FHIR bundle is structured.

  
  // additional attributes will be present depending on the resource posted
  "id" : "string",
  "resourceType" : "string",
  // the entry will contain the fhir resources that match the query
  "entry" :   [
  ],
},
-or-
{
  
  // would be non-empty if an error occurred during the request
  "error" : "string",
},
Create a FHIR Resource
Description

Can be used to create a FHIR resource with a given type. Note that within the fhir standard you can

See also:

Path
POST /fhir/{fhirVersion}/{resourceType}
Headers

This endpoint receives authentication in the form of a http bearer authenitcation header.

For example, Authorization: Bearer <user_access_token_here>.

Responses
http status code: 200
A FHIR Resource containing all the attributes that were posted.
application/json
{
  
  // additional attributes will be present depending on the resource posted
  "id" : "string",
  "resourceType" : "string",
},
Get all user data
Description

This endpoint returns a list of all known FHIR resources for a given patient. This is useful when transmitting batch data or getting the full patient history.

Path
GET /fhir/{fhirVersion}/Patient/{patientId}/$everything
Headers

This endpoint receives authentication in the form of a http bearer authenitcation header.

For example, Authorization: Bearer <user_access_token_here>.

Responses
http status code: 200
A FHIR Bundle containing all the resources that match the query
application/json
{
  // See the official hl7 FHIR docs (https://www.hl7.org/fhir/bundle.html) for more information on how a FHIR bundle is structured.

  
  // additional attributes will be present depending on the resource posted
  "id" : "string",
  "resourceType" : "string",
  // the entry will contain the fhir resources that match the query
  "entry" :   [
  ],
},
Grant permissions to user
Description

When making a request to the 1upHealth FHIR API using a user's access_token, the resources returned will be scoped to only the resources that the user has permissions to view. However, sometimes when building an app you might want to support the ability for users to grant access to other users to see certain records. This endpoint allows you to grant access to resources to arbitrary users.

Path
PUT /fhir/dstu2/Patient/patientid/_permission/{oneUpUserId}
Responses
http status code: 200
application/json
{
  
  // would be non-empty if an error occurred during the request
  "error" : "string",
},
Revoke permissions from user
Description

This endpoint allows you to remove permissions that have been granted to users to see other users' FHIR resources.

Path
DELETE /fhir/dstu2/Patient/patientid/_permission/{oneUpUserId}
Responses
http status code: 200
application/json
{
  
  // would be non-empty if an error occurred during the request
  "error" : "string",
},
Get Users
Description

Get the list of all the users that exist inside your 1up Developer Application, with the option of filtering by specific users

Path
GET /user-management/v1/user
Query Parameters
oneup_user_id — string
app_user_id — string
Responses
http status code: 200
An array of user objects
application/json
[
  {
    "client_id" : "string",
    "client_secret" : "string",
    "app_user_id" : "string",
    
    // Indicates whether the user is active or not
    "active" : "boolean",
  },
],
-or-
{
  
  // would be non-empty if an error occurred during the request
  "error" : "string",
},
Create User
Description

Will cause a user to be created with the attributes passed in the request body. The request won't fail if the user already exists but rather will return the user data but with

Path
POST /user-management/v1/user
Request Body
application/json
{
  "client_id" : "string",
  "client_secret" : "string",
  "app_user_id" : "string",
  
  // Indicates whether the user is active or not
  "active" : "boolean",
},
Responses
http status code: 201
application/json
{
  "client_id" : "string",
  "client_secret" : "string",
  "app_user_id" : "string",
  
  // Indicates whether the user is active or not
  "active" : "boolean",
},
-or-
{
  
  // would be non-empty if an error occurred during the request
  "error" : "string",
},
Update User
Description

Can be used to modify an existing user object. It is possible to modify the app_user_id, but the oneup_user_id is assigned when the user is created and cannot be changed.

Path
PUT /user-management/v1/user
Request Body
application/json
{
  "client_id" : "string",
  "client_secret" : "string",
  "app_user_id" : "string",
  "oneup_user_id" : "string",
  
  // A status flag on the user that indicates whether the user is active.  Setting this to false will mark the user as inactive.
  "active" : "boolean",
},
Responses
http status code: 200
Will return the new user object
Generate User Authorization Code
Description

A backend app can use this endpoint to get a new authorization code for a user. Note that this endpoint should not be called in a browser context because it would require exposing your app's secret key to users.

Path
POST /user-management/v1/user/auth-code
Request Body
application/json
{
  "client_id" : "string",
  "app_user_id" : "string",
  "client_secret" : "string",
},
Responses
http status code: 200
Returns an access token and a refresh token, which can be used to authenticate requests made on behalf of the user.
application/json
{
  "access_token" : "string",
  "refresh_token" : "string",
},
Health System Picker UI
Description

A common pattern is to ask the user to connect data from their health system to the app. This endpoint returns a simple html page that can be used as a starting point for walking the user through the data connect flow. For more details, read about the Connect Health Data IFrame.

Path
GET /connect
Responses
http status code: 200
text/html
This endpoint returns an html page and inline css that, when rendered, results in a UI for selecting which health care system the user would like to connect. The most common use of this is to render this endpoint in an iframe within the developers own app.
Query Devices
Description

Currently 1upHealth allows importing data from either Fitbit, GoogleFit or Withings.

Learn more about connecting to sensors

Path
GET /connect/system/device
Responses
http status code: 200
Returns a list of device types that can be used as sources.
Get Supported Health Systems
Description

Use this endpoint to query the full list of supported health systems. If your use-case would benefit from full-text search of providers on fields like name, address, or clinician names, then we recommend using the Provider Search endpoint instead.

Path
GET /connect/system/clinical
Responses
http status code: 200