# Get shipping rates Retrieves shipping rates for the specified shipping details. Use this endpoint to compare rates across different carriers and services before creating a label. Endpoint: POST /shipments/getrates Version: 1.0.0 Security: basicAuth ## Request fields (application/json): - `carrierCode` (string, required) Carrier code to get rates from Example: "fedex" - `serviceCode` (any) Specific service code (optional) - `packageCode` (any) Package type code (optional) - `fromPostalCode` (string, required) Origin postal code Example: "78703" - `toCountry` (string, required) Destination country (two-letter ISO code) Example: "US" - `toPostalCode` (string, required) Destination postal code Example: "20500" - `toState` (string) Destination state (required for UPS) Example: "DC" - `toCity` (string) Destination city (optional) Example: "Washington" - `weight` (object, required) Weight measurement - `weight.value` (number, required) Weight value Example: 24 - `weight.units` (string, required) Weight unit of measurement Enum: "pounds", "ounces", "grams" - `dimensions` (any) - `confirmation` (string) Delivery confirmation type Enum: "none", "delivery", "signature", "adult_signature", "direct_signature" - `residential` (boolean) Whether destination is residential ## Response 200 fields (application/json): - `serviceName` (string) Example: "FedEx Ground®" - `serviceCode` (string) Example: "fedex_ground" - `shipmentCost` (number) Example: 8.25 - `otherCost` (number) Example: 0.33 ## Response 400 fields (application/json): - `message` (string) Example: "Invalid request parameters" ## Response 401 fields (application/json): - `message` (string) Example: "Invalid API credentials" ## Response 500 fields (application/json): - `message` (string) Example: "An internal error occurred"