API Reference - Notes

Link: https://support.brilliantdirectories.com/support/solutions/articles/12000108084

← Back to API Reference | Getting Started

Notes

Notes are short internal annotations that can be attached to any record in the system, such as a member profile, order, lead, or task. They are used by site administrators to log activity, track history, and leave internal comments. Notes are not visible to end users.

Model name in URL: notes — DB table: NOTES

The Note Object

FieldTypeDescription
NOTE_IDintegerUnique note ID (primary key, read-only)
DB_IDintegerID of the record this note is attached to
DBstringTable name of the record this note is attached to (EG users_data, orders)
NOTEtextFull text content of the note
DATE_ADDEDstringDate the note was created (format: YYYYMMDDHHmmss)
NOTE_BYstringUsername or identifier of who created the note
revision_timestamptimestampTimestamp of last record modification (auto-managed)

List Notes

GET /api/v2/notes/get

Example Request

Copy
curl -X GET "https://www.yourdomain.com/api/v2/notes/get?limit=25" \
  -H "X-Api-Key: your-api-key-here"

Example Response

Copy
{
  "status": "success",
  "message": [
    {
      "NOTE_ID": "2",
      "DB_ID": "24",
      "DB": "users_data",
      "NOTE": "Email with subject: Welcome to our directory - Sent",
      "DATE_ADDED": "20240301120000",
      "NOTE_BY": "admin",
      "revision_timestamp": "2024-03-01 12:00:00"
    }
  ],
  "total": "106",
  "current_page": 1,
  "total_pages": 5,
  "next_page": "MipfKjI="
}

Retrieve a Note

GET /api/v2/notes/get/{NOTE_ID}

Example Request

Copy
curl -X GET "https://www.yourdomain.com/api/v2/notes/get/2" \
  -H "X-Api-Key: your-api-key-here"

Example Response

Copy
{
  "status": "success",
  "message": [
    {
      "NOTE_ID": "2",
      "DB_ID": "24",
      "DB": "users_data",
      "NOTE": "Email with subject: Welcome to our directory - Sent",
      "DATE_ADDED": "20240301120000",
      "NOTE_BY": "admin",
      "revision_timestamp": "2024-03-01 12:00:00"
    }
  ],
  "total": "106",
  "current_page": 1,
  "total_pages": 5
}

Create a Note

POST /api/v2/notes/create

Example Request

Copy
curl -X POST "https://www.yourdomain.com/api/v2/notes/create" \
  -H "X-Api-Key: your-api-key-here" \
  -d "DB_ID=100" \
  -d "DB=users_data" \
  -d "NOTE=Followed+up+with+member+via+phone" \
  -d "DATE_ADDED=20240301120000" \
  -d "NOTE_BY=admin"

Example Response

Copy
{
  "status": "success",
  "message": {
    "NOTE_ID": "107",
    "DB_ID": "100",
    "DB": "users_data",
    "NOTE": "Followed up with member via phone",
    "DATE_ADDED": "20240301120000",
    "NOTE_BY": "admin",
    "revision_timestamp": null
  }
}

Update a Note

PUT /api/v2/notes/update

Example Request

Copy
curl -X PUT "https://www.yourdomain.com/api/v2/notes/update" \
  -H "X-Api-Key: your-api-key-here" \
  -d "NOTE_ID=107" \
  -d "NOTE=Followed+up+with+member+via+phone+-+resolved"

Example Response

Copy
{
  "status": "success",
  "message": {
    "NOTE_ID": "107",
    "DB_ID": "100",
    "DB": "users_data",
    "NOTE": "Followed up with member via phone - resolved",
    "DATE_ADDED": "20240301120000",
    "NOTE_BY": "admin",
    "revision_timestamp": "2024-03-02 09:15:00"
  }
}

Delete a Note

DELETE /api/v2/notes/delete

Example Request

Copy
curl -X DELETE "https://www.yourdomain.com/api/v2/notes/delete" \
  -H "X-Api-Key: your-api-key-here" \
  -d "NOTE_ID=107"

Example Response

Copy
{
  "status": "success",
  "message": "notes record was deleted"
}