Sample Codes - Node JS SDK

Sample Codes - Node JS SDK

All of Zoho CRM's APIs can be used through the Node JS SDK, to enable your custom application to perform data sync to the best degree. Here are the sample codes for all the API methods available in our SDK.

Organization & User Operations

These methods involve actions that can be performed in your application, to fetch the data of your Zoho CRM's organization. For instance, you can get the list of all the users (employees) that are present in your organization at any point of time.

Methods
Description
To fetch information about your CRM account organization.
To fetch information about all the users in your CRM account.
To fetch information about a particular user in your CRM account. [Specify the id of the user].

Settings Operations

These methods involve actions that can be performed in your application, to fetch information regarding the resources available in Zoho CRM. In other words, you can get the meta data of all the resources.

Methods
Description
crmclient.API.SETTINGS.getModules(input)
To fetch the list of all the modules available in your CRM account.
crmclient.API.SETTINGS.getModules(input)
To fetch information about a particular module in your CRM account. [Specify the name of the module]
crmclient.API.SETTINGS.getRoles(input)
To fetch the list of all the roles that were created in your CRM account.
crmclient.API.SETTINGS.getRoles(input)
To fetch information about a particular role in your CRM account. [Specify the id of the role]
To fetch the list of all the profiles that are available in your CRM account.
To fetch information about a particular role available in your CRM account. [Specify the id of the profile]
To fetch the list of all the fields available in a module in your CRM account.
To fetch the list of all the layouts of a module in your CRM account.
To fetch information about a particular layout of a particular module in your CRM account. [Specify the id of the layout]
To fetch the list of all the related lists of a particular module in your CRM account.
To fetch the list of all the custom views of a particular module in your CRM account.
To fetch information about a particular custom view of a particular module in your CRM account. [Specify the id of the custom view]

Module Operations

These methods involve actions that can be performed in your application, to modify the data in your CRM at the module level. For instance, you can get all the records from a module, search for specific ones, delete them, and do more.

Methods
Description
crmclient.API.MODULES.get(input)
To fetch the list of all the records that are present in a module.
crmclient.API.MODULES.get(input)
To fetch information about a particular record present in a module. [Specify the id of the record]
crmclient.API.MODULES.post(input)
To create records in a module.
crmclient.API.MODULES.put(input)
To update existing records in a module.
crmclient.API.MODULES.put(input)
To update a particular record in a module. [Specify the id of the record]
crmclient.API.MODULES.delete(input)
To delete a particular record in a module.
To delete records in a module.
To fetch the list of all the deleted records of a module.
To fetch the list of all the records that are deleted and are in the Recycle Bin.
To fetch the list of all the permanently deleted records of a module.
To search for records in a module.

Actions & Attachments Operations

These methods involve actions that can be performed in your application, to perform certain actions such as converting a lead, uploading attachments, photos, etc.

Methods
Description
crmclient.API.ACTIONS.convert(input)
To convert a record(Leads to Contacts/Deals).
crmclient.API.ATTACHMENTS.uploadFile(input)
To upload files(attachments) to a record in a module.
crmclient.API.ATTACHMENTS.downloadFile(input)
To download files(attachments) that were attached to a record in a module.
crmclient.API.ATTACHMENTS.deleteFile(input)
To delete files(attachments) that were attached to a record in a module.
crmclient.API.ATTACHMENTS.uploadPhoto(input)
To upload photos/images to a record in a module.
crmclient.API.ATTACHMENTS.downloadPhoto(input)
To download photos/images that were attached to a record in a module.
To delete photos/images that were attached to a record in a module.







    • Related Articles

    • Installation - Node JS SDK

      Node JS SDK will be installed and a package named 'zcrmsdk' will be created in the local machine. The package can be added using the following code: var ZCRMRestClient = require('zcrmsdk') Installing the SDK Run the command below to install the Node ...
    • Initialization - Node JS SDK

      Whenever the app is started, the below code snippet is to be called for initialization. var ZCRMRestClient = require('zcrmsdk'); ZCRMRestClient.initialize().then(function() { //do whatever required after initialize }) Generating self-authorized grant ...
    • Configuration - Node JS SDK

      Your OAuth Client details should be given to the SDK as a property file. In the SDK, you need to configure a file named oauth_configuration.properties. Please place the respective values in that file. You can place it under resources folder from ...
    • Node JS SDK - An Overview

      Node JS SDK offers a way to create client node js applications that can be integrated with Zoho CRM. This SDK makes the access and use of necessary CRM APIs easy. In other words, it serves as a wrapper for the REST APIs, making it easier to use the ...
    • Release Notes - Node JS SDK

      ZCRMSDK -VERSION 0.0.15 Install command npm install zcrmsdk@0.0.15 Notes Enhancement: User identifier default value handled in get method. ZCRMSDK -VERSION 0.0.14 Install command npm install zcrmsdk@0.0.14 Notes Issue fix: Default user identifier set ...