Skip to content

Latest commit

 

History

History
270 lines (172 loc) · 6.5 KB

NotesApi.md

File metadata and controls

270 lines (172 loc) · 6.5 KB

crms.NotesApi

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

createNote(userId, body)

Creates a new note

Example

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);
});

Parameters

Name Type Description Notes
userId String User instance id returned from saasgrids after authorization
body Note Note object that needs to be created

Return type

null (empty response body)

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteNoteById

deleteNoteById(userId)

Delete note by Id

Example

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);
});

Parameters

Name Type Description Notes
userId String User instance id returned from saasgrids after authorization

Return type

null (empty response body)

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getAllNotes

[Note] getAllNotes(userId, email)

Get all notes

Example

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);
});

Parameters

Name Type Description Notes
userId String User instance id returned from saasgrids after authorization
email String Email id of the note

Return type

[Note]

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getNoteById

Note getNoteById(userId, noteId)

Get note by Id

Example

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);
});

Parameters

Name Type Description Notes
userId String User instance id returned from saasgrids after authorization
noteId String ObjectId of acount

Return type

Note

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

updateNoteById

updateNoteById(userId, body)

Update note by Id

Example

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);
});

Parameters

Name Type Description Notes
userId String User instance id returned from saasgrids after authorization
body Note Note object that needs to be updated

Return type

null (empty response body)

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json