Notes

Fetch all notes for a lead


Return all the notes for a specified lead
GET /leads/:lead_id/notes
lead_id Unique identifier of the lead Required
page Page number of notes to return. Returns empty array if the page has no notes. If page parameter isn't present, returns the first page Optional
size Number of notes to return in a page. If size parameter isn't present, returns the page with 25 notes Optional
Response Body
[
    {
        "_id": "52778360cce8b441c700023f",
        "content": "et magnis dis parturient montes, ...",
        "author": "Claire Parson",
        "author_photo_url": "https://s3.amazonaws.com/...",
        "user": {
            "_id": "521f26ebcce8b4310e000064",
            "name": "Claire Parson"
        }
    }
]

Show a note


Show details of an individual note for a specified lead
GET /leads/:lead_id/notes/:note_id
lead_id Unique identifier of the lead Required
note_id Unique identifier of the note Required
Response Body
{
    "_id": "52778360cce8b441c700023f",
    "content": "et magnis dis parturient montes, ...",
    "author": "Claire Parson",
    "author_photo_url": "https://s3.amazonaws.com/...",
    "user": {
        "_id": "521f26ebcce8b4310e000064",
        "name": "Claire Parson"
    }
}

Create a note


Create a new note for a specified lead
POST /leads/:lead_id/notes
lead_id Unique identifier of the lead Required
content Content of the note Required
user_id Unique identifier of the user creating the note Required
Response Body
{
    "_id": "527cc3c7cce8b44a7400000e",
    "content": "new note ...",
    "author": "Claire Parson",
    "author_photo_url": "https://s3.amazonaws.com/...",
    "user": {
        "_id": "521f26ebcce8b4310e000064",
        "name": "Claire Parson"
    }
}

Update a note


Update the value of a note for a specified lead
PUT /leads/:lead_id/notes/:note_id
lead_id Unique identifier of the lead Required
note_id Unique identifier of the note Required
content Content of the note Required
Response Body
{
    "_id": "527cc3c7cce8b44a7400000e",
    "content": "New note content...",
    "author": "Claire Parson",
    "author_photo_url": "https://s3.amazonaws.com/clinchpad-static/avatars/males/1.png",
    "user": {
        "_id": "521f26ebcce8b4310e000064",
        "name": "Claire Parson"
    }
}

Delete a note


Delete a note
DELETE /leads/:lead_id/notes/:note_id
lead_id Unique identifier of the lead Required
note_id Unique identifier of the note Required
Response Body
{}