サンプルコード - Node JS SDK
Node JS SDKを通じて、すべてのZoho CRM APIを使用し、カスタムアプリケーションでデータ同期を実行できます。Node JS SDKで利用できるAPIメソッドのサンプルコードを紹介します。
組織とユーザーの演算
これらのメソッドには、Zoho CRMの組織のデータを取得するために、アプリケーション内で実行できる処理が含まれます。たとえば、組織内のすべてのユーザー(従業員)の一覧をいつでも取得できます。
メソッド | 説明 |
---|---|
crmclient.API.ORG.get(params) | To fetch information about your CRM account organization. |
crmclient.API.USERS.get(input) | To fetch information about all the users in your CRM account. |
crmclient.API.USERS.get(input) | To fetch information about a particular user in your CRM account. [Specify the id of the user]. |
設定の演算
これらのメソッドには、Zoho CRM内で利用できるリソースに関する情報を取得するために、アプリケーション内で実行できる処理が含まれます。つまり、すべてのリソースのメタデータを取得できます。
メソッド | 説明 |
---|---|
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] |
crmclient.API.SETTINGS.getProfiles(input) | To fetch the list of all the profiles that are available in your CRM account. |
crmclient.API.SETTINGS.getProfiles(input) | To fetch information about a particular role available in your CRM account. [Specify the id of the profile] |
crmclient.API.SETTINGS.getFields(input) | To fetch the list of all the fields available in a module in your CRM account. |
crmclient.API.SETTINGS.getLayouts(input) | To fetch the list of all the layouts of a module in your CRM account. |
crmclient.API.SETTINGS.getLayouts(input) | To fetch information about a particular layout of a particular module in your CRM account. [Specify the id of the layout] |
crmclient.API.SETTINGS.getRelatedLists(input) | To fetch the list of all the related lists of a particular module in your CRM account. |
crmclient.API.SETTINGS.getCustomViews(input) | To fetch the list of all the custom views of a particular module in your CRM account. |
crmclient.API.SETTINGS.getCustomViews(input) | To fetch information about a particular custom view of a particular module in your CRM account. [Specify the id of the custom view] |
タブの演算
これらのメソッドには、Zoho CRM内でタブ単位でデータを修正するために、アプリケーション内で実行できる処理が含まれます。たとえば、タブからすべてのデータを取得したり、特定のデータを検索したり、データを削除したりなどができます。
メソッド | 説明 |
---|---|
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. |
crmclient.API.MODULES.delete(input) | To delete records in a module. |
crmclient.API.MODULES.getAllDeletedRecords(input) | To fetch the list of all the deleted records of a module. |
crmclient.API.MODULES.getRecycleBinRecords(input) | To fetch the list of all the records that are deleted and are in the Recycle Bin. |
crmclient.API.MODULES.getPermanentlyDeletedRecords(input) | To fetch the list of all the permanently deleted records of a module. |
crmclient.API.MODULES.search(input) | To search for records in a module. |
活動と添付ファイルの演算
これらのメソッドには、特定の処理を実行するために、アプリケーション内で実行できる処理が含まれます。たとえば、見込み客の変換、添付ファイルのアップロードなどの処理を実行できます。
メソッド | 説明 |
---|---|
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. |
crmclient.API.ATTACHMENTS.deletePhoto(params) | To delete photos/images that were attached to a record in a module. |