Lyft

Lyft's API

Drive your app to success with Lyft's developer API. You'll find comprehensive guides and documentation to help you start working with Lyft as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    
Suggest Edits

Ride - Request

A POST to the /rides endpoint allows your application to request a ride on behalf of the user. The user's payment credentials on file will be charged for the ride.

Before requesting real rides for a user, please test your application using the Sandbox environment! You can read more about using the Sandbox here.

 
posthttps://api.lyft.com/v1/rides
curl -X POST -H "Authorization: Bearer <access_token> " \
     -H "Content-Type: application/json" \
     -d '{"ride_type" : "lyft", "origin" : {"lat" : 37.77663, "lng" : -122.39227 },  "destination" : {"lat" : 37.771, "lng" : -122.39123, "address" : "Mission Bay Boulevard North" } }' \
     'https://api.lyft.com/v1/rides'
import "github.com/lyft/lyft-go-sdk/lyft"

origin := map[string]interface{}{
	"lat": 37.77663,
	"lng": -122.39227,
}

destination := map[string]interface{}{
	"lat": 37.771,
	"lng": -122.39123,
  "address": "Mission Bay Boulevard North"
}

result, resp, err := client.UserApi.NewRide(lyft.Ride{
	RideType: lyft.RideTypeLyft,
	Origin:   origin,
  Destination:   destination,
})
import lyft from 'node-lyft';
let defaultClient = lyft.ApiClient.instance;

// Configure OAuth2 access token for authorization: User Authentication
let userAuth = defaultClient.authentications['User Authentication'];
userAuth.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new lyft.UserApi();

let request = new lyft.Ride('lyft', new lyft.Location(37.77663, -122.39227));
request.destination = new lyft.Location(37.771, -122.39123);

apiInstance.newRide(request).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});
A binary file was returned

You couldn't be authenticated

{
  "status": "pending",
  "ride_id": "123",
  "ride_type": "lyft",
  "passenger": {
    "rating": "5",
    "first_name": "John",
    "last_name": "Smith",
    "image_url": "https://lyft.com/photo.jpg",
    "user_id": "987"
  },
  "destination": {
    "lat": 37.771,
    "lng": -122.39123,
    "eta_seconds": null,
    "address": "Mission Bay Boulevard North"
  },
  "origin": {
    "lat": 37.77663,
    "lng": -122.39227,
    "address": null
  }
}

Body Params

origin
object
required

Pickup location.

origin.lat
float
required

Latitude of a location.

origin.lng
float
required

Longitude of a location.

origin.address
string

Display address at/near the lat/lng coordinates.

destination
object

Drop off location.

destination.lat
float
required

Latitude of a location.

destination.lng
float
required

Longitude of a location.

destination.address
string

Display address at/near the lat/lng coordinates.

ride_type
string
required

Ride type; supported values depend on your location, check Availability - Ride Types for acceptable values (possible examples include lyft, lyft_plus, etc).

primetime_confirmation_token
string

(Deprecated) Prime Time Confirmation token. See below for more information.

cost_token
string

Cost token. See below for more information.

 

Rate Limit

5 calls per minute.

Prime Time Confirmation and Cost Tokens

If Prime Time is active, the response will include a Cost Token under the key cost_token. It is your application's responsibility to confirm the user's acceptance of Prime Time pricing. Once the user has accepted the pricing, your application should repeat the request with the confirmation token to confirm the ride request. The Cost Token locks in pricing for one minute. Note that this is the same cost_token that is also in the Availability - Ride Estimates response when querying that endpoint with a user context.

A primetime_confirmation_token still works as expected for backwards-compatibility purposes, but cost_token will be replacing it for more uses in the future. If you can, please include it in your request body parameter instead.

Lyft Line Limitations

Lyft Line is not currently fully supported by the API. The API does not make available the ability to specify the number of passengers in a ride, retrieve information about other passengers who may be part of the route, or any other Line-specific features. If you do make Lyft Line available to your app, it is your responsibility to indicate a maximum of one passenger, and to notify the user that other passengers may be in the ride. You can find more information on Lyft Line here.

201 Success Response Schema

Field Name
Field Type
Field Description

ride_id

string

Requested ride ID.

status

string

Ride status for a newly requested ride will be returned as pending.

ride_type

string

Ride type will correspond to the ride_type request body parameter.

origin

object

Requested location for passenger pickup.

origin.lat

double

Latitude of the location.

origin.lng

double

Longitude of the location.

origin.address

string

Display address at/near the location.

destination

object

Requested location for passenger drop off.

destination.lat

double

Latitude of the location.

destination.lng

double

Longitude of the location.

destination.address

string

Display address at/near the given location.

passenger

object

Passenger

passenger.user_id

string

Passenger user ID.

passenger.first_name

string

Passenger first name.

passenger.last_name

string

Passenger last name.

passenger.image_url

string

Passenger profile image.

passenger.rating

string

Passenger current rating (0.0 – 5.0).

400 Failure Response Schema

Field Name
Field Type
Field Description

error

string

bad_parameter: A validation error occurred. Details in the error_description field.

no_service_in_area: The origin location is not within a Lyft service area.

ridetype_unavailable_in_region: Ride type not supported at the origin location.

primetime_confirmation_required: User must accept Prime Time. A Prime Time Confirmation token and a Cost token are included in the response.

invalid_primetime_confirmation: Supplied token is invalid or expired.

destination_prohibited: Lyft is not allowed to drop off at that destination location. See user-displayable details in the error_description field.

client_error: An uncategorized error. Details in the error_description field.

error_detail

array

Array of key-value pairs with detailed error messages.

error_description

string

Error description.

primetime_percentage

string

Current Prime Time percentage. Prime Time adds a percentage to ride costs, prior to other applicable fees. If Prime Time is inactive, the value returned will be "0%".

primetime_multiplier

double

Current Prime Time multiplier. If primetime_percentage is "100%", then primetime_multiplier will be 2.0.

primetime_confirmation_token

string

(Deprecated) A token that should be used to confirm that the user has accepted current Prime Time. See note above.

cost_token

string

A token that should be used to confirm that the user has accepted current Prime Time and/or fixed price charges. See note above.

token_duration

string

Validity of the token in seconds.

error_uri

string

When a user must go through another flow before requesting a ride, this URI specifies which flow to use (e.g. an account challenge flow in a web view).

4XX Failure Response Schema

Field Name
Field Type
Description

error

string

user_payment_required: User does not have a valid payment method on file. They must use the Lyft app to add or update one.

account_disabled: User's account has been suspended, and they must contact Lyft support.

user_in_driver_mode: User is logged in as a driver and can’t request rides until they log out.

verified_phone_required: User has not provided or verified their phone number. They can add one in the Lyft app.

no_drivers_available: No drivers are available right now.

user_already_in_ride: User cannot request a ride while in a ride.

error_detail

array

Array of key-value pairs with detailed error messages.

error_description

string

Error description.

Suggest Edits

Ride - Details

A GET to the /rides/<ride_id> endpoint allows your application to get details about the specified ride.

 
gethttps://api.lyft.com/v1/rides/ride_id
curl -X GET -H "Authorization: Bearer <access_token>" \
     -H "Content-Type: application/json" \
     'https://api.lyft.com/v1/rides/<ride_id>'
import "github.com/lyft/lyft-go-sdk/lyft"

result, resp, err := client.UserApi.GetRide("<ride_id>")
import lyft from 'node-lyft';
let defaultClient = lyft.ApiClient.instance;

// Configure OAuth2 access token for authorization: User Authentication
let userAuth = defaultClient.authentications['User Authentication'];
userAuth.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new lyft.UserApi();

let id = "123"; // The ID of the ride

apiInstance.getRide(id).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});
A binary file was returned

You couldn't be authenticated

