This Method retrieves the Carrier rates for a specific shipment for 170+ Carriers with the same API call.
💡With this Method you can:
Retrieve all your Carrier Rates in real time
Compare your Carrier rates to choose the best options during order fulfillment
Improve conversion rate by showing live rates at your checkout
Apply a markup on top of your shipment cost
Summary
1. Before you start
For testing purposes, you can use the ShippyPro Generic Carrier for generating test rates. See here if you need help configuring ShippyPro Generic Carrier.
📌 You can also add CarrierOptions attribute to get rates for specific Carrier services.
📌 GetRates API will work according to the Shipping Rules applied. If your GetRates call returns no Rates and no errors for a specific shipment, make sure your Shipping Rules are correctly set up and not blocking those SKUs.
📌Remember to value the TransactionID of the order in the API_GetRates to use the ShippingService rule, otherwise it will be skipped. If the field TransactionID is not populated, the filter for ShippingService can't be applied.
📌 If your GetRates rates don’t match the rate shown in “To Ship”, make sure both GetRates and your My Profile > Preferences units of measure correspond!
📌 By referring the RateID from Shipping API call response you'll also be able to use our Invoice Analysis feature.
📌You can filter this call for specific services by filling out the RateCarriers field with CarrierName and CarrierID, that you can retrieve from the APIKEYS ShippyPro page. E.G RateCarriers: [“CarrierName|CarrierID,CarrierName|CarrierID”]
📍 To obtain the rates from Amazon and AMF you need to have the reference order already imported on the ShippyPro platform in the "To be shipped" section
2. How it works
To call the GetRate API, these body params need to be passed:
Name | Data Type | Required | Empty | Description | Max length |
to_address | Array | true | false | Recipient address information |
|
name | string | true | false | Recipient name |
|
company | string | true | true | Recipient company |
|
street1 | string | true | false | Recipient street1 | Depends on the specific carrier |
street2 | string | true | true | Recipient street2 | Depends on the specific carrier |
city | string | true | false | Recipient city |
|
state | string | true | false | Recipient state |
|
zip | string | true | false | Recipient zip code | Depends on the country |
country | string | true | false | Recipient country (ISO 3166) | 2 char |
phone | string | true | false | Recipient Phone | Country specific phone length |
string | false | false | Recipient Email | 64 char | |
from_address | Array | true | false | Sender address information |
|
name | string | true | false | Sender name |
|
company | string | true | true | Sender company |
|
street1 | string | true | false | Sender street1 |
|
street2 | string | true | true | Sender street2 |
|
city | string | true | false | Sender city |
|
state | string | false | true | Sender state |
|
zip | string | true | false | Sender zip code | Depends on the country |
country | string | true | false | Sender country (ISO 3166) | 2 char |
phone | string | true | false | Sender phone | Depends on the country |
string | true | false | Sender email |
| |
parcels | Array | true | false | Parcels information (Minimum 1) | 4 objects each |
dimension_unit | string | false | false | Parcel unit of measurement for lenght: "CM" (default), "IN" | 2 char |
length | int | true | false | Parcel Length |
|
width | int | true | false | Parcel width |
|
height | int | true | false | Parcel height |
|
weight_unit | string | false | false | Parcel unit of measurement for weight: "KG" (default), "LB", "OZ" | 2 char |
weight | float | true | false | Parcel weight | 2 decimals |
Insurance | float | false | false | Insurance value (default: 0) |
|
InsuranceCurrency | string | false | false | Insurance currency (default: "EUR"), see here | 3 char |
CashOnDelivery | float | false | false | Cash on delivery value (default: 0) |
|
CashOnDeliveryCurrency | string | false | false | Cash on delivery currency (default: "EUR"), see here | 3 char |
ContentDescription | string | true | false | Description of the content | 255 char |
TotalValue | string | false ⚠️ | true | Value of the order including the currency (e.g. 120.50 EUR) ⚠️ It's required for international shipment! |
|
ShippingService | string | true | true | Customer selected shipping service (e.g. Express, Standard) |
|
RateCarriers | Array | false | false | Rate only specific carriers ["DHLExpress", …] |
|
TransactionID | string | false | false | Your internal reference order number | 35 char |
⚠️ Note that the response attribute delivery_days could be both a number (e.g. 2) or a string (e.g. "2-5").
3. Get Rates API reference
Visit our API Documentation to view an example of Get Rates API request and response.
💡 How can I filter this call only for some specific connected Carriers?
You can filter this call for specific services by filling out the RateCarriers field with CarrierName and CarrierID that you can retrieve from the APIKEYS page.
Eg. RateCarriers: [“CarrierName|CarrierID,CarrierName|CarrierID”]
Talk to our Experts to learn more about our APIs and take your business to the next level!