Australian Post (AusPost) Driver
This is a driver for the Australian Post API. Check out the repository on GitHub for more information.
Installation
First, install the AusPost driver via the Composer package manager:
shell
composer require parceltrap/driver-auspost
composer require parceltrap/driver-auspost
Configuration
In your config/parceltrap.php
configuration file, add the following to the drivers
key:
php
'auspost' => [
'api_key' => env('PARCELTRAP_AUSPOST_API_KEY'),
'password' => env('PARCELTRAP_AUSPOST_PASSWORD'),
'account_number' => env('PARCELTRAP_AUSPOST_ACCOUNT_NUMBER'),
],
'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.
Usage
php
$driver = \ParcelTrap\Facades\ParcelTrap::driver('auspost');
$driver->find('7XX1000634011427'); // ParcelTrap\DTOs\TrackingDetails
$driver = \ParcelTrap\Facades\ParcelTrap::driver('auspost');
$driver->find('7XX1000634011427'); // ParcelTrap\DTOs\TrackingDetails