Skip to content

qadeersahmed/vtiger-restapi-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vtiger REST API client for PHP

Installation

composer require qadeersahmed/vtiger-restapi-php

Usage

require 'vendor/autoload.php';

$vtiger = new vtiger('VTIGER_URL', 'VTIGER_USERNAME', 'VTIGER_ACCESSKEY');
Create
$params      = [
    'assigned_user_id'         => '1',
    'subject'                  => 'Test',
    'quotestage'               => 'Created',
    'productid'                => '14x3',
    'description'              => 'Test Description',
    'hdnTaxType'               => 'group', // group or individual taxes are obtained from the application
    'LineItems'                => [
        '0' => [
            'productid'        => '14x3',
            'sequence_no'      => '1',
            'quantity'         => '1.000',
            'listprice'        => '500.00',
            'comment'          => 'sample comment product',
        ],

    ],
];

$result = $vtiger->create($params, 'Quotes');

Update

$params = ['id' => '12x3654', 'lastname' => 'Test Lead', 'email' => '[email protected]', 'assigned_user_id' => '19x1'];
$result = $vtiger->update($params);

Retrieve

$result = $vtiger->retrieve('5x3679');

Revise

$params = ['id' => '12x3653', 'email' => '[email protected]', 'assigned_user_id' => '19x1'];
$result = $vtiger->revise($params);

Describe

$result = $vtiger->describe('Contacts');

Query

$params = ['email' => '[email protected]'];
$select = ['mobile'];

$result = $vtiger->query('Contacts', $params, $select);

ListTypes

$result = $vtiger->listTypes();

RetrieveRelated

$result = $vtiger->retrieveRelated('12x3653', 'Activities', 'Calendar');

About

PHP Client for VTiger Rest API

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages