Comment on page
Status
Represent status of habit don't have any data for this specific day.
none
Example Response
{
"status": "none"
}
Represent status of habit have progressed in specific day, include the progress info.
in_progress
Name | Type | Required | Description |
current_value | Double | required | |
target_value | Double | required | |
unit_type | required | | |
periodicity | required | | |
reference_date | Date | required | |
Example Response
{
"status": "in_progress",
"progress": {
"current_value": 0,
"target_value": 30,
"unit_type": "min",
"periodicity": "daily",
"reference_date": "2019-08-24T14:15:22Z"
}
}
Represent the completed status
completed
Name | Type | Required | Description |
current_value | Double | required | |
target_value | Double | required | |
unit_type | required | | |
periodicity | required | | |
reference_date | Date | required | |
Example Response
{
"status": "completed",
"progress": {
"current_value": 30,
"target_value": 30,
"unit_type": "min",
"periodicity": "daily",
"reference_date": "2021-05-26T00:00:00.000Z"
}
}
Represent the skipped status
skipped
Name | Type | Required | Description |
current_value | Double | required | |
target_value | Double | required | |
unit_type | required | | |
periodicity | required | | |
reference_date | Date | required | |
Example Response
{
"status": "skipped",
"progress": {
"current_value": 0,
"target_value": 2,
"unit_type": "rep",
"periodicity": "daily",
"reference_date": "2021-05-28T00:00:00.000Z"
}
}
Represent the failed status.
failed
Example Response
{
"status": "failed"
}
Only users created before August 20, 2020, have this status enabled.
get
https://api.habitify.me
/status/:habit_id
Get Habit Status
put
https://api.habitify.me
/status/:habit_id
Update Habit Status
We only support you to update the status is completed if your habit does not have a goal. So if you want to complete the habit that has a goal. You should use Add Log to log your habit's progress.
Last modified 2yr ago