Skip to main content

Implementation

Requesting ROOKScore 2.0

To request the activation of ROOKScore for your integration, contact the customer experience team.

Configuring Your ROOKScore 2.0

Once ROOKScore 2.0 has been activated by the ROOK team, you can customize ROOKScore through the ROOK Portal.

ROOKScore 2.0 Module

Once inside the ROOKScore 2.0 module, you can customize each pillar and its internal variables. In this way, you can configure which variables or pillars you want to include in the composition of your health score.

Settings 1.png

note

Remember that the total of the active variables for each pillar must equal 100%, just like the total of all health pillars that make up the global score.

Implementation Via Webhook

Currently, we only support webhook implementation. To set it up, you must register on the Data Webhook through your portal. ROOK will automatically send the health score of your users to this webhook as it is generated.

note

The endpoint previously used to query ROOKScore 1.0 is no longer applicable for ROOKScore 2.0. The only way to access the ROOKScore 2.0 is via a webhook.

The implementation follows this flow:

  1. The user generates data using their wearable device.
  2. ROOK receives the data from the wearable device.
  3. ROOK structures and normalizes the data.
  4. ROOK generates a health score using the structured information.
  5. ROOK sends the health score to your webhook.
  6. You receive the health score.
  7. You will receive a JSON for each user every time new data is generated.
note

It is important to note that the score is continuously updated as ROOK receives new data from the connected sources. With each incoming summary, the corresponding score will also be recalculated. To track these updates, it is recommended to use the document_version field, which indicates that the score has been revised.

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": {
"datetime_string": "2023-12-28T21:07:14.402999Z",
"created_at_string": "2023-12-28T21:07:14.402999Z",
"updated_at_string": "2023-12-28T21:07:14.402999Z",
"score_0_100_int": 100,
"calculated_with_missing_user_info_bool": false,
"missing_user_info_array": []
},
"activity_score": {
"datetime_string": "2023-12-28T21:07:14.402999Z",
"created_at_string": "2023-12-28T21:07:14.402999Z",
"updated_at_string": "2023-12-28T21:07:14.402999Z",
"score_0_100_int": 100,
"calculated_with_missing_user_info_bool": false,
"missing_user_info_array": []
},
"steps_score": {
"datetime_string": "2023-12-28T21:07:14.402999Z",
"created_at_string": "2023-12-28T21:07:14.402999Z",
"updated_at_string": "2023-12-28T21:07:14.402999Z",
"score_0_100_int": 100,
"calculated_with_missing_user_info_bool": false,
"missing_user_info_array": []
}
},
"sleep_health_score": {
"score_0_100_int": 100,
"sleep_duration_score": {
"datetime_string": "2023-12-28T21:07:14.402999Z",
"created_at_string": "2023-12-28T21:07:14.402999Z",
"updated_at_string": "2023-12-28T21:07:14.402999Z",
"score_0_100_int": 100,
"calculated_with_missing_user_info_bool": false,
"missing_user_info_array": []
},
"sleep_quality_score": {
"datetime_string": "2023-12-28T21:07:14.402999Z",
"created_at_string": "2023-12-28T21:07:14.402999Z",
"updated_at_string": "2023-12-28T21:07:14.402999Z",
"score_0_100_int": 100,
"calculated_with_missing_user_info_bool": false,
"missing_user_info_array": []
},
"readiness_score": {
"datetime_string": "2023-12-28T21:07:14.402999Z",
"created_at_string": "2023-12-28T21:07:14.402999Z",
"updated_at_string": "2023-12-28T21:07:14.402999Z",
"score_0_100_int": 100,
"calculated_with_missing_user_info_bool": false,
"missing_user_info_array": []
}
},
"body_health_score": {
"score_0_100_int": 100,
"bmi_score": {
"datetime_string": "2023-12-28T21:07:14.402999Z",
"created_at_string": "2023-12-28T21:07:14.402999Z",
"updated_at_string": "2023-12-28T21:07:14.402999Z",
"score_0_100_int": 100,
"calculated_with_missing_user_info_bool": false,
"missing_user_info_array": []
}
}
}
}

