Skip to main content

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
  • pagination
    Pagination
    required
    index-1
    Indicates the page information of the resource.
  • sortings
    A list of sorting elements, the order of the list matters.
  • userId
    string
    required
    The identifier of a user.
  • start
    date
    required
    The inclusive start date.
  • end
    date
    required
    The inclusive end date.

FetchUserStepSummaryResDTO

properties
  • pagination
    Pagination
    required
    index-1
    Indicates the page information of the resource.
  • sortings
    A list of sorting elements, the order of the list matters.
  • totalSteps
    number
    The total number of steps in the specific period.
  • A list of filtered elements.

FetchUserStepResDTO

properties
  • date
    date
    The date in Hong Kong timezone.
  • steps
    number
    The number to be added to the user's last hour in the specific date.

AdjustUserStepReqDTO

properties
  • userId
    string
    required
    The identifier of a user.
  • date
    date
    required
    The date in Hong Kong timezone.
  • steps
    number
    required
    [0 ... 100000]
    The number to be added to the user's last hour in the specific date.