hotfix/leadfox

PHP library for LeadFox API

1.0.2 2017-02-15 00:51 UTC

This package is auto-updated.

Last update: 2024-10-26 07:00:36 UTC


README

installation via composer:

composer require hotfix/leadfox

Exemple d'utilisation

<?php
include __DIR__. "/vendor/autoload.php";

try {
    $leadFoxAPI = new \Hotfix\LeadFox\Api([
        'key' => '...',
        'secret' => '...'
    ]);
    
    $response = $leadFoxAPI->call('contact/save', [
        'email' => 'apitest@leadfox.co',
        'firstname' => 'Api',
        'lastname' => 'Test',
        'lifecycle' => 'lead',
        'properties' => [
            'test' => 'Test',
            'phone' => '(819) 565-1234'
        ],
        'lists' => [1, 2, 3]
    ]);
} catch (Exception $e) {
    echo $e->getMessage();
    die();
}

$message = $response->message();
if($response->success()) {
    $data = $response->data();
    $log = $response->log();
}