Skip to main content
Cancel a ride by its ID. The server records the reason, the identity of who cancelled, and any applicable cancellation fee, then returns the updated ride object. Authentication required — include Authorization: Bearer <token> in the request header.

Request

POST /rides/cancel/{rideId}
number
required
The unique ID of the ride to cancel.
string
An optional explanation for the cancellation. Stored in cancellationReason on the ride.

Response

number
Unique ride identifier.
string
Always CANCELLED after a successful cancellation.
string
The reason provided in the request body, or an empty string if none was given.
string
Identifier indicating who initiated the cancellation (rider or driver).
number
Fee charged for the cancellation, or null if no fee applies.
number
ID of the rider.
number
ID of the assigned driver, or null.
number
Original fare for the ride.
string
Pickup address.
string
Drop-off address.
string
ISO 8601 timestamp of ride creation.

Example

A cancellationFee may be charged depending on how much time has elapsed since the ride was accepted. Check the cancellationFee field in the response to see the exact amount deducted.
You can send a cancellation request with no body — the reason field is entirely optional. If you omit the body, the cancellationReason on the ride will be stored as an empty string.