About The Generic Score

In some cases, data providers may not have the ability to provide basic user data, such as gender, age, weight, and height. The Health Score requires this data to generate a fully personalized score for the user. In such cases, the Health Score includes two keys indicating whether the score calculation was personalized:

  • Calculated with missing user information
    • Data type: bool.
    • Possible values: [true, false].
    • Description: If true, indicates that the user does not have the basic data required to obtain a personalized score.
  • Missing user information
    • Data type: array.
    • Possible values: ["sex_string", "date_of_birth_string", "weight_kg_float", "height_cm_int", "bmi_float"]
    • Description: Indicate which basic user data is missing to generate a personalized score.

About Null Values

Not all wearables can capture all the necessary data to calculate the health score. In such cases, the score for the affected section and all related keys will contain a null value. Composite scores will not take these null values into account.

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": {
"datetime_string": "2020-01-01T00:00:00.000000Z",
"created_at_string": "2024-09-20T20:59:40.553703Z",
"updated_at_string": "2024-09-20T20:59:40.553732Z",
"score_0_100_int": 83.0,
"calculated_with_missing_user_info_bool": true,
"missing_user_info_array": [
"height_cm_int",
"weight_kg_float",
"date_of_birth_string",
"sex_string"
]
},
"activity_score": {
"datetime_string": "2020-01-01T00:00:00.000000Z",
"created_at_string": "2024-09-20T20:59:40.918151Z",
"updated_at_string": "2024-09-20T20:59:40.918176Z",
"score_0_100_int": 100,
"calculated_with_missing_user_info_bool": false,
"missing_user_info_array": [

]
},
"steps_score": {
"datetime_string": "2020-01-01T00:00:00.000000Z",
"created_at_string": "2024-09-20T20:59:40.918941Z",
"updated_at_string": "2024-09-20T20:59:40.918961Z",
"score_0_100_int": 100,
"calculated_with_missing_user_info_bool": false,
"missing_user_info_array": [

]
}
},
"sleep_health_score": {
"score_0_100_int": 100,
"sleep_duration_score": {
"datetime_string": "2019-12-31T22:51:32.624000Z",
"created_at_string": "2024-09-20T21:00:04.293616Z",
"updated_at_string": "2024-09-20T21:00:04.293650Z",
"score_0_100_int": 100,
"calculated_with_missing_user_info_bool": true,
"missing_user_info_array": [
"date_of_birth_string",
"sex_string"
]
},
"sleep_quality_score": {
"datetime_string": "2019-12-31T22:51:32.624000Z",
"created_at_string": "2024-09-20T21:00:04.602768Z",
"updated_at_string": "2024-09-20T21:00:04.602796Z",
"score_0_100_int": 100,
"calculated_with_missing_user_info_bool": true,
"missing_user_info_array": [
"date_of_birth_string",
"sex_string"
]
},
"readiness_score": {
"datetime_string": "2019-12-31T22:51:32.624000Z",
"created_at_string": "2024-09-20T21:00:04.907743Z",
"updated_at_string": "2024-09-20T21:00:04.907773Z",
"score_0_100_int": 100,
"calculated_with_missing_user_info_bool": true,
"missing_user_info_array": [
"date_of_birth_string",
"sex_string"
]
}
},
"body_health_score": {
"score_0_100_int": null,
"bmi_score": {
"datetime_string": "2020-01-01T00:00:00.000000Z",
"created_at_string": "2024-09-20T21:00:27.644473Z",
"updated_at_string": "2024-09-20T21:03:05.934681Z",
"score_0_100_int": null,
"calculated_with_missing_user_info_bool": true,
"missing_user_info_array": [
"weight_kg_float",
"height_cm_int",
"bmi_float"
]
}
}
}
}