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

Add the passenger's rating, feedback, and tip

PUT
/rides/{id}/rating
User
Add the passenger's 1 to 5 star rating of the ride, optional written feedback, and optional tip amount in minor units and currency. The ride must already be dropped off, and ratings must be given within 24 hours of drop off. For purposes of display, 5 is considered the default rating. When this endpoint is successfully called, payment processing will begin.
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://api.lyft.com/rides//rating' \
--header 'Content-Type: application/json' \
--data-raw '{
    "feedback": "Great ride!",
    "rating": 5,
    "tip": {
        "amount": 100,
        "currency": "USD"
    }
}'
响应示例响应示例
204 - 示例 1
{}

请求参数

Path 参数
id
string 
必需
The ID of the ride
Body 参数application/json
Rating and optional feedback and tip
feedback
string 
可选
The passenger's written feedback about this ride
rating
integer <int32>
必需
The passenger's rating of this ride from 1 to 5
>= 1<= 5
tip
object 
可选
Tip amount in minor units and tip currency
示例值:
{"amount":300,"currency":"USD"}
amount
integer <int32>
可选
A tip for the driver in cents. To be charged to the user's default charge account.
>= 0
currency
string 
可选
The currency in which you want to tip. e.g. USD
示例

返回响应

🟢204删除成功
application/json
Successfully added the rating
Body
object {0}
🟠400请求有误
🟠409409

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

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

扫码加入交流群
上一页
Update the destination of the ride
下一页
Get the receipt of the rides.
Built with