Notes/Events API

Notes/Events

GET https://api.mothernode.com/notes

Receive a list of all Notes

Sample Response:

{
  "notes": [
    {
      "note_id": "2000",
      "ref_id": "fdb030d8-6628-11e5-9f60-e03f49a0757a",
      "ref_type": "client",
      "ref_msg": "Subject line here 2",
      "note_text": "This is the message body 2\n\nLine 2.",
      "author_id": null,
      "customer_id": "fdb030d8-6628-11e5-9f60-e03f49a0757a",
      "note_action_type": null,
      "event_start_date": null,
      "event_end_date": null,
      "is_all_day": "0",
      "created_date": "2015-12-22 15:38:39"
    },
    {
      "note_id": "1999",
      "ref_id": "630e3764-a5d5-11e5-ab45-e03f49a0757a",
      "ref_type": "contact",
      "ref_msg": "Event Subject",
      "note_text": "This is the message body contact rec\n\nLine 2.",
      "author_id": null,
      "customer_id": "638f30b7-a5d5-11e5-ab45-e03f49a0757a",
      "note_action_type": null,
      "event_start_date": "2015-12-24 16:30:00",
      "event_end_date": "2015-12-25 16:30:00",
      "is_all_day": "0",
      "created_date": "2015-12-22 15:34:28"
    },
    {
      "note_id": "1998",
      "ref_id": "630e3764-a5d5-11e5-ab45-e03f49a0757a",
      "ref_type": "contact",
      "ref_msg": "Subject line here",
      "note_text": "This is the message body contact rec\n\nLine 2.",
      "author_id": null,
      "customer_id": "638f30b7-a5d5-11e5-ab45-e03f49a0757a",
      "note_action_type": null,
      "event_start_date": null,
      "event_end_date": null,
      "is_all_day": "0",
      "created_date": "2015-12-22 15:30:59"
    }
  ]
}

GET https://api.mothernode.com/notes/{id}

Receive a single Note

Sample Response:

{
  "note": {
    "note_id": "2000",
    "ref_id": "fdb030d8-6628-11e5-9f60-e03f49a0757a",
    "ref_type": "client",
    "ref_msg": "Subject line here 2",
    "note_text": "This is the message body 2\n\nLine 2.",
    "author_id": null,
    "customer_id": "fdb030d8-6628-11e5-9f60-e03f49a0757a",
    "note_action_type": null,
    "event_start_date": null,
    "event_end_date": null,
    "is_all_day": "0",
    "created_date": "2015-12-22 15:38:39"
  }
}

POST https://api.mothernode.com/notes

Create a new Note for a Customer

{
  "note": {
    "ref_id": "fdb030d8-6628-11e5-9f60-e03f49a0757a",
    "ref_type": "client",
    "ref_msg": "Meeting Tomorrow",
    "note_text": "Message goes here."
  }
}


On success will return status code 201 with response:

{
  "note": {
    "note_id": "2002",
    "ref_id": "fdb030d8-6628-11e5-9f60-e03f49a0757a",
    "ref_type": "client",
    "ref_msg": "Meeting Tomorrow",
    "note_text": "Message goes here.",
    "author_id": null,
    "customer_id": "fdb030d8-6628-11e5-9f60-e03f49a0757a",
    "note_action_type": null,
    "event_start_date": null,
    "event_end_date": null,
    "is_all_day": "0",
    "created_date": "2015-12-24 05:21:10"
  }
}

Create a new Note for a Contact

{
  "note": {
    "ref_id": "ac86591e-a996-11e5-ab45-e03f49a0757a",
    "ref_type": "contact",
    "ref_msg": "Meeting Tomorrow",
    "note_text": "Message goes here."
  }
}

Create a new Note for a Contact with a Calendar Event

{
  "note": {
    "ref_id": "ac86591e-a996-11e5-ab45-e03f49a0757a",
    "ref_type": "contact",
    "ref_msg": "Meeting Tomorrow",
    "note_text": "Message goes here.",
    "event_start_date": "2015-12-24",
    "event_end_date": "2015-12-24",
    "is_all_day": "1"
  }
}

or 

{
  "note": {
    "ref_id": "ac86591e-a996-11e5-ab45-e03f49a0757a",
    "ref_type": "contact",
    "ref_msg": "Meeting Tomorrow",
    "note_text": "Message goes here.",
    "event_start_date": "2015-12-24 15:00",
    "event_end_date": "2015-12-24 16:00",
    "is_all_day": "0"
  }
}

On success will return status code 201 with response:

{
  "note": {
    "note_id": "2004",
    "ref_id": "ac86591e-a996-11e5-ab45-e03f49a0757a",
    "ref_type": "contact",
    "ref_msg": "Meeting Tomorrow",
    "note_text": "Message goes here.",
    "author_id": null,
    "customer_id": "449a3c12-a98c-11e5-ab45-e03f49a0757a",
    "note_action_type": null,
    "event_start_date": null,
    "event_end_date": null,
    "is_all_day": "0",
    "created_date": "2015-12-24 05:25:01"
  }
}

PUT https://api.mothernode.com/notes/{id}

Modify an existing Note

{
  "note": {
    "note_text": "Message goes here updated."
  }
}

On success will return status code 200 with response:

{
  "note": {
    "note_id": "2004",
    "ref_id": "ac86591e-a996-11e5-ab45-e03f49a0757a",
    "ref_type": "contact",
    "ref_msg": "Meeting Tomorrow",
    "note_text": "Message goes here updated.",
    "author_id": null,
    "customer_id": "449a3c12-a98c-11e5-ab45-e03f49a0757a",
    "note_action_type": null,
    "event_start_date": null,
    "event_end_date": null,
    "is_all_day": "0",
    "created_date": "2015-12-24 05:25:01"
  }
}

DELETE https://api.mothernode.com/notes/{id}

Remove a Note from the database

Response:

HTTP/1.1 200 OK
{}

GET https://api.mothernode.com/notes/count

Receive a count of all Notes

Response:

{
  "record_count": "658"
}
Print Friendly, PDF & Email

Was this article helpful?

Related Articles