All URIs are relative to https://api.saasgrids.com/apis/crms/
| Method | HTTP request | Description |
|---|---|---|
| createContact | POST /{userId}/contacts | Creates a new contact |
| deleteContactById | DELETE /{userId}/contacts/{contactId} | Delete contact by Id |
| getContactByFilter | GET /{userId}/contacts/filters/{filterId} | Get all contacts by filter |
| getContactById | GET /{userId}/contacts/{contactId} | Get contact by Id |
| getContactFilters | GET /{userId}/contacts/filters | Get all contact filters |
| getContactProperties | GET /{userId}/contacts/properties | Get all contact properties |
| getContacts | GET /{userId}/contacts | Get contacts |
| getContactsByEmail | GET /{userId}/contacts/email/{email} | Get all contacts by email |
| updateContactById | PUT /{userId}/contacts/{contactId} | Update contact by Id |
Contact createContact(userId, body)
Creates a new contact
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.ContactsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var body = new crms.Contact(); // Contact | Contact object that needs to be created
apiInstance.createContact(userId, body).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 | |
| body | Contact | Contact object that needs to be created |
- Content-Type: application/json
- Accept: application/json
deleteContactById(userId)
Delete contact 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.ContactsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
apiInstance.deleteContactById(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
InlineResponse2006 getContactByFilter(userId, filterId, opts)
Get all contacts 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.ContactsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var filterId = "filterId_example"; // String | ObjectId of filter
var opts = {
'limit': "limit_example", // String | Number of records to be fetched
'skip': "skip_example" // String | Skip value got from previous request, can be empty for first request
};
apiInstance.getContactByFilter(userId, filterId, opts).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 | |
| limit | String | Number of records to be fetched | [optional] |
| skip | String | Skip value got from previous request, can be empty for first request | [optional] |
- Content-Type: application/json
- Accept: application/json
Contact getContactById(userId, contactId)
Get contact 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.ContactsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var contactId = "contactId_example"; // String | ObjectId of contact
apiInstance.getContactById(userId, contactId).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 | |
| contactId | String | ObjectId of contact |
- Content-Type: application/json
- Accept: application/json
InlineResponse2005 getContactFilters(userId, opts)
Get all contact 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.ContactsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var opts = {
'limit': "limit_example", // String | Number of records to be fetched
'skip': "skip_example" // String | Skip value got from previous request, can be empty for first request
};
apiInstance.getContactFilters(userId, opts).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 | |
| limit | String | Number of records to be fetched | [optional] |
| skip | String | Skip value got from previous request, can be empty for first request | [optional] |
- Content-Type: application/json
- Accept: application/json
InlineResponse2004 getContactProperties(userId)
Get all contact properties
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.ContactsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
apiInstance.getContactProperties(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
InlineResponse2003 getContacts(userId, contactId)
Get contacts
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.ContactsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var contactId = ["contactId_example"]; // [String] | ObjectIds of contact
apiInstance.getContacts(userId, contactId).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 | |
| contactId | [String] | ObjectIds of contact |
- Content-Type: application/json
- Accept: application/json
Contact getContactsByEmail(userId, email)
Get all contacts by email
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.ContactsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var email = "email_example"; // String | Email id of the contacts
apiInstance.getContactsByEmail(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 contacts |
- Content-Type: application/json
- Accept: application/json
updateContactById(userId, contactId, body)
Update contact 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.ContactsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var contactId = "contactId_example"; // String | ObjectId of contact to be updated
var body = new crms.Contact(); // Contact | Contact object that needs to be updated
apiInstance.updateContactById(userId, contactId, 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 | |
| contactId | String | ObjectId of contact to be updated | |
| body | Contact | Contact object that needs to be updated |
null (empty response body)
- Content-Type: application/json
- Accept: application/json