All URIs are relative to https://api.saasgrids.com/apis/crms/
Method | HTTP request | Description |
---|---|---|
createAccount | POST /{userId}/accounts | Creates a new account |
deleteAccountById | DELETE /{userId}/account/{accountId} | Delete account by Id |
getAccountById | GET /{userId}/account/{accountId} | Get account by Id |
getAccountFilters | GET /{userId}/accounts/filters | Get all account filters |
getAccountsByFilter | GET /{userId}/accounts/filters/{filterId} | Get all accounts by filter |
getAllAccounts | GET /{userId}/accounts | Get all accounts |
updateAccountById | PUT /{userId}/account/{accountId} | Update account by Id |
createAccount(userId, body)
Creates a new account
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.AccountsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var body = new crms.Account(); // Account | Account object that needs to be created
apiInstance.createAccount(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 | Account | Account object that needs to be created |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
deleteAccountById(userId)
Delete account 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.AccountsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
apiInstance.deleteAccountById(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
Account getAccountById(userId, accountId)
Get account 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.AccountsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var accountId = "accountId_example"; // String | ObjectId of acount
apiInstance.getAccountById(userId, accountId).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 | |
accountId | String | ObjectId of acount |
- Content-Type: application/json
- Accept: application/json
InlineResponse2002 getAccountFilters(userId)
Get all account filters
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.AccountsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
apiInstance.getAccountFilters(userId).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 |
- Content-Type: application/json
- Accept: application/json
InlineResponse2007 getAccountsByFilter(userId, filterId)
Get all accounts by filter
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.AccountsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var filterId = "filterId_example"; // String | ObjectId of filter
apiInstance.getAccountsByFilter(userId, filterId).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 | |
filterId | String | ObjectId of filter |
- Content-Type: application/json
- Accept: application/json
InlineResponse2007 getAllAccounts(userId, email)
Get all accounts
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.AccountsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var email = "email_example"; // String | Email id of the account
apiInstance.getAllAccounts(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 account |
- Content-Type: application/json
- Accept: application/json
updateAccountById(userId, body)
Update account 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.AccountsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var body = new crms.Account(); // Account | Account object that needs to be updated
apiInstance.updateAccountById(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 | Account | Account object that needs to be updated |
null (empty response body)
- Content-Type: application/json
- Accept: application/json