PHP code example of sch-group / 17track

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

    

sch-group / 17track example snippets


$apiKey = ''; // your api key

$trackNumber = ''; // Your track number

$trackingConnector = new TrackingConnector($apiKey);

$isReggiestered = $trackingConnector->register($trackNumber);

$isStopped = $trackingConnector->stopTracking($trackNumber);

$isRetracked = $trackingConnector->reTrack($trackNumber);

$isChanged = $trackingConnector->changeCarrier($trackNumber, $newCarrierId);


$trackNumbers = [[
     'number' => $trackNumber,
     'carrier' => $carrier
  ],
  [
     'number' => $trackNumberSecond,
     'carrier' => null
]];
 
$trackNumbersHistories =  $trackingConnector->getTrackInfoMulti($trackNumbers);