HealthCloud API (v1)

Download OpenAPI specification:Download

Introduction

Welcome to the HealthCloud API! You can use our API to access HC API endpoints.

HealthCloud exposes a Swagger UI which can be accessed at /swagger.

The Swagger can be used with http://editor.swagger.io/ to generate client proxy code in many different development languages.

Authorization

To be able to integrate with the HealthCloud SSO platform the developer needs to follow a few steps.

Step 1 – Follow the Apply for access link to register for your API credentials.

Step 2 – You will receive an email once your application is approved with your api credentials.

Step 3 – You can configure your callback URL and maintain your credentials by following Maintain Credentials.

Step 4 - Implementation.

Implementation

The HC System requires the API Key, a CorrelationId and passphrase, to be sent with every request, this will be used to identify the calling system and to prevent Replay attacks.

  • The CorrelationId is a concatenated string of the current UTC Date Time in the format of “yyyyMMddHHmm” and 32 Random Generated Alphanumeric characters (0-9, A-Z, a-z). This should give a total length of 44 characters.

  • The next step is to create a HASH using HMACSHA256 of your API Key. The Secret used in this HASH must be the concatenation of your CorrelationId from 1 above and your secret.

  • Lastly convert this HASH value to a base64 string and pass it to the server as your passphrase.

      Replace the {YOUR API KEY} and {YOUR SECRET} with your own.

HCCActivity

Exposes fitness provider data and daily summaries

Sleep Get

Returns Sleep data obtained from fitness devices connected to the profile.

Request Body schema: application/json
profileId
required
string <uuid>

Unique identifier that links to the patient

fromDate
required
string <date-time>

Start Date of the date range

toDate
required
string <date-time>

End Date of the date range

apiKey
string <uuid>

The Integrating System's unique identifier.

correlationId
string

Concatenated string of the current UTC Date Time and 32 Random Generated Alphanumeric characters (0-9, A-Z, a-z)

passphrase
string

base64 string of the HMACSHA256 hashing.

loggedInUserId
string <uuid>

Unique identifier of the logged in user

Responses

200

Success

Response Schema: application/json
Array
minutes
number <double>

Total sleep time in minutes

deviceCode
string

Unique code that identifies the device

deviceName
string

Name of the device used

deviceProvider
string

The Provider of the device(ex. FitBit)

activityDateTime
string <date-time>

Date and Time of when the activity took place

dateUpdated
string <date-time>

Date of when the activity was updated

dateCreated
string <date-time>

Created date

post /api/HCCActivity/SleepGet
/api/HCCActivity/SleepGet

Request samples

application/json
Copy
Expand all Collapse all
{
  • "profileId": "string",
  • "fromDate": "2018-12-13T07:16:58Z",
  • "toDate": "2018-12-13T07:16:58Z",
  • "apiKey": "string",
  • "correlationId": "string",
  • "passphrase": "string",
  • "loggedInUserId": "string"
}

Response samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Heart Rate Get

Returns Heart Rate data obtained from fitness devices connected to the profile.

Request Body schema: application/json
profileId
required
string <uuid>

Unique identifier that links to the patient

fromDate
required
string <date-time>

Start Date of the date range

toDate
required
string <date-time>

End Date of the date range

apiKey
string <uuid>

The Integrating System's unique identifier.

correlationId
string

Concatenated string of the current UTC Date Time and 32 Random Generated Alphanumeric characters (0-9, A-Z, a-z)

passphrase
string

base64 string of the HMACSHA256 hashing.

loggedInUserId
string <uuid>

Unique identifier of the logged in user

Responses

200

Success

Response Schema: application/json
Array
restHeartRate
number <double>

Resting Heart Rate Value

minHeartRateBpm
number <double>

Min Heart Rate Value

maxHeartRate
number <double>

MAx Heart Rate Value

averageHeartRate
number <double>

Average Heart Rate Value

unit
string

The unit of which the value is measured in. ex. bpm (beats per minute)

deviceCode
string

Unique code that identifies the device

deviceName
string

Name of the device used

deviceProvider
string

The Provider of the device(ex. FitBit)

activityDateTime
string <date-time>

Date and Time of when the activity took place

dateUpdated
string <date-time>

