PHP code example of itbmedia / kund24-api-php
1. Go to this page and download the library: Download itbmedia/kund24-api-php 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/ */
itbmedia / kund24-api-php example snippets
nt = new \Kund24\Api\Client(YOUR_ACCOUNT_ID, 'YOUR_API_KEY');
$contact = new \Kund24\Api\Models\Contact();
$contact->setEmail('[email protected]')
->setFirstName('Fredrik')
->setLastName('Bengtsson')
->setCompany('ITB Media')
->addMetafield(new \Kund24\Api\Models\ContactMetafield('favorite_food', 'pizza'));
;
$deal = new \Kund24\Api\Models\Deal();
$deal->setValue(500)
->setTitle('Lead från hemsida')
->setSource('Hemsida')
->setStage('Leads')
->setContact($contact)
;
$deal = $client->createDeal($deal);