Lyft
  1. User
Lyft
  • Public
    • Cost estimates
      GET
    • Available drivers nearby
      GET
    • Pickup ETAs
      GET
    • Types of rides
      GET
  • User
    • The user's general info
      GET
    • List rides
      GET
    • Request a Lyft
      POST
    • Get the ride detail of a given ride ID
      GET
    • Cancel a ongoing requested ride
      POST
    • Update the destination of the ride
      PUT
    • Add the passenger's rating, feedback, and tip
      PUT
    • Get the receipt of the rides.
      GET
  • Sandbox
    • Preset Prime Time percentage
      PUT
    • Propagate ride through ride status
      PUT
    • Preset types of rides for sandbox
      PUT
    • Driver availability for processing ride request
      PUT
  1. User

Cancel a ongoing requested ride

POST
/rides/{id}/cancel
User
Cancel a ongoing ride which was requested earlier by providing the ride id.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.lyft.com/v1/rides//cancel' \
--header 'Content-Type: application/json' \
--data-raw '{
    "cancel_confirmation_token": "656a91d"
}'
Response Response Example
204 - Example 1
{}

Request

Path Params
id
string 
required
The ID of the ride
Body Params application/json
cancel_confirmation_token
string 
optional
Token affirming the user accepts the cancellation fee. Required if a cancellation fee is in effect.
Examples

Responses

🟢204Successfully canceled the ride
application/json
Body
object {0}
🟠400Cancellation token required * `cancel_confirmation_required`: a cancelation fee applies which the user must accept * `invalid_cancel_confirmation`: provided token was invalid or expired
🟠403User or client does not have permission to complete this request
🟠404No ride found with provided ride ID
🟠409You cannot cancel this ride
Modified at 2023-08-15 05:38:33
Previous
Get the ride detail of a given ride ID
Next
Update the destination of the ride
Built with