UPS Shipping¶
The ext_ups extension adds UPS as a shipping carrier: it registers a rate-quote
strategy under the carrier code ups and quotes five UPS service levels at
checkout. It ships with a live UPS Rating API client plus a built-in
weight-based fallback rate table, and auto-seeds the five service methods when
you create a UPS shipping provider. Use it when you want UPS Ground and Air
service levels offered as checkout shipping options.
At a glance
| Extension id | ups |
| Category | shipping |
| Version | 0.0.1 |
| Provides | Shipping carrier strategy (ups), carrier method auto-seeding |
| External account | None currently usable — a UPS Rating API client exists, but no configuration surface supplies credentials (see Operational notes) |
What It Provides¶
-
A
ShippingCalculatorStrategyregistered asups(see Building Extensions for the strategy surface). It quotes five services:Method code Service UPS code Est. days groundUPS Ground 03 3–5 3_day_selectUPS 3 Day Select 12 3 2nd_day_airUPS 2nd Day Air 02 2 next_day_air_saverUPS Next Day Air Saver 13 1 next_day_airUPS Next Day Air 01 1 -
Carrier method auto-seeding — creating a shipping provider with carrier code
upsseeds all five methods above as live-rate methods (no flat rate set), so they are dispatched to the strategy at quote time. - Quotes surface through the storefront
shippingRatesForCheckoutGraphQL query, which routes every zone-assigned method without a flat rate to the carrier strategy matching the provider's carrier code.
Setup¶
- Once installed (or dev-linked in development), the extension is
discovered at startup via its
upsentry point. Per-channel enablement is managed under Settings > Extensions. - Create a provider under Settings > Shipping > Providers with carrier
code
ups(the admin form maps the extension to this carrier code and pre-fills the five default methods). Creating the provider auto-seeds the methods; this requires thesettings.editpermission. - Assign the seeded methods to shipping zones under Settings > Shipping > Zones — only enabled methods assigned to an enabled zone are quoted.
- Optionally scope the provider to specific channels and set per-method rate adjustments (fixed amount and/or percent). See Shipping & Fulfillment for the provider / zone / method model.
Configuration Reference¶
The manifest declares no config_schema; there are no extension-level
settings. Carrier setup lives on the shipping provider and its methods under
Settings > Shipping > Providers (method enablement, estimated days, rate
adjustments). The strategy class accepts api_key and account_number
constructor parameters, but no configuration path currently populates them —
see the warning below.
Operational Notes¶
Live rates are not currently wired to credentials
The strategy is instantiated at boot with empty credentials, and no admin
or provider configuration feeds an API key into it. The live UPS Rating
API path is therefore unreachable in practice: all quotes come from the
built-in fallback table. The live client (POST
https://onlinetools.ups.com/api/rating/v2403/Rate, Bearer-token auth,
10-second timeout) only runs when an API key is present, and any API
failure logs a warning and falls back.
- Fallback rate table — base rate =
8.99 + 0.50 × total package weight, then per service: Ground ×1.0, 3 Day Select ×1.4, 2nd Day Air ×2.0, Next Day Air ×3.5. UPS Next Day Air Saver has no fallback row, so that method returns no quote while credentials are unwired. - Seeding is create-time only —
seed_carrier_methodsshort-circuits when the provider already has any methods; deleted methods are not re-created on save. - Rate adjustments apply per method to live quotes too:
final = base + amount + base × percent / 100, floored at 0. - No prepaid-label purchase — the strategy does not implement
purchase_label, so return-label flows (RMA) cannot use it.
Source: ext_ups/extension.py — in the enterprise-extensions repo.