Status

Available Status

None

Represent status of habit don't have any data for this specific day.

none

Example Response
{
  "status": "none"
}

In Progress

Represent status of habit have progressed in specific day, include the progress info.

in_progress

Properties

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"
  }
}

Completed

Represent the completed status

completed

Properties

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"
    }
}

Skipped

Represent the skipped status

skipped

Properties

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"
 }
}

Failed

Represent the failed status.

failed

Example Response
{
  "status": "failed"
}

Only users created before August 20, 2020, have this status enabled.

Available Methods

Get Habit Status

GET https://api.habitify.me/status/:habit_id

Path Parameters

NameTypeDescription

habit_id

string

Query Parameters

NameTypeDescription

target_date

string

Date Format

Headers

NameTypeDescription

Authorization

string

API Key

{
    "message": "Success",
    "data": {
        "status": "in_progress",
        "progress": {
            "current_value": 0,
            "target_value": 20,
            "unit_type": "min",
            "periodicity": "daily",
            "reference_date": "2021-05-24T00:00:00.000Z"
        }
    },
    "version": "v1.2",
    "status": true
}

Update Habit Status

PUT https://api.habitify.me/status/:habit_id

Path Parameters

NameTypeDescription

habit_id

string

Headers

NameTypeDescription

Authorization

string

API Key

Request Body

NameTypeDescription

status

string

Available options: completed, skipped, none

target_date

string

Date Format

{
    "message": "Success",
    "data": null,
    "version": "v1.2",
    "status": true
}

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 updated