Whats the best way to get the delivery API for a custom section

Whats the best way to get the delivery API for a custom section

Kreeveyates
Shopify Partner
17 0 3

Hello,

I am attempting to create a section to add onto our product pages which will allow our customers to calculate their delivery cost before adding the product to their cart.

I have got the code working how I want it to, however I need the delivery API so that I can get it to show the correct delivery rates that we offer on our store.

Can you tell me what the best way to do this is or is there an app already out there that we can use to do this for us?

Reply 1 (1)

mageplaza-cs
Shopify Partner
551 46 85

Hi @Kreeveyates

I am from Mageplaza - Shopify solution expert.

 

You're on the right track—Shopify doesn’t provide a public "Delivery API" per se, but there are ways to access shipping rates dynamically, either via Shopify’s CarrierService API or third-party apps. Below is a breakdown of the best options:

 

Best Options for Adding Delivery Rate Estimator to Product Pages

1. Use Shopify's CarrierService API (Custom App)
This is the most native and customizable solution if you're building it yourself.

Overview:

  • The CarrierService API returns shipping rates during checkout.
  • You can use it in a Shopify Plus store, or any plan with Carrier Calculated Shipping enabled (can be added to Advanced plan or higher, or for ~$20/mo on lower-tier plans).
  • You must create a custom app that provides the rates via a server endpoint.

How It Works:

  1. Create a custom app with an endpoint that receives a POST request from Shopify.
  2. Register a CarrierService in Shopify via the Admin API.
  3. Shopify calls your app with the delivery address + cart info.
  4. Your app returns available rates as JSON.
  5. Use JavaScript on the product page to call your app and display the rates.

Requirements:

  • Carrier Calculated Shipping enabled.
  • Custom app hosting (Node.js, PHP, etc.).
  • Admin API permissions.

2. Use a Third-Party App (No Code Needed)
If you want a simpler route, here are the top apps that let customers estimate shipping on product pages:

Shipping Rates Calculator Plus by Code Black Belt

  • Highly rated and customizable.
  • Adds a shipping estimator widget to product/cart pages.
  • Works without needing to build an API.

App Link

Estimated Shipping Cost by Websyms

  • Another popular app with live shipping rate estimates.
  • Can be styled and embedded easily.
  • Supports international rates too.

App Link

 

Notes if You're Building It Yourself
If you're pulling rates before the checkout, there's no official Storefront API support to get shipping rates (Shopify restricts this to prevent misuse). So you either:

  • Use a backend app with the CarrierService API, or
  • Use a proxy through the cart or checkout (less ideal and fragile).

Recommendation:

  • If you're comfortable with code and have Carrier Calculated Shipping: Build a custom app using CarrierService API.
  • If you want fast setup and no code: Use Shipping Rates Calculator Plus app.

Please let me know if it works as expected!

Best regards!

Mageplaza | Top-Rated Shopify Agency | Trusted by 230,000+ worldwide merchants


If our suggestion works for you, please give it a Like or mark it as a Solution!


Should you have any questions or concerns, feel free to contact us via consultant@mageplaza.com