Skip to content

erigglem/zoho-api-wrapper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZOHO CRM API V2 Wrapper for Laravel 5.x

Laravel 5.x Latest Stable Version Latest Unstable Version Total Downloads License

To easing ZOHO REST API V2 call for Laravel application.

Requirements

Installation

$ composer require asad/laravel-zoho-api-wrapper

Configuration

$ php artisan zoho:authentication

Input CRM client id:
> (your client id)
Input CRM client secret:
> (your client secret)
Input client domain (ex: example.com):
> (your client domain name)
Select your protocol.[http]:
[0] http
[1] https
> 0
Select your env. [sandbox]:
[0] sandbox
[1] live
> 0

Copy the following url, paste on browser and hit return.
https://accounts.zoho.com/oauth/v2/auth?....

How to use (example)

> ZohoController.php

use Asad\Zoho\Api\RecordApi;
use Asad\Zoho\Exception\ZohoException;

Class ZohoController extends Controller
{

    public function testAPI()
    {
        $param = [
            'headers' => [
                'If-Modified-Since' => date('c')
            ],
            'data' => [
                'page' => 1,
                'per_page' => 20,
            ]
        ];

        $response = $this->listOfRecords('Leads', $param);
        dd($response);
    }

    public function listOfRecords($module, array $param)
    {   
        $record_api = new RecordApi();
        try {
            $response = $record_api->listOfRecords($module, $param);
            if ($response->getStatus() == 'success') {
                $crm_data = $response->getResults();
                return $crm_data;
            }
        } catch(ZohoException $e) {
            // Handle Exception and return
        }
    }
}

APIs

Currently there are only 7 api wrappers. Those are follows:

  • Record APIs
  • Meta Data APIs (It also belong Module API)
  • Note APIs
  • Related List APIs
  • Tag APIs
  • Attachments APIs
  • Query APIs

Documentation

See the documentation at : Zoho API Wrapper

Contributing

Contributions are welcome and will be fully credited.

I accept contributions via Pull Requests on Github.

Issues

If you discover any issues, please email at [email protected] also you can create issue on the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Packages

No packages published

Languages

  • PHP 100.0%