Get Rates

Retrieves shipping rates for the specified shipping details. Fields listed as Optional are not required to make the Get Rates call with our API. However, to successfully return rates, some carriers do require values in these Optional fields. Check with your carrier to make sure you are providing all the required values in your call.

The body of this request should specify the following attributes:

Name Data Type Description
carrierCode string Returns rates for the specified carrier.

Required
serviceCode string Returns rates for the specified shipping service.

Optional
packageCode string Returns rates for the specified package type.

Optional
fromPostalCode string Originating postal code.

Required
fromCity string Originating city.

Optional
fromState string Originating state.

Optional
fromWarehouseId string Originating warehouse ID.

The fromCity and fromState fields will take precedence over the fromWarehouseId field if all three are entered.

Optional
toState string Destination State/Province. Please use two-character state/province abbreviation.

Optional
toCountry string Destination Country. Please use the two-letter ISO Origin Country code.

Required
toPostalCode string Destination Postal Code.

Required
toCity string Destination City.

Optional
weight Object: numbers and strings Weight of the order.

Required
dimensions Object: numbers and strings Dimensions of the order.

Optional
confirmation string The type of delivery confirmation that is to be used once the shipment is created.

Possible values: none, delivery, signature, adult_signature, and direct_signature. The option for direct_signature is available for FedEx only.

Optional
residential boolean Carriers may return different rates based on whether or not the address is commercial (false) or residential (true). Default value: false

Optional

Example Request

POST /shipments/getrates HTTP/1.1
Host: ssapi.shipstation.com
Authorization: __YOUR_AUTH_HERE__
Content-Type: application/json

{
  "carrierCode": "fedex",
  "serviceCode": null,
  "packageCode": null,
  "fromPostalCode": "78703",
  "toState": "DC",
  "toCountry": "US",
  "toPostalCode": "20500",
  "toCity": "Washington",
  "weight": {
    "value": 3,
    "units": "ounces"
  },
  "dimensions": {
    "units": "inches",
    "length": 7,
    "width": 5,
    "height": 6
  },
  "confirmation": "delivery",
  "residential": false
}

Example Response

[
  {
    "serviceName": "FedEx First Overnight®",
    "serviceCode": "fedex_first_overnight",
    "shipmentCost": 87.8,
    "otherCost": 2.63
  },
  {
    "serviceName": "FedEx Priority Overnight®",
    "serviceCode": "fedex_priority_overnight",
    "shipmentCost": 50.23,
    "otherCost": 1.51
  },
  {
    "serviceName": "FedEx Standard Overnight®",
    "serviceCode": "fedex_standard_overnight",
    "shipmentCost": 46.96,
    "otherCost": 1.41
  },
  {
    "serviceName": "FedEx 2Day® A.M.",
    "serviceCode": "fedex_2day_am",
    "shipmentCost": 23.04,
    "otherCost": 0.69
  },
  {
    "serviceName": "FedEx 2Day®",
    "serviceCode": "fedex_2day",
    "shipmentCost": 20.03,
    "otherCost": 0.6
  },
  {
    "serviceName": "FedEx Express Saver®",
    "serviceCode": "fedex_express_saver",
    "shipmentCost": 14.28,
    "otherCost": 0.43
  },
  {
    "serviceName": "FedEx Ground®",
    "serviceCode": "fedex_ground",
    "shipmentCost": 8.25,
    "otherCost": 0.33
  }
]