Skip to content

Latest commit

 

History

History
270 lines (172 loc) · 6.5 KB

DealsApi.md

File metadata and controls

270 lines (172 loc) · 6.5 KB

crms.DealsApi

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

createDeals(userId, body)

Creates a new deals

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

Parameters

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

Return type

null (empty response body)

Authorization

basicAuth

HTTP request headers

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

deleteDealById

deleteDealById(userId)

Delete deal 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.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);
});

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

getAllDeal

[Deal] getAllDeal(userId, email)

Get all deal

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

Parameters

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

Return type

[Deal]

Authorization

basicAuth

HTTP request headers

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

getDealById

Deal getDealById(userId, dealId)

Get deal 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.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);
});

Parameters

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

Return type

Deal

Authorization

basicAuth

HTTP request headers

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

updateDealById

updateDealById(userId, body)

Update deal 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.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);
});

Parameters

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

Return type

null (empty response body)

Authorization

basicAuth

HTTP request headers

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