Skip to main content

Vitals API

Overview

The Vitals API allows you to interact with the Vitals Backend service. The Vitals Backend service is designed to add, retrieve and manage vital signs data for users. It provides a RESTful API that allows you to interact with the service.

Base URL

The base URLs for the AI Specialists API are

  • PROD: https://api.prod.helfie.ai.
  • DEV: https://api-dev.helfie.ai.

API Endpoints

Save Assessment Endpoint

  • Endpoint: /vitals/api/save_assessment
  • Method: POST
  • Description: This endpoint allows you to save a user's vitals assessment data.

Request Parameters

  • user_id (string): The unique UUID identifier of the user.
  • assessment_id Optional(string): The unique UUID identifier of the assessment. If not provided, a new assessment will be created.
  • assessment_type (string): The type of assessment to be saved. Possible values are vitals, heart_rate, blood_pressure and stress.
  • data (object): The vitals assessment data to be saved.

Example Request:

curl --location '${BASE_URL}/vitals/api/save_assessment' \
--header 'Content-Type: application/json' \
--header 'api-key: ••••••' \
--data '{
"assessment_id": "••••••",
"user_id": "••••••",
"assessment_type": "vitals",
"data": {
"heart_rate": 80,
"resp_rate": 20,
"hrv": 60,
"spo2": 98,
"stress": "LOW",
"systolic_bp": 120,
"diastolic_bp": 80
}
}'

Example Response

{
"assessment_id": "••••••",
"status": "success"
}

Get Assessment Endpoint

  • Endpoint: /vitals/api/get_assessment
  • Method: GET
  • Description: This endpoint allows you to retrieve a user's vitals assessment data. Only acknowledged assessments are returned.

Request Parameters

  • user_id (string): The unique UUID identifier of the user.
  • assessment_id (string): The unique UUID identifier of the assessment. If not provided, a new assessment will be created.

Example Request:

curl --location '${BASE_URL}/vitals/api/get_assessment' \
--header 'Content-Type: application/json' \
--header 'api-key: ••••••' \
--data '{
"assessment_id": "••••••",
"user_id": "••••••",
}'

Example Response

[
{
"acknowledged": true,
"assessment_id": "••••••",
"user_id": "••••••",
"assessment_type": "vitals",
"created": "2024-06-03T12:21:07.365381",
"diastolic_bp": 80,
"heart_rate": 80,
"hrv": 60,
"resp_rate": 20,
"spo2": 98,
"stress": "LOW",
"systolic_bp": 120
}
]

Acknowledge Assessment

  • Endpoint: /vitals/api/acknowledge_assessment
  • Method: POST
  • Description: This endpoint allows you to acknowledge a user's vitals assessment data. It returns the assessment data with the vitals conditions.

Request Parameters

  • user_id (string): The unique UUID identifier of the user.
  • assessment_id (string): The unique UUID identifier of the assessment. If not provided, a new assessment will be created.

Example Request:

curl --location '${BASE_URL}/vitals/api/acknowledge_assessment' \
--header 'Content-Type: application/json' \
--header 'api-key: ••••••' \
--data '{
"assessment_id": "••••••",
"user_id": "••••••",
}'

Example Response

{
"assessment_type": "vitals",
"diastolic_bp": "normal",
"systolic_bp": "normal",
"heart_rate": "abnormal",
"hrv": null,
"resp_rate": "abnormal",
"spo2": null,
"stress": "abnormal",

}

Check API Health

  • Endpoint: /vitals/api/health
  • Method: GET
  • Description: This endpoint allows a user to check the health status of the API for possible outages.

Request Parameters: None

Example Request:

curl --location '${BASE_URL}/vitals/api/health' \
--header 'Content-Type: application/json'

Example Response:

{
"status": "Vitals API healthy"
}

Response Fields:

  • status (str): Status of the API.