Obtain an OAuth 2.0 bearer token from UPS and call the Rating API to get shipping rates

domain: developer.ups.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. POST client credentials (client_id, client_secret) to https://onlinetools.ups.com/security/v1/oauth/token with grant_type=client_credentials to receive a bearer token
  2. Cache the token with its expires_in value and refresh proactively before expiry
  3. Build a Rating request JSON body with shipment origin, destination, package weight/dimensions, and desired service code
  4. POST to https://onlinetools.ups.com/api/rating/v1/Shop (or /Rate for a single service) with Authorization: Bearer <TOKEN>
  5. Parse the RatedShipment array from the response, extracting TotalCharges for each service option
  6. For sandbox testing, replace the base URL with https://wwwcie.ups.com/api/rating/v1/Shop

Known gotchas

Related routes

Retrieve UPS shipment rates for a domestic parcel using the UPS Rating REST API with OAuth 2.0
logistics/shipping · 6 steps · unrated
Obtain a FedEx OAuth 2.0 access token and call the FedEx Rate API to compare service-level rates for a domestic shipment
developer.fedex.com · 5 steps · unrated
Connect your own UPS negotiated-rate account to EasyPost via the CarrierAccount API using the OAuth 2.0 MFA flow
docs.easypost.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans