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
- Stripe
- Products
- Vendors
- 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
- Vendors
- Webhook Events
- Webhook Subscribers
- Wished Items
- Wishlists
- Zones
List Estimated Shipping Rates
Returns a list of shipping rates for the current cart. The rates given are only estimates and can vary from the final shipping rates.
curl --request GET \
--url https://demo.spreecommerce.org/api/v2/storefront/cart/estimate_shipping_rates \
--header 'X-Spree-Order-Token: <api-key>'
{
"data": [
{
"id": null,
"type": "shipping_rate",
"attributes": {
"name": "UPS Ground (USD)",
"selected": true,
"cost": "5.0",
"tax_amount": "0.0",
"final_price": "5.0",
"shipping_method_id": "1",
"display_cost": "$5.00",
"display_final_price": "$5.00",
"display_tax_amount": "$0.00",
"free": false
},
"relationships": {
"shipping_method": {
"data": {
"type": "shipping_method",
"id": "1"
}
}
}
},
{
"id": null,
"type": "shipping_rate",
"attributes": {
"name": "UPS Two Day (USD)",
"selected": false,
"cost": "10.0",
"tax_amount": "0.0",
"final_price": "10.0",
"shipping_method_id": "2",
"display_cost": "$10.00",
"display_final_price": "$10.00",
"display_tax_amount": "$0.00",
"free": false
},
"relationships": {
"shipping_method": {
"data": {
"id": "2",
"type": "shipping_method"
}
}
}
},
{
"id": null,
"type": "shipping_rate",
"attributes": {
"name": "UPS One Day (USD)",
"selected": false,
"cost": "15.0",
"tax_amount": "0.0",
"final_price": "15.0",
"shipping_method_id": "3",
"display_cost": "$15.00",
"display_final_price": "$15.00",
"display_tax_amount": "$0.00",
"free": false
},
"relationships": {
"shipping_method": {
"data": {
"id": "3",
"type": "shipping_method"
}
}
}
}
]
}
Authorizations
Order token to authorize Cart and Checkout requests.
Query Parameters
Pass country ISO or ISO3 symbol to get estimations for this destination. If no code is passed we'll try to use Cart shipping address country or the default Country for the current Store.
"USA"
Specify the fields you would like returned in the response body. More information.
Response
"1"
"USPS Ground"
true
Price of the service without discounts applied
"10.0"
Eligible tax for service (if any)
"0.0"
ID of a Shipping Method. You will need this for the Checkout Update action
1
Price to be presented for the Customer
"10.0"
"$10.00"
"$10.00"
"$0.00"
Indicates if the Shipping Rate is free, eg. when Free shipping promo applied to Cart
true
curl --request GET \
--url https://demo.spreecommerce.org/api/v2/storefront/cart/estimate_shipping_rates \
--header 'X-Spree-Order-Token: <api-key>'
{
"data": [
{
"id": null,
"type": "shipping_rate",
"attributes": {
"name": "UPS Ground (USD)",
"selected": true,
"cost": "5.0",
"tax_amount": "0.0",
"final_price": "5.0",
"shipping_method_id": "1",
"display_cost": "$5.00",
"display_final_price": "$5.00",
"display_tax_amount": "$0.00",
"free": false
},
"relationships": {
"shipping_method": {
"data": {
"type": "shipping_method",
"id": "1"
}
}
}
},
{
"id": null,
"type": "shipping_rate",
"attributes": {
"name": "UPS Two Day (USD)",
"selected": false,
"cost": "10.0",
"tax_amount": "0.0",
"final_price": "10.0",
"shipping_method_id": "2",
"display_cost": "$10.00",
"display_final_price": "$10.00",
"display_tax_amount": "$0.00",
"free": false
},
"relationships": {
"shipping_method": {
"data": {
"id": "2",
"type": "shipping_method"
}
}
}
},
{
"id": null,
"type": "shipping_rate",
"attributes": {
"name": "UPS One Day (USD)",
"selected": false,
"cost": "15.0",
"tax_amount": "0.0",
"final_price": "15.0",
"shipping_method_id": "3",
"display_cost": "$15.00",
"display_final_price": "$15.00",
"display_tax_amount": "$0.00",
"free": false
},
"relationships": {
"shipping_method": {
"data": {
"id": "3",
"type": "shipping_method"
}
}
}
}
]
}