GoatLabels

Updated

Rates at checkout, labels after payment.

Shipping for custom storefronts: Shopify apps, WooCommerce, headless


A custom storefront needs two things from shipping: a rate to show at checkout and a label once the order is paid. Shopify takes rates through a carrier service callback, WooCommerce through a shipping method class, and a headless checkout calls an API itself. GoatLabels covers both with one REST API.

USPS, UPS and FedEx in one response

DHL joins on international lanes, all without your own carrier accounts.

UPS FedEx DHL USPS DHL: international
Live quotes One rates call.
No carrier accounts Nothing to connect first.
Bearer auth One header, no signing.

A wallet, not a platform fee

Fund a prepaid wallet and the API spends it label by label, the same balance as the dashboard.

VisaMastercardAmerican ExpressDiscover
Prepaid Spent label by label.
No monthly fee on Free, up to 50 a month Staging costs nothing idle.
Pay as you go The bill is the labels.

Free account. No card needed.

Two jobs, four calls

What does a custom storefront need from a shipping API?

Rates at checkout come from POST /v1/rates/quote. It needs only postal_code and country for each end plus the parcel, it creates nothing and does not touch the wallet, and a read-only key can call it. The label comes after payment: POST /v1/shipments creates a draft and returns its rates, POST /v1/shipments/{id}/purchase buys the label from the prepaid wallet, and GET /v1/shipments/{id}/label downloads the file.

The two shipping jobs of a custom storefront and the calls behind them
JobCallKey neededWhat comes back
Rates at checkout POST /v1/rates/quoteread-only is enoughrates[] with carrier, serviceName, displayPrice, deliveryDays
Draft after payment POST /v1/shipmentsfull accessid and rates[]
Buy the label POST /v1/shipments/{id}/purchasefull accesslabelUrl and trackingNumber
Download GET /v1/shipments/{id}/labelread-only is enoughthe label file, normally a PDF

Set to.residential to true for consumer orders. It defaults to false, which means a commercial address, and a home address quoted as commercial is billed the carrier's residential surcharge later as an adjustment. The purchase call also needs the acknowledgements block that the API docs describe. Read the API docs for every field, or see the shipping API for developers for the wider picture.

Updated 2026-11-29

How does Shopify take rates from a custom app?

Shopify's carrier service reference on shopify.dev (API version 2026-10, checked 2026-11-29) describes the mechanism. A carrier service gives Shopify a callback URL. At checkout Shopify POSTs the origin, destination, items, currency and locale to that URL and expects a JSON rates array back. Each rate has service_name, description, service_code, currency and total_price, with the price in subunits.

Not every store can create one. The same page lists who can: stores on Advanced Shopify or higher, stores on the Shopify plan with yearly billing, stores that added the carrier service feature for a monthly fee, and development stores that are not on Basic. The app needs the write_shipping scope.

Inside the callback, your app calls the GoatLabels quote endpoint with the two postal codes and the parcel, then maps each returned rate to one entry in Shopify's rates array. The table shows how long Shopify waits for that answer.

Shopify's time budget for a carrier service callback, from shopify.dev, checked 2026-11-29
RuleWhat Shopify says
Retries None: the callback must answer on the first try.
Read timeout 10 seconds under 1,500 requests a minute, 5 seconds from 1,500 to 3,000, 3 seconds above 3,000.
On a timeout, an error, a 40x or a 50x Backup rates are shown.
Cache Identical requests for 15 minutes after a success and 30 seconds after an error.

Shopify's page also says the REST Admin API has been a legacy API since October 1, 2024; the GraphQL equivalent is the carrierServiceCreate mutation. Shopify's plan prices and the price of the carrier service feature are not compared here. If the store only needs labels for its orders, see shipping labels for Shopify.

How does a WooCommerce shipping method get live rates?

WooCommerce's code reference (checked 2026-11-29) gives three facts. A shipping extension subclasses WC_Shipping_Method. WooCommerce calls its calculate_shipping($package) method. The method registers each price with add_rate().

