This method is used to get pickup orders rates. It can be used by sending a POST request to: https://api.deftship.com/pickup-orders/get-rates.
| Method | URI | Headers |
|---|---|---|
| POST | pickup-orders/get-rates |
default |
[ups, dhl, usps, canadapost]
pickup_date | Yes | String | Proposed pickup date, in Y-m-d. Condition: only not required if a "carrier" is "dhl"
ready_time | No | String | Opening time of pickup address, in H:i. Condition: only required if a "carrier" is "ups"
close_time | No | String | Closing time of pickup address, in H:i. Condition: only required if a "carrier" is "ups"
pieces [] | Yes | Array | An array containing all the information about pieces
+service | Yes | String | For a full list please check out carrier service types.
+container_type | No | String | Container type is either "package" or "letter". Condition: only required if a "carrier" is "ups"
+quantity | Yes | Integer | Quantity of the pickup item
+weight | Yes | Float | Weight (LBS)
+destination_country_code | No | String | Destination country needs to be a country code please refer to country-codes. Condition: only required if a "carrier" is "ups"{
"from_address_id": 1387235969,
"carrier": "ups",
"ready_time": "13:30",
"close_time": "15:30",
"pickup_date": "04/28/2023",
"pieces": [
{
"service": "PICKUP-UPS-1",
"container_type": "package",
"quantity": "2",
"weight": "20",
"destination_country_code": "US"
}
]
}
{
"from_address_id": 696756088,
"carrier": "usps",
"pickup_date": "04/28/2023",
"pieces": [
{
"service": "PICKUP-USPS-1",
"quantity": "2",
"weight": "20"
}
]
}
Successful
{
"success": true,
"data": {
"id": 634804812,
"miscellaneous_charges": [],
"base_price": "8.00",
"fuel_price": "0.00",
"final_price": "8.00"
}
}
Failed
{
"success": false,
"message": "The given data was invalid.",
"data": {
"from_address_id": [
"A valid from address is required"
]
}
}