PHP code example of zephia / pilot-api-client
1. Go to this page and download the library: Download zephia/pilot-api-client 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/ */
zephia / pilot-api-client example snippets
$config = [
'app_key' => 'PILOT_APP_KEY',
'debug' => true
];
$client = new Zephia\PilotApiClient\Client\PilotApiClient($config);
$lead_data = new \Zephia\PilotApiClient\Model\LeadData([
'contact_type_id' => 1,
'business_type_id' => 1,
'suborigin_id' => "FFFF0000",
'firstname' => 'John',
'lastname' => 'Doe',
'phone' => '+543512345678',
'email' => '[email protected]'
]);
// or programatically
$lead_data = (new \Zephia\PilotApiClient\Model\LeadData())
->setContactTypeId(1)
->setBusinessTypeId(1)
->setSuboriginId("FFFF0000")
->setFirstname("John")
->setLastname("Doe")
->setPhone("+543512345678")
->setEmail("[email protected]");
$client->storeLead($lead_data);
// Returns API response object.