Date of when the activity was updated

dateCreated
string <date-time>

Created date

post /api/HCCActivity/HeartRateGet
/api/HCCActivity/HeartRateGet

Request samples

application/json
Copy
Expand all Collapse all
{
  • "profileId": "string",
  • "fromDate": "2018-12-13T07:16:58Z",
  • "toDate": "2018-12-13T07:16:58Z",
  • "apiKey": "string",
  • "correlationId": "string",
  • "passphrase": "string",
  • "loggedInUserId": "string"
}

Response samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Calories Get

Returns Heart Rate data obtained from fitness devices connected to the profile.

Request Body schema: application/json
profileId
required
string <uuid>

Unique identifier that links to the patient

fromDate
required
string <date-time>

Start Date of the date range

toDate
required
string <date-time>

End Date of the date range

apiKey
string <uuid>

The Integrating System's unique identifier.

correlationId
string

Concatenated string of the current UTC Date Time and 32 Random Generated Alphanumeric characters (0-9, A-Z, a-z)

passphrase
string

base64 string of the HMACSHA256 hashing.

loggedInUserId
string <uuid>

Unique identifier of the logged in user

Responses

200

Success

Response Schema: application/json
Array
calories
number <double>

Total Mathematical calculated calories burned during the time range

deviceCode
string

Unique code that identifies the device

deviceName
string

Name of the device used

deviceProvider
string

The Provider of the device(ex. FitBit)

activityDateTime
string <date-time>

Date and Time of when the activity took place

dateUpdated
string <date-time>

Date of when the activity was updated

dateCreated
string <date-time>

Created date

post /api/HCCActivity/CaloriesGet
/api/HCCActivity/CaloriesGet

Request samples

application/json
Copy
Expand all Collapse all
{
  • "profileId": "string",
  • "fromDate": "2018-12-13T07:16:58Z",
  • "toDate": "2018-12-13T07:16:58Z",
  • "apiKey": "string",
  • "correlationId": "string",
  • "passphrase": "string",
  • "loggedInUserId": "string"
}

Response samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Steps Get

Returns Step data obtained from fitness devices connected to the profile.

Request Body schema: application/json
profileId
required
string <uuid>

Unique identifier that links to the patient

fromDate
required
string <date-time>

Start Date of the date range

toDate
required
string <date-time>

End Date of the date range

apiKey
string <uuid>

The Integrating System's unique identifier.

correlationId
string

Concatenated string of the current UTC Date Time and 32 Random Generated Alphanumeric characters (0-9, A-Z, a-z)

passphrase
string

base64 string of the HMACSHA256 hashing.

loggedInUserId
string <uuid>

Unique identifier of the logged in user

Responses

200

Success

Response Schema: application/json
Array
steps
integer <int32>

Total amount of steps taken during the time range

deviceCode
string

Unique code that identifies the device

deviceName
string

Name of the device used

deviceProvider
string

The Provider of the device(ex. FitBit)

activityDateTime
string <date-time>

Date and Time of when the activity took place

dateUpdated
string <date-time>

Date of when the activity was updated

dateCreated
string <date-time>

Created date

post /api/HCCActivity/StepsGet
/api/HCCActivity/StepsGet

Request samples

application/json
Copy
Expand all Collapse all
{
  • "profileId": "string",
  • "fromDate": "2018-12-13T07:16:58Z",
  • "toDate": "2018-12-13T07:16:58Z",
  • "apiKey": "string",
  • "correlationId": "string",
  • "passphrase": "string",
  • "loggedInUserId": "string"
}

Response samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

DistanceGet

Returns Distance data obtained from fitness devices connected to the profile.

Request Body schema: application/json
profileId
required
string <uuid>

Unique identifier that links to the patient

fromDate
required
string <date-time>

Start Date of the date range

toDate
required
string <date-time>

End Date of the date range

apiKey
string <uuid>

The Integrating System's unique identifier.

correlationId
string

Concatenated string of the current UTC Date Time and 32 Random Generated Alphanumeric characters (0-9, A-Z, a-z)

passphrase
string

base64 string of the HMACSHA256 hashing.

loggedInUserId
string <uuid>

Unique identifier of the logged in user

Responses

200

Success

