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

Get the ride detail of a given ride ID

GET
/rides/{id}
Get the status of a ride along with information about the driver, vehicle and price of a given ride ID
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.lyft.com/rides/'
响应示例响应示例
200 - 示例 1
{
    "beacon_color": "#FFFFFF",
    "destination": {
        "address": "987 Second St, Anytown, CA",
        "lat": 36.9453452,
        "lng": -123.8642521
    },
    "distance_miles": 16.2,
    "driver": {
        "first_name": "Joe",
        "image_url": "http://example.com/lyft.png",
        "phone_number": "+15554445111",
        "rating": "4.9"
    },
    "dropoff": {
        "address": "987 Second St, Anytown, CA",
        "lat": 36.9453452,
        "lng": -123.8642521,
        "time": "2015-09-24T23:28:25+00:00"
    },
    "duration_seconds": 1620,
    "line_items": [
        {
            "amount": 500,
            "currency": "USD",
            "type": "Ride"
        },
        {
            "amount": 250,
            "currency": "USD",
            "type": "Prime Time"
        },
        {
            "amount": 155,
            "currency": "USD",
            "type": "Service fee"
        }
    ],
    "location": {
        "address": "987 Second St, Anytown, CA",
        "lat": 36.9453452,
        "lng": -123.8642521
    },
    "origin": {
        "address": "123 Main St, Anytown, CA",
        "lat": 36.9442175,
        "lng": -123.8679133
    },
    "passenger": {
        "first_name": "Jane",
        "phone_number": "+15554445000",
        "user_id": "776630198662493392"
    },
    "pickup": {
        "address": "123 Main St, Anytown, CA",
        "lat": 36.9442175,
        "lng": -123.8679133,
        "time": "2015-09-24T23:27:25+00:00"
    },
    "price": {
        "amount": 905,
        "currency": "USD",
        "description": "Total ride price"
    },
    "primetime_percentage": "50%",
    "requested_at": "2015-09-24T23:26:25+00:00",
    "ride_id": 123456789,
    "ride_profile": "personal",
    "ride_type": "lyft",
    "status": "droppedOff",
    "vehicle": {
        "color": "black",
        "image_url": "http://example.com/lyft.png",
        "license_plate": "AAAAAAA",
        "make": "Audi",
        "model": "A4"
    }
}

请求参数

Path 参数

返回响应

🟢200成功
application/json
Detailed ride information including ride status, driver information, passenger information, vehicle information, location information and price
Body

🟠403禁止访问
🟠404记录不存在

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

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

扫码加入交流群
修改于 2024-11-22 03:29:37
上一页
Request a Lyft
下一页
Cancel a ongoing requested ride
Built with