PHP code example of webflixtec / sdk-php-rdstation

1. Go to this page and download the library: Download webflixtec/sdk-php-rdstation 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/ */

    

webflixtec / sdk-php-rdstation example snippets


$apiCrmDeals = new \RdStation\Crm\Deals();

$apiCrmDeals->setToken('');

try{
    
    $data = $apiCrmDeals->create([
        "deal" => [
            "deal_stage_id" => "",
            "name" => " 1",
            "user_id" => ""
        ],
        "contacts" => [[
            "name" => " 1",
            "emails" => [[
                'email' => "",
            ]],
            "phones" => [[
                'phone' => "1232313123",
                'type' => 'Celular'
            ]]
        ]],
        "deal_products" => [
            "amount" => 1,
            "price" => 1000000,
            "total" => 1000000,
            "name" => "123131",
            "description" => "771231380 sdasdasd"
        ]
    ]);

    var_dump($data);
    
} catch (\RdStation\Exceptions\RdStationException $ex) {
    var_dump($ex);
}