Response Schema: application/json
Array
distance
number <double>

Total Distance traveled during the time range in Km

deviceCode
string

Unique code that identifies the device

deviceName
string

Name of the device used

deviceProvider
string

The Provider of the device(ex. FitBit)

activityDateTime
string <date-time>

Date and Time of when the activity took place

dateUpdated
string <date-time>

Date of when the activity was updated

dateCreated
string <date-time>

Created date

post /api/HCCActivity/DistanceGet
/api/HCCActivity/DistanceGet

Request samples

application/json
Copy
Expand all Collapse all
{
  • "profileId": "string",
  • "fromDate": "2018-12-13T07:16:58Z",
  • "toDate": "2018-12-13T07:16:58Z",
  • "apiKey": "string",
  • "correlationId": "string",
  • "passphrase": "string",
  • "loggedInUserId": "string"
}

Response samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Stress Data Get

Returns Stress data obtained from fitness devices connected to the profile.

Request Body schema: application/json
profileId
required
string <uuid>

Unique identifier that links to the patient

fromDate
required
string <date-time>

Start Date of the date range

toDate
required
string <date-time>

End Date of the date range

apiKey
string <uuid>

The Integrating System's unique identifier.

correlationId
string

Concatenated string of the current UTC Date Time and 32 Random Generated Alphanumeric characters (0-9, A-Z, a-z)

passphrase
string

base64 string of the HMACSHA256 hashing.

loggedInUserId
string <uuid>

Unique identifier of the logged in user

Responses

200

Success

Response Schema: application/json
Array
restStressDurationInSeconds
integer <int32>

The number of seconds in this monitoring period where stress level measurements were in the restful range (1 to 25).

stressDurationInSeconds
integer <int32>

The number of seconds in this monitoring period where stress level measurements were in the stressful range (26-100).

lowStressDurationInSeconds
integer <int32>

The portion of the user’s stress duration where the measured stress score was in the low range (26-50).

mediumStressDurationInSeconds
integer <int32>

The portion of the user’s stress duration where the measured stress score was in the medium range (51-75).

highStressDurationInSeconds
integer <int32>

The portion of the user’s stress duration where the measured stress score was in the high range (76-100).

activityStressDurationInSeconds
integer <int32>

The number of seconds in this monitoring period where the user was engaging in physical activity and so stress measurement was unreliable.

averageStressLevel
integer <int32>

User’s average stress level in this monitoring period, measured from 1 to 100

maxStressLevel
integer <int32>

The highest stress level measurement taken during this monitoring period

stressQualifier
string

A qualitative label applied based on all stress measurements in this monitoring period. Possible values: unknown, calm, balanced, stressful, very_stressful, calm_awake, balanced_awake, stressful_awake, very_stressful_awake.

deviceCode
string

Unique code that identifies the device

deviceName
string

Name of the device used

deviceProvider
string

The Provider of the device(ex. FitBit)

activityDateTime
string <date-time>

Date and Time of when the activity took place

dateUpdated
string <date-time>

Date of when the activity was updated

dateCreated
string <date-time>

Created date

post /api/HCCActivity/StressDataGet
/api/HCCActivity/StressDataGet

Request samples

application/json
Copy
Expand all Collapse all
{
  • "profileId": "string",
  • "fromDate": "2018-12-13T07:16:58Z",
  • "toDate": "2018-12-13T07:16:58Z",
  • "apiKey": "string",
  • "correlationId": "string",
  • "passphrase": "string",
  • "loggedInUserId": "string"
}

Response samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Device Count

Returns the amount of devices linked to the patient

Request Body schema: application/json
profileId
string <uuid>

Unique identifier that links to the patient

apiKey
string <uuid>

The Integrating System's unique identifier.

correlationId
string

Concatenated string of the current UTC Date Time and 32 Random Generated Alphanumeric characters (0-9, A-Z, a-z)

passphrase
string

base64 string of the HMACSHA256 hashing.

loggedInUserId
string <uuid>

Unique identifier of the logged in user

Responses

200

Success

Response Schema: application/json
integer <int32>
post /api/HCCActivity/GetPatientDeviceCount
/api/HCCActivity/GetPatientDeviceCount

Request samples