Inside calculate_shipping the extension calls the quote endpoint and passes each returned rate to add_rate(). For the label side, WooCommerce's REST API docs (checked 2026-11-29) place the REST API under wp-json/wc/v3, with orders at wp-json/wc/v3/orders, which is where your code reads orders before it creates the shipment.

For the label side without code, see shipping labels for WooCommerce and the guide on how to ship WooCommerce orders.

What about a headless checkout?

A headless storefront has no platform callback to fill in. Its own server calls the quote endpoint and the checkout shows the result. Three things belong in that handler.

Your own timeout and a fallback rate

GoatLabels has no checkout component and no SLA. Set a timeout on the quote call and show a fallback rate when it passes, so a slow answer does not block an order.

A short cache

Cache the answer by destination postal code and cart weight for a short time. A shopper who reloads the cart then gets the same rates without a second call.

The two fields a shopper reads

Read displayPrice and deliveryDays from each rate, next to carrier and serviceName. Those four fields are enough to draw a list of shipping options.

The limit is 300 requests a minute per key, and every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers. Over the limit the answer is HTTP 429 with a Retry-After header. A related page: the commercetools shipping integration.

When is the built-in store connection enough?

If the store runs a standard checkout and you only need labels for its orders, you may not need any of this. Shopify, Etsy, WooCommerce, eBay and Wix stores can be connected in the GoatLabels dashboard. Connecting a store is a dashboard action, not an API call. Orders from other channels arrive by CSV or the REST API.

The connection imports orders for label buying: it is not a checkout rate service. To show live carrier rates in your own checkout, you still build one of the three routes above.

Comparing rates across carriers is covered in shipping rate shopping software.

What are the limits?

What GoatLabels does not do for a checkout

  • No checkout component, no published response time and no SLA. The timeout and the fallback rate are yours to build.
  • No official SDK. Generate a client from the OpenAPI 3.1 document or call the REST endpoints directly.
  • USPS, UPS and FedEx on domestic parcels and DHL on international lanes, from US origins only.
  • No own carrier accounts: you cannot connect your own carrier contracts or rates.
  • Free is up to 50 shipments a month and Pro is $40 a month. Quote calls are never counted toward the 50.

If those limits fit, create an account and make a Sandbox key: it runs the same calls against test data, no carrier is booked and nothing is charged.

Shipping for custom storefronts: FAQ

Does GoatLabels have a Shopify app that shows rates at checkout?
No. A Shopify store connects in the GoatLabels dashboard so its orders can be imported for label buying. Checkout rates on a custom app come from your own carrier service, which calls the GoatLabels quote endpoint and returns the rates to Shopify.
Which Shopify plans can use a carrier service?
Shopify's carrier service reference on shopify.dev (checked 2026-11-29) lists four cases: Advanced Shopify or higher, the Shopify plan with yearly billing, stores that added the carrier service feature for a monthly fee, and development stores that are not on Basic. Creating a carrier service fails on any other store.
Can a read-only key fetch rates?
Yes. The quote call is a POST, but it counts as a read, so a read-only key can call it. That lets a checkout server hold a key that cannot buy a label.
What happens if the quote call is slow at checkout?
Shopify does not retry a carrier service callback and shows backup rates on a timeout. GoatLabels publishes no response-time figure and no SLA, so your handler needs its own timeout and a fallback rate to return when the timeout passes.
Is the quoted rate the final price?
Not always. A quote is the live price at that moment, not a promise about the final bill. Carrier adjustments after delivery, such as a re-weigh or a dimension correction, can post to the wallet later.

Related reading: the API docs, the shipping API for developers, shipping labels for Shopify, shipping labels for WooCommerce, how to ship WooCommerce orders, a commercetools shipping integration, shipping rate shopping software, create an account.

Try it with a Sandbox key first.

Quote at checkout.
Buy the label after payment.

Create a Sandbox key, call the quote endpoint from your checkout handler and run the whole flow against test data. No carrier is booked and nothing is charged.

Free account. No card needed.