GET
/
api
/
v2
/
storefront
/
checkout
/
shipping_rates
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

X-Spree-Order-Token
string
header
required

Order token to authorize Cart and Checkout requests.

How to obtain X-Spree-Order-Token

Response

200
application/vnd.api+json
200 Success - Returns an array containing several `shipment` objects, along with the included array containing all available `shipping_rate` and `stock_location` objects.
data
object[]
required
included
object[]
required