This is a driver for the Australian Post API. Check out the repository on GitHub for more information.
First, install the AusPost driver via the Composer package manager:
composer require parceltrap/driver-auspostIn your config/parceltrap.php configuration file, add the following to the drivers key:
'auspost' => [
'api_key' => env('PARCELTRAP_AUSPOST_API_KEY'),
'password' => env('PARCELTRAP_AUSPOST_PASSWORD'),
'account_number' => env('PARCELTRAP_AUSPOST_ACCOUNT_NUMBER'),
],You can get these details by registering for
the Shipping & Tracking API. To find out more, visit
the Track Items API reference.
This documentation page also shows the raw AusPost-specific data that can be found in the returned TrackingDetails
DTO.
$driver = \ParcelTrap\Facades\ParcelTrap::driver('auspost');
$driver->find('7XX1000634011427'); // ParcelTrap\DTOs\TrackingDetails