{
  "status": "pending",
  "ride_id": "123",
  "ride_type": "lyft",
  "passenger": {
    "rating": "5",
    "first_name": "John",
    "last_name": "Smith",
    "image_url": "https://lyft.com/max1200.jpg",
    "user_id": "123"
  },
  "destination": {
    "lat": 37.771,
    "lng": -122.39123,
    "eta_seconds": null,
    "address": "Mission Bay Boulevard North"
  },
  "origin": {
    "lat": 37.77663,
    "lng": -122.39227,
    "address": null
  }
}
{
  "status": "accepted",
  "origin": {
    "lat": 37.77663,
    "lng": -122.39227,
    "eta_seconds": 180,
    "address": null
  },
  "ride_type": "lyft",
  "passenger": {
    "rating": "5",
    "first_name": "John",
    "last_name": "Smith",
    "image_url": "https://lyft.com/pax.jpg",
    "user_id": "123"
  },
  "requested_at": "2017-05-18T21:16:30+00:00",
  "destination": {
    "lat": 37.771,
    "lng": -122.39123,
    "eta_seconds": null,
    "address": "Mission Bay Boulevard North"
  },
  "driver": {
    "phone_number": "+123",
    "rating": "5",
    "first_name": "Ronald",
    "image_url": "https://lyft.com/driver.jpg"
  },
  "vehicle": {
    "color": "Gold",
    "make": "Hyundai",
    "license_plate": "123ABC",
    "image_url": "https://lyft.com/car.png",
    "year": 2016,
    "license_plate_state": "CA",
    "model": "Elantra"
  },
  "can_cancel": [
    "driver",
    "passenger",
    "dispatcher"
  ],
  "route_url": "https://lyft.com/route",
  "ride_id": "123",
  "generated_at": "2017-05-18T21:16:53+00:00",
  "pricing_details_url": "https://www.lyft.com/pricing/SFO",
  "ride_profile": "personal",
  "location": {
    "lat": 37.779407,
    "bearing": 240.0,
    "lng": -122.390427
  }
}
{
  "status": "arrived",
  "origin": {
    "lat": 37.77663,
    "lng": -122.39227,
    "eta_seconds": null,
    "address": null
  },
  "ride_type": "lyft",
  "passenger": {
    "rating": "5",
    "first_name": "John",
    "last_name": "Smith",
    "image_url": "https://lyft.com/pax.jpg",
    "user_id": "123"
  },
  "requested_at": "2017-05-18T21:16:30+00:00",
  "destination": {
    "lat": 37.771,
    "lng": -122.39123,
    "eta_seconds": 60,
    "address": "Mission Bay Boulevard North"
  },
  "driver": {
    "phone_number": "+123",
    "rating": "5",
    "first_name": "Ronald",
    "image_url": "https://lyft.com/driver.jpg"
  },
  "vehicle": {
    "color": "Gold",
    "make": "Hyundai",
    "license_plate": "123ABC",
    "image_url": "https://lyft.com/car.png",
    "year": 2016,
    "license_plate_state": "CA",
    "model": "Elantra"
  },
  "can_cancel": [
    "driver",
    "passenger",
    "dispatcher"
  ],
  "route_url": "https://www.lyft.com/route",
  "ride_id": "123",
  "generated_at": "2017-05-18T21:21:35+00:00",
  "pricing_details_url": "https://www.lyft.com/pricing/SFO",
  "ride_profile": "personal",
  "location": {
    "lat": 37.776625,
    "bearing": null,
    "lng": -122.392421
  }
}
{
  "status": "pickedUp",
  "origin": {
    "lat": 37.77663,
    "lng": -122.39227,
    "eta_seconds": null,
    "address": null
  },
  "ride_type": "lyft",
  "passenger": {
    "rating": "5",
    "first_name": "John",
    "last_name": "Smith",
    "image_url": "https://lyft.com/pax.jpg",
    "user_id": "123"
  },
  "cancellation_price": {
    "token_duration": 90,
    "currency": "USD",
    "amount": 500,
    "description": "Cancellation penalty",
    "token": "foo"
  },
  "destination": {
    "lat": 37.771,
    "lng": -122.39123,
    "eta_seconds": 120,
    "address": "Mission Bay Boulevard North"
  },
  "driver": {
    "phone_number": "+123",
    "rating": "5",
    "first_name": "Ronald",
    "image_url": "https://lyft.com/driver.jpg"
  },
  "vehicle": {
    "color": "Gold",
    "make": "Hyundai",
    "license_plate": "123ABC",
    "image_url": "https://lyft.com/driver.png",
    "year": 2016,
    "license_plate_state": "CA",
    "model": "Elantra"
  },
  "can_cancel": [
    "driver",
    "passenger",
    "dispatcher"
  ],
  "pickup": {
    "lat": 37.77634,
    "lng": -122.39215,
    "time": "2017-05-18T21:22:03+00:00",
    "address": null
  },
  "route_url": "https://www.lyft.com/route",
  "ride_id": "123",
  "generated_at": "2017-05-18T21:22:07+00:00",
  "pricing_details_url": "https://www.lyft.com/pricing/SFO",
  "requested_at": "2017-05-18T21:16:30+00:00",
  "ride_profile": "personal",
  "location": {
    "lat": 37.776359,
    "bearing": 193.0,
    "lng": -122.39216
  }
}
{
  "status": "droppedOff",
  "line_items": [
    {
      "currency": "USD",
      "amount": 500,
      "type": "Lyft fare"
    },
    {
      "currency": "USD",
      "amount": 250,
      "type": "Prime Time + 50%"
    },
    {
      "currency": "USD",
      "amount": 175,
      "type": "Service fee"
    }
  ],
  "passenger": {
    "rating": "5",
    "first_name": "John",
    "last_name": "Smith",
    "image_url": "https://lyft.com/pax.jpg",
    "user_id": "123"
  },
  "ride_type": "lyft",
  "dropoff": {
    "lat": 37.77075,
    "lng": -122.39126,
    "time": "2017-05-18T21:26:28+00:00",
    "address": null
  },
  "requested_at": "2017-05-18T21:16:30+00:00",
  "price": {
    "currency": "USD",
    "amount": 925,
    "description": "Total ride price"
  },
  "destination": {
    "lat": 37.771,
    "lng": -122.39123,
    "eta_seconds": null,
    "address": "Mission Bay Boulevard North"
  },
  "driver": {
    "phone_number": "+123",
    "rating": "5",
    "first_name": "Ronald",
    "image_url": "https://lyft.com/driver.jpg"
  },
  "primetime_percentage": "50%",
  "vehicle": {
    "color": "Gold",
    "make": "Hyundai",
    "license_plate": "123ABC",
    "image_url": "https://lyft.com/car.png",
    "year": 2016,
    "license_plate_state": "CA",
    "model": "Elantra"
  },
  "pickup": {
    "lat": 37.77634,
    "lng": -122.39215,
    "time": "2017-05-18T21:22:03+00:00",
    "address": null
  },
  "route_url": "https://www.lyft.com/route",
  "ride_id": "123",
  "generated_at": "2017-05-18T21:27:02+00:00",
  "pricing_details_url": "https://www.lyft.com/pricing/SFO",
  "ride_profile": "personal",
  "origin": {
    "lat": 37.77663,
    "lng": -122.39227,
    "eta_seconds": null,
    "address": null
  }
}
 {
  "status": "droppedOff",
  "line_items": [
    {
      "currency": "USD",
      "amount": 500,
      "type": "Lyft fare"
    },
    {
      "currency": "USD",
      "amount": 250,
      "type": "Prime Time + 50%"
    },
    {
      "currency": "USD",
      "amount": 175,
      "type": "Service fee"
    },
    {
      "currency": "USD",
      "amount": 200,
      "type": "Tip"
    }
  ],
  "passenger": {
    "rating": "5",
    "first_name": "John",
    "last_name": "Smith",
    "image_url": "https://lyft.com/pax.jpg",
    "user_id": "123"
  },
  "ride_type": "lyft",
  "dropoff": {
    "lat": 37.77075,
    "lng": -122.39126,
    "time": "2017-05-18T21:26:28+00:00",
    "address": " 4th St, San Francisco, CA "
  },
  "charges": [
    {
      "payment_method": "Card",
      "currency": "USD",
      "amount": 200
    },
    {
      "payment_method": "Lyft Credit",
      "currency": "USD",
      "amount": 925
    }
  ],
  "requested_at": "2017-05-18T21:16:30+00:00",
  "price": {
    "currency": "USD",
    "amount": 200,
    "description": "Total ride price"
  },
  "destination": {
    "lat": 37.771,
    "lng": -122.39123,
    "eta_seconds": null,
    "address": "Mission Bay Boulevard North"
  },
  "driver": {
    "phone_number": "+123",
    "rating": "5",
    "first_name": "Ronald",
    "image_url": "https://lyft.com/driver.jpg"
  },
  "primetime_percentage": "50%",
  "vehicle": {
    "color": "Gold",
    "make": "Hyundai",
    "license_plate": "7KSS534",
    "image_url": "https://lyft.com/car.png",
    "year": 2016,
    "license_plate_state": "CA",
    "model": "Elantra"
  },
  "pickup": {
    "lat": 37.77634,
    "lng": -122.39215,
    "time": "2017-05-18T21:22:03+00:00",
    "address": "593 Berry St, San Francisco, CA 94107"
  },
  "route_url": "https://www.lyft.com/route",
  "ride_id": "123",
  "generated_at": "2017-05-19T16:19:02+00:00",
  "pricing_details_url": "https://www.lyft.com/pricing/SFO",
  "ride_profile": "personal",
  "origin": {
    "lat": 37.77663,
    "lng": -122.39227,
    "eta_seconds": null,
    "address": null
  }
}

Path Params

ride_id
string
required

Ride ID. Returned by the Ride - Request endpoint.

 

Rate Limit

1000 calls per minute.

200 OK Response Schema

Field Name
Field Type
Field Description

ride_id

string

Ride ID.

status

string

Ride status (pending, accepted, arrived, pickedUp, droppedOff, canceled, unknown).

ride_type

string

Ride type (possible values for your location returned by Availability - Ride Types).

origin

object

Requested location for passenger pickup.

origin.lat

double

Latitude of the location.

origin.lng

double

Longitude of the location.

origin.address

string

Display address at/near the location.

origin.eta_seconds

int

Estimated time for the driver to arrive at the location. Available after ride status changes to accepted and until arrived.

pickup

object

Actual location of passenger pickup.

pickup.lat

double

Latitude of the location.

pickup.lng

double

Longitude of the location.

pickup.address

string

Display address at/near the location.

