GET to read the current state of any ride, and an authenticated POST to drive the ride through its lifecycle. A separate GET /rides/requested endpoint lists all rides awaiting driver acceptance.
Get ride status
No authentication required — this is a public endpoint.GET /rides/status/{rideId}
The unique ID of the ride.
Response
Returns the full Ride object for the givenrideId. Returns 404 if the ride does not exist.
Unique ride identifier.
Current status of the ride. One of
REQUESTED, ACCEPTED, PICKED, COMPLETED, CANCELLED.ID of the rider.
ID of the assigned driver, or
null if not yet accepted.Fare for the ride.
ISO 8601 timestamp of ride creation.
ISO 8601 timestamp of when a driver accepted the ride, or
null.Example
Update ride status
Authentication required — includeAuthorization: Bearer <token> in the request header.
POST /rides/status/{rideId}
The unique ID of the ride to update.
The target status. Must be one of
ACCEPTED, PICKED, COMPLETED, or CANCELLED.Required when setting status to
ACCEPTED. The ID of the driver accepting the ride.Required when setting status to
PICKED or COMPLETED. Must match the corresponding OTP on the ride (startOtp for PICKED, endOtp for COMPLETED).Status transitions
| From | To | Required fields |
|---|---|---|
REQUESTED | ACCEPTED | driverId |
ACCEPTED | PICKED | otp (must match startOtp) |
PICKED | COMPLETED | otp (must match endOtp) |
| Any non-terminal | CANCELLED | — |
Response
Returns the updated Ride object with the newstatus applied.
Example
List requested rides
No authentication required — this is a public endpoint.GET /rides/requested
Returns all rides currently in REQUESTED status. Drivers use this endpoint to discover available rides.
Response
An array of Ride objects withstatus: "REQUESTED".