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"
}
}
}
}
]
}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"
}
}
}
}
]
}Order token to authorize Cart and Checkout requests.
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.
200 Success - Returns an array of shipping_rate objects.
Show child attributes
Was this page helpful?