application/json
Copy
Expand all Collapse all
{
  • "profileId": "string",
  • "apiKey": "string",
  • "correlationId": "string",
  • "passphrase": "string",
  • "loggedInUserId": "string"
}

Response samples

application/json
Copy
Expand all Collapse all
0

Inactive Devices Get

Returns a list of all the inactive devices linked to the patient's profile

Request Body schema: application/json
profileId
string <uuid>

Unique identifier that links to the patient

apiKey
string <uuid>

The Integrating System's unique identifier.

correlationId
string

Concatenated string of the current UTC Date Time and 32 Random Generated Alphanumeric characters (0-9, A-Z, a-z)

passphrase
string

base64 string of the HMACSHA256 hashing.

loggedInUserId
string <uuid>

Unique identifier of the logged in user

Responses

200

Success

Response Schema: application/json
Array
providerType
string
Enum:"FitBit" "GoogleFit" "Striiv" "Garmin" "TomTom" "Polar" "HealthKit"

The Fitness Provider of the device ex FitBit

status
string
Enum:"Active" "Disabled" "Error"

The Current Status of the device

errorMessage
string

Set only if an error has occurred and the device is in an error status

lastSynced
string <date-time>

The Last time the device has synced data

providerName
string

The name of the fitness provider

post /api/HCCActivity/InactiveDevicesGet
/api/HCCActivity/InactiveDevicesGet

Request samples

application/json
Copy
Expand all Collapse all
{
  • "profileId": "string",
  • "apiKey": "string",
  • "correlationId": "string",
  • "passphrase": "string",
  • "loggedInUserId": "string"
}

Response samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Fitness Device Status

Returns the status of the specified device

Request Body schema: application/json
id
required
string <uuid>

The Unique Fitness Provider Id

apiKey
string <uuid>

The Integrating System's unique identifier.

correlationId
string

Concatenated string of the current UTC Date Time and 32 Random Generated Alphanumeric characters (0-9, A-Z, a-z)

passphrase
string

base64 string of the HMACSHA256 hashing.

loggedInUserId
string <uuid>

Unique identifier of the logged in user

Responses

200

Success

Response Schema: application/json
status
string
Enum:"Active" "Disabled" "Error"

The Current Status of the device

post /api/HCCActivity/GetFitnessDeviceStatus
/api/HCCActivity/GetFitnessDeviceStatus

Request samples

application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "apiKey": "string",
  • "correlationId": "string",
  • "passphrase": "string",
  • "loggedInUserId": "string"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "status": "Active"
}

HCCMasterData

Contains a collection of API Endpoints that allows users to retrieve static lists of objects.

Get Province List

This API endpoint will return a list of Key Value Pairs for Provinces

Request Body schema: application/json
apiKey
string <uuid>

The Integrating System's unique identifier.

correlationId
string

Concatenated string of the current UTC Date Time and 32 Random Generated Alphanumeric characters (0-9, A-Z, a-z)

passphrase
string

base64 string of the HMACSHA256 hashing.

loggedInUserId
string <uuid>

Unique identifier of the logged in user

Responses

200

Success

Response Schema: application/json
Array
id
string <uuid>

Unique identifier that links to a province

name
string

The name of the province

post /api/HCCMasterData/ProvinceList
/api/HCCMasterData/ProvinceList

Request samples

application/json
Copy
Expand all Collapse all
{
  • "apiKey": "string",
  • "correlationId": "string",
  • "passphrase": "string",
  • "loggedInUserId": "string"
}

Response samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Get TimeSlot List

This API endpoint will return a list of Key Value Pairs for TimeSlot

Request Body schema: application/json
apiKey
string <uuid>

The Integrating System's unique identifier.

correlationId
string

Concatenated string of the current UTC Date Time and 32 Random Generated Alphanumeric characters (0-9, A-Z, a-z)

passphrase
string

base64 string of the HMACSHA256 hashing.

loggedInUserId
string <uuid>

Unique identifier of the logged in user

Responses

200

Success

Response Schema: application/json
Array
id
string <uuid>

Unique identifier that links to a Timeslot

description
string

This is a description of the timeslot

minutes
integer <int32>

This indicates the length of the timeslot in minutes

