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

Request a Lyft

POST
/rides
Request a Lyft come pick you up at the given location.
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.lyft.com/rides' \
--header 'Content-Type: application/json' \
--data-raw '{
    "cost_token": "string",
    "destination": {
        "address": "string",
        "lat": 36.9442175,
        "lng": -123.8679133
    },
    "origin": {
        "address": "string",
        "lat": 36.9442175,
        "lng": -123.8679133
    },
    "primetime_confirmation_token": "string",
    "ride_type": "lyft"
}'
响应示例响应示例
201 - 示例 1
{
    "destination": {
        "address": "123 Main St, Anytown, CA",
        "lat": 36.9442175,
        "lng": -123.8679133
    },
    "origin": {
        "address": "123 Main St, Anytown, CA",
        "lat": 36.9442175,
        "lng": -123.8679133
    },
    "passenger": {
        "first_name": "Jane",
        "image_url": "https://public-api.lyft.com/static/images/user.png",
        "rating": 4.9,
        "user_id": "776630198662493392"
    },
    "ride_id": 123456789,
    "status": "pending"
}

请求参数

Body 参数application/json

示例

返回响应

🟢201成功
application/json
An object with high level ride information. Use GET /v1/rides/{id} for more details.
Body

🟠400请求有误
🟠403禁止访问
🟠409409

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

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

扫码加入交流群
修改于 2024-11-22 03:29:37
上一页
List rides
下一页
Get the ride detail of a given ride ID
Built with