pickup.time

datetime

Timestamp of the event.

destination

object

Requested location for passenger drop off.

destination.lat

double

Latitude of the location.

destination.lng

double

Longitude of the location.

destination.address

string

Display address at/near the given location.

destination.eta_seconds

double

Estimated time for the driver to arrive at the location. Available after ride status changes to pickedUp and until droppedOff.

dropoff

object

Actual location of passenger drop off.

dropoff.lat

double

Latitude of the location.

dropoff.lng

double

Longitude of the location.

dropoff.address

string

Display address at/near the given location.

dropoff.time

datetime

Timestamp of the event.

location

object

Current location of the vehicle. Available after ride status changes to accepted and until droppedOff.

location.lat

double

Latitude of the location.

location.lng

double

Longitude of the location.

location.bearing

double

Bearing of the vehicle in degrees.

passenger

object

Passenger object.

passenger.user_id

string

Passenger user ID.

passenger.first_name

string

Passenger first name.

passenger.last_name

string

Passenger last name.

passenger.image_url

string

Passenger profile image.

passenger.rating

string

Passenger current rating (0.0 – 5.0).

driver

object

Driver object.

driver.user_id

string

Driver user ID.

driver.first_name

string

Driver first name.

driver.image_url

string

Driver profile image.

driver.rating

string

Driver current rating (0.0 – 5.0).

driver.phone_number

string

Driver phone number.

vehicle

object

Vehicle object.

vehicle.make

string

Vehicle make.

vehicle.model

string

Vehicle model.

vehicle.year

int

Vehicle year.

vehicle.license_plate

string

Vehicle license plate.

vehicle.license_plate_state

string

Vehicle license plate state (two letter abbreviation). Can be null.

vehicle.color

string

Vehicle color name, eg. black.

vehicle.image_url

string

Vehicle image.

primetime_percentage

string

Prime Time percentage applied to the base price.

distance_miles

double

Distance, in miles, that this ride traveled. Available after ride status changes to droppedOff.

duration_seconds

double

Duration of the ride in seconds from pickup to drop-off. Available after ride status changes to droppedOff.

price

object

Total cost for the ride. Available after ride status changes to droppedOff and the passenger has rated and paid for the ride, plus some processing time.

price.amount

int

Cost amount.

price.currency

string

ISO 4217 currency code for the amount (e.g. USD).

price.description

string

Description for the cost.

line_items

array

Break down of ride cost. Available after ride status changes to droppedOff and the passenger has rated and paid for the ride, plus some processing time.

line_items[].amount

int

Line item amount.

line_items[].currency

string

Currency for the amount.

line_items[].type

string

Line item display name for a charge item.

requested_at

datetime

Ride request timestamp.

generated_at

datetime

Request timestamp.

ride_profile

string

Indicates whether the ride was requested from the business profile or personal profile of the passenger.

beacon_color

string

Amp color HEX code, eg. #FFFFFF.

pricing_details_url

string

Link to a web view showing the pricing structure for the geographic area where the ride was taken.

route_url

string

Link to a web view showing the passenger, driver, and route information for a ride. This field will only be present for rides created via the API, or that have been shared through the "Share my Route" feature.

can_cancel

array

The array of actors who may cancel the ride at this point (driver, passenger, dispatcher).

canceled_by

string

The role of user who canceled the ride (if applicable).

cancellation_price

object

The cost of cancellation if there would be a penalty.

cancellation_price.amount

int

Ride cancellation fee.

cancellation_price.currency

string

The ISO 4217 currency code for the amount (e.g. USD).

cancellation_price.token

string

Token used to confirm the fee when cancelling a request.

cancellation_price.token_duration

int

How long, in seconds, before the token expires.

rating

int

The rating the user left for this ride, from 1 to 5.

feedback

string

The written feedback the user left for this ride.

4XX Failure Response Schema

Field Name
Field Type
Description

error

string

Error code.

error_detail

array

Array of key-value pairs with detailed error messages.

error_description

string

Error description.

Suggest Edits

Ride - Destination

A PUT to the /rides/<ride_id>/destination endpoint allows your application to update the destination of the specified ride. Note that the ride state must still be active (not droppedOff or canceled), and that destinations on Lyft Line rides cannot be changed.

 
puthttps://api.lyft.com/v1/rides/ride_id/destination
curl -X PUT -H "Authorization: Bearer <access_token> " \
     -H "Content-Type: application/json" \
     -d '{"lat" : 34.305658, "lng" : -118.8893667}' \
     'https://api.lyft.com/v1/rides/<ride_id>/destination'
import "github.com/lyft/lyft-go-sdk/lyft"

param := lyft.Location{
	Lat: 34.305658,
	Lng: -118.8893667,
}

result, resp, err := client.UserApi.SetRideDestination("<ride_id>", param)
import lyft from 'node-lyft';
let defaultClient = lyft.ApiClient.instance;

// Configure OAuth2 access token for authorization: User Authentication
let userAuth = defaultClient.authentications['User Authentication'];
userAuth.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new lyft.UserApi();

let id = "<ride_id>"; // The ID of the ride

let request = new lyft.Location(34.305658, -118.8893667);

apiInstance.setRideDestination(id, request).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});
A binary file was returned

You couldn't be authenticated

{
  "lat": 34.305658,
  "lng": -118.8893667,
}

Path Params

ride_id
string
required

Ride ID. Returned by the Ride - Request endpoint.

Body Params

lat
float
required

Latitude of a location.

lng
float
required

Longitude of a location.

address
string

Display address at/near the lat/lng coordinates.

 

Rate Limit

5 per minute, shared with Ride - Request.

200 Success Response Schema

Field Name
Field Type
Description

lat

double

Latitude of the location.

lng

double

Longitude of the location.

address

string

Display address at/near the location.

4XX Failure Response Schema

Field Name
Field Type
Description

error

string

bad_parameter: A validation error occurred

invalid_destination: Destination is generally invalid (eg. not in a Lyft service area)

destination_prohibited: Lyft drop-offs are not permitted at this location (eg. some airports). The ‘error_description’ field will contain an explanation suitable to display to the user.

ride_is_lyft_line: Cannot change the destination on Line rides

ride_is_finished: Ride has already been completed

ride_does_not_belong_to_user: User or client does not have permission to complete this request

error_detail

array

Array of key-value pairs with detailed error messages.

error_description

string

Error description.

Suggest Edits

Ride - Rating and Tipping

A PUT to the /rides/<ride_id>/rating endpoint allows your application to rate the specified ride. Add the passenger's 1 to 5 star rating of the ride, optional written feedback, and optional tip in dollars. 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.

 
puthttps://api.lyft.com/v1/rides/:ride_id/rating
curl -X PUT -H "Authorization: Bearer <access_token> " \
     -H "Content-Type: application/json" \
     -d '{"rating" : 5, "tip" : {"amount": 100, "currency": "USD"}, "feedback" : "great ride!"}' \
     'https://api.lyft.com/v1/rides/<ride_id>/rating'
import "github.com/lyft/lyft-go-sdk/lyft"

param := lyft.RatingRequest{
	Rating: 5,
	Tip: lyft.Tip{
		Amount:   100,
		Currency: "USD",
	},
	Feedback: "Great ride!",
}

resp, err := client.UserApi.SetRideRating("<ride_id>", param)
import lyft from 'node-lyft';
let defaultClient = lyft.ApiClient.instance;

// Configure OAuth2 access token for authorization: User Authentication
let userAuth = defaultClient.authentications['User Authentication'];
userAuth.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new lyft.UserApi();

let id = "<ride_id>"; // The ID of the ride

let request = new lyft.RatingRequest("5");
request.feedback = "Great ride!";
request.tip = new lyft.Tip();
request.tip.amount = 100;
request.tip.currency = "USD";

apiInstance.setRideRating(id, request).then(() => {
  console.log('API called successfully.');
}, (error) => {
  console.error(error);
});
A binary file was returned

You couldn't be authenticated

Content-Length: 0

Path Params

:ride_id
string
required

Ride ID. Returned by the Ride - Request endpoint.

Body Params

rating
int32
required

Numerical rating of the ride between 1 and 5, inclusive.

tip
object
tip.amount
integer

Tip for the driver, greater than 0 in minor currency units; e.g. 200 for $2.

tip.currency
string

Tip's 3-character currency code; e.g. 'USD'.

feedback
string

Written feedback beyond the numerical rating.

 

Rate Limit

5 per minute, shared with Ride - Request.

4XX Failure Response Schema

Field Name
Field Type
Description

error

string

bad_parameter: A validation error occurred.

user_cannot_rate_this_ride: Rides can only be rated once, within 24 hours of drop-off, and before the user starts another ride.

tip_too_large: Tip amount is too large for this ride.

tip_currency_not_accepted: That tip currency is not accepted.

ride_not_finished: Ride is still in progress (not yet in the droppedOff status).

error_detail

array

Array of key-value pairs with detailed error messages.

error_description

string

Error description.

Suggest Edits

Ride - Receipt

