Skip to main content

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)

POST /app/health/physique
{
"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)

POST /app/health/steps/symc
{
"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)

POST /app/health/steps/fetch/day
{
"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)

POST /app/health/steps/fetch/week
{
"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)

POST /app/health/steps/fetch/month
{
"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)

POST /app/health/steps/fetch/year
{
"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
    string
    required
    The last step time of the user.

CheckPhysiqueResDTO

properties
  • check
    Boolean
    It 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
  • data
    SyncStepItemDTO[]
    A list of step entities.

SyncStepItemDTO

properties
  • startTime
    datetime
    required
    YYYY-MM-DDThh:mm:ss.000Z
    The start time.
  • endTime
    datetime
    required
    YYYY-MM-DDThh:mm:ss.000Z
    The end time.
  • steps
    number
    required
    The step count of the user.

FetchStepResDTO

properties
  • total
    StepTotalDTO
    The summary of the steps over the period.
  • 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
    boolean
    If the current data source is Samsung Health, it will be True; otherwise, it is False

StepTotalDTO

properties
  • steps
    number
    required
    The total step count over the period.
  • distance
    number
    required
    The total distance over the period.
  • calories
    number
    required
    The total calories over the period.

StepDailyAverageDTO

properties
  • steps
    number
    required
    The daily average of the step count over the period.
  • distance
    number
    required
    The daily average of the distance over the period.
  • calories
    number
    required
    The daily average of the calories over the period.

StepHourlyItemDTO

properties
  • startTime
    datetime
    required
    YYYY-MM-DDThh:mm:ss.000Z
    The start time.
  • endTime
    datetime
    required
    YYYY-MM-DDThh:mm:ss.000Z
    The end time.
  • steps
    number
    required
    The step count of the user.
  • distance
    number
    required
    The distance of the user.
  • calories
    number
    required
    The calories of the user.

StepDailyItemDTO

properties
  • date
    datetime
    YYYY-MM-DD
    The date for the statistics.
  • steps
    number
    The step count of the user.
  • distance
    number
    The distance of the user.
  • calories
    number
    The calories of the user.

StepMonthlyItemDTO

properties
  • month
    string
    required
    YYYY-MM
    The month of the statistics.
  • steps
    number
    required
    The step count of the user.
  • distance
    number
    required
    The distance of the user.
  • calories
    number
    required
    The calories of the user.

FetchDayStepReqDTO

properties
  • day
    datetime
    default:  now in ISO 8601 format.
    It is always null in the case of getting today's statistics.

FetchWeekStepReqDTO

properties
  • day
    datetime
    default:  now in ISO 8601 format.
    It is always null in the case of getting this week's statistics.

FetchMonthStepReqDTO

properties
  • yearMomth
    string
    default:  The current month
    YYYY-MM
    It is always null in the case of getting the current month's statistics.

FetchYearStepReqDTO

properties
  • year
    string
    default:  The current year
    YYYY
    It is always null in the case of getting the current year's statistics.