Obtain an OAuth 2.0 Bearer token from the UPS Developer Portal
POST to /api/rating/v2409/Rate; include Package.PackageWeight with actual weight and Package.Dimensions with length, width, height and 'UnitOfMeasurement' (IN or CM)
The UPS Rating API calculates billable weight automatically by computing dimensional weight (length × width × height / divisor, where divisor is 139 for inches) and comparing it to actual weight; the higher value is billed
Read 'RatedPackage.BillingWeight' in the response to see the billable weight used; compare it to your actual weight to understand any dimensional surcharge before committing to a label
Use the response to compare service levels and their associated BillingWeight-based charges to select the most cost-effective option
Known gotchas
The dimensional weight divisor varies by carrier and service (UPS uses 139 for domestic, international may differ); do not hardcode the divisor — read the 'BillingWeight' field from the API response instead of computing it client-side
Large package surcharges apply automatically when any single dimension exceeds UPS thresholds (typically 96 inches or girth + length > 130 inches); the surcharge appears as an additional fee in 'RatedPackage.ItemizedCharges'
UPS OAuth 2.0 is required; legacy access-key authentication has been retired since June 2024
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp