This method is used to check pricing for parcel orders from all allowed providers. The method also automatically creates an order that isn't visible from the dashboard
The request accepts an optional carrier query param if preferred, it can be used like: https://api.deftship.com/parcel-orders/get-rates?carrier=ups. Selecting a specific carrier can significantly reduce the response time for rates.
Please note that this endpoint has rate-limiting, therefore, it will only allow 1000 requests per minute.
Available carriers are [Carriers are only available to registered users]
| Method | URI | Headers |
|---|---|---|
| POST | parcel-orders/get-rates |
default |
LBS and KG
length_unit | No | String | By default, length unit is taken from your preferences. However, it can be overwritten using this field. Valid values: IN and CM
package_list [] | Yes | Array | An array containing all the package information
+count | Yes | Integer | Pieces count
+box_type | No | String | Carrier box types for the list please refer to Parcel Box Types
+length | Yes | Float | Length
+width | Yes | Float | Width
+height | Yes | Float | Height
+weight | Yes | Float | Weight
+reference_1 | No | String | Reference that will appear on the label
+reference_2 | No | String | Reference that will appear on the label
+insurance | No | Boolean | Default is false. Setting this to true would require items information
+is_hazmat | No | Boolean | If the item is hazmat, default is false
+signature | No | String | Default is no_signature, other options are adult_signature and signature
+items [] | No | Array | An array containing all items information. Condition: only required on international shipments and shipments with insurance
++quantity | No | Integer | Quantity of the item Condition: only required when items [] is used
++price | No | Float | Price of the item Condition: only required when items [] is used
++country_of_manufacture | No | String | Where the item is manufactured needs to be a country code please refer to country-codes. Condition: only required when items [] is used
++sku | No | String | SKU. Condition: only required when items [] is used
++hs_code | No | String | HS Tariff Code of item. The HS tariff code is an internationally standardized classification system for traded goods, used to determine tariffs and customs duties. Condition: only required when items [] is used
++description | No | String | A brief description for customs. Condition: only required when items [] is used
++content_type | No | String | Default is Merchandise, acceptable values are Merchandise, Gift, Documents, Sample. Condition: only required when items [] is used
extra_services [] | No | Array | An array containing all the extra services
+saturday_delivery | No | Boolean | Default is false.
+certified_mail | No | Boolean | Default is false.
+return_receipt | No | Boolean | Default is false.
+return_receipt_electronic | No | Boolean | Default is false.
+restricted_delivery | No | Boolean | Default is false.
customs_details {} | No | Object | Customs details container
+bill_type | No | String | Either DDU or DDP should be selected, default is DDP.
+tax_id_type | No | String | Either VAT, EIN or SSN should be used, default is null.
+tax_id | No | String | Default is null.
+issuer_country | No | String | Default is null.
+aes_itn | No | String | Default is null.{
"from_address": {
"name": "Example Corp",
"attention": "John Doe",
"city": "Los Angeles",
"street_1": "123 S Main St",
"zip": "90012",
"state": "CA",
"country": "US",
"telephone": "9999999999"
},
"to_address": {
"name": "Example Corp",
"attention": "John Doe",
"city": "Flushing",
"street_1": "123 Main St",
"zip": "11354",
"state": "NY",
"country": "US",
"telephone": "9999999999"
},
"package_list": [
{
"length": 5,
"width": 4,
"count": 3,
"weight": 2,
"height": 1,
"insurance": false,
"signature": "no_signature",
"items": [
{
"quantity": 1,
"price": 12.5,
"sku": "SKU",
"hs_code": "620342",
"description": "Fryer",
"content_type": "Merchandise"
}
]
}
],
"extra_services": {
"saturday_delivery": false,
"certified_mail": false,
"return_receipt": false,
"return_receipt_electronic": false,
"restricted_delivery": false
}
}
Successful
{
"success": true,
"data": [
{
"id": 12345678,
"carrier": "fedex",
"service": "Fedex Ground",
"service_code": "FEDEX-1",
"final_price": "45.72",
"fuel_price": "2.59",
"restrictions": [],
"miscellaneous_charges": [],
"has_enough_credits": true,
"channel_id": null,
"eta": "3"
},
{
"id": 12345678,
"carrier": "fedex",
"service": "Fedex Ground (MyOwnFedExAccount)",
"service_code": "FEDEX-1",
"final_price": "45.72",
"fuel_price": "2.59",
"restrictions": [],
"miscellaneous_charges": [],
"has_enough_credits": true,
"channel_id": "MyOwnFedExAccount",
"eta": "3"
},
{
"id": 12345678,
"carrier": "ups",
"service": "UPS 3 Day Select",
"service_code": "UPS-8",
"final_price": "80.33",
"fuel_price": "4.55",
"restrictions": [],
"miscellaneous_charges": [],
"has_enough_credits": true,
"channel_id": null,
"eta": null
}
]
}
Failed
{
"success": false,
"message": "The given data was invalid.",
"data": {
"to_address.city": [
"The to address.city field is required."
]
}
}
| Name | Code | Length (IN) | Width (IN) | Height (IN) | Weight (LBS) | |
|---|---|---|---|---|---|---|
| UPS Boxes | ||||||
| UPS Letter | 01 | 15.00 🔒 | 9.50 🔒 | 1.00 🔒 | 0.90 | |
| Tube | 03 | 38.00 🔒 | 6.00 🔒 | 9.00 🔒 | 150.00 | |
| 25KG Box | 24 | 19.75 🔒 | 17.75 🔒 | 13.25 🔒 | 55.12 🔒 | |
| 10KG Box | 25 | 16.50 🔒 | 13.25 🔒 | 10.75 🔒 | 22.05 🔒 | |
| Small Express Box | 2a | 13.00 🔒 | 11.00 🔒 | 2.00 🔒 | 150.00 | |
| Medium Express Box | 2b | 16.00 🔒 | 11.00 🔒 | 3.00 🔒 | 150.00 | |
| Large Express Box | 2c | 18.00 🔒 | 13.00 🔒 | 3.00 🔒 | 150.00 | |
| Express Pak | 04 | 0.00 | 0.00 | 0.00 | 2.00 🔒 | |
| FedEx Boxes | ||||||
| FedEx Small Box | FEDEX_SMALL_BOX | 1.50 🔒 | 12.24 🔒 | 10.87 🔒 | 19.84 | |
| FedEx Medium Box | FEDEX_MEDIUM_BOX | 2.36 🔒 | 12.99 🔒 | 11.50 🔒 | 19.84 | |
| FedEx Large Box | FEDEX_LARGE_BOX | 2.99 🔒 | 17.87 🔒 | 12.36 🔒 | 20.00 | |
| FedEx Pak | FEDEX_PAK | 0.39 🔒 | 15.51 🔒 | 12.01 🔒 | 5.51 | |
| FedEx Tube | FEDEX_TUBE | 5.98 🔒 | 5.98 🔒 | 37.99 🔒 | 19.84 | |
| FedEx Envelope | FEDEX_ENVELOPE | 0.10 🔒 | 12.51 🔒 | 9.40 🔒 | 5.51 | |
| FedEx 10kg Box | FEDEX_10KG_BOX | 10.16 🔒 | 12.94 🔒 | 15.81 🔒 | 22.05 🔒 | |
| FedEx 25kg Box | FEDEX_25KG_BOX | 13.19 🔒 | 16.56 🔒 | 21.56 🔒 | 55.12 🔒 | |
| USPS Boxes | ||||||
| Small Flat Rate Box | usps_small_flat_rate_box | 8.62 🔒 | 5.37 🔒 | 1.62 🔒 | 70.00 | |
| Medium Flat Rate Box | usps_medium_flat_rate_box | 11.87 🔒 | 13.62 🔒 | 3.37 🔒 | 70.00 | |
| Large Flat Rate Box | usps_large_flat_rate_box | 12.00 🔒 | 12.00 🔒 | 5.50 🔒 | 70.00 | |
| Flat Rate Envelope | usps_flat_rate_envelope | 12.50 🔒 | 8.50 🔒 | 1.00 🔒 | 70.00 | |
| Padded Flat Rate Envelope | usps_padded_flat_rate_envelope | 12.50 🔒 | 8.50 🔒 | 1.00 🔒 | 70.00 | |
| Legal Flat Rate Envelope | usps_legal_flat_rate_envelope | 15.00 🔒 | 8.50 🔒 | 1.00 🔒 | 70.00 | |
| Regional Rate Box A | usps_regional_rate_box_a | 10.93 🔒 | 2.37 🔒 | 2.81 🔒 | 15.00 | |
| Regional Rate Box B | usps_regional_rate_box_b | 14.37 🔒 | 2.87 🔒 | 15.87 🔒 | 20.00 | |