PHP code example of shipmates / shipmates-php

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

    

shipmates / shipmates-php example snippets


\Shipmate\Shipmate::setApiKey('your-api-key');
$deletedConsignment = \Shipmate\Consignment::delete('consignment-reference-number');
echo $deletedConsignment;

\Shipmate\Shipmate::setApiKey('your-api-key');
$attributes = \Shipmate\Parcel::allAttributes();
echo $attributes;

composer