Before you begin
This Guide helps you to make a POST call to get shipping rates for your multiple carrier and service options. Display these at checkout to let your customers choose the fastest, cheapest, or most-trusted route when you ship your products.
Similar to the Creating a Label guide we need to know some basic information to get a rate.
REQUIREMENTS
To get rates, you must locate and include the following:
Before you begin you may choose to validate the address to help ensure that you get back the most-accurate rates possible. Check out our Validate Address guide here.
Example Requests
POST /api/v2.1/GetRates
Below is an example to POST a call in JSON, the response returns you should see, and how to understand and use their results.
{ "accessToken": "lKGTGIQFour..", "shippingInfo": { "carrierClientContractId": 2523, "serviceLevelId": 1115, "options": { "shipmentContentType": "CONTENT_TYPE_SAMPLE" }, "addressFrom": { "companyName": "ShipCaddie", "address1": "2600 Executive Pkwy", "address2": "#160", "city": "Lehi", "stateOrProvince": "UT", "postalCode": "84043", "countryCode": "US", "phoneNumber": "(844)381-7447" }, "addressTo": { "attentionOf": "Jane Doe", "address1": "2605 Executive Pkwy", "address2": "#160", "city": "Lehi", "stateOrProvince": "UT", "postalCode": "84043", "countryCode": "US" }, "parcels": [ { "packagingId": "", "weightInPounds": 0.4, "lengthInInches": 5, "widthInInches": 4, "heightInInches": 12 } ] } }
Example Response
The response can be quite intimidating depending on how many carriers you requested rates from.
For this example we only used one in our response below, however, it does display multiple service levels. As you can see the information displayed can get quite extensive.
{ "processingTimeInSeconds": 0.46879129999999997, "carrierName": "USPS via ShipCaddie", "carrierClientContractId": 2523, "data": [ { "serviceLevelName": "Priority Mail", "serviceLevelID": 1115, "parcelChargeDetails": [ { "parcelID": "3c1e5e9e-afa9-497a-85fb-7c677d8e6e46", "costDetails": [ { "name": "Freight Charge", "amount": 7.16 } ], "packagingId": "0-0" } ], "shippingChargeDetails": [], "transitDaysMin": 2, "transitDaysMax": 3, "totalChargeAmount": 7.16, "totalChargeAmount3pl": 0.0, "deliveryDateTime": "2/23/2021 12:00:00 AM", "isDeliveryGuaranteed": false, "zoneName": "1" }, { "serviceLevelName": "Express Mail", "serviceLevelID": 1118, "parcelChargeDetails": [ { "parcelID": "23008d05-a86e-438a-98fe-8e0c412e4c19", "costDetails": [ { "name": "Freight Charge", "amount": 22.75 } ], "packagingId": "0-0" } ], "shippingChargeDetails": [], "transitDaysMin": 1, "transitDaysMax": 2, "totalChargeAmount": 22.75, "totalChargeAmount3pl": 0.0, "deliveryDateTime": "2/23/2021 12:00:00 AM", "isDeliveryGuaranteed": false, "zoneName": "1" }, { "serviceLevelName": "First Class Package", "serviceLevelID": 1122, "parcelChargeDetails": [ { "parcelID": "309bf0aa-d2ce-4158-b42e-67081dc0d913", "costDetails": [ { "name": "Freight Charge", "amount": 3.46 } ], "packagingId": "0-0" } ], "shippingChargeDetails": [], "transitDaysMin": 1, "transitDaysMax": 3, "totalChargeAmount": 3.46, "totalChargeAmount3pl": 0.0, "deliveryDateTime": "2/23/2021 12:00:00 AM", "isDeliveryGuaranteed": false, "zoneName": "1" }, { "serviceLevelName": "Media Mail", "serviceLevelID": 1123, "parcelChargeDetails": [ { "parcelID": "b2c48b60-95a5-4a9e-bda5-10a6d6e8a596", "costDetails": [ { "name": "Freight Charge", "amount": 2.89 } ], "packagingId": "0-0" } ], "shippingChargeDetails": [], "transitDaysMin": 2, "transitDaysMax": 8, "totalChargeAmount": 2.89, "totalChargeAmount3pl": 0.0, "deliveryDateTime": "2/23/2021 12:00:00 AM", "isDeliveryGuaranteed": false, "zoneName": "1" }, { "serviceLevelName": "Parcel Select - Ground", "serviceLevelID": 1124, "parcelChargeDetails": [ { "parcelID": "291e6793-5e3e-4224-a941-0cc0020c3566", "costDetails": [ { "name": "Freight Charge", "amount": 7.01 } ], "packagingId": "0-0" } ], "shippingChargeDetails": [], "transitDaysMin": 2, "transitDaysMax": 8, "totalChargeAmount": 7.01, "totalChargeAmount3pl": 0.0, "deliveryDateTime": "2/23/2021 12:00:00 AM", "isDeliveryGuaranteed": false, "zoneName": "1" } ], "error": { "details": [], "hasError": false } }
Once the rate request is completed you’ll see each service level includes:
Powered by BetterDocs