How to fetch shipping options from a Shopify store using the API gem?

I’m working with the Shopify API gem and need to get all the shipping options that are set up for a specific store. At first, I thought this info would be available through the ShopifyAPI::Store object, but I can’t seem to locate the shipping configuration data there.

Has anyone figured out how to access the shipping methods that are configured for a shop through the current API? I’ve been looking through the documentation but haven’t found a clear way to retrieve this information. Any guidance on which endpoint or object I should be using would be really helpful.

I’m specifically trying to get a list of all available shipping methods so I can display them to customers during checkout.

Check out the CarrierService API if you need real-time shipping rates. I found this after dealing with the same headache last year. Use ShopifyAPI::CarrierService.all to grab both Shopify’s internal rates and third-party stuff like UPS or FedEx. You get way more control over rate calculations than the basic zone methods. Just heads up - you’ll need extra scopes in your app permissions for calculated shipping rates from external providers. The docs are kind of all over the place, but it’s great when you need to actually manage shipping options instead of just showing them.

Shopify’s shipping data is scattered across different endpoints, which is annoying. I’ve found the best approach is combining shipping zones with the checkout API when you need real shipping options for customers. Don’t just fetch zones - use ShopifyAPI::Checkout.create with a dummy cart to get actual calculated rates. This includes custom shipping rules and discounts, so you get the exact rates customers see at checkout instead of basic zone configs. Make sure your API version matches your store’s capabilities - older stores might not have delivery profile features. Some shipping methods only appear with real cart data (weight, dimensions), so you’ll need sample product data to get useful results.

You want the shipping rates endpoint. Use ShopifyAPI::ShippingZone.all to grab the shipping zones and their rates. Each zone has the shipping methods for that region. I hit this same problem six months back while building a custom checkout. The delivery profiles thing works too, but shipping zones is easier since it matches how Shopify’s admin panel is set up. Just double-check your API credentials have read permissions for shipping data - otherwise you’ll get empty responses even with correct code.

i had a similar prob! try using the delivery profiles endpoint, like ShopifyAPI::DeliveryProfile.all to get all the shipping methods & zones you need. it worked great for me!

the shipping rates api can b tricky based on ur store setup. for checkout options, just go straight to /admin/api/2023-10/shipping_zones.json. way easier than using gem methods. this helped me a lot when i had the same issue last time.