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.