Notes
Get all Notes
GET /notes
Parameters
activity_ids
- Filter notes by activities (comma-separated)account_ids
- Filter notes by accounts (comma-separated)case_ids
- Filter notes by cases (comma-separated)contact_ids
- Filter notes by contacts (comma-separated)- Supports Searching
- Supports Pagination
Response
Status code 200
{
"data": [
{
"id": 201,
"note": "This is a note!",
"user": {
"id": 1,
"first_name": "Jane",
"last_name": "Doe",
"phone_number": "+4588888888",
"job_title": "Sales Executive",
"email": "demo@easir.com",
"email_notifications": false,
"profile_picture": "https://randomuser.me/api/portraits/thumb/women/5.jpg",
"system_user": false,
"created_at": "2014-01-01 12:45:56",
"updated_at": "2017-05-26 21:19:41"
},
"case_id": "e033dd2d-fbaf-4f61-9294-94a71da546c3",
"activity_id": "1df8754f-484f-4ec5-86be-eecc19de8087",
"contact_id": "6f8ced0b-3681-4656-8064-e99d8b0e098b",
"account_id": "43249c19-9a99-409a-a682-cf61e5ce85c3",
"created_at": "2017-05-26 21:20:02",
"updated_at": "2017-05-26 21:20:02"
},
{
"id": 202,
"note": "This is the second note.",
"user": {
"id": 1,
"first_name": "Jane",
"last_name": "Doe",
"phone_number": "+4588888888",
"job_title": "Sales Executive",
"email": "demo@easir.com",
"email_notifications": false,
"profile_picture": "https://randomuser.me/api/portraits/thumb/women/5.jpg",
"system_user": false,
"created_at": "2014-01-01 12:45:56",
"updated_at": "2017-05-26 21:19:41"
},
"case_id": "e033dd2d-fbaf-4f61-9294-94a71da546c3",
"activity_id": null,
"contact_id": "6f8ced0b-3681-4656-8064-e99d8b0e098b",
"account_id": "43249c19-9a99-409a-a682-cf61e5ce85c3",
"created_at": "2017-05-26 21:20:52",
"updated_at": "2017-05-26 21:21:06"
}
],
"pagination": {
"total": 2,
"page": 1,
"per_page": 15,
"urls": {
"previous": null,
"next": null
}
}
}
Get a Note
GET /notes/:note_id
Response
Status code 200
{
"id": 202,
"note": "This is the second note.",
"user": {
"id": 1,
"first_name": "Jane",
"last_name": "Doe",
"phone_number": "+4588888888",
"job_title": "Sales Executive",
"email": "demo@easir.com",
"email_notifications": false,
"profile_picture": "https://randomuser.me/api/portraits/thumb/women/5.jpg",
"system_user": false,
"created_at": "2014-01-01 12:45:56",
"updated_at": "2017-05-26 21:19:41"
},
"case_id": "e033dd2d-fbaf-4f61-9294-94a71da546c3",
"activity_id": null,
"contact_id": "6f8ced0b-3681-4656-8064-e99d8b0e098b",
"account_id": "43249c19-9a99-409a-a682-cf61e5ce85c3",
"created_at": "2017-05-26 21:20:52",
"updated_at": "2017-05-26 21:21:06"
}
Create Note
POST /notes
Parameters
note
string, max 65535 chars- Required
activity_id
uuidcase_id
uuid- Required with
activity_id
- Required without
contact_id
- Required with
contact_id
uuid- Required with
account_id
- Required without
case_id
account_id
uuid- Required with
contact_id
notify.users
array of integers - User IDs to notifynotify.teams
array of integers - Team IDs to notify
Payload
{
"note" : "Lorem ipsum dolor sit amet",
"case_id": "e033dd2d-fbaf-4f61-9294-94a71da546c3",
"activity_id": "7dfa000e-8a59-4cfb-84bd-21be9224eb39",
"contact_id": "6f8ced0b-3681-4656-8064-e99d8b0e098b",
"account_id": "43249c19-9a99-409a-a682-cf61e5ce85c3",
"notify": {
"users": [1, 2, 3],
"teams": [1]
}
}
Response
Status code 201
{
"id": 203,
"note": "Lorem ipsum dolor sit amet",
"user": {
"id": 1,
"first_name": "Jane",
"last_name": "Doe",
"phone_number": "+4588888888",
"job_title": "Sales Executive",
"email": "demo@easir.com",
"email_notifications": false,
"profile_picture": "https://randomuser.me/api/portraits/thumb/women/5.jpg",
"system_user": false,
"created_at": "2014-01-01 12:45:56",
"updated_at": "2017-05-26 21:19:41"
},
"case_id": "e033dd2d-fbaf-4f61-9294-94a71da546c3",
"activity_id": "7dfa000e-8a59-4cfb-84bd-21be9224eb39",
"contact_id": "6f8ced0b-3681-4656-8064-e99d8b0e098b",
"account_id": "43249c19-9a99-409a-a682-cf61e5ce85c3",
"created_at": "2017-05-26 21:20:52",
"updated_at": "2017-05-26 21:21:06"
}
Update Note
PUT /notes/:note_id
A user can only update notes created by themself.
Parameters
note
string, max 65535 chars- Required
notify.users
array of integers - User IDs to notifynotify.teams
array of integers - Team IDs to notify
Payload
{
"note" : "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore",
"notify": {
"users": [1, 2, 3],
"teams": [1]
}
}
Response
Status code 201
{
"id": 203,
"note": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore",
"user": {
"id": 1,
"first_name": "Jane",
"last_name": "Doe",
"phone_number": "+4588888888",
"job_title": "Sales Executive",
"email": "demo@easir.com",
"email_notifications": false,
"profile_picture": "https://randomuser.me/api/portraits/thumb/women/5.jpg",
"system_user": false,
"created_at": "2014-01-01 12:45:56",
"updated_at": "2017-05-26 21:19:41"
},
"case_id": "e033dd2d-fbaf-4f61-9294-94a71da546c3",
"activity_id": "7dfa000e-8a59-4cfb-84bd-21be9224eb39",
"contact_id": "6f8ced0b-3681-4656-8064-e99d8b0e098b",
"account_id": "43249c19-9a99-409a-a682-cf61e5ce85c3",
"created_at": "2017-05-26 21:20:52",
"updated_at": "2017-05-26 21:21:06"
}
Delete a Note
DELETE notes/:note_id
Response
Status code 204