All URIs are relative to https://api.saasgrids.com/apis/crms/
Method | HTTP request | Description |
---|---|---|
createDeals | POST /{userId}/deals | Creates a new deals |
deleteDealById | DELETE /{userId}/deal/{dealId} | Delete deal by Id |
getAllDeal | GET /{userId}/deals | Get all deal |
getDealById | GET /{userId}/deal/{dealId} | Get deal by Id |
updateDealById | PUT /{userId}/deal/{dealId} | Update deal by Id |
createDeals(userId, body)
Creates a new deals
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.DealsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var body = new crms.Deal(); // Deal | Deal object that needs to be created
apiInstance.createDeals(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 | Deal | Deal object that needs to be created |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
deleteDealById(userId)
Delete deal 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.DealsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
apiInstance.deleteDealById(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
[Deal] getAllDeal(userId, email)
Get all deal
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.DealsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var email = "email_example"; // String | Email id of the deal
apiInstance.getAllDeal(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 deal |
- Content-Type: application/json
- Accept: application/json
Deal getDealById(userId, dealId)
Get deal 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.DealsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var dealId = "dealId_example"; // String | ObjectId of acount
apiInstance.getDealById(userId, dealId).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 | |
dealId | String | ObjectId of acount |
- Content-Type: application/json
- Accept: application/json
updateDealById(userId, body)
Update deal 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.DealsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var body = new crms.Deal(); // Deal | Deal object that needs to be updated
apiInstance.updateDealById(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 | Deal | Deal object that needs to be updated |
null (empty response body)
- Content-Type: application/json
- Accept: application/json