Lyft API
  1. User
Lyft API
  • Restricted
  • 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.
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.lyft.com/rides//cancel' \
--header 'Content-Type: application/json' \
--data-raw '{
    "cancel_confirmation_token": "656a91d"
}'
响应示例响应示例
204 - 示例 1
{}

请求参数

Path 参数
id
string 
必需
The ID of the ride
Body 参数application/json
cancel_confirmation_token
string 
可选
Token affirming the user accepts the cancellation fee. Required if a cancellation fee is in effect.
示例

返回响应

🟢204删除成功
application/json
Successfully canceled the ride
Body
object {0}
🟠400请求有误
🟠403禁止访问
🟠404记录不存在
🟠409409

【Lyft】API开发者 微信交流群

用微信扫右侧二维码,加入【Lyft】API开发者 交流群,互助沟通

扫码加入交流群
上一页
Get the ride detail of a given ride ID
下一页
Update the destination of the ride
Built with