API Documentation
  • Getting Started
  • Changelog
  • Authentication
  • Date Format
  • Response API
  • Core Resources
    • Journal
    • Habits
      • Status
      • Logs
      • Goal
        • Periodicity
    • Actions List
    • Notes
    • Moods
    • Areas
  • Enum
    • Action Status
    • Mood Value
    • Note Type
    • Unit Type
    • Log Method
    • Time Of Day
Powered by GitBook
On this page
  • Properties
  • Get Actions
  • Get Action By Id
  • Create a new action
  • Update Action

Was this helpful?

  1. Core Resources

Actions List

Properties

The table describes all properties of an Action object.

Name

Type

Required

Description

id

String

required

remind_at

String

required

status

Number

required

title

String

required

updated_at

Date

required

habit_id

String

required

Get Actions

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

This endpoint allows you to get actions of the habit

Path Parameters

Name
Type
Description

habit_id

string

Headers

Name
Type
Description

Authorization

string

API Key

{
    "message": "Success",
    "data": [
        {
            "id": "-MafYXR1HpPqaGEwvT4c",
            "remind_at": "2021-05-27T11:03",
            "status": 0,
            "title": "📕📕📕 Buy books",
            "updated_at": "2021-05-27T02:01:30.704Z",
            "habit_id": "DE02E6DE-6140-491E-8517-BFC0C6FD6B6D"
        }
    ],
    "version": "v1.2",
    "status": true
}
{
    "message": "The habit does not exist",
    "data": null,
    "version": "v1.2",
    "status": false
}

Get Action By Id

GET https://api.habitify.me/actions/:habit_id/:action_id

Action successfully retrieved.

Path Parameters

Name
Type
Description

action_id

string

habit_id

string

Headers

Name
Type
Description

Authorization

string

API Key

{
    "message": "Success",
    "data": {
        "id": "-MafYXR1HpPqaGEwvT4c",
        "remindAt": "2021-05-27T11:03",
        "status": 0,
        "title": "📕📕📕 Buy books",
        "updatedAt": "2021-05-27T02:01:30.704Z",
        "habitId": "DE02E6DE-6140-491E-8517-BFC0C6FD6B6D"
    },
    "version": "v1.2",
    "status": true
}
{
    "message": "The action does not exist",
    "data": null,
    "version": "v1.2",
    "status": false
}

Create a new action

POST https://api.habitify.me/actions/:habit_id

Create a new action of the habit successfully

Path Parameters

Name
Type
Description

habit_id

string

Headers

Name
Type
Description

Authorization

string

API Key

Request Body

Name
Type
Description

title

string

remind_at

string

Date Format

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

Update Action

PUT https://api.habitify.me/actions/:habit_id/:action_id

Path Parameters

Name
Type
Description

action_id

string

habit_id

string

Headers

Name
Type
Description

Authorization

string

API Key

Request Body

Name
Type
Description

status

string

Only accept the value of status in Action Status

title

string

remind_at

string

Date Format

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

DELETE https://api.habitify.me/actions/:habit_id/:action_id

Path Parameters

Name
Type
Description

action_id

string

habit_id

string

Headers

Name
Type
Description

Authorization

string

API Key

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

Last updated 3 years ago

Was this helpful?

Action Status