A GET to the /rides/<ride_id>/receipt endpoint allows your application to retrieve the receipt for the specified ride. Receipts are only available after the passenger has rated the ride and the payment processing has been completed. If you have webhooks set up, your webhook will receive an update when the receipt is ready.

 
gethttps://api.lyft.com/v1/rides/ride_id/receipt
curl -X GET -H "Authorization: Bearer <access_token>" \
     -H "Content-Type: application/json" \
     'https://api.lyft.com/v1/rides/<ride_id>/receipt'
import "github.com/lyft/lyft-go-sdk/lyft"

result, _, err := client.UserApi.GetRideReceipt("<ride_id>")
import lyft from 'node-lyft';
let defaultClient = lyft.ApiClient.instance;

// Configure OAuth2 access token for authorization: User Authentication
let userAuth = defaultClient.authentications['User Authentication'];
userAuth.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new lyft.UserApi();

let id = "<ride_id>"; // String | The ID of the ride

apiInstance.getRideReceipt(id).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});
A binary file was returned

You couldn't be authenticated

{
  "ride_id": "123456789",
  "price": {
    "amount": 905,
    "currency": "USD",
    "description": "Total ride price"
  },
  "line_items": [
    {
      "amount": 500,
      "currency": "USD",
      "type": "Ride"
    },
    {
      "amount": 250,
      "currency": "USD",
      "type": "Prime Time"
    },
    {
      "amount": 155,
      "currency": "USD",
      "type": "Trust & Service Fee"
    }
  ],
  "charges": [
    {
      "amount": 500,
      "currency": "USD",
      "payment_method": "Card"
    },
    {
      "amount": 405,
      "currency": "USD",
      "payment_method": "Lyft Credit"
    }
  ],
  "requested_at": "2015-09-24T23:26:25+00:00"
}

Path Params

ride_id
string
required

ID of a ride. Returned by the Ride - Request endpoint.

 

Rate Limit

1000 calls per minute, shared with Ride - Details.

200 OK Response Schema

Field Name
Field Type
Field Description

ride_id

string

Ride ID.

price

object

Total cost for the ride. Available after ride status changes to droppedOff and the passenger has rated and paid for the ride, plus some processing time.

price.amount

int

Cost amount.

price.currency

string

ISO 4217 currency code for the amount (e.g. USD).

price.description

string

Description for the cost.

line_items

array

Break down of ride cost. Available after ride status changes to droppedOff and the passenger has rated and paid for the ride, plus some processing time.

line_items[].amount

int

Line item amount.

line_items[].currency

string

Currency for the amount.

line_items[].type

string

Line item display name for a charge item.

charges

array

Break down of a charge.

charges.amount

int

The line item amount.

charges.currency

string

The ISO 4217 currency code for the amount (e.g. USD)

charges.payment_method

string

Payment method display name.

requested_at

datetime

Ride timestamp.

ride_profile

string

Indicates whether the ride was requested from the business profile or personal profile of the passenger.

4XX Failure Response Schema

Field Name
Field Type
Description

error

string

Error code.

error_detail

array

Array of key-value pairs with detailed error messages.

error_description

string

Error description.

Suggest Edits

Ride - Cancel

A POST to the /rides/<ride_id>/cancel endpoint allows your application to cancel the specified ride.

 
posthttps://api.lyft.com/v1/rides/ride_id/cancel
curl -X POST -H "Authorization: Bearer <access_token>" \
     -H "Content-Type: application/json" \
     'https://api.lyft.com/v1/rides/<ride_id>/cancel'
import "github.com/lyft/lyft-go-sdk/lyft"

resp, err := client.UserApi.CancelRide("<ride_id>", nil)
import lyft from 'node-lyft';
let defaultClient = lyft.ApiClient.instance;

// Configure OAuth2 access token for authorization: User Authentication
let userAuth = defaultClient.authentications['User Authentication'];
userAuth.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new lyft.UserApi();

let id = "<ride_id>"; // String | The ID of the ride

apiInstance.cancelRide(id).then(() => {
  console.log('API called successfully.');
}, (error) => {
  console.error(error);
});
A binary file was returned

You couldn't be authenticated

No Content

Path Params

ride_id
string
required

Ride ID. Returned by the Ride - Request endpoint.

Body Params

cancel_confirmation_token
string

Cancellation confirmation token.

 

Rate Limit

5 per minute, shared with Ride - Request.

Cancel Confirmation Tokens

In some cases, there may be a cancellation fee—which the user must pay—in order to cancel the ride. If there is a cancellation fee, the response will include a token, which is valid for token_duration seconds. Using this token, it is your application's responsibility to confirm the user's acceptance of the cancellation fee. Once the user has accepted the fee, your application should repeat the request with the <token> appended to the POST as the cancel_confirmation_token to confirm the ride cancellation. Cancellation fees appear depending on how much time has passed between the ride request and the cancellation attempt.

Example Ride Cancel Flow

Below you'll find an example ride cancellation flow, outlining the two possible response scenarios. First, you start with a POST using the <ride_id> you'd like to cancel for the user.

In the case where there's no cancellation fee, the API will respond with an HTTP 204 success code:

HTTP/1.1 204 No Content

If you receive this code, no further action is required. The ride has been cancelled at no charge to the user.

However, if you get an HTTP 400 error code with a cancel_confirmation_required error in the response body, you'll need to handle the cancellation as described in the callout above. Here's an example of this kind of response:

HTTP/1.1 400 - Bad Request
Content-Type: application/json

{
  "error": "cancel_confirmation_required",
  "error_detail": [
    {
      "cancel_confirmation": "a valid cancel_confirmation_token is required to cancel a ride"
    }
  ],
  "amount": 500,
  "currency": "USD",
  "token": "656a91d",
  "token_duration": 60
}

If you receive this kind of response (with a cancel_confirmation_required error) the ride hasn't been cancelled yet. This is because the ride has reached a stage where— if cancelled—your user would incur a cancellation fee. The fee itself is listed in the amount and currency fields in this response; in your application, the user should be presented with this information in some form, and a chance to confirm or deny the cancellation.

If the user agrees, use the supplied <token> as your cancel_confirmation_token in your next request. Note that the <token> is only valid for token_duration seconds. If your <token> expires, you'll have to re-request one, and it might include a different cancellation fee returned by amount. Again, if that happens, you should communicate the new fee to your user before using the <token> to fully cancel their ride.

Below is an example request including the <token> returned above to confirm the cancellation, along with piped grep to isolate the HTTP status code returned. If it's accepted, the request will return an HTTP 204 success code, your user's ride will be cancelled, and their Lyft account will be charged the <amount> cancellation fee.

curl -s -i -X POST -H "Authorization: Bearer <access_token>" \
     -H "Content-Type: application/json" \
     -d '{"cancel_confirmation_token":"656a91d"}' \
     'https://api.lyft.com/v1/rides/<ride_id>/cancel' | grep "HTTP"

HTTP/1.1 204 No Content

400 Failure Response Schema

Field Name
Field Type
Description

error

string

cancel_confirmation_required: Cancelation fee applies which the user must accept.

invalid_cancel_confirmation: Provided token was invalid or expired.

error_detail

array

Array of key-value pairs with detailed error messages.

error_description

string

Error description.

amount

double

Cancellation fee.

currency

string

The ISO 4217 currency code for the amount (e.g. USD).

token

string

Token used to confirm the fee when cancelling a request.

token_duration

int

How long, in seconds, before the token expires.

4XX Failure Response Schema

Field Name
Field Type
Description

error

string

Error code.

error_detail

array

Array of key-value pairs with detailed error messages.

error_description

string

Error description.

Suggest Edits

Availability - Ride Types

A GET to the /ridetypes endpoint returns the ride types available at the specified location, indicated by latitude and longitude. If no ride types are available at the specified location, the response will be an error.

 
gethttps://api.lyft.com/v1/ridetypes
curl --include -X GET -H 'Authorization: Bearer <access_token>' \
     'https://api.lyft.com/v1/ridetypes?lat=37.7763&lng=-122.3918'
import "github.com/lyft/lyft-go-sdk/lyft"

result, resp, err := client.PublicApi.GetRideTypes(37.7763, -122.3918, nil)
import lyft from 'node-lyft';
let defaultClient = lyft.ApiClient.instance;

// Configure OAuth2 access token for authorization: Client Authentication
let clientAuth = defaultClient.authentications['Client Authentication'];
clientAuth.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new lyft.PublicApi();

apiInstance.getRideTypes(37.7763, -122.3918).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});
A binary file was returned

You couldn't be authenticated

