Health API
The Health API provides ways for the App Users to manage all health-related data, including step counts.
Endpoints
# Endpoints
Get pointer
This endpoint gets the step pointer.
Request
GET /app/health/pointer
Response (StepPointerResDTO)
{
"success": true,
"message": "",
"data": {
"pointerTime": "2025-04-02T16:00:00.000Z"
}
}
Check self physique
This endpoint checks self physique.
Request
GET /app/health/physique/check
Response (CheckPhysiqueResDTO)
{
"success": true,
"message": "",
"data": {
"check": true
}
}
Update self physique
This endpoint updates self physique.
Request (PhysiqueDTO)
{
"age": 30,
"height": 175,
"weight": 70
}
Response
{
"success": true,
"message": "",
"data": null
}
Get self physique
This endpoint gets self physique.
Request (PhysiqueDTO)
GET /app/health/physique
Response (PhysiqueDTO)
{
"success": true,
"message": "",
"data": {
"age": 30,
"height": 175,
"weight": 70
}
}
Sync steps
This endpoint synchronizes steps
Request (SyncStepDTO)
{
"data": [
{
"startTime": "2024-06-07T09:38:07.000Z",
"endTime": "2024-06-07T10:38:07.000Z",
"steps": 376
}
]
}
Response
{
"success": true,
"message": "",
"data": null
}
Fetch day steps
This endpoint fetches day steps.
Request (FetchDayStepReqDTO)
{
"day": "2024-05-10T16:00:00.000Z"
}
Response (FetchStepResDTO)
{
"success": true,
"message": "",
"data": {
"total": {
"steps": 1274,
"distance": 906,
"calories": 59
},
"rows": [
{
"startTime": "2024-06-07 08:00:00",
"endTime": "2024-06-07 09:00:00",
"steps": 328,
"distance": 233,
"calories": 15
}
],
"isFullDay": false
}
}
Fetch week steps
This endpoint fetches week steps.
Request (FetchWeekStepReqDTO)
{
"day": "2024-05-10T16:00:00.000Z"
}
Response (FetchStepResDTO)
{
"success": true,
"message": "",
"data": {
"total": {
"steps": 1274,
"distance": 906,
"calories": 59
},
"dailyAverage": {
"steps": 1274,
"distance": 906,
"calories": 59
},
"rows": [
{
"date": "2024-06-07",
"steps": 1274,
"distance": 906,
"calories": 59
}
]
}
}
Fetch month steps
This endpoint fetches month steps.
Request (FetchMonthStepReqDTO)
{
"yearMomth": "2024-06"
}
Response (FetchStepResDTO)
{
"success": true,
"message": "",
"data": {
"total": {
"steps": 1274,
"distance": 906,
"calories": 59
},
"dailyAverage": {
"steps": 1274,
"distance": 906,
"calories": 59
},
"rows": [
{
"date": "2024-06-07",
"steps": 1274,
"distance": 906,
"calories": 59
}
]
}
}
Fetch year steps
This endpoint fetches year steps.
Request (FetchYearStepReqDTO)
{
"year": "2024"
}
Response (FetchStepResDTO)
{
"success": true,
"message": "",
"data": {
"total": {
"steps": 1274,
"distance": 906,
"calories": 59
},
"dailyAverage": {
"steps": 1274,
"distance": 906,
"calories": 59
},
"rows": [
{
"month": "2024-06",
"steps": 328,
"distance": 233,
"calories": 15
}
]
}
}
Connect health connect
This endpoint notifies server that the App has connected Health Connect/Apple Health. If it is Android, it means that Health Connect is connected; if it is IOS, it means that Apple Health is connected. Please note that this information is ONLY for reference and it may not reflect the actual situation due to the fact that the settings in the phone devices have the highest control authority for all the App permission.
Request
POST /app/health/health-connect
Response
{
"success": true,
"message": "",
"data": null
}
Disconnect health connect
This endpoint notifies server that the App has disconnected Health Connect/Apple Health. If it is Android, it means that Health Connect is connected; if it is IOS, it means that Apple Health is connected. Please note that this information is ONLY for reference and it may not reflect the actual situation due to the fact that the settings in the phone devices have the highest control authority for all the App permission.
Request
DELETE /app/health/health-connect
Response
{
"success": true,
"message": "",
"data": null
}
Resources
StepPointerResDTO
properties
pointerTime
stringrequiredThe last step time of the user.
CheckPhysiqueResDTO
properties
check
BooleanIt returns true if physique is set; otherwise, it returns false.
PhysiqueDTO
properties
age
number[1 ... 150]The age of the user in year.
height
number[1 ... 300]The height of the user in cm.
weight
number[1 ... 300]The weight of the user in kg.
SyncStepDTO
properties
A list of step entities.
SyncStepItemDTO
properties
startTime
datetimerequiredYYYY-MM-DDThh:mm:ss.000ZThe start time.
endTime
datetimerequiredYYYY-MM-DDThh:mm:ss.000ZThe end time.
steps
numberrequiredThe step count of the user.
FetchStepResDTO
properties
total
The summary of the steps over the period.
dailyAverage
The summary of the daily average information over the period. It is only available for the mode = 2 or mode = 3.
The step entity.
isFullDay
booleanIf the current data source is Samsung Health, it will be True; otherwise, it is False
StepTotalDTO
properties
steps
numberrequiredThe total step count over the period.
distance
numberrequiredThe total distance over the period.
calories
numberrequiredThe total calories over the period.
StepDailyAverageDTO
properties
steps
numberrequiredThe daily average of the step count over the period.
distance
numberrequiredThe daily average of the distance over the period.
calories
numberrequiredThe daily average of the calories over the period.
StepHourlyItemDTO
properties
startTime
datetimerequiredYYYY-MM-DDThh:mm:ss.000ZThe start time.
endTime
datetimerequiredYYYY-MM-DDThh:mm:ss.000ZThe end time.
steps
numberrequiredThe step count of the user.
distance
numberrequiredThe distance of the user.
calories
numberrequiredThe calories of the user.
StepDailyItemDTO
properties
date
datetimeYYYY-MM-DDThe date for the statistics.
steps
numberThe step count of the user.
distance
numberThe distance of the user.
calories
numberThe calories of the user.
StepMonthlyItemDTO
properties
month
stringrequiredYYYY-MMThe month of the statistics.
steps
numberrequiredThe step count of the user.
distance
numberrequiredThe distance of the user.
calories
numberrequiredThe calories of the user.
FetchDayStepReqDTO
properties
day
datetimedefault: now in ISO 8601 format.It is always null in the case of getting today's statistics.
FetchWeekStepReqDTO
properties
day
datetimedefault: now in ISO 8601 format.It is always null in the case of getting this week's statistics.
FetchMonthStepReqDTO
properties
yearMomth
stringdefault: The current monthYYYY-MMIt is always null in the case of getting the current month's statistics.
FetchYearStepReqDTO
properties
year
stringdefault: The current yearYYYYIt is always null in the case of getting the current year's statistics.