Skip to content

Ride events

The ride events are sent when a certain milestone is reached in the ride / order.

The detailed documentation of the ride events endpoint is available in the API specification.

Event subtypes

The following ride milestones (states) are supported: Inquiry, Accepted, Cancelled, Pickup arrival, Passenger on board, Finished

Inquiry

This state is when a customer requests a ride and a ride is created but not accepted by any driver yet.

Accepted

When order is accepted by the driver and the driver is on the way to pick up the passenger the “accepted” event is sent to the Mileus ingestion engine. Keeping track of the active orders in the system enables Mileus to predict with higher certainty when and where the driver will be in a given time and whether it makes sense for the driver to be matched with any other future order that might come in.

Cancelled

If the order was cancelled for any reason. It could be rejected by the driver, cancelled by the passenger or aborted by the RH system.

Pickup arrival

Once the driver arrives at the pickup location this milestone event is sent to the ingestion engine.

Passenger on board

Once the passenger enters the car the passenger_on_board event is sent. At this point, the chances of the driver reaching the future destination as per the order details (destination parameter) are highest and at this point the driver is in the system as available driver for matching any future orders that might come in.

Finished

This event is sent to the ingestion engine when the passenger leaves the car and the driver marked themselves as available to take another ride / order.

Event payload

The not required, but recommended, fields should be sent at least once at any of the order milestones (state of the order).

Field Type Required Description
state enum (string) Yes Possible values (inquiry, accepted, pickup_arrival, cancelled, passenger_on_board, finished)
timestamp date (string) Yes Date and time when the event occurred in UTC ISO format
driverId string Yes Driver ID as in the partners system
passengerId string Yes Passenger ID as in the partners system
orderId string Yes Order or ride ID that uniquely identifies the ride / order
inquiryDriversCount number No How many drivers received the inquiry
inquiryOffersCount number No How many offers were presented to the passenger
durationSecondsEstimated number No (Recommended) Estimated ride duration in seconds from pickup to destination location
durationSeconds number No Real duration in seconds from pickup to destination location
distanceMetersEstimated number No Estimated distance in meters from pickup to destination location
distanceMeters number No Real travelled distance in meters from pickup to destination location
driverPickupArrivalEstimatedAt date (string) No (Recommended) Timestamp in UTC ISO format when the driver will be at pickup location
routeEstimated Coordinates array No (Recommended) Array of coordinates objects with estimated route that the driver will take
route Coordinates array No Real route of the driver from pickup to destination
pickupLocation Coordinates No (Recommended) Object with lat and lon values of pickup location
driverLocation Coordinates No (Recommended) Lat and lon of the current driver position when the event occurred
requestedPickupTime date (string) No Should be sent only if the ride is not “now”, but it's pre ordered. Otherwise the parameter is omitted. It must be in UTC, ISO format
destinationLocation Coordinates No (Recommended) Lat and lon of the destination location
priceEstimated Cost No Estimated price of the order
price Cost No Real price of the order