{
  "ride_types": [
    {
      "ride_type": "lyft_line",
      "display_name": "Lyft Line",
      "image_url": "https://cdn.lyft.com/assets/car_standard.png",
      "pricing_details": {
        "base_charge": 200,
        "cost_per_mile": 114,
        "cost_per_minute": 22,
        "cost_minimum": 475,
        "trust_and_service": 175,
        "currency": "USD",
        "cancel_penalty_amount": 500
      },
      "seats": 2
    },
    {
      "ride_type": "lyft",
      "display_name": "Lyft",
      "image_url": "https://cdn.lyft.com/assets/car_standard.png",
      "pricing_details": {
        "base_charge": 200,
        "cost_per_mile": 114,
        "cost_per_minute": 22,
        "cost_minimum": 500,
        "trust_and_service": 175,
        "currency": "USD",
        "cancel_penalty_amount": 500
      },
      "seats": 4
    },
    {
      "ride_type": "lyft_plus",
      "display_name": "Lyft Plus",
      "image_url": "https://cdn.lyft.com/assets/car_plus.png",
      "pricing_details": {
        "base_charge": 300,
        "cost_per_mile": 200,
        "cost_per_minute": 30,
        "cost_minimum": 700,
        "trust_and_service": 175,
        "currency": "USD",
        "cancel_penalty_amount": 500
      },
      "seats": 6
    },
    {
      "ride_type": "lyft_premier",
      "display_name": "Lyft Premier",
      "image_url": "https://cdn.lyft.com/assets/car_plus.png",
      "pricing_details": {
        "base_charge": 500,
        "cost_per_mile": 275,
        "cost_per_minute": 50,
        "cost_minimum": 900,
        "trust_and_service": 175,
        "currency": "USD",
        "cancel_penalty_amount": 500
      },
      "seats": 4
    },
    {
      "ride_type": "lyft_lux",
      "display_name": "Lyft Lux",
      "image_url": "https://cdn.lyft.com/assets/car_plus.png",
      "pricing_details": {
        "base_charge": 800,
        "cost_per_mile": 375,
        "cost_per_minute": 65,
        "cost_minimum": 1500,
        "trust_and_service": 175,
        "currency": "USD",
        "cancel_penalty_amount": 1000
      },
      "seats": 4
    },
    {
      "ride_type": "lyft_luxsuv",
      "display_name": "Lyft Lux SUV",
      "image_url": "https://cdn.lyft.com/assets/car_plus.png",
      "pricing_details": {
        "base_charge": 1500,
        "cost_per_mile": 375,
        "cost_per_minute": 90,
        "cost_minimum": 2500,
        "trust_and_service": 175,
        "currency": "USD",
        "cancel_penalty_amount": 1000
      },
      "seats": 6
    }
  ]
}

Query Params

lat
float
required

Latitude of a location

lng
float
required

Longitude of a location

ride_type
string

ID of a ride type. Returned by this endpoint.

 

Rate Limit

10000 calls per minute.

200 Success Response Schema

Field Name
Field Type
Description

ride_types

array

Array of ride types.

ride_types[].display_name

string

Human readable description of the ride type.

ride_types[].ride_type

string

Ride type (possible values include lyft, lyft_plus, lyft_line, lyft_premier, lyft_lux, lyft_luxsuv).

ride_types[].image_url

string

Image representing the ride type.

ride_types[].pricing_details

object

Pricing details for a ride.

ride_types[].pricing_details.base_charge

int

Base charge for a ride.

ride_types[].pricing_details.cost_per_mile

int

Cost per mile for a ride.

ride_types[].pricing_details.cost_per_minute

int

Cost per mile for a ride.

ride_types[].pricing_details.cost_minimum

int

Minimum charge for a ride.

ride_types[].pricing_details.trust_and_service

int

Service fee for a ride.

ride_types[].pricing_details.currency

string

The ISO 4217 currency code (e.g. USD).

ride_types[].pricing_details.cancel_penalty_amount

int

Charge amount if cancel penalty is involved.

ride_types[].seats

int

Maximum number of seats available for rides requested with this ride type.

4XX Failure Response Schema

Field Name
Field Type
Description

error

string

Error code.

error_detail

array

Array of key-value pairs with detailed error messages.

error_description

string

Error description.

Suggest Edits

Availability - Driver ETA

A GET to the /eta endpoint returns the estimated time in seconds it will take for the nearest driver to reach the specified location. A success response will be broken down by ridetypes available at the specified location. An optional ride_type parameter can be specified to only return the ETA for that ridetype. Valid inputs for the ride_type parameter can be found by querying the /v1/ridetypes endpoint.

An empty response indicates that the specified ride_type isn't available at the specified location. You can try requesting again without the ride_type parameter.

 
gethttps://api.lyft.com/v1/eta
curl --include -X GET -H 'Authorization: Bearer <access_token>' \
     'https://api.lyft.com/v1/eta?lat=37.7763&lng=-122.3918'
import "github.com/lyft/lyft-go-sdk/lyft"

result, resp, err := client.PublicApi.GetETA(37.7763, -122.3918, nil)
import lyft from 'node-lyft';
let defaultClient = lyft.ApiClient.instance;

// Configure OAuth2 access token for authorization: Client Authentication
let clientAuth = defaultClient.authentications['Client Authentication'];
clientAuth.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new lyft.PublicApi();

apiInstance.getETA(37.7763, -122.3918).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});
A binary file was returned

You couldn't be authenticated

HTTP/1.1 200 OK
Content-Type: application/json
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 59
Content-Length: 158
Connection: keep-alive

{
 "eta_estimates": [
   {
     "display_name": "Lyft Line",
     "ride_type": "lyft_line",
     "eta_seconds": 120,
     "is_valid_estimate": true
   },
   {
     "display_name": "Lyft",
     "ride_type": "lyft",
     "eta_seconds": 120,
     "is_valid_estimate": true
   },
   {
     "display_name": "Lyft Plus",
     "ride_type": "lyft_plus",
     "eta_seconds": 660,
     "is_valid_estimate": true
   }
 ]
}

Query Params

lat
float
required

Latitude of the origin location.

lng
float
required

Longitude of the origin location.

destination_lat
float

Latitude of the destination location.

destination_lng
float

Longitude of the destination location.

ride_type
string

ID of a ride type. Returned by the Ride Types endpoint.

 

Rate Limit

10000 calls per minute.

200 Success Response Schema

Field Name
Field Type
Description

eta_estimates

array

Array of ETAs.

eta_estimates[].ride_type

string

Ride type (lyft,lyft_plus,lyft_line`).

eta_estimates[].display_name

string

A human readable description of the ride type.

eta_estimates[].eta_seconds

int

Estimated seconds for a driver to pickup or reach destination based on ride status

eta_estimates.is_valid_estimate

bool

The validity of the ETA returned. See table below for more details.

Value of eta_seconds
Value of is_valid_estimate
Suggestion

null

true

No drivers currently available.

null

false

Unable to predict the ETA at this time; don't use eta_seconds.

Larger than 0

true

Use eta_seconds.

Larger than 0

false

Invalid combination; never returned.

4XX Failure Response Schema

Field Name
Field Type
Description

error

string

bad_parameter: A validation error occurred.

no_service_in_area: Location is not within a Lyft service area.

ridetype_unavailable_in_region: Ride type not supported at this location.

error_detail

array

Array of key-value pairs with detailed error messages.

error_description

string

Error description.

Suggest Edits

Availability - Ride Estimates

A GET to the /cost endpoint returns the estimated cost, distance, and duration of a ride between a start location and end location. A success response will be broken down by ride types available at the specified location. An optional ride_type parameter can be specified to only return the cost_estimate for that ride_type. Valid inputs for the ride_type parameter can be found by querying the /v1/ridetypes endpoint.

If the destination parameters are not supplied, the cost endpoint will simply return the Prime Time pricing at the specified location.

 
gethttps://api.lyft.com/v1/cost
curl --include -X GET -H 'Authorization: bearer <access_token>' \
     'https://api.lyft.com/v1/cost?start_lat=37.7763&start_lng=-122.3918&end_lat=37.7972&end_lng=-122.4533'
import "github.com/lyft/lyft-go-sdk/lyft"

opt := map[string]interface{}{
	"endLat": 37.7972,
	"endLng": -122.4533,
}

result, resp, err := client.PublicApi.GetCost(37.7763, -122.3918, opt)
import lyft from 'node-lyft';
let defaultClient = lyft.ApiClient.instance;

// Configure OAuth2 access token for authorization: Client Authentication
let clientAuth = defaultClient.authentications['Client Authentication'];
clientAuth.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new lyft.PublicApi();

let opts = { 
  'endLat': 37.7972, // Latitude of the ending location
  'endLng': -122.4533 // Longitude of the ending location
};

apiInstance.getCost(37.7763, -122.3918, opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});
A binary file was returned

You couldn't be authenticated

HTTP/1.1 200 OK
Content-Type: application/json

{
  "cost_estimates": [
    {
      "ride_type": "lyft_plus",
      "estimated_duration_seconds": 913,
      "estimated_distance_miles": 3.29,
      "estimated_cost_cents_max": 2355,
      "primetime_percentage": "25%",
      "currency": "USD",
      "estimated_cost_cents_min": 1561,
      "display_name": "Lyft Plus",
      "primetime_confirmation_token": null,
      "cost_token": null,
      "is_valid_estimate": true
    },
    {
      "ride_type": "lyft_line",
      "estimated_duration_seconds": 913,
      "estimated_distance_miles": 3.29,
      "estimated_cost_cents_max": 475,
      "primetime_percentage": "0%",
      "currency": "USD",
      "estimated_cost_cents_min": 475,
      "display_name": "Lyft Line",
      "primetime_confirmation_token": null,
      "cost_token": null,
      "is_valid_estimate": true
    },
    {
      "ride_type": "lyft",
      "estimated_duration_seconds": 913,
      "estimated_distance_miles": 3.29,
      "estimated_cost_cents_max": 1755,
      "primetime_percentage": "25%",
      "currency": "USD",
      "estimated_cost_cents_min": 1052,
      "display_name": "Lyft",
      "primetime_confirmation_token": null,
      "cost_token": null,
      "is_valid_estimate": true
    }
  ]
}

Query Params

start_lat
float
required

Latitude of the origin location.

start_lng
float
required

Longitude of the origin location.

end_lat
float

Latitude of the destination location.

end_lng
float

Longitude of the destination location.

ride_type
string

Ride type. Returned by the Ride Types endpoint.

 

Rate Limit

10000 calls per minute.

A note on Prime Time

Lyft rides may be subject to Prime Time pricing in cases where many passengers are requesting rides from the same area. If applicable, it is your app's responsibility to display the Prime Time cost to the user. The cost endpoint enables you to determine what the current value of Prime Time is via the primetime_percentage field. Note that in order to get Prime Time pricing prior to the ride request, we require a user context; check the Authentication section for details on leveraging the OAuth 3-legged flow to login on behalf of a user.

Since Prime Time may change between when you display the cost and when the user actually makes the request, the cost_token allows you to lock in a Prime Time percentage for a short period of time. You will need to pass the token through in the subsequent ride request. Like Prime Time pricing, the cost_token requires a user context; otherwise it will be null. The cost_token expires after one minute.

A primetime_confirmation_token still works as expected for backwards-compatibility purposes, but cost_token will be replacing it for more uses in the future. If you can, please include it in your request body parameter instead.

200 Success Response Schema

Field Name
Field Type
Description

cost_estimates

array

Array of estimates.

cost_estimates[].ride_type

string

Ride type (lyft,lyft_plus,lyft_line`).

