Notes

Properties

This table describes all properties of a Note object.

Name

Type

Required

Description

id

String

required

content

String

required

created_date

Date

required

habit_id

String

required

note_type

Number

required

image_url

String

optional

List Notes

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

Get all notes of the habit

Path Parameters

NameTypeDescription

habit_id

string

ID of habit

Query Parameters

NameTypeDescription

from

string

Date Format

to

boolean

Date Format

Headers

NameTypeDescription

Authorization

string

API Key

{
    "message": "Success",
    "data": [
        {
            "id": "-MakqEWlb6c6D7WOdPj6",
            "content": "Today is the first day of my journey",
            "created_date": "2021-05-28T09:40:53",
            "image_url": null,
            "note_type": 1,
            "habit_id": "94E9E907-81DB-4838-89BD-FECE283C6B10"
        }
    ],
    "version": "v1.2",
    "status": true
}

Add Text Note

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

Append new note for specific habit

Path Parameters

NameTypeDescription

habit_id

string

The habit ID

Headers

NameTypeDescription

Authorization

string

API Key

Request Body

NameTypeDescription

created

string

Date Format

content

string

Content of the note you're adding

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

Add Image Note

POST https://api.habitify.me/notes/addImageNote/:habit_id

Path Parameters

NameTypeDescription

habit_id

string

Query Parameters

NameTypeDescription

created_at

string

Headers

NameTypeDescription

Authorization

string

API Key

Request Body

NameTypeDescription

image

object

Only support JPG, JPEG format. The size of the image is smaller than 2MB.

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

Delete Note

DELETE https://api.habitify.me/notes/:habit_id/:note_id

Path Parameters

NameTypeDescription

note_id

string

Note ID

habit_id

string

Habit ID

Headers

NameTypeDescription

Authorization

string

API Key

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

Delete Notes

DELETE https://api.habitify.me/notes/:habit_id

Path Parameters

NameTypeDescription

habit_id

string

Headers

NameTypeDescription

Authorization

string

API Key

Request Body

NameTypeDescription

to

string

Date Format

from

string

Date Format

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

Last updated