Skip to main content
Fetch the complete ride history for the authenticated user. The response includes rides where the user participated as either a rider or a driver. Authentication required — include Authorization: Bearer <token> in the request header.

Request

GET /rides/history No query parameters.

Response

An array of Ride objects. Each object contains the full ride record.
number
Unique ride identifier.
string
Final or current status of the ride. One of REQUESTED, ACCEPTED, PICKED, COMPLETED, CANCELLED.
number
ID of the rider.
number
ID of the driver, or null if the ride was never accepted.
string
Human-readable pickup address.
string
Human-readable drop-off address.
number
Pickup latitude.
number
Pickup longitude.
number
Drop-off latitude.
number
Drop-off longitude.
number
Fare for the ride.
string
Payment method used (e.g., CASH, CARD, WALLET).
string
Current payment status.
number
Rating the rider submitted (1–5), or null if no feedback was given.
string
Written feedback from the rider, or null.
string
Reason for cancellation, or null if the ride was not cancelled.
string
Identifier of who cancelled the ride, or null.
number
Fee charged for cancellation, or null.
string
ISO 8601 timestamp of ride creation.
string
ISO 8601 timestamp of driver acceptance, or null.

Example

This endpoint returns rides where you appear as either the rider (riderId) or the driver (driverId), giving both riders and drivers a unified view of their trip history.