PHP code example of schoppax / gel-php

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

    

schoppax / gel-php example snippets




ey = 'api-key';
$depotNr = 0;
$knr = 0;
$test = true;
$gel = new mehrWEBnet\Gel\Gel($apiKey, $depotNr, $knr, $test);

// Modify Shipment By SNR
// var_dump($gel->shipments()->modify('snr', [parameters]));

// List all carriers
// var_dump($gel->shipmentQuotes()->create([parameters]));

try {
    var_dump($gel->shipments()->create([
        'sname1'    => 'company name',
        'sname1'    => 'first name',
        'sname2'    => 'lastname',
        'sstreet'   => 'street',
        'scountry'  => 'D',
        'szipcode'  => 'zip_code',
        'stown'     => 'city',
        'cname1'    => 'name',
        'cstreet'   => 'street',
        'ccountry'  => 'D',
        'ctown'     => 'city',
        'srv'       => '2',
        'xsrv>'     => 'A',
        'collicnt'  => 'int',
        'colli'     => '|weight|length|width|height', // in cm
        'avis'      => 'phone',
        'atype'    => 'A3',
        'email'    => 'mail',
        'rcall'    => ''
    ]));    
} catch(GuzzleHttp\Exception\ClientException $t) {
    var_dump($t);
}