Implementation
Requesting ROOK Score 2.0
ROOK Score 2.0 is a health metric designed to provide a descriptive analysis of users. This score is generated from health data collected through ROOK Connect integration.
Configuring ROOK Score 2.0
Once ROOK Score 2.0 has been activated by the ROOK team, it can be customized through the ROOK Portal.
ROOK Score 2.0 Module
Within the ROOK Score 2.0 module, each pillar and its internal variables can be customized. This allows configuration of which variables or pillars to include in the health score calculation.
Ensure that the total of active variables for each pillar equals 100%, and the total of all health pillars sums to 100%.
Implementation via Webhook
Currently, only webhook implementation is supported. To set it up, the Data Webhook must be registered through the portal. ROOK automatically sends the health score of users to this webhook as it is generated.
The endpoint previously used to query ROOK Score 1.0 is not applicable to ROOK Score 2.0. The only way to access ROOK Score 2.0 is via webhook.
The implementation follows this flow:
- The user generates data using their wearable device.
- ROOK receives the data from the wearable device.
- ROOK structures and normalizes the data.
- ROOK generates a health score using the structured information.
- ROOK sends the health score to the webhook.
- The health score is received.
- A JSON is generated for each user whenever new data is received.
The score is continuously updated as ROOK receives new data from connected sources. Each new summary triggers a
recalculation of the corresponding score. To track updates, the document_version
field should be used.
Example Structure
{
"data_structure": "health_score",
"version": 2,
"document_version": 1,
"user_id": "testUserAllDemographics",
"client_uuid": "019240e3-64ff-7195-a487-c4728502b190",
"health_score_data": {
"metadata": {
"datetime_string": "2023-12-28T00:00:00.000000Z",
"sources_of_data_array": [
"Polar"
],
"user_id_string": "testUserAllDemographics"
},
"overall_scores": {
"global_score_0_100_int": 100,
"seven_days_avg_score_0_100_int": 100
},
"physical_health_score": {
"score_0_100_int": 100,
"calories_score": {
"score_0_100_int": 100
},
"activity_score": {
"score_0_100_int": 100
}
}
}
}
Generic Score Information
In some cases, data providers may not supply basic user data such as gender, age, weight, and height. ROOK Score requires this data for full personalization. When unavailable, the Health Score includes two keys:
- calculated_with_missing_user_info: Indicates whether the score was calculated with missing data.
- missing_user_info: Specifies which basic user data is missing.
Handling Null Values
Not all wearables capture all necessary data to calculate the health score. In such cases, the affected score section and related keys contain a null value, and composite scores exclude these null values.
Example of Score with Null Values
{
"data_structure": "health_score",
"version": 2,
"document_version": 1,
"user_id": "testUserNoDemographics",
"client_uuid": "019240e3-64ff-7195-a487-c4728502b190",
"health_score_data": {
"metadata": {
"datetime_string": "2020-01-01T00:00:00.000000Z",
"sources_of_data_array": [
"Garmin"
],
"user_id_string": "testUserNoDemographics"
},
"overall_scores": {
"global_score_0_100_int": 97,
"seven_days_avg_score_0_100_int": 97
},
"physical_health_score": {
"score_0_100_int": 94,
"calories_score": {
"score_0_100_int": 83,
"calculated_with_missing_user_info_bool": true,
"missing_user_info_array": [
"height_cm_int",
"weight_kg_float"
]
}
}
}
}
By following this guide, ROOK Score 2.0 can be seamlessly integrated into an APP, ensuring continuous and reliable health insights for users.