Storefront API
- Authentication
- Account
- Account / Address
- Account / Credit Cards
- Account / Orders
- Order Status
- Cart
- Cart / Line Items
- Cart / Other
- Cart / Coupons
- Checkout
- Checkout / State
- Checkout / Shipments
- Checkout / Payments
- Checkout / Store Credit
- Products
- Stores
- Taxons
- Countries
- CMS Pages
- Menus
- Wishlists
- Wishlists / Wished Items
- Digital Downloads
Platform API
- Authentication
- Addresses
- Adjustments
- Classifications
- CMS Pages
- CMS Sections
- Countries
- Data Feeds
- Digital Links
- Digital Assets
- Line Items
- Menu Items
- Menus
- Option Types
- Option Values
- Orders
- Payment Methods
- Payments
- Products
- Promotion Actions
- Promotion Categories
- Promotion Rules
- Promotions
- Roles
- Shipments
- Shipping Categories
- Shipping Methods
- States
- Stock Items
- Stock Locations
- Store Credit Categories
- Store Credit Types
- Store Credits
- Tax Categories
- Tax Rates
- Taxonomies
- Taxons
- Users
- Variants
- Webhook Events
- Webhook Subscribers
- Wished Items
- Wishlists
- Zones
List Shipping Rates
Returns a list of available shipping rates for the checkout.
Shipping rates are grouped against shipments. Each checkout can have multiple shipments. Some products are in stock and will be shipped immediately, while others might be back-ordered and sent later.
curl --request GET \
--url https://demo.spreecommerce.org/api/v2/storefront/checkout/shipping_rates \
--header 'X-Spree-Order-Token: <api-key>'
{
"data": [
{
"id": "3",
"type": "shipment",
"attributes": {
"number": "H97593072360",
"final_price": "5.0",
"display_final_price": "$5.00",
"state": "pending",
"shipped_at": null,
"tracking_url": null,
"free": false
},
"relationships": {
"shipping_rates": {
"data": [
{
"id": "10",
"type": "shipping_rate"
},
{
"id": "11",
"type": "shipping_rate"
},
{
"id": "12",
"type": "shipping_rate"
}
]
},
"stock_location": {
"data": {
"id": "1",
"type": "stock_location"
}
}
}
}
],
"included": [
{
"id": "10",
"type": "shipping_rate",
"attributes": {
"name": "UPS Ground (USD)",
"selected": true,
"final_price": "5.0",
"display_final_price": "$5.00",
"cost": "5.0",
"display_cost": "$5.00",
"tax_amount": "0.0",
"display_tax_amount": "$0.00",
"shipping_method_id": 1,
"free": false
}
},
{
"id": "11",
"type": "shipping_rate",
"attributes": {
"name": "UPS Two Day (USD)",
"selected": false,
"final_price": "10.0",
"display_final_price": "$10.00",
"cost": "10.0",
"display_cost": "$10.00",
"tax_amount": "0.0",
"display_tax_amount": "$0.00",
"shipping_method_id": 2,
"free": false
}
},
{
"id": "12",
"type": "shipping_rate",
"attributes": {
"name": "UPS One Day (USD)",
"selected": false,
"final_price": "15.0",
"display_final_price": "$15.00",
"cost": "15.0",
"display_cost": "$15.00",
"tax_amount": "0.0",
"display_tax_amount": "$0.00",
"shipping_method_id": 3,
"free": false
}
},
{
"id": "1",
"type": "stock_location",
"attributes": {
"name": "default"
}
}
]
}
Authorizations
Order token to authorize Cart and Checkout requests.
Response
Unique Shipment identifier
Indicates if the Shipping Rate is free, eg. when Free shipping promo applied to Cart
Price to be presented for the Customer
Tracking URL to the service provider website
Status of the Shipment. For a list of all available statuses please refer: <a href="/developer/core-concepts/shipments" target="_blank" rel="noopener"> Shipment section in Spree Guides </a>
pending
, ready
, shipped
, canceled
Date when Shipment was being sent from the warehouse
Price of the service without discounts applied
Eligible tax for service (if any)
ID of a Shipping Method. You will need this for the Checkout Update action
Price to be presented for the Customer
Indicates if the Shipping Rate is free, eg. when Free shipping promo applied to Cart
Was this page helpful?
curl --request GET \
--url https://demo.spreecommerce.org/api/v2/storefront/checkout/shipping_rates \
--header 'X-Spree-Order-Token: <api-key>'
{
"data": [
{
"id": "3",
"type": "shipment",
"attributes": {
"number": "H97593072360",
"final_price": "5.0",
"display_final_price": "$5.00",
"state": "pending",
"shipped_at": null,
"tracking_url": null,
"free": false
},
"relationships": {
"shipping_rates": {
"data": [
{
"id": "10",
"type": "shipping_rate"
},
{
"id": "11",
"type": "shipping_rate"
},
{
"id": "12",
"type": "shipping_rate"
}
]
},
"stock_location": {
"data": {
"id": "1",
"type": "stock_location"
}
}
}
}
],
"included": [
{
"id": "10",
"type": "shipping_rate",
"attributes": {
"name": "UPS Ground (USD)",
"selected": true,
"final_price": "5.0",
"display_final_price": "$5.00",
"cost": "5.0",
"display_cost": "$5.00",
"tax_amount": "0.0",
"display_tax_amount": "$0.00",
"shipping_method_id": 1,
"free": false
}
},
{
"id": "11",
"type": "shipping_rate",
"attributes": {
"name": "UPS Two Day (USD)",
"selected": false,
"final_price": "10.0",
"display_final_price": "$10.00",
"cost": "10.0",
"display_cost": "$10.00",
"tax_amount": "0.0",
"display_tax_amount": "$0.00",
"shipping_method_id": 2,
"free": false
}
},
{
"id": "12",
"type": "shipping_rate",
"attributes": {
"name": "UPS One Day (USD)",
"selected": false,
"final_price": "15.0",
"display_final_price": "$15.00",
"cost": "15.0",
"display_cost": "$15.00",
"tax_amount": "0.0",
"display_tax_amount": "$0.00",
"shipping_method_id": 3,
"free": false
}
},
{
"id": "1",
"type": "stock_location",
"attributes": {
"name": "default"
}
}
]
}