DashForDevsDocs
DocsNewsAPI v1
dashfordevs.comSign in

© 2026 DashForDevs

DocsNewsdashfordevs.comLegalStatus
DocsShippingShipping Rates
Introduction
Getting Started
Authentication
Products
Categories
Cart
Checkout
Blog
Reviews
Webhooks
Customers
Orders
Inventory
Shipping
Shipping RatesGenerate LabelsTrackingShipping Locations
Discounts
Affiliates
Email
Media & Files
Analytics & Tracking
Locations
Tax
Global Data
SEO
Error Handling
Geography
Finance
Automations
Page Types
Surveys
Billing & Subscriptions
Storefront Payments
SDK Reference
REST API
Storefront Architecture
Notifications
Security
Team & Permissions
Migrations & Import
Calendar & Appointments
Contact Forms
AI Bots
Dashboard API
Deployment
Changelog
Troubleshooting
Recipes
CLI & Deployment
Image Pipeline
White-label Platforms
Records Engine
Platform Modules
Platform Security
Site Keys & Client Sites
Use Cases
Operations

Shipping Rates

Calculate shipping rates for an order.

Updated September 8, 2026

On this page
  • Overview
  • SDK Usage
  • Get Cheapest or Fastest Rate
  • Free Shipping Check
  • Parameters
  • REST API
  • Next Steps

Overview

Fetch real-time shipping rate quotes from the organization's active shipping provider — a direct UPS or FedEx account, or ShipStation (which brokers rates from whatever carriers are connected in the merchant's ShipStation account).

SDK Usage

typescript
import dash from "@/lib/dash"

const { rates } = await dash.shipping.getRates({
  to_postal: "78701",
  to_state: "TX",
  to_country: "US",
  weight_oz: 5.0,
})

// rates = [
//   { serviceName: "UPS Ground", carrierCode: "ups", shipmentCost: 8.50, transitDays: 5 },
//   { serviceName: "FedEx 2Day", carrierCode: "fedex", shipmentCost: 12.99, transitDays: 2 },
// ]
// (carrierCode reflects the org's active provider: "ups", "fedex", or whatever carrier ShipStation used)

Get Cheapest or Fastest Rate

typescript
// Cheapest option
const { rate } = await dash.shipping.getCheapestRate({
  to_postal: "78701",
  weight_oz: 5.0,
})

// Fastest option
const { rate } = await dash.shipping.getFastestRate({
  to_postal: "78701",
  weight_oz: 5.0,
})

// Single recommended rate (cheapest or fastest)
const rate = await dash.shipping.getRate({
  to_postal: "78701",
  weight_oz: 5.0,
  prefer: "cheapest",  // or "fastest"
})

Free Shipping Check

typescript
const { qualifies, threshold, remaining } = await dash.shipping.checkFreeShipping("89.99")
// qualifies: true if subtotal meets free shipping threshold
// remaining: amount needed to qualify (e.g., "$10.01")

Parameters

ParameterTypeRequiredDescription
to_postalstringYesDestination postal code
to_statestringNoDestination state
to_countrystringNoDestination country (default: US)
weight_oznumberYesPackage weight in ounces
dimensionsobjectNoPackage dimensions { length, width, height }

REST API

shell
POST /storefront/shipping/rates
X-API-Key: pk_live_your_key
Content-Type: application/json

{
  "to_postal": "78701",
  "to_state": "TX",
  "to_country": "US",
  "weight_oz": 5.0
}

Next Steps

  • Generate Labels — Creating shipping labels
  • Tracking — Package tracking
  • Create Order — Using rates in checkout

Rates, labels and carrier setup are covered from the operator's side in shipping and fulfillment.

PreviousSubscriptions In Your DashboardNextGenerate Labels

On this page

  • Overview
  • SDK Usage
  • Get Cheapest or Fastest Rate
  • Free Shipping Check
  • Parameters
  • REST API
  • Next Steps