Lyft API
  1. Sandbox
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. Sandbox

Preset types of rides for sandbox

PUT
/sandbox/ridetypes
Sandbox
The sandbox-ridetypes endpoint allows you to preset the ridetypes in the region surrounding the specified latitude and longitude to allow testing different scenarios
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://api.lyft.com/sandbox/ridetypes' \
--header 'Content-Type: application/json' \
--data-raw '{
    "lat": 37.7833,
    "lng": -122.4167,
    "ride_types": [
        "lyft",
        "lyft_line",
        "lyft_plus"
    ]
}'
响应示例响应示例
200 - 示例 1
{
    "lat": 37.7833,
    "lng": -122.4167,
    "ride_types": [
        "lyft",
        "lyft_line",
        "lyft_plus"
    ]
}

请求参数

Body 参数application/json
lat
number <double>
必需
The latitude component of a location
lng
number <double>
必需
The longitude component of a location
ride_types
array[string]
必需
枚举值:
lyftlyft_linelyft_pluslyft_premierlyft_luxlyft_luxsuv
示例

返回响应

🟢200成功
application/json
An object listing the ridetypes at a given location
Body
lat
number <double>
必需
The latitude component of a location
lng
number <double>
必需
The longitude component of a location
ride_types
array[string]
必需
枚举值:
lyftlyft_linelyft_pluslyft_premierlyft_luxlyft_luxsuv
🟠400请求有误

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

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

扫码加入交流群
上一页
Propagate ride through ride status
下一页
Driver availability for processing ride request
Built with