Samples Codes - PHP SDK

Samples Codes - PHP SDK

All of Zoho CRM's APIs can be used through the PHP 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.

Rest Client Operations

These methods involve authentications procedures that are to be included in your application, to provide access to Zoho CRM's data.

Methods
Description
To fetch the list of all the modules available in your CRM account.
To fetch information about a particular module in your CRM account.
To get a dummy record. 
To fetch  details of  a dummy module.
To fetch  details of  a dummy organization.
To fetch information about the user who is currently accessing Zoho CRM's data through your application.
getCurrentUserEmailID
  To fetch the email ID of the user, who's is currently accessing CRM's data.
  To fetch all the details regarding your organization in your CRM account.

Organization Operations

These methods involve actions that can be performed in your application, to modify the data that pertains to 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
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.
getAllConfirmedUsers
To fetch the list of all the confirmed users in your CRM account.
getAllNotConfirmedUsers
To fetch the list of all the non-confirmed users in your CRM account.
To fetch the list of all the users who were deleted from your CRM account.
To fetch the list of all the active and confirmed users in your CRM account.
To fetch the list of all the users who have admin level permissions in your CRM account.
To fetch the list of all the users who have admin level permissions and are confirmed, in your CRM account.
To fetch the information about the users who is currently accessing CRM's data though your application.
To delete a user from your CRM account.
To create a new user in your CRM account.
To update details of an existing user in your CRM account.
To fetch the list of all the profiles that were created in your CRM account.
To fetch information about a particular profile in your CRM account.
To fetch the list of all the roles that were created in your CRM account.
To fetch information about a particular role in your CRM account.

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
getFieldDetails
To fetch the details about a particular field present in a module, in your CRM.
getAllFields
To fetch the list of all the fields that are 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.
To update a custom view of a module.
To fetch information about a particular related list of a module.
To fetch the list of all the related lists that are available for a module.
To fetch the list of all the records that are available in a module.
To fetch information about a particular record in a module.
To search for records in a module.
searchRecordsByPhone
To search for records in a module based on the Phone number.
To search for records in a module based on Email address.
To search for records in a module based on a criteria specified by the user.
To update content in a particular field for multiple records in a module.
To update details of multiple records in a module.
To create a new record in a module.
To delete existing records from a module.
To fetch the list of all the records that were deleted from a module.
To fetch the list of all the records that were deleted from a module and stored in the recycle bin.
To fetch the list of all the records that were permanently deleted from a module.
To fetch the list of all the tags that were created for a module.
To fetch total count of the tags that were created for a module.
To create new tags for a module.
To update details of existing tags for a module.
To associate tags to records in a module.
To disassociate tags from records in a module.

Record Operations

These methods involve actions that can be performed in your application, to access or modify data that are stored in a particular record. You could fetch the details of a record, create new ones, update existing ones, upload notes, attachments, photos, etc.

Methods
Description
create
To create new records.
update
To update existing records.
delete
To delete existing records.
convert
To convert records(Leads to Contacts/Deals).
getRelatedListRecords
To fetch list of records in Related Lists.
getNotes
To fetch the notes that were attached to a record. 
To add a note to a record.
To update a note that was previously added to a record.
To delete a note from a record.
To fetch the list of attachments of a record.
To upload an attachment to a record.
To upload a link as an attachment to a record.
To download an attachment that was uploaded to a record.
To delete an attachment that was added to a record.
To upload a photo to a record.
To download a photo that was added to a record.
To delete a photo that was added to a record.
To make a relation between two records.
To remove a relation between two records.
To add tags to a record.
To remove tags from a record.




    • Related Articles

    • Release Notes - PHP SDK

      ZOHO CRM/PHP SDK 2.0.1 Install command composer require zohocrm/php-sdk:2.0.1 Notes Enhancement Tag names can contain spaces in between them, while associating with records. Tag names can be retrieved as "ZCRMTag" objects in records function. ZOHO ...
    • Installation - PHP SDK

      Install Composer(if not installed) Run this command to install the composer curl -sS  https://getcomposer.org/installer  | php To install composer on mac/ linux machine: https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx To install ...
    • PHP SDK - An Overview

      PHP SDK offers a way to create client PHP applications that can be integrated with Zoho CRM. This SDK makes the access and use of necessary CRM APIs with ease. In other words, it serves as a wrapper for the REST APIs, making it easier to use the ...
    • Configuration - PHP SDK

      To access the CRM services through SDK, the client application must be first authenticated. This can be done by passing a key-value configuration pair to the initialization process. The $configuration array must be created. It will contain the ...
    • Initialization - PHP SDK

      The app would be ready to be initialized after defining the configuration array. The user can now proceed to generate the required tokens to run the app. The generation of the grant token can be done using two methods. Self-Client Redirection-based ...