サンプルコード - PHP SDK
PHP SDKを通じて、すべてのZoho CRM APIを使用し、カスタムアプリケーションでデータ同期を実行できます。PHP SDKで利用できるAPIメソッドのサンプルコードを紹介します。
RESTクライアントの演算
これらのメソッドには、Zoho CRMのデータにアクセスするために、アプリケーション内に含める認証手順が含まれます。
メソッド | 説明 |
---|---|
getOrganizationDetails | To fetch information about your CRM account organization. |
getOrganizationInstance | To fetch details of a dummy organization. |
getCurrentUser | To fetch information about the user who is currently accessing Zoho CRM's data through your application. |
getRecordInstance | To get a dummy record. |
getModuleInstance | To fetch details of a dummy module. |
組織の演算
Tこれらのメソッドには、Zoho CRMの組織のデータを取得するために、アプリケーション内で実行できる処理が含まれます。たとえば、組織内のすべてのユーザー(従業員)の一覧をいつでも取得できます。
メソッド | 説明 |
---|---|
getUser | To fetch information about a specific user in your CRM account. |
getAllUsers | To fetch the list of all the users from your CRM account. |
getAllActiveUsers | To fetch the list of all the active users in your CRM account. |
getAllDeactiveUsers | To fetch the list of all the non-active users in your CRM account. |
getAllActiveConfirmedUsers | To fetch the list of all the active and confirmed users in your CRM account. |
getAllConfirmedUsers | To fetch the list of all the confirmed users in your CRM account. |
getAllNotConfirmedUsers | To fetch the list of all the users who are not confirmed in your CRM account. |
getAllDeletedUsers | To fetch the list of all the users who were deleted from your CRM account. |
getAllAdminUsers | To fetch the list of all the users who have admin level permissions in your CRM account. |
getAllActiveConfirmedAdmins | To fetch the list of all the active and confirmed users who have admin level permissions in your CRM account. |
createUser | To create a new user in your CRM account. |
updateUser | To update details of an existing user in your CRM account. |
deleteUser | To delete a user from your CRM account. |
getCurrentUser | To fetch information on the user who is currently accessing Zoho CRM's data through your app. |
getAllProfiles | To fetch the list of all the profiles that were created in your CRM account. |
getProfile | To fetch information about a particular profile in your CRM account. |
getAllRoles | To fetch information about a particular role in your CRM account. |
getRole | To fetch information about a particular role in your CRM account. |
getorgtaxes | To fetch the list of all organization taxes. |
getOrganizationTax | To fetch information about a particular organization tax. |
createOrganizationTaxes | To create a new organization tax. |
updateOrganizationTaxes | To update the details of a particular organization tax. |
getRole | To fetch information about a particular role in your CRM account. |
deleteOrganizationTaxes | To delete all the taxes associated to the organization. |
deleteOrganizationTax | To delete a particular tax associated to the organization. |
searchUsersByCriteria | To search for records in a module based on a criteria specified by the user. |
getNotes | To fetch the list of notes created for your organization. |
createNotes | To create notes for your organization. |
deleteNotes | To delete notes from your organization. |
getVariables | To fetch the list of variables created for your organization. |
createVariables | To create variables for your organization. |
updateVariables | To update variables created for your organization. |
getVariableGroups | To fetch information about the variable groups created for your organization. |
タブの演算
これらのメソッドには、Zoho CRM内でタブ単位でデータを修正するために、アプリケーション内で実行できる処理が含まれます。たとえば、タブからすべてのデータを取得したり、特定のデータを検索したりタブ、データを削除したりなどができます。
メソッド | 説明 |
---|---|
getAllFields | To fetch the list of all the fields that are available in a module. |
getFieldDetails | To fetch information about a particular field available in a module. |
getLayoutDetails | To fetch information about a particular layout of a module. |
getAllLayouts | To fetch the list of all the layouts that are available for a module. |
getCustomView | To fetch information about a particular custom view of a module. |
getAllCustomViews | To fetch the list of all the custom views that are available for a module. |
updateCustomView | To update a custom view of a module. |
getAllRelatedLists | To fetch the list of all the related lists that are available for a module. |
getRelatedListDetails | To fetch the list of all the related lists that are available for a module. |
updateModuleSettings | To update the settings of a module. Ex: territory, custom view, etc. |
getRecords | To fetch the list of all the records that are available in a module. |
getRecord | To fetch information about a particular record in a module. |
searchRecordsByWord | To search for records in a module based on a Word(text). |
searchRecordsByPhone | To search for records in a module based on the Phone number. |
searchRecordsByEmail | To search for records in a module based on Email address. |
searchRecordsByCriteria | To search for records in a module based on a criteria specified by the user. |
updateRecords | To update details of multiple records in a module. |
createRecords | To create a new record in a module. |
deleteRecords | To delete existing records from a module. |
getAllDeletedRecords | To fetch the list of all the records that were deleted from a module. |
getRecycleBinRecords | To fetch the list of all the records that were deleted from a module and stored in the recycle bin. |
getPermanentlyDeletedRecords | To fetch the list of all the records that were permanently deleted from a module. |
upsertRecords | To insert/update records in a module. |
massUpdateRecords | To update single field value for multiple records. Same value will get updated for all the mentioned records. |
getTags | To fetch the list of all the tags that were created for a module. |
getTagCount | To fetch total count of the tags that were created for a module. |
createTags | To create new tags for a module. |
updateTags | To update details of existing tags for a module. |
addTagsToRecords | To associate tags to records in a module. |
removeTagsFromRecords | To disassociate tags from records in a module. |
データの演算
これらのメソッドには、特定のデータ内に保管されている詳細情報にアクセスしたり、詳細情報を修正したりするために、アプリケーション内で実行できる処理が含まれます。たとえば、データの詳細情報の取得、新しいデータの作成、既存データの更新、メモ/添付ファイル/写真のアップロードなどが可能です。
メソッド | 説明 |
---|---|
create | To create a new record. |
update | To update an existing record. |
delete | To delete an existing record. |
convert | To convert a record (Leads to Contacts/Deals). |
getNotes | To fetch the notes that were attached to a record. |
addNotes | To add a note to a record. |
addNote | To add a note to a record. |
updateNote | To update a note that was previously added to a record. |
deleteNote | To delete a note from a record. |
getAttachments | To fetch the list of attachments of a record. |
uploadAttachment | To upload an attachment to a record. |
uploadLinkAsAttachment | To upload a link as an attachment to a record. |
downloadAttachment | To download an attachment that was uploaded to a record. |
deleteAttachment | To delete an attachment that was added to a record. |
uploadPhoto | To upload a photo to a record. |
downloadPhoto | To download a photo that was added to a record. |
deletePhoto | To delete a photo that was added to a record. |
addRelation | To make a relation between two records. |
removeRelation | To remove a relation between two records. |
addTags | To add tags to a record. |
removeTags | To remove tags from a record. |
メモの演算
これらのメソッドには、Zoho CRM内のデータのメモにアクセスしたり、修正したりするために、アプリケーション内で実行できる処理が含まれます。
メソッド | 説明 |
---|---|
getAttachmentsOfNote | To fetch all attachments of a note. |
uploadAttachmentToNote | To upload a note attachment to a record. |
downloadAttachmentFromNote | To download an attachment that was attached to a record. |
deleteAttachmentFromNote | To delete an attachment that was attached to a record. |
変数の演算
これらのメソッドを使用すると、組織用の変数を更新したり、削除したりできます。
メソッド | 説明 |
---|---|
getVariableofGroup | To fetch information about a specific variable from a group created for your organization. |
updateVariable | To update the details of a specific variable. |
deleteVariable | To delete a specific variable. |
変数グループの演算
これらのメソッドを使用すると、組織用に作成した変数グループに関する情報を取得できます。
メソッド | 説明 |
---|---|
getVariableGroup | To fetch information about a specific variable group created for your organization. |
カスタムビューの演算
これらのメソッドを使用すると、特定のカスタムビュー内のデータを取得できます。
メソッド | 説明 |
---|---|
getrecords | To fetch records in a custom view. |