Step Goals
A Step Goal can be used to set a personal user goal for steps.
Overview
Property | Type | Description |
---|---|---|
code | String | The id of the steps measurement |
user_code | String | The global Id of the user |
start_date | Datetime with Timezone | The original start date and time of the sleep segment in UTC time |
steps | Number | The target number of steps |
source | String | The source service for the measurement, where it was created |
created_at | Datetime with Timezone | The time the measurement was created on the ZivaCare API server |
updated_at | Datetime with Timezone | The time the measurement was updated on the ZivaCare API server |
Example
GET https://api.zivacare.com/api/v2/human/step_goals?access_token=demo
{
"stepGoals": [
{
"code": "5eccf9ee-d85f-46dd-8eed-02b5555a7911",
"user_code": "e231e984-2209-4a10-b634-2257b89c200f",
"steps": 95.00,
"source": "fitbit",
"created_at": "22016-06-02 08:17:50.678818+00"
},
{
"code": "dbafcd40-ea23-4c7a-9c51-b66a2f766e44",
"user_code": "e231e984-2209-4a10-b634-2257b89c200f",
"steps": 92.00,
"source": "fitbit",
"created_at": "2016-06-02 08:07:27+00",
"updated_at": "2016-06-02 08:10:15+00"
}
],
"total": 2
}
curl -i POST -H 'Content-Type: application/json' https://api.zivacare.com/api/v2/human/step_goals?access_token=demo -d '{
"source": "fitbit",
"steps": 90.00
}'
curl -i PUT -H 'Content-Type: application/json' https://api.zivacare.com/api/v2/human/step_goals/5eccf9ee-d85f-46dd-8eed-02b5555a7911?access_token=demo -d '{
"source": "fitbit",
"steps": 90.00
}'