Sample Codes

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.

Attachment Operations

ConstructorDescription
AttachmentsOperations(moduleAPIName, recordId)Creates an AttachmentsOperations class instance with the moduleAPIName and recordId.
MethodDescription
getAttachmentsTo fetch the list of attachments of a record.
uploadAttachmentsTo upload attachments to a record.
deleteAttachmentsTo delete the attachments that were added to a record.
deleteAttachmentTo delete an attachment that was added to a record.
downloadAttachmentTo download an attachment that was uploaded to a record.
uploadLinkAttachmentsTo upload a link as an attachment to a record.

Blueprint Operations

ConstructorDescription
BluePrintOperations(recordId, moduleAPIName)Creates a BluePrintOperations class instance with the recordId and moduleAPIName.
MethodDescription
getBlueprintTo get the next available transitions for that record, fields available for each transition, current value of each field, and validation(if any).
updateBlueprintTo update a single transition at a time.

Bulk Read Operations

MethodDescription
createBulkReadJobTo schedule a bulk read job to export records that match the criteria.
getBulkReadJobDetailsTo know the status of the bulk read job scheduled previously.
downloadResultTo download the result of the bulk read job. The response contains a zip file. Extract it to get the CSV or ICS file depending on the "file_type" you specified while creating the bulk read job

Bulk Write Operations

MethodDescription
uploadFileTo upload a CSV file in ZIP format. The response contains the "file_id". Use this ID while making the bulk write request.
createBulkWriteJobTo create a bulk write job to insert, update, or upsert records. The response contains the "job_id". Use this ID while getting the status of the scheduled bulk write job.
getBulkWriteJobDetailsTo know the status of the bulk write job scheduled previously.
downloadResultTo download the result of the bulk write job. The response contains a zip file. Extract it to get the CSV or ICS file depending on the "file_type" you specified while creating the write job

Contact Roles Operations

MethodDescription
getContactRolesTo get the list of all contact roles.
createContactRolesTo create contact roles.
updateContactRolesTo update contact roles.
deleteContactRolesTo delete contact roles.
getContactRoleTo get specific contact role.
updateContactRoleTo update specific contact role.
deleteContactRoleTo delete specific contact role.

Currencies Operations

MethodDescription
getCurrenciesTo get the list of all currencies available for your org.
addCurrenciesTo add new currencies to your org.
updateCurrenciesTo update the currencies' details of your org.
enableMultipleCurrenciesTo enable multiple currencies for your org.
updateBaseCurrencyTo update the base currency details of your org.
getCurrencyTo get the details of specific currency.
updateCurrencyTo update the details of specific currency.

Custom View Operations

ConstructorDescription
CustomViewsOperations(module)Creates a CustomViewsOperations class instance with the moduleAPIName.
MethodDescription
getCustomViewsTo get the list of all custom views in a module.
getCustomViewTo get the details of specific custom view in a module.

Fields Metadata Operations

ConstructorDescription
FieldsOperations(module)Creates a FieldsOperations class instance with the module.
MethodDescription
getFieldsTo get the meta details of all fields in a module.
getFieldTo get the meta details of specific field in a module.

Files Operations

MethodDescription
uploadFilesTo upload files and get their encrypted IDs.
getFileTo get the uploaded file through its encrypted ID.

Layouts Operations

ConstructorDescription
LayoutsOperations(module)Creates a LayoutsOperations class instance with the moduleAPIName.
MethodDescription
getLayoutsTo get the details of all the layouts in a module.
getLayoutTo get the details (metadata) of a specific layout in a module.

Modules Operations

MethodDescription
getModulesTo get the details of all the modules.
getModuleTo get the details (metadata) of a specific module.
updateModuleByAPINameTo update the details of a module by its API name.
updateModuleByIdTo update the details of a module by its ID.

Notes Operations

MethodDescription
getNotesTo get the list of notes of a record.
createNotesTo add new notes to a record.
updateNotesTo update the details of the notes of a record.
deleteNotesTo delete the notes of a record.
getNoteTo get the details of a specific note.
updateNoteTo update the details of an existing note.
deleteNoteTo delete a specific note.

Notification Operations

MethodDescription
enableNotificationsTo enable instant notifications of actions performed on a module.
getNotificationDetailsTo get the details of the notifications enabled by the user.
updateNotificationsTo update the details of the notifications enabled by a user. All the provided details would be persisted and rest of the details would be removed.
updateNotificationTo update only specific details of a specific notification enabled by the user. All the provided details would be persisted and rest of the details will not be removed.
disableNotificationsTo stop all the instant notifications enabled by the user for a channel.
disableNotificationTo disable notifications for the specified events in a channel.

Organization Operations

MethodDescription
getOrganizationTo get the details of your organization.
uploadOrganizationPhotoTo upload a photo of your organization.

Profile Operations

