PHP code example of dibmartins / superlogica

1. Go to this page and download the library: Download dibmartins/superlogica 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/ */

    

dibmartins / superlogica example snippets


try{

     = new \Superlogica\Api('https://api.superlogica.net/v2/financeiro/', 'your_app_token', 'your_access_token');

    $clientes = new \Superlogica\Clientes($api);

    $response = $clientes->post([
        'ST_NOME_SAC'           => 'Acme',
        'ST_NOMEREF_SAC'        => 'Acme LTDA.',
        'ST_DIAVENCIMENTO_SAC'  => '20',
    ]);

    var_dump($response);
}
catch(\Superlogica\Exception $e){
    
    var_dump($e);
}

try{

     = new \Superlogica\Api('https://api.superlogica.net/v2/financeiro/', 'your_app_token', 'your_access_token');

    $clientes = new \Superlogica\Clientes($api);

    $response = $clientes->get(['id' => 1]);

    var_dump($response);
}
catch(\Superlogica\Exception $e){
    
    var_dump($e);
}