Skip to main content

Get Delivery Derived Estimate Calculation [Beta]

deliveryDerivedEstimatesCalculate Query

Delivery derived estimates are estimates calculated utilizing an origin location (originLocation) and a vehicle type (selectedDeliveryMethod). The calculation is based on historical data from past deliveries. The estimate is calculated by adding the estimated time to assign a driver and the estimated time it will take the driver to get to the pickup location.

Query Props

// originLocation
type OriginLocation {
latitude: string
longitude: string
postalCode: string
}

// selectedDeliveryMethod
type VehicleType =
| 'car'
| 'suv'
| 'cargo-van'
| 'truck'
| 'truck-with-pipe-rack'
| 'cargo-van-high-roof'
| 'box-truck'
| 'box-truck-with-liftgate'

Example Query

query deliveryDerivedEstimatesCalculate(
originLocation: {
latitude: "32.7170334",
longitude: "-117.1658997",
postalCode: "92101",
},

selectedDeliveryMethod: "car",
) {
estimateInSeconds
}
}

deliveryDerivedEstimatesCalculate Response

attributedescription
estimateInSecondsEstimated time, in seconds, to assign a driver and get to pickup location
{
"data": {
"deliveryDerivedEstimatesCalculate": {
"estimateInSeconds": 3243
}
}
}