Shipping Rates API?

Shipping Rates API?

harpstcg
Shopify Partner
8 0 3

Hello, just curious if there is any API to request the rate info for Shopify Shipping? I am trying to make the rates displayed at checkout actually accurate accounting for the box sizes I have and the weight of items but I cannot find a way to request the rates from shopify.

Replies 5 (5)

Kudosi-Carlos
Explorer
246 25 113

Hello @harpstcg 

There’s no Admin REST call that just returns “here are the live shipping rates” outside of the checkout flow or a CarrierService callback—Shopify offloads that to the storefront layer or to your custom service. But you have two ways to surface accurate, box-and-weight–based rates:

 

1. Use the Storefront GraphQL API
You can simulate a checkout via the Storefront API, then pull back the available shipping rates exactly as they’d appear at checkout:

  • Create a checkout (mutation): include your line items (with weight) and shipping address.
  • Query checkoutShippingRates for that checkout ID:

{
checkoutShippingRates(checkoutId: "gid://shopify/Checkout/…") {
ready
shippingRates {
handle
title
priceV2 { amount, currencyCode }
}
}
}

  • That returns Shopify Shipping (and carrier-calculated) rates in real time.

2. Build a Custom CarrierService App
If you need full control over box sizes and packing logic, register a CarrierService via the Admin API. Shopify will POST each rate request to your app, where you:

  • Define your packaging rules (one package per item or custom bundle packs).
  • Fetch UPS/USPS/other carrier rates using their APIs with your credentials and your box dimensions.
  • Respond to Shopify with a JSON list of rates, and Shopify will show those live at checkout alongside any built-in rates.
- Was this helpful? Click Like or Mark as Solution to support the community.
- Kudosi Product Reviews – Instantly import high-quality reviews from AliExpress, Amazon, eBay, Etsy, Temu and anywhere you want. Build trust fast, boost conversions, and kickstart your sales.
Start free trial
harpstcg
Shopify Partner
8 0 3

Unfortunately not very helpful, #1 doesnt solve anything as the rates it displays would be the same available at checkout already and doesnt factor in accurate box dimensions since Shopify only uses 1 box as if you can ship anything on planet earth in it. And #2 means I have to use some other carrier app to calculate rates and the prices might be (and are) different than whatever else you use, not to mention they are slow to return rates compared to whatever magic Shopify does that returns rates quickly.

kate_finiship
Visitor
2 0 0

Have you tried using a third-party shipping app for exact/very accurate shipping quotes during the process? Are you exclusively shipping through the Shopify option?

harpstcg
Shopify Partner
8 0 3

I do use a 3rd party to calculate the rates right now given how unreliable the built in system is for giving accurate rates.

 

But Shopify Shipping has way better rates when it comes to FedEx than any 3rd party shipping platform out there. I have tried to figure out what the Shopify discount rate might be to calculate it on my own but it varies quite a lot even within the same shipping zone that I dont have anything perfect to calculate the rate and just have to guess that ground delivery is roughly 65% of retail rate and express is between 50-20% of retail depending on how expensive the retail rate is. Not to mention using a 3rd party app to display rates takes quite a bit longer to load than the built in system. Ultimately I would prefer shopify to join the 21st century and fix their app but I assume they wont so I at least want to pull their rates from an api.

kate_finiship
Visitor
2 0 0

If I can figure out how to reach out on here, I'll send you a PM. We have our own shipping app (FINISHIP) in the app store and think it would solve all your issues with the benefit of being much more affordable for you, especially on express shipping.