This is a driver for the USPS API. Check out the repository on GitHub for more information.
First, install the USPS driver via the Composer package manager:
composer require parceltrap/driver-uspsIn your config/parceltrap.php configuration file, add the following to the drivers key:
'usps' => [
'api_key' => env('PARCELTRAP_USPS_API_KEY'),
'source_id' => env('PARCELTRAP_USPS_SOURCE_ID', env('APP_NAME')),
],You can get these details by registering for the USPS API. To find
out more, visit the Track & Confirm API reference.
This documentation page also shows the raw USPS-specific data that can be found in the returned TrackingDetails DTO.
$driver = \ParcelTrap\Facades\ParcelTrap::driver('usps');
$driver->find('XXXXXXXXXXXXXXXXXX'); // ParcelTrap\DTOs\TrackingDetails