API documentation
The Note object allows to associate notes to contacts. A note has to be associated with an existing contact - it can't be orphan.
A note can be favorited. When favorited, it will be display on the dashboard inside the application.
When retrieving a note, we always also return some basic information about the related contact.
GET /notes/
Name | Type | Description |
---|---|---|
limit | integer | Indicates the page size. |
page | integer | Indicates the page to return. |
{
"data": [
{
"id": 4724,
"object": "note",
"body": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor.",
"is_favorited": true,
"favorited_at": "2017-12-04T00:00:00Z",
"account": {
"id": 1
},
"contact": {
"id": 1,
"object": "contact",
"first_name": "Usher",
"last_name": "Misste",
"gender": "male",
"is_partial": false,
"information": {
"dates": [
{
"name": "birthdate",
"is_birthdate_approximate": "exact",
"birthdate": "1983-10-23T19:10:42Z"
}
]
},
"account": {
"id": 1
}
},
"created_at": "2017-10-07T09:00:35Z",
"updated_at": "2017-10-07T09:00:35Z"
},
{
"id": 4725,
"object": "note",
"body": "I should definitely see her more often, this is sad that I don't see her more often.",
"is_favorited": true,
"favorited_at": "2017-12-04T00:00:00Z",
"account": {
"id": 1
},
"contact": {
"id": 1,
"object": "contact",
"first_name": "Henri",
"last_name": "Troyat",
"gender": "female",
"is_partial": false,
"information": {
"dates": [
{
"name": "birthdate",
"is_birthdate_approximate": "exact",
"birthdate": "1983-10-23T19:10:42Z"
}
]
},
"account": {
"id": 1
}
},
"created_at": "2017-10-07T15:28:22Z",
"updated_at": "2017-10-07T15:28:22Z"
}
],
"links": {
"first": "https://app.monicahq.com/api/contacts/1/notes?page=1",
"last": "https://app.monicahq.com/api/contacts/1/notes?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://app.monicahq.com/api/contacts/1/notes",
"per_page": 10,
"to": 2,
"total": 2
}
}
GET /contacts/:id/notes
{
"data": [
{
"id": 4724,
"object": "note",
"body": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor.",
"is_favorited": true,
"favorited_at": "2017-12-04T00:00:00Z",
"account": {
"id": 1
},
"contact": {
"id": 1,
"object": "contact",
"first_name": "Usher",
"last_name": "Misste",
"gender": "male",
"is_partial": false,
"information": {
"dates": [
{
"name": "birthdate",
"is_birthdate_approximate": "exact",
"birthdate": "1983-10-23T19:10:42Z"
}
]
},
"account": {
"id": 1
}
},
"created_at": "2017-10-07T09:00:35Z",
"updated_at": "2017-10-07T09:00:35Z"
},
{
"id": 4725,
"object": "note",
"body": "I should definitely see her more often, this is sad that I don't see her more often.",
"is_favorited": true,
"favorited_at": "2017-12-04T00:00:00Z",
"account": {
"id": 1
},
"contact": {
"id": 1,
"object": "contact",
"first_name": "Henri",
"last_name": "Troyat",
"gender": "female",
"is_partial": false,
"information": {
"dates": [
{
"name": "birthdate",
"is_birthdate_approximate": "exact",
"birthdate": "1983-10-23T19:10:42Z"
}
]
},
"account": {
"id": 1
}
},
"created_at": "2017-10-07T15:28:22Z",
"updated_at": "2017-10-07T15:28:22Z"
}
],
"links": {
"first": "https://app.monicahq.com/api/contacts/1/notes?page=1",
"last": "https://app.monicahq.com/api/contacts/1/notes?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://app.monicahq.com/api/contacts/1/notes",
"per_page": 10,
"to": 2,
"total": 2
}
}
GET /notes/:id
{
"data": {
"id": 4724,
"object": "note",
"body": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor.",
"is_favorited": true,
"favorited_at": "2017-12-04T00:00:00Z",
"account": {
"id": 1
},
"contact": {
"id": 1,
"object": "contact",
"first_name": "Henri",
"last_name": "Troyat",
"gender": "female",
"is_partial": false,
"information": {
"dates": [
{
"name": "birthdate",
"is_birthdate_approximate": "exact",
"birthdate": "1983-10-23T19:10:42Z"
}
]
},
"account": {
"id": 1
}
},
"created_at": "2017-10-07T09:00:35Z",
"updated_at": "2017-10-07T09:00:35Z"
}
}
POST /notes/
Name | Type | Description |
---|---|---|
body | string | Required. The body of the note. Max 100000 characters. |
contact_id | integer | Required. The ID of the contact that the note is associated with. |
is_favorited | integer | Required. Indicates whether the note is favorited or not. Can be 0 (false) or 1 (true). |
{
"body": "This is a sample of a note.",
"contact_id": 1,
"is_favorited": 0
}
The API call returns a note object if the call succeeds.
{
"data": {
"id": 4724,
"object": "note",
"body": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor.",
"is_favorited": true,
"favorited_at": null,
"account": {
"id": 1
},
"contact": {
"id": 1,
"object": "contact",
"first_name": "Henri",
"last_name": "Troyat",
"gender": "female",
"is_partial": false,
"information": {
"dates": [
{
"name": "birthdate",
"is_birthdate_approximate": "exact",
"birthdate": "1983-10-23T19:10:42Z"
}
]
},
"account": {
"id": 1
}
},
"created_at": "2017-10-07T09:00:35Z",
"updated_at": "2017-10-07T09:00:35Z"
}
}
PUT /notes/:id
Name | Type | Description |
---|---|---|
body | string | Required. The body of the note. Max 100000 characters. |
contact_id | integer | Required. The ID of the contact that the note is associated with. |
is_favorited | integer | Required. Indicates whether the note is favorited or not. Can be 0 (false) or 1 (true). |
{
"body": "This is a test that is updated",
"contact_id": 3
}
{
"data": {
"id": 4724,
"object": "note",
"body": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor.",
"is_favorited": true,
"favorited_at": "2017-12-04T00:00:00Z",
"account": {
"id": 1
},
"contact": {
"id": 1,
"object": "contact",
"first_name": "Henri",
"last_name": "Troyat",
"gender": "female",
"is_partial": false,
"information": {
"dates": [
{
"name": "birthdate",
"is_birthdate_approximate": "exact",
"birthdate": "1983-10-23T19:10:42Z"
}
]
},
"account": {
"id": 1
}
},
"created_at": "2017-10-07T09:00:35Z",
"updated_at": "2017-10-07T09:00:35Z"
}
}
DELETE /notes/:id
The response sends back the id that was just deleted.
{
"deleted": true,
"id": 31
}
Features
Company
Resources
© 2018 — 2024