cost_estimates[].display_name

string

A human readable description of the ride type.

cost_estimates[].estimated_cost_cents_max

int

Estimated upper bound for trip cost, in minor units (cents). Estimates are not guaranteed, and only provide a reasonable range based on current conditions.

cost_estimates[].estimated_cost_cents_min

int

Estimated lower bound for trip cost, in minor units (cents). Estimates are not guaranteed, and only provide a reasonable range based on current conditions.

cost_estimates[].estimated_distance_miles

double

Estimated distance for this ride.

cost_estimates[].estimated_distance_seconds

int

Estimated time to get from the start location to the end.

cost_estimates[].primetime_confirmation_token

string

(Deprecated) A token that should be used to confirm that the user has accepted current Prime Time. See note above.

cost_estimates[].cost_token

string

A token that should be used to confirm that the user has accepted current Prime Time and/or fixed price charges. See note above.

cost_estimates[].is_valid_estimate

bool

The validity of the cost estimate returned. When the API returns false for is_valid_estimate we also return 0 for cost estimates. When this happens, we do not have a valid cost estimate for the trip; typically this occurs when the queried trip is long distance.

4XX Failure Response Schema

Field Name
Field Type
Description

error

string

bad_parameter: A validation error occurred.

no_service_in_area: Location is not within a Lyft service area.

ridetype_unavailable_in_region: Ride type not supported at this location.

error_detail

array

Array of key-value pairs with detailed error messages.

error_description

string

Error description.

Suggest Edits

Availability - Nearby Drivers

A GET to the /drivers endpoint returns the location of drivers near a location. The result will contain a list of 5 locations for a sample of drivers for each ride type available at the specified latitude and longitude.

 
gethttps://api.lyft.com/v1/drivers
curl --include -X GET -H 'Authorization: Bearer <access_token>' 'https://api.lyft.com/v1/drivers?lat=37.7763&lng=-122.3918'
import "github.com/lyft/lyft-go-sdk/lyft"

result, resp, err := client.PublicApi.GetDrivers(37.7763, -122.3918)
import lyft from 'node-lyft';
let defaultClient = lyft.ApiClient.instance;

// Configure OAuth2 access token for authorization: Client Authentication
let clientAuth = defaultClient.authentications['Client Authentication'];
clientAuth.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new lyft.PublicApi();

apiInstance.getDrivers(37.7763, -122.3918).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});
A binary file was returned

You couldn't be authenticated

{
  "nearby_drivers": [
    {
      "drivers": [
        {
          "locations": [
            {
              "lat": 37.780099178,
              "lng": -122.4560498233
            },
            {
              "lat": 37.7800702739,
              "lng": -122.4560313931
            },
            {
              "lat": 37.7800616438,
              "lng": -122.456024372
            },
            {
              "lat": 37.7800546575,
              "lng": -122.4560217391
            },
            {
              "lat": 37.7800523287,
              "lng": -122.4560208615
            }
          ]
        },
        {
          "locations": [
            {
              "lat": 37.7812899999,
              "lng": -122.4565999839
            },
            {
              "lat": 37.7812899999,
              "lng": -122.4565999839
            },
            {
              "lat": 37.7812899999,
              "lng": -122.4565999839
            },
            {
              "lat": 37.7812899999,
              "lng": -122.4565999839
            },
            {
              "lat": 37.7812899999,
              "lng": -122.4565999839
            }
          ]
        },
        {
          "locations": [
            {
              "lat": 37.7746225247,
              "lng": -122.455451083
            },
            {
              "lat": 37.7746365535,
              "lng": -122.4553615805
            },
            {
              "lat": 37.774647136,
              "lng": -122.4552836749
            },
            {
              "lat": 37.7746548544,
              "lng": -122.4552194602
            },
            {
              "lat": 37.7746574272,
              "lng": -122.455174722
            }
          ]
        },
        {
          "locations": [
            {
              "lat": 37.7791899999,
              "lng": -122.4621399844
            },
            {
              "lat": 37.7791899999,
              "lng": -122.4621399844
            },
            {
              "lat": 37.7791899999,
              "lng": -122.4621399844
            },
            {
              "lat": 37.7791899999,
              "lng": -122.4621399844
            },
            {
              "lat": 37.7791899999,
              "lng": -122.4621399844
            }
          ]
        },
        {
          "locations": [
            {
              "lat": 37.7735039334,
              "lng": -122.4648762032
            },
            {
              "lat": 37.7735338571,
              "lng": -122.4646185389
            },
            {
              "lat": 37.7735576375,
              "lng": -122.4644094286
            },
            {
              "lat": 37.7735790551,
              "lng": -122.4642197622
            },
            {
              "lat": 37.7735995277,
              "lng": -122.4640398734
            }
          ]
        },
        {
          "locations": [
            {
              "lat": 37.7806871969,
              "lng": -122.4700446885
            },
            {
              "lat": 37.7806924577,
              "lng": -122.469883254
            },
            {
              "lat": 37.7807001761,
              "lng": -122.4697350885
            },
            {
              "lat": 37.7807080705,
              "lng": -122.4696220264
            },
            {
              "lat": 37.7807140353,
              "lng": -122.4694910057
            }
          ]
        },
        {
          "locations": [
            {
              "lat": 37.7857499999,
              "lng": -122.4436299827
            },
            {
              "lat": 37.7857499999,
              "lng": -122.4436299827
            },
            {
              "lat": 37.7857499999,
              "lng": -122.4436299827
            },
            {
              "lat": 37.7857499999,
              "lng": -122.4436299827
            },
            {
              "lat": 37.7857499999,
              "lng": -122.4436299827
            }
          ]
        },
        {
          "locations": [
            {
              "lat": 37.77686,
              "lng": -122.4718497879
            },
            {
              "lat": 37.77686,
              "lng": -122.4718499098
            },
            {
              "lat": 37.77686,
              "lng": -122.4718499562
            },
            {
              "lat": 37.77686,
              "lng": -122.4718499736
            },
            {
              "lat": 37.77686,
              "lng": -122.4718499794
            }
          ]
        }
      ],
      "ride_type": "lyft"
    }
  ]
}

Query Params

lat
float
required

Latitude of a location.

lng
float
required

Longitude of a location.

 

Rate Limit

5 calls per minute.

200 Success Response Schema

Field Name
Field Type
Description

nearby_drivers

array

Array of drivers at/near a location.

nearby_drivers[].drivers

array

Array of drivers.

nearby_drivers[].drivers[].locations

array

Array of 5 latest coordinates of a driver.

nearby_drivers[].drivers[].locations[].lat

double

Latitude of a location.

nearby_drivers[].drivers[].locations[].lng

double

Longitude of a location.

nearby_drivers[].ride_type

string

Ride type (lyft, lyft_plus, lyft_line).

4XX Failure Response Schema

Field Name
Field Type
Description

error

string

Error code.

error_detail

array

Array of key-value pairs with detailed error messages.

error_description

string

Error description.

Suggest Edits

Users - Ride History

A GET to the /rides endpoint returns a list of current and past rides for a given, authenticated passenger. If there's a ride in progress, location will have the ride's current location.

 
gethttps://api.lyft.com/v1/rides
curl -X GET -H "Authorization: Bearer <access_token>" \
     'https://api.lyft.com/v1/rides?start_time=2015-12-01T21:04:22Z'
import "github.com/lyft/lyft-go-sdk/lyft"

result, resp, err := client.UserApi.GetRides(time.Now().AddDate(0, 0, -3), nil)
import lyft from 'node-lyft';
let defaultClient = lyft.ApiClient.instance;

