Health API
The Health API provides ways for the Staff to manage the users' health-related data.
Endpoints
# Endpoints
Fetch user steps
This endpoint fetch user steps.
Request (FetchUserStepReqDTO)
POST /web/health/steps/fetch
{
"pagination": {
"page": 1,
"size": 10
},
"sortings": [],
"userId": "084c69e3-988b-4aef-9604-c784ab61d6c2",
"start": "2024-06-01",
"end": "2024-06-10"
}
Response (FetchUserStepSummaryResDTO)
{
"success": true,
"message": "",
"data": [
{
"pagination": {
"page": 1,
"size": 10,
"totalItems": 1,
"totalPages": 1
},
"sortings": [],
"totalSteps": 25235,
"items": [
{
"date": "2024-06-01",
"steps": 8748
}
]
}
]
}
Adjust user steps
This endpoint adjust user steps.
Request (AdjustUserStepReqDTO)
POST /web/health/steps/adjust
{
"userId": "084c69e3-988b-4aef-9604-c784ab61d6c2",
"date": "2024-06-02",
"steps": -1
}
Response
{
"success": true,
"message": "",
"data": null
}
Resources
FetchUserStepReqDTO
properties
Indicates the page information of the resource.
sortings
A list of sorting elements, the order of the list matters.
userId
stringrequiredThe identifier of a user.
start
daterequiredThe inclusive start date.
end
daterequiredThe inclusive end date.
FetchUserStepSummaryResDTO
properties
Indicates the page information of the resource.
sortings
A list of sorting elements, the order of the list matters.
totalSteps
numberThe total number of steps in the specific period.
A list of filtered elements.
FetchUserStepResDTO
properties
date
dateThe date in Hong Kong timezone.
steps
numberThe number to be added to the user's last hour in the specific date.
AdjustUserStepReqDTO
properties
userId
stringrequiredThe identifier of a user.
date
daterequiredThe date in Hong Kong timezone.
steps
numberrequired[0 ... 100000]The number to be added to the user's last hour in the specific date.