vtiger-cloudsdk / restapi-php
Vtiger Cloud Restapi Library
1.0
2019-02-16 07:10 UTC
Requires
- php: >=7.0
- rmccue/requests: dev-master
Requires (Dev)
- phpunit/phpunit: 7.0
This package is not auto-updated.
Last update: 2024-04-12 08:15:52 UTC
README
RestApi library makes it easy to interact with your data on Vtiger Cloud.
Reference: https://www.vtiger.com/docs/rest-api-for-vtiger
Setup
You will need to know the domain of your Vtiger Cloud instance along with your login username and accesskey allocated for the same.
$restapi = new \Vtiger\Cloud\RestApi($domain, $username, $accesskey);
Types
$types = $restapi->listTypes();
Create Record
$moduleName = "Accounts";
$newAccount = array(
"accountname" => "Name of Account",
"assigned_user_id" => $restapi->myid()
);
$account = $restapi->create($moduleName, $newAccount);
Find Records
$records = $restapi->query("SELECT * FROM Accounts WHERE createdtime = '2019-01-01';");
Retrieve Record
$id = "target_record_id";
$record = $restapi->retrieve($id);