PHP code example of maidmaid / zoho

1. Go to this page and download the library: Download maidmaid/zoho library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

maidmaid / zoho example snippets


use Maidmaid\Zoho\Client;

$client = new Client('your_authtoken');

$records = $client->insertRecords($module = 'Contacts', $data = [
    10 => [
        'Last Name' => 'Holmes',
        'First Name' => 'Sherlock',
    ]
);

$records = $client->updateRecords($module, $data = [
    10 => [
        'Id' => 'the_ID',
        'First Name' => 'Sherlock',
    ]
]);

$client->deleteRecords($module = 'Contacts', 'the_ID');

$records = $client->getRecordById($module = 'Contacts', ['the_ID_1', 'the_ID_2'])

$records = $client->getRecords($module = 'Contacts')

$page = 0;
while ($records = $client->getRecords($module = 'Contacts', ++$page)) {

}

$records = $client->searchRecords($module = 'Contacts', $criteria = '(Last Name:Holmes)');

$fields = $client->getFields($module = 'Contacts');
 
$result = $client->call($module, $method, $params, $data)

$errors = $client->getLastErrors();

try {
    $results = $client->updateRecords('Contacts', $updates = []);
} catch (ZohoCRMException $e) {
}