// Configure OAuth2 access token for authorization: User Authentication
let userAuth = defaultClient.authentications['User Authentication'];
userAuth.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new lyft.UserApi();

let startTime = new Date("2017-01-20T19:20:30+01:00");

apiInstance.getRides(startTime).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});
A binary file was returned

You couldn't be authenticated

{
  "ride_history": [
    {
      "ride_id": "123456789",
      "status": "droppedOff",
      "ride_type": "lyft",
      "passenger": {
        "first_name": "Jane",
        "phone_number": "+15554445000"
      },
      "driver": {
        "first_name": "Joe",
        "phone_number": "+15554445000",
        "rating": "4.9",
        "image_url": "http://example.com/lyft.png"
      },
      "vehicle": {
        "make": "Audi",
        "model": "A4",
        "license_plate": "AAAAAAA",
        "color": "black",
        "image_url": "http://example.com/lyft.png"
      },
      "origin": {
        "lat": 36.9442175,
        "lng": -123.8679133,
        "address": "123 Main St, Anytown, CA",
        "eta_seconds": null
      },
      "destination": {
        "lat": 36.9442175,
        "lng": -123.8679133,
        "address": "123 Main St, Anytown, CA",
        "eta_seconds": null
      },
      "pickup": {
        "lat": 36.9442175,
        "lng": -123.8679133,
        "address": "123 Main St, Anytown, CA",
        "time": "2015-09-24T23:27:25+00:00"
      },
      "dropoff": {
        "lat": 36.9442175,
        "lng": -123.8679133,
        "address": "123 Main St, Anytown, CA",
        "time": "2015-09-24T23:28:32+00:00"
      },
      "location": {
        "lat": 36.9442175,
        "lng": -123.8679133,
        "address": "123 Main St, Anytown, CA"
      },
      "primetime_percentage": "50%",
      "price": {
        "amount": 905,
        "currency": "USD",
        "description": "Total ride price"
      },
      "line_items": [
        {
          "amount": 500,
          "currency": "USD",
          "type": "Ride"
        },
        {
          "amount": 250,
          "currency": "USD",
          "type": "Prime Time"
        },
        {
          "amount": 155,
          "currency": "USD",
          "type": "Trust & Service Fee"
        }
      ],
      "eta_seconds": 200,
      "requested_at": "2017-01-24T23:26:25+00:00"
    }
  ]
}

Query Params

start_time
date
required

Restrict to rides starting after this point in time. The earliest supported date is 2015-01-01T00:00:00Z.

end_time
date

Restrict to rides starting before this point in time. The earliest supported date is 2015-01-01T00:00:00Z.

limit
int32

Maximum number of rides to return. The default limit is 10 if not specified. The maximum possible value is 50.

 

Rate Limit

1000 calls per minute.

200 OK Response Schema

Field Name
Field Type
Field Description

ride_history

array

Array of rides.

ride_history[].ride_id

string

Ride ID.

ride_history[].status

string

Ride status (pending, accepted, arrived, pickedUp, droppedOff, canceled, unknown).

ride_history[].ride_type

string

Ride type (lyft, lyft_plus, lyft_line).

ride_history[].origin

object

Requested location for passenger pickup.

ride_history[].origin.lat

double

Latitude of the location.

ride_history[].origin.lng

double

Longitude of the location.

ride_history[].origin.address

string

Display address at/near the location.

ride_history[].origin.eta_seconds

int

Estimated time for the driver to arrive at the location. Available after ride status changes to accepted and until arrived.

ride_history[].pickup

object

Actual location of passenger pickup.

ride_history[].pickup.lat

double

Latitude of the location.

ride_history[].pickup.lng

double

Longitude of the location.

ride_history[].pickup.address

string

Display address at/near the location.

ride_history[].pickup.time

datetime

Timestamp of the event.

ride_history[].destination

object

Requested location for passenger drop off.

ride_history[].destination.lat

double

Latitude of the location.

ride_history[].destination.lng

double

Longitude of the location.

ride_history[].destination.address

string

Display address at/near the given location.

ride_history[].destination.eta_seconds

double

Estimated time for the driver to arrive at the location. Available after ride status changes to pickedUp and until droppedOff.

ride_history[].dropoff

object

Actual location of passenger drop off.

ride_history[].dropoff.lat

double

Latitude of the location.

ride_history[].dropoff.lng

double

Longitude of the location.

ride_history[].dropoff.address

string

Display address at/near the given location.

ride_history[].dropoff.time

datetime

Timestamp of the event.

ride_history[].location

object

Current location of the vehicle. Available after ride status changes to pickedUp and until droppedOff.

ride_history[].location.lat

double

Latitude of the location.

ride_history[].location.lng

double

Longitude of the location.

ride_history[].location.bearing

double

Bearing of the vehicle in degrees.

ride_history[].passenger

object

Passenger object.

ride_history[].passenger.user_id

string

Passenger user ID.

ride_history[].passenger.first_name

string

Passenger first name.

ride_history[].passenger.last_name

string

Passenger last name.

ride_history[].passenger.image_url

string

Passenger profile image.

ride_history[].passenger.rating

string

Passenger current rating (0.0 – 5.0).

ride_history[].driver

object

Driver object.

ride_history[].driver.user_id

string

Driver user ID.

ride_history[].driver.first_name

string

Driver first name.

ride_history[].driver.image_url

string

Driver profile image.

ride_history[].driver.rating

string

Driver current rating (0.0 – 5.0).

ride_history[].driver.phone_number

string

Driver phone number.

ride_history[].vehicle

object

Vehicle object.

ride_history[].vehicle.make

string

Vehicle make.

ride_history[].vehicle.model

string

Vehicle model.

ride_history[].vehicle.year

int

Vehicle year.

ride_history[].vehicle.license_plate

string

Vehicle license plate.

ride_history[].vehicle.license_plate_state

string

Vehicle license plate state (two letter abbreviation).

ride_history[].vehicle.color

string

Vehicle color name, eg. black.

ride_history[].vehicle.image_url

string

Vehicle image.

ride_history[].primetime_percentage

string

Prime Time percentage applied to the base price.

ride_history[].distance_miles

double

Distance, in miles, that this ride traveled. Available after ride status changes to droppedOff.

ride_history[].duration_seconds

double

Duration of the ride in seconds from pickup to drop-off. Available after ride status changes to droppedOff.

ride_history[].price

object

Total cost for the ride. Available after ride status changes to droppedOff and the passenger has rated and paid for the ride, plus some processing time.

ride_history[].price.amount

int

Cost amount.

ride_history[].price.currency

string

ISO 4217 currency code for the amount (e.g. USD).

ride_history[].price.description

string

Description for the cost.

ride_history[].line_items

array

Break down of ride cost. Available after ride status changes to droppedOff and the passenger has rated and paid for the ride, plus some processing time.

ride_history[].line_items[].amount

int

Line item amount.

ride_history[].line_items[].currency

string

Currency for the amount.

ride_history[].line_items[].type

string

Line item display name for a charge item.

ride_history[].requested_at

datetime

Timestamp of when the request was made.

ride_history[].ride_profile

string

Indicates whether the ride was requested from the business profile or personal profile of the passenger.

ride_history[].beacon_color

string

Amp color HEX code, eg. #FFFFFF.

ride_history[].pricing_details_url

string

Link to a web view showing the pricing structure for the geographic area where the ride was taken.

ride_history[].route_url

string

Link to a web view showing the passenger, driver, and route information for a ride. This field will only be present for rides created via the API, or that have been shared through the "Share my Route" feature.

ride_history[].can_cancel

array

The array of actors who may cancel the ride at this point (driver, passenger, dispatcher).

ride_history[].canceled_by

string

The role of user who canceled the ride (if applicable).

ride_history[].cancellation_price

object

The cost of cancellation if there would be a penalty.

ride_history[].cancellation_price.amount

int

Ride cancellation fee.