post /api/HCCMasterData/TimeSlotList
/api/HCCMasterData/TimeSlotList

Request samples

application/json
Copy
Expand all Collapse all
{
  • "apiKey": "string",
  • "correlationId": "string",
  • "passphrase": "string",
  • "loggedInUserId": "string"
}

Response samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Get Language List

This API endpoint will return a list of Key Value Pairs for Language

Request Body schema: application/json
apiKey
string <uuid>

The Integrating System's unique identifier.

correlationId
string

Concatenated string of the current UTC Date Time and 32 Random Generated Alphanumeric characters (0-9, A-Z, a-z)

passphrase
string

base64 string of the HMACSHA256 hashing.

loggedInUserId
string <uuid>

Unique identifier of the logged in user

Responses

200

Success

Response Schema: application/json
Array
id
string <uuid>

Unique identifier that links to a language

name
string

This is the language's name

post /api/HCCMasterData/LanguageList
/api/HCCMasterData/LanguageList

Request samples

application/json
Copy
Expand all Collapse all
{
  • "apiKey": "string",
  • "correlationId": "string",
  • "passphrase": "string",
  • "loggedInUserId": "string"
}

Response samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Get Speciality List

This API endpoint will return a list of Key Value Pairs for Speciality

Request Body schema: application/json
apiKey
string <uuid>

The Integrating System's unique identifier.

correlationId
string

Concatenated string of the current UTC Date Time and 32 Random Generated Alphanumeric characters (0-9, A-Z, a-z)

passphrase
string

base64 string of the HMACSHA256 hashing.

loggedInUserId
string <uuid>

Unique identifier of the logged in user

Responses

200

Success

Response Schema: application/json
Array
id
string <uuid>

Unique identifier that links to a speciality

name
string

This is the speciality's name

post /api/HCCMasterData/SpecialityList
/api/HCCMasterData/SpecialityList

Request samples

application/json
Copy
Expand all Collapse all
{
  • "apiKey": "string",
  • "correlationId": "string",
  • "passphrase": "string",
  • "loggedInUserId": "string"
}

Response samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Get Profession List

This API endpoint will return a list of Key Value Pairs for Profession

Request Body schema: application/json
apiKey
string <uuid>

The Integrating System's unique identifier.

correlationId
string

Concatenated string of the current UTC Date Time and 32 Random Generated Alphanumeric characters (0-9, A-Z, a-z)

passphrase
string

base64 string of the HMACSHA256 hashing.

loggedInUserId
string <uuid>

Unique identifier of the logged in user

Responses

200

Success

Response Schema: application/json
Array
id
string <uuid>

Unique identifier that links to a profession

name
string

This is the profession's name

post /api/HCCMasterData/ProfessionList
/api/HCCMasterData/ProfessionList

Request samples

application/json
Copy
Expand all Collapse all
{
  • "apiKey": "string",
  • "correlationId": "string",
  • "passphrase": "string",
  • "loggedInUserId": "string"
}

Response samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Get Medical Aid List

This API endpoint will return a list of Key Value Pairs for Medical Aid.

Request Body schema: application/json
apiKey
string <uuid>

The Integrating System's unique identifier.

correlationId
string

Concatenated string of the current UTC Date Time and 32 Random Generated Alphanumeric characters (0-9, A-Z, a-z)

passphrase
string

base64 string of the HMACSHA256 hashing.

loggedInUserId
string <uuid>

Unique identifier of the logged in user

Responses

200

Success

Response Schema: application/json
Array
id
string <uuid>

Unique identifier that links to a medical aid

name
string

This is the medical aid's name

post /api/HCCMasterData/MedicalAidList
/api/HCCMasterData/MedicalAidList

Request samples

application/json
Copy
Expand all Collapse all
{
  • "apiKey": "string",
  • "correlationId": "string",
  • "passphrase": "string",
  • "loggedInUserId": "string"
}

Response samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Get Employer List

his API endpoint will return a list of Key Value Pairs for Employer.

Request Body schema: application/json
apiKey
string <uuid>

The Integrating System's unique identifier.

correlationId
string

Concatenated string of the current UTC Date Time and 32 Random Generated Alphanumeric characters (0-9, A-Z, a-z)

passphrase