ConstructorDescription
ProfilesOperations(ifModifiedSince)Creates a ProfilesOperations class instance with the value of the If-Modified-Since header.
MethodDescription
getProfilesTo get the list of profiles available for your organization.
getProfileTo get the details of a specific profile.

Query (COQL) Operation

MethodDescription
getRecordsTo get the records from a module through a COQL query.

Records Operations

MethodDescription
getRecordTo get a specific record from a module.
updateRecordTo update a specific record in a module.
deleteRecordTo delete a specific record from a module.
getRecordsTo get all records from a module.
createRecordsTo insert records in a module.
updateRecordsTo update records in a module.
deleteRecordsTo delete records from a module.
upsertRecordsTo insert/update records in a module.
getDeletedRecordsTo get the deleted records from a module.
searchRecordsTo search for records in a module that match certain criteria, email, phone number, or a word.
convertLeadTo convert records(Leads to Contacts/Deals).
getPhotoTo get the photo of a record.
uploadPhotoTo upload a photo to a record.
deletePhotoTo delete the photo of a record.
massUpdateRecordsTo update the same field for multiple records in a module.
getMassUpdateStatusTo get the status of the mass update job scheduled previously.

Related List Operations

ConstructorDescription
RelatedListsOperations(module)Creates a RelatedListsOperations class instance with the moduleAPIName.
MethodDescription
getRelatedListsTo get the details of all the related lists of a module.
getRelatedListTo get the details of a specific related list of a module.

Related Records Operations

ConstructorDescription
RelatedRecordsOperations(relatedListAPIName, recordId, moduleAPIName)Creates a RelatedRecordsOperations class instance with the relatedListAPIName, recordId, and moduleAPIName.
MethodDescription
getRelatedRecordsTo get list of records from the related list of a module.
updateRelatedRecordsTo update the association/relation between the records.
delinkRecordsTo delete the association between the records.
getRelatedRecordTo get the records from a specific related list of a module.
updateRelatedRecordTo update the details of a specific record of a related list in a module.
delink RecordTo delete a specific record from the related list of a module.

Role Operations

MethodDescription
getRolesTo get the list of all roles available in your organization.
getRoleTo get the details of a specific role.

Shared Records Operations

ConstructorDescription
ShareRecordsOperations( recordId, moduleAPIName)Creates a ShareRecordsOperations class instance with the recordId and moduleAPIName.
MethodDescription
getSharedRecordDetailsTo get the details of a record shared with other users.
shareRecordTo share a record with other users in the organization.
updateSharePermissionsTo
  • Update the sharing permissions of a record granted to users as Read-Write, Read-only, or grant full access.

  • Revoke access given to users to a shared record.

  • Update the access permission to the related lists of the record that was shared with the user.

revokeSharedRecordTo revoke access to a shared record.

Tags Operations

MethodDescription
getTagsTo get the list of all tags in your organization.
createTagsTo create tags.
updateTagsTo update multiple tags.
updateTagTo update a specific tag.
deleteTagTo delete a specific tag from the module.
mergeTagsTo merge two tags.
addTagsToRecordTo add tags to a specific record.
removeTagsFromRecordTo remove tags from a record.
addTagsToMultipleRecordsTo add tags to multiple records.
removeTagsFromMultipleRecordsTo remove tags from multiple records.
getRecordCountForTagTo get the record count for a tag.

Taxes Operations

MethodDescription
getTaxesTo get the taxes of your organization.
createTaxesTo add taxes to your organization.
updateTaxesTo update the existing taxes of your organization.
deleteTaxesTo delete multiple taxes from your organization.
getTaxTo get the details of a specific tax.
deleteTaxTo delete a specific tax from your organization.

Territory Operations

MethodDescription
getTerritoriesTo get the list of all territories.
getTerritoryTo get the details of a specific territory.

Users Operations

MethodDescription
getUsersTo get the list of users in your organization.
createUserTo add a user to your organization.
updateUsersTo update the existing users of your organization.
getUserTo get the details of a specific user.
updateUserTo update the details of a specific user.
deleteUserTo delete a specific user from your organization.

Variable Groups Operations

MethodDescription
getVariableGroupsTo get the list of all variable groups available for your organization.
getVariableGroupByIdTo get the details of a variable group by its ID.
getVariableGroupByAPINameTo get the details of a specific variable group by its API name.

Variables Operations

MethodDescription
getVariablesTo get the list of variables available for your organization.
createVariablesTo add new variables to your organization.
updateVariablesTo update the details of variables.
deleteVariablesTo delete multiple variables.
getVariableByIdTo get the details of a specific variable by its unique ID.
updateVariableByIdTo update the details of a specific variable by its unique ID.
deleteVariableTo delete a specific variable.
getVariableForAPINameTo get the details of a variable by its API name.
updateVariableByAPINameTo update the details of a variable by its API name.