All URIs are relative to https://api.saasgrids.com/apis/crms/
Method | HTTP request | Description |
---|---|---|
createLead | POST /{userId}/leads | Creates a new lead |
deleteLeadById | DELETE /{userId}/leads/{leadId} | Delete lead by Id |
getAllLeads | GET /{userId}/leads | Get all leads |
getLeadById | GET /{userId}/leads/{leadId} | Get lead by Id |
getLeadFilters | GET /{userId}/leads/filters | Get all lead filters |
getLeadsByFilter | GET /{userId}/leads/filters/{filterId} | Get all leads by filter |
updateLeadById | PUT /{userId}/leads/{leadId} | Update lead by Id |
Lead createLead(userId, body)
Creates a new lead
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.LeadsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var body = new crms.Lead(); // Lead | Lead object that needs to be created
apiInstance.createLead(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 | Lead | Lead object that needs to be created |
- Content-Type: application/json
- Accept: application/json
deleteLeadById(userId)
Delete lead 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.LeadsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
apiInstance.deleteLeadById(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
InlineResponse2001 getAllLeads(userId, email)
Get all leads
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.LeadsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var email = "email_example"; // String | Email id of the lead
apiInstance.getAllLeads(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 lead |
- Content-Type: application/json
- Accept: application/json
Lead getLeadById(userId, leadId)
Get lead 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.LeadsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var leadId = "leadId_example"; // String | ObjectId of lead
apiInstance.getLeadById(userId, leadId).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 | |
leadId | String | ObjectId of lead |
- Content-Type: application/json
- Accept: application/json
InlineResponse2002 getLeadFilters(userId)
Get all lead 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.LeadsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
apiInstance.getLeadFilters(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
InlineResponse2001 getLeadsByFilter(userId, filterId)
Get all leads 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.LeadsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var filterId = "filterId_example"; // String | ObjectId of filter
apiInstance.getLeadsByFilter(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
updateLeadById(userId, body)
Update lead 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.LeadsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var body = new crms.Lead(); // Lead | Lead object that needs to be updated
apiInstance.updateLeadById(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 | Lead | Lead object that needs to be updated |
null (empty response body)
- Content-Type: application/json
- Accept: application/json