Notes


Search

Search for notes.

Endpoint

Method URI Description
GET /users/{user_id}/notes Search user owned notes
GET /contacts/{contact_id}/notes Search contact owned notes

Example Response

{
    "data": [
        {
            "id": 1,
            "value": "Note here...",
            "created_at": "2016-08-16T14:23:47Z",
            "updated_at": "2016-08-16T14:23:47Z"
        }
    ],
    "links": {
        "first": "https://api.happygrasshopper.com/v3/users/77179/notes?page=1",
        "last": "https://api.happygrasshopper.com/v3/users/77179/notes?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https://api.happygrasshopper.com/v3/users/77179/notes",
        "per_page": 15,
        "to": 1,
        "total": 1
    }
}

Create

Create a note.

Endpoint

Method URI Description
POST /users/{user_id}/notes Create a user note
POST /contacts/{contact_id}/notes Create a contact note

Body Params

{
    "value": "Note here..."
}

Example Response

{
    "id": 1,
    "value": "Note here...",
    "created_at": "2016-08-16T14:23:47Z",
    "updated_at": "2016-08-16T14:23:47Z"
}

Read

Retrieve a note.

Endpoint

Method URI Description
GET /notes/{note_id} Retrieve a note by it's id

Example Response

{
    "id": 1,
    "value": "Note here...",
    "created_at": "2016-08-16T14:23:47Z",
    "updated_at": "2016-08-16T14:23:47Z"
}

Update

Update a note.

Endpoint

Method URI Description
PUT /notes/{note_id} Update a note

Body Params

{
    "value": "Note here..."
}

Example Response

{
    "id": 1,
    "value": "Note here...",
    "created_at": "2016-08-16T14:23:47Z",
    "updated_at": "2016-08-16T14:23:47Z"
}

Delete

Delete a note.

Endpoint

Method URI Description
DELETE /notes/{note_id} Delete a note by it's id

Example Response

{
    "success": true
}