Priority1 LTL Freight¶
Priority1 LTL freight rate quotes with pallet calculation, carrier filtering, per-product freight class, hazmat, and NMFC support. Priority1 is a freight broker: one quote request returns competing carrier quotes identified by SCAC code, and Vectis maps each valid quote to a checkout rate option. Use this extension when you ship heavy or palletized orders that need live less-than-truckload freight pricing at checkout.
At a glance
| Extension id | priority1 |
| Category | Shipping |
| Version | 0.2.0 |
| Provides | Shipping rate calculator strategy (priority1), admin GraphQL queries and mutations, product trait seeding, carrier-method seeding |
| External account | Priority1 account with API key (obtained from your Priority1 account representative) |
What It Provides¶
- Live LTL rate quotes — registers a
ShippingCalculatorStrategynamedpriority1that calls the Priority1 v2 API (POST /v2/ltl/quotes/rates,X-API-KEYauth) and returns one rate per valid broker carrier quote, sorted by price. Rate names render as<Carrier> LTL (<n> days)when transit days are known. - Pallet calculation — converts cart items into Priority1 pallet line items in three modes:
simple(aggregate by weight with volume-based stack height),per_product_dims(also splits when an item exceeds the pallet footprint), andcubbing(3D bin-packing via the platform cubing engines, falling back to simple mode on failure). - Per-product freight data via traits — on activation the extension seeds four product trait definitions: LTL Freight Class (enum, NMFC classes 50–500), LTL Hazardous Material (boolean), NMFC Item Code, and NMFC Sub Code. Values assigned to products flow into the pallet line items.
- Suggested freight class — an optional
freight_class_strategymode that callsPOST /v2/ltl/quotes/suggestedclassper item, using weight and dimensions. - Accessorial services — liftgate, residential, limited-access, and appointment delivery (API codes
LGDEL,RESDEL,LTDDEL,APPT) are forwarded when the quote request carries accessorial codes, and thepriority1AccessorialPricingGraphQL query computes the per-accessorial price delta against a base quote. - GraphQL admin operations — queries
priority1Statusandpriority1AccessorialPricing; mutationstestPriority1Connection(single test quote) anddiscoverPriority1Carriers(test quotes across 7 US routes to collect available carrier SCAC codes, merged with the built-inKNOWN_LTL_CARRIERSregistry). - Carrier-method seeding — a
seed_carrier_methodshook runs on every provider save: it creates oneShippingMethodper SCAC inallowed_carriers(display name fromKNOWN_LTL_CARRIERS), re-enables previously disabled ones, and disables — rather than deletes — methods whose SCAC was removed, preserving zone assignments and audit trail.
Setup¶
- Create (or edit) a shipping provider with carrier code
priority1under Settings > Shipping > Providers & Methods. - Enter the API key from your Priority1 account representative and choose the environment (
dev=https://dev-api.priority1.com,live=https://api.priority1.com). - Click Test Connection — this runs the
testPriority1Connectionmutation, which validates the key with a single test quote. - Click Discover Carriers to run
discoverPriority1Carriers, then pick the SCACs you want offered via theallowed_carrierscheckbox picker (blank = all carriers). - Optionally assign the LTL Freight Class, LTL Hazardous Material, and NMFC traits to individual products; products without a freight class trait use the configured
default_freight_class.
See Shipping & Fulfillment for how carrier strategies, zones, and methods fit together.
Configuration Reference¶
This extension declares no manifest config_schema. All settings live in the shipping provider's config (the ShippingProvider.config column for the provider whose carrier code is priority1), edited from Settings > Shipping > Providers & Methods. The keys read by the extension:
| Key | Type | Default | Description |
|---|---|---|---|
api_key |
string | (required, secret) | Priority1 API key; no rates are returned without it |
environment |
string | "dev" |
dev or live API endpoint |
api_timeout |
integer | 30 |
API timeout in seconds |
freight_class_strategy |
string | "per_product" |
global_default, per_product, or suggested |
default_freight_class |
string | "70" |
NMFC freight class fallback |
pallet_mode |
string | "simple" |
simple, per_product_dims, or cubbing |
pallet_length |
number | 48 |
Pallet length in inches |
pallet_width |
number | 40 |
Pallet width in inches |
max_pallet_weight |
number | 2500 |
Max weight per pallet (lbs, includes tare) |
pallet_tare_weight |
number | 45 |
Empty pallet weight (lbs) |
pallet_min_weight |
number | 0 |
Minimum pallet weight sent to the API (0 = none) |
pallet_min_height |
number | 0 |
Minimum pallet height sent to the API (0 = deck height + 1") |
max_pallet_height |
number | 94 |
Max stack height in inches |
min_weight |
number | 0 |
Minimum cart weight (lbs) before LTL rates are offered (0 = always) |
max_rates |
integer | 0 |
Max carrier rates shown, cheapest first (0 = all) |
transit_days_padding |
integer | 0 |
Extra days added to the displayed transit time |
allowed_carriers |
string | "" |
Comma-separated SCAC codes (blank = all) |
fallback_enabled |
boolean | false |
Show a flat fallback rate when the API fails or returns no quotes |
fallback_rate |
number | 0 |
Fallback rate amount |
fallback_label |
string | "LTL Freight Shipping" |
Fallback rate label |
When pallet_mode is cubbing, the provider's packing configuration (ShippingProvider.packing_config, e.g. engine: vectis_3d) is merged in and drives the bin-packing engine.
For local development the extension falls back to the PRIORITY1_API_KEY and PRIORITY1_ENVIRONMENT environment variables when no enabled provider row carries an api_key.
Operational Notes¶
- Response caching — successful API responses are cached in Valkey for 10 minutes, keyed on a hash of the request path and body, to reduce API calls during checkout rate recalculation. If Valkey is unavailable, calls go straight to the API.
- Pickup date — computed as the next business day in the
America/Phoenixtimezone: a weekday before 3 PM quotes same-day pickup, otherwise the next weekday. - Fallback behaviour — API errors (including 401 invalid key, 403, and 429 rate-limit responses), empty quote lists, and fully filtered carrier lists all fall back to the single flat rate when
fallback_enabledis set andfallback_rateis greater than 0; otherwise no LTL rates are offered. - Freight class aggregation — when multiple items share a pallet, the pallet is quoted at the highest (most expensive) freight class among its items; a pallet containing any hazmat-flagged item is quoted as hazardous.
- Zero-weight items — items without weight log a warning and make the pallet estimate inaccurate; give LTL products real weights.
transit_days_paddingonly changes the displayed method name (e.g. "3 days" becomes "5 days"); the underlying estimate fields keep the carrier's transit days.suggestedfreight-class strategy cost — it makes onesuggestedclassAPI call per cart item that has no per-product freight class trait (responses are cached like rate calls).