Skip to main content

Get Delivery Estimates

deliveryEstimates Query

To get delivery estimates from an active delivery (en_route_to_origin or en_route_to_destination), you will need to provide a deliveryId. Delivery Estimates will provide an estimate calculated by Google API bestGuessEstimate. This is calculated based on the drivers location.

Example Query

query {
deliveryEstimates(deliveryId: "del_6E8SEDHBDE") {
createdAt
driverLocationLastUpdatedAt
driverLatitude
driverLongitude
address {
addressLine1
addressLine2
city
state
postalCode
}
distance
bestGuessEstimate
estimateType
}
}

deliveryEstimates Response

attributedescription
createdAtThe date the estimate was created
driverLatitudeDriver's latitude location
driverLongitudeDriver's longitude location
addressAddress to destination
distanceMileage away from destination in miles
bestGuessEstimateBest Guess Estimate in seconds provided by Google API in second (Shoter ETA. duration_in_traffic should be the best estimate of travel time given what is known about both historical traffic conditions and live traffic)
estimateTypeEstimate type reflects the delivery status. For tracking purposes, we utilize en_route_to_origin and en_route_to_destination.
{
"data": {
"deliveryEstimates": [
{
"createdAt": "2021-12-27 19:20:30.622233+00",
"driverLocationLastUpdatedAt": "2021-12-27 19:07:28.903+00",
"driverLatitude": "26.705522",
"driverLongitude": "-80.248193",
"address": {
"addressLine1": "1801 TX-351",
"addressLine2": "",
"city": "Abilene",
"postalCode": "79601",
"state": "TX"
},
"distance": 16133,
"bestGuessEstimate": 1046,
"estimateType": "en_route_to_destination"
}
]
}
}