All URIs are relative to https://api.saasgrids.com/apis/crms/
Method | HTTP request | Description |
---|---|---|
createNote | POST /{userId}/notes | Creates a new note |
deleteNoteById | DELETE /{userId}/note/{noteId} | Delete note by Id |
getAllNotes | GET /{userId}/notes | Get all notes |
getNoteById | GET /{userId}/note/{noteId} | Get note by Id |
updateNoteById | PUT /{userId}/note/{noteId} | Update note by Id |
createNote(userId, body)
Creates a new note
var crms = require('saasgrids');
var defaultClient = crms.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new crms.NotesApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var body = new crms.Note(); // Note | Note object that needs to be created
apiInstance.createNote(userId, body).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
userId | String | User instance id returned from saasgrids after authorization | |
body | Note | Note object that needs to be created |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
deleteNoteById(userId)
Delete note by Id
var crms = require('saasgrids');
var defaultClient = crms.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new crms.NotesApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
apiInstance.deleteNoteById(userId).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
userId | String | User instance id returned from saasgrids after authorization |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
[Note] getAllNotes(userId, email)
Get all notes
var crms = require('saasgrids');
var defaultClient = crms.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new crms.NotesApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var email = "email_example"; // String | Email id of the note
apiInstance.getAllNotes(userId, email).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
userId | String | User instance id returned from saasgrids after authorization | |
String | Email id of the note |
- Content-Type: application/json
- Accept: application/json
Note getNoteById(userId, noteId)
Get note by Id
var crms = require('saasgrids');
var defaultClient = crms.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new crms.NotesApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var noteId = "noteId_example"; // String | ObjectId of acount
apiInstance.getNoteById(userId, noteId).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
userId | String | User instance id returned from saasgrids after authorization | |
noteId | String | ObjectId of acount |
- Content-Type: application/json
- Accept: application/json
updateNoteById(userId, body)
Update note by Id
var crms = require('saasgrids');
var defaultClient = crms.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new crms.NotesApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var body = new crms.Note(); // Note | Note object that needs to be updated
apiInstance.updateNoteById(userId, body).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
userId | String | User instance id returned from saasgrids after authorization | |
body | Note | Note object that needs to be updated |
null (empty response body)
- Content-Type: application/json
- Accept: application/json