UPS
Description
UPS integrates Enso products with UPS tracking.
The package stores encrypted UPS credentials and runtime tokens, exposes a settings form, fetches tracking payloads from UPS, persists the latest tracking snapshot per inquiry number, classifies tracking responses into status and group enums, and exposes product-level tracking endpoints for backoffice flows.
Installation
Install the package:
composer require laravel-enso/ups
Run the migrations:
php artisan migrate
Features
- Settings model with encrypted client credentials and cached singleton accessors.
- OAuth token acquisition and refresh through
Services\Token. - Tracking sync service that stores the last UPS response in
UpsTracking. - Product tracking endpoint plus separate settings edit/update endpoints.
- Enum mapping for tracking status and status groups.
- Data upgrade for existing tracking statuses.
Usage
Package routes:
- settings prefix:
api/integrations/ups/settings - product prefix:
api/integrations/ups/products
Endpoints:
GET settingsPATCH settings/{settings}GET products/{product}/tracking
Important classes:
LaravelEnso\Ups\Models\SettingsLaravelEnso\Ups\Models\UpsTrackingLaravelEnso\Ups\Services\TokenLaravelEnso\Ups\Services\Tracking
Helpful settings accessors:
baseUrl()clientId()clientSecret()authToken()authTokenExpiresAt()enabled()
Tracking statuses are represented by:
TrackingStatusTrackingGroup
API
This package exposes its backend integration through the routes, controllers, services, jobs, and configuration points referenced in the usage examples above.
Consumers should rely on the published config keys, documented route groups, and explicit service classes shown in the examples. Internal helper classes, listeners, casts, and background jobs are implementation details unless the README calls them out as extension points.
Depends On
Required Enso packages:
Companion frontend package:
External service dependency:
- UPS OAuth and tracking APIs used for token management and parcel tracking
Contributions
are welcome. Pull requests are great, but issues are good too.
Thank you to all the people who already contributed to Enso!