Endpoint to obtain estimated price of ride
Hi,
Currently we're trying to get the estimated price of a ride from a webhook. Initially we used the priceAmount when the ride was created, but this value is incorrect over larger distances. I see that the ride has a estimationId, but I can't find or figure out what the end point would be.
Is there a way to get the estimated value of a ride as it appears in the app?
Hey @stevenwithaph, great question. Thanks for raising it here!
You're correct that the ride object includes an estimationId, but at this time, there is no public endpoint available to fetch the estimated price based on that ID. The system doesn’t expose this information post-creation via the API or webhook.
Currently, the estimated fare as shown to the rider in the app is not included in the ride.updated webhook.
The only price-related field available there is priceAmount, which reflects the current fare, this value may differ from the original estimation.
If you want to keep track of what the estimated price was when the ride was created, we suggest the following:
-
Store the estimated price at the moment the ride is created (client-side), before it’s dispatched.
-
You can also use the Pricing & Tips endpoints on our docs to see changes.
Hope this helps clarify things, let us know if anything is still unclear!
Thanks for the response,
Store the estimated price at the moment the ride is created (client-side), before it’s dispatched.
This won't work because the client would be able to change the price to whatever they wanted. We need it to be validated on the server.
You can also use the Pricing & Tips endpoints on our docs to see changes.
the pricing is what's incorrect here, the further the distance the more incorrect the pricing calculation is from the estimate.
Looking here: https://docs.autofleet.io/reference/get-api-v1-price-calculation-pricecalculationid-1#upfront-vs-actual-pricing
If the calculation basis is upfront, the price is not recalculated by Autofleet. For example, if end-users are shown an ETA and price for a service and book that ride, this priceCalculationId gets set on the ride and the ride fare won't change.
Even seting our pricing policy to upfront is not seting the pirceAmount to be correct. Users can book a $500 for the minimum price in this scenario.
I feel like this is a bug?