GET
/
api
/
v2
/
storefront
/
cart
/
estimate_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",
        "shipping_method_id": 1,
        "final_price": "5.0",
        "display_cost": "$5.00",
        "display_final_price": "$5.00",
        "display_tax_amount": "$0.00",
        "free": false
      }
    },
    {
      "id": null,
      "type": "shipping_rate",
      "attributes": {
        "name": "UPS Two Day (USD)",
        "selected": false,
        "cost": "10.0",
        "tax_amount": "0.0",
        "shipping_method_id": 2,
        "final_price": "10.0",
        "display_cost": "$10.00",
        "display_final_price": "$10.00",
        "display_tax_amount": "$0.00",
        "free": false
      }
    },
    {
      "id": null,
      "type": "shipping_rate",
      "attributes": {
        "name": "UPS One Day (USD)",
        "selected": false,
        "cost": "15.0",
        "tax_amount": "0.0",
        "shipping_method_id": 3,
        "final_price": "15.0",
        "display_cost": "$15.00",
        "display_final_price": "$15.00",
        "display_tax_amount": "$0.00",
        "free": false
      }
    }
  ]
}

Authorizations

X-Spree-Order-Token
string
header
required

Order token to authorize Cart and Checkout requests.

How to obtain X-Spree-Order-Token

Query Parameters

country_iso
string
required

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.

fields[shipping_rate]
string

Specify the fields you would like returned in the response body. More information.

Response

200
application/vnd.api+json
200 Success - Returns an array of `shipping_rate` objects.
data
object[]
required