`ride_history[].cancellation_price.currency

string

The ISO 4217 currency code for the amount (e.g. USD).

ride_history[].cancellation_price.token

string

Token used to confirm the fee when cancelling a request.

ride_history[].cancellation_price.token_duration

int

How long, in seconds, before the token expires.

ride_history[].rating

int

The rating the user left for this ride, from 1 to 5.

ride_history[].feedback

string

The written feedback the user left for this ride.

4XX Failure Response Schema

Field Name
Field Type
Description

error

string

Error code.

error_detail

array

Array of key-value pairs with detailed error messages.

error_description

string

Error description.

Suggest Edits

Users - Profile

A GET to the /profile only returns the authenticated user's id, first_name, and last_name. In the future it will return more information.

 
gethttps://api.lyft.com/v1/profile
curl -X GET -H "Authorization: Bearer <access_token>" \
     'https://api.lyft.com/v1/profile'
import "github.com/lyft/lyft-go-sdk/lyft"

result, _, err := client.UserApi.GetProfile()
import lyft from 'node-lyft';
let defaultClient = lyft.ApiClient.instance;

// Configure OAuth2 access token for authorization: User Authentication
let userAuth = defaultClient.authentications['User Authentication'];
userAuth.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new lyft.UserApi();
apiInstance.getProfile().then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});
A binary file was returned

You couldn't be authenticated

{
    "id": "123456789",
    "first_name": "Rick",
    "last_name": "Sanchez",
    "has_taken_a_ride": true
}
 

Rate Limit

5 calls per minute.

200 Success Response Schema

Field Name
Field Type
Description

id

string

Authenticated user's ID.

first_name

string

First name.

last_name

string

Last name.

has_taken_a_ride

boolean

Indicates whether the user has taken at least one Lyft ride.

Suggest Edits

Sandbox - Ride Status

Allows propagating a sandbox-ride through various ride status, allowing the developer to test various scenarios in the course of a ride from the initial request to the final drop off. First, sandbox credentials must be used to create a ride using the Ride - Request endpoint. Keep note of the ride_id. All sandbox-rides will start with an initial status of pending. In order to get the ride details, you can hit the Ride - Details endpoint with the same sandbox credentials.

 
puthttps://api.lyft.com/v1/sandbox/rides/ride_id
curl --include -X PUT -H 'Authorization: Bearer <access_token>' 'https://api.lyft.com/v1/sandbox/rides/4554071665457258493' -H 'Content-Type: application/json' -d '{"status": "accepted"}'
import "github.com/lyft/lyft-go-sdk/lyft"

param := lyft.SandboxRideStatus{
	Status: lyft.RideStatusAccepted,
}

result, resp, err := client.SandboxApi.SetRideStatus("4554071665457258493", param)
import lyft from 'node-lyft';
let defaultClient = lyft.ApiClient.instance;

// Configure OAuth2 access token for authorization: User Authentication
let userAuth = defaultClient.authentications['User Authentication'];
userAuth.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new lyft.SandboxApi();

let id = "<ride_id>"; // String | The ID of the ride

let request = new lyft.SandboxRideStatus("accepted");

apiInstance.setRideStatus(id, request).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});
A binary file was returned

You couldn't be authenticated

{
    "ride_id": "4319057680757320826", 
    "status": "accepted"
}

Path Params

ride_id
string
required

ID of a ride. Returned by the Ride - Request endpoint.

Body Params

status
string
required

Desired state to transition the ride to.

 

Rate Limit

10000 calls per minute, shared with all other Sandbox-specific endpoints.

Valid inputs for status

Status Meaning
pending Ride has been requested, but not yet matched with a driver
accepted A driver has accepted the request and is on the way to the pickup location
arrived The driver has arrived at the requested pickup location and is awaiting the passenger
pickedUp Driver has picked up the passenger and is en-route to the destination
droppedOff The passenger is dropped off at the final location
canceled The ride has been canceled. In this ride state, the additional field canceled_by indicates whether the ride was canceled by the driver, passenger, or no_drivers_available if no driver could be found for the ride.

200 Success Response Schema

Field Name
Field Type
Description

ride_id

string

Ride ID.

status

string

Ride status (pending, accepted, arrived, pickedUp, droppedOff, canceled).

4XX Failure Response Schema

Field Name
Field Type
Description

error

string

Error code.

error_detail

array

Array of key-value pairs with detailed error messages.

error_description

string

Error description.

Suggest Edits

Sandbox - Ride Types

Allows you to set the availability of different Lyft ride types in the region surrounding the specified latitude and longitude. Once the developer sets the ride_types for a given lat/lng, the Availability - Ride Types endpoint can be used to get the data.

 
puthttps://api.lyft.com/v1/sandbox/ridetypes
curl --include -X PUT 'https://api.lyft.com/v1/sandbox/ridetypes' \
-H 'Authorization: Bearer <access_token>' \
-H 'Content-Type: application/json' \
-d '{"lat": 37.7, "lng": -122.2, "ride_types": ["lyft", "lyft_line"]}'
import "github.com/lyft/lyft-go-sdk/lyft"

param := lyft.SandboxRideType{
	Lat: 37.7,
	Lng: -122.2,
	RideTypes: []lyft.RideTypeEnum{
		lyft.RideTypeLyft,
		lyft.RideTypeLyftLine,
	},
}

result, resp, err := client.SandboxApi.SetRideTypes(param)
import lyft from 'node-lyft';
let defaultClient = lyft.ApiClient.instance;

// Configure OAuth2 access token for authorization: User Authentication
let userAuth = defaultClient.authentications['User Authentication'];
userAuth.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new lyft.SandboxApi();

let request = new lyft.SandboxRideType(37.7, -122.2, ["lyft", "lyft_line"]);

apiInstance.setRideTypes(request).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});
A binary file was returned

You couldn't be authenticated

{
    "lat": 37.7, 
    "lng": -122.2, 
    "ride_types": [
        "lyft", 
        "lyft_line"
    ]
}

Body Params

lat
float
required

Latitude of a location.

lng
float
required

Longitude of a location.

ride_types
array of strings
required

Ride types.

 

Rate Limits

10000 calls per minute, shared with all other Sandbox-specific endpoints.

200 Success Response Schema

Field Name
Field Type
Description

lat

double

Latitude of the location.

lng

double

Longitude of the location.

ride_types

array

Ride types now available at the location.

4XX Failure Response Schema

Field Name
Field Type
Description

error

string

Error code.

error_detail

array

Array of key-value pairs with detailed error messages.

error_description

string

Error description.

Suggest Edits

Sandbox - Prime Time

Allows setting Prime Time in the region surrounding the specified latitude and longitude. The value, expressed as a percentage, will be applied when requesting a new ride or a ride cost estimate.

 
puthttps://api.lyft.com/v1/sandbox/primetime
curl --include -X PUT 'https://api.lyft.com/v1/sandbox/primetime' \ 
-H 'Authorization: Bearer <access_token>' \
-H 'Content-Type: application/json' \
-d '{"lat": 37.7, "lng": -122.2, "primetime_percentage": "25%"}'
import "github.com/lyft/lyft-go-sdk/lyft"

param := lyft.SandboxPrimetime{
	Lat: 37.7,
	Lng: -122.2,
	PrimetimePercentage: "25%",
}

resp, err := client.SandboxApi.SetPrimeTime(param)
import lyft from 'node-lyft';
let defaultClient = lyft.ApiClient.instance;

// Configure OAuth2 access token for authorization: Client Authentication
let Client Authentication = defaultClient.authentications['Client Authentication'];
Client Authentication.accessToken = 'YOUR ACCESS TOKEN';

// Configure OAuth2 access token for authorization: User Authentication
let User Authentication = defaultClient.authentications['User Authentication'];
User Authentication.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new lyft.SandboxApi();

let request = new lyft.SandboxPrimetime(37.7, -122.2, "25%");

apiInstance.setPrimeTime(request).then(() => {
  console.log('API called successfully.');
}, (error) => {
  console.error(error);
});
A binary file was returned

You couldn't be authenticated

Content-Length: 0

Body Params

lat
float
required

Latitude of a location.

lng
float
required

Longitude of a location.

primetime_percentage
string
required

Prime Time expressed as a percentage, eg. 25%.

 

Rate Limits

10000 calls per minute, shared with all other Sandbox-specific endpoints.

204 Success

Successfully applied Prime Time in sandbox.

4XX Failure Response Schema

Field Name
Field Type
Description

error

string

Error code.

error_detail

array

Array of key-value pairs with detailed error messages.

error_description

string

Error description.

Suggest Edits

Sandbox - Driver Availability

Allows developers to set driver availability for a Lyft ride type in the region surrounding the specified latitude and longitude. This is useful to test lapsed scenarios where drivers are busy and cannot accept a ride request.

 
puthttps://api.lyft.com/v1/sandbox/ridetypes/ride_type
curl --include -X PUT 'https://api.lyft.com/v1/sandbox/ridetypes/lyft_line' \ 
-H 'Authorization: Bearer <access_token>' \
-H 'Content-Type: application/json' \
-d '{"lat": 37.7833, "lng": -122.4167, "driver_availability": false}'
import "github.com/lyft/lyft-go-sdk/lyft"

param := lyft.SandboxDriverAvailability{
	Lat: 37.7833,
	Lng: -122.4167,
	DriverAvailability: false,
}

resp, err := client.SandboxApi.SetRideTypeAvailability(string(lyft.RideTypeLyftLine), param)
import lyft from 'node-lyft';
let defaultClient = lyft.ApiClient.instance;

// Configure OAuth2 access token for authorization: User Authentication
let userAuth = defaultClient.authentications['User Authentication'];
userAuth.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new lyft.SandboxApi();

let request = new lyft.SandboxDriverAvailability(37.7833, -122.4167, false);

apiInstance.setRideTypeAvailability("lyft_line", request).then(() => {
  console.log('API called successfully.');
}, (error) => {
  console.error(error);
});
A binary file was returned

You couldn't be authenticated

Content-Length: 0

Path Params

ride_type
string
required

Ride Type ID.

Body Params

lat
float
required

Latitude of a location.

lng
float
required

Longitude of a location.

driver_availability
boolean
required

Determines if drivers are available or busy.

 

Rate Limits

10000 calls per minute, shared with all other Sandbox-specific endpoints.

204 Success

Successfully set driver availability in sandbox.

4XX Failure Response Schema

Field Name
Field Type
Description

error

string

Error code.

error_detail

array

Array of key-value pairs with detailed error messages.

error_description

string

Error description.