openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 47.1 kB
JSON
{"openapi":"3.0.0","info":{"contact":{"email":"api-support@lyft.com","name":"Lyft","url":"http://developer.lyft.com"},"description":"Drive your app to success with Lyft's API","title":"Lyft","version":"1.0.0","x-apisguru-categories":["location"],"x-logo":{"url":"https://twitter.com/lyft/profile_image?size=original"},"x-origin":[{"format":"swagger","url":"https://api.lyft.com/v1/spec","version":"2.0"}],"x-providerName":"lyft.com"},"security":[{"Client_Authentication":["public"]},{"User_Authentication":["public"]}],"tags":[{"description":"Endpoints that do not require a user","name":"Public"},{"description":"Endpoints that require a user context","name":"User"},{"description":"Endpoints that manipulate the Lyft sandbox","name":"Sandbox"},{"description":"Endpoints that require special permission from Lyft to use","name":"Restricted"}],"paths":{"/cost":{"get":{"description":"Estimate the cost of taking a Lyft between two points.\n","operationId":"GetCost","parameters":[{"$ref":"#/components/parameters/OptionalRideType"},{"description":"Latitude of the starting location","in":"query","name":"start_lat","required":true,"schema":{"type":"number","format":"double"}},{"description":"Longitude of the starting location","in":"query","name":"start_lng","required":true,"schema":{"type":"number","format":"double"}},{"description":"Latitude of the ending location","in":"query","name":"end_lat","required":false,"schema":{"type":"number","format":"double"}},{"description":"Longitude of the ending location","in":"query","name":"end_lng","required":false,"schema":{"type":"number","format":"double"}}],"responses":{"200":{"description":"An object with an array of cost estimates by ride type","content":{"application/json":{"schema":{"properties":{"cost_estimates":{"items":{"$ref":"#/components/schemas/CostEstimate"},"type":"array"}},"title":"CostEstimateResponse","type":"object"}}}},"400":{"description":"The 'error' field will be one of the following:\n * `bad_parameter`: A validation error occurred\n * `no_service_in_area`: start location is not within a Lyft service area\n * `ridetype_unavailable_in_region`: ridetype not supported at this start location\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"summary":"Cost estimates","tags":["Public"]}},"/drivers":{"get":{"description":"The drivers endpoint returns a list of nearby drivers' lat and lng at a given location.\n","operationId":"GetDrivers","parameters":[{"$ref":"#/components/parameters/LatParam"},{"$ref":"#/components/parameters/LngParam"}],"responses":{"200":{"description":"An object with an array of available drivers sorted by eta for the given location","content":{"application/json":{"schema":{"properties":{"nearby_drivers":{"items":{"$ref":"#/components/schemas/NearbyDriversByRideType"},"type":"array"}},"title":"NearbyDriversResponse","type":"object"}}}},"400":{"description":"A validation error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"summary":"Available drivers nearby","tags":["Public"]}},"/eta":{"get":{"description":"The ETA endpoint lets you know how quickly a Lyft driver can come get you\n","operationId":"GetETA","parameters":[{"$ref":"#/components/parameters/LatParam"},{"$ref":"#/components/parameters/LngParam"},{"$ref":"#/components/parameters/OptionalDestLatParam"},{"$ref":"#/components/parameters/OptionalDestLngParam"},{"$ref":"#/components/parameters/OptionalRideType"}],"responses":{"200":{"description":"An object with an array of ETAs by ride type for the given location","content":{"application/json":{"schema":{"properties":{"eta_estimates":{"items":{"$ref":"#/components/schemas/Eta"},"type":"array"}},"title":"EtaEstimateResponse","type":"object"}}}},"400":{"description":"The 'error' field will be one of the following:\n * `bad_parameter`: A validation error occurred\n * `no_service_in_area`: location is not within a Lyft service area\n * `ridetype_unavailable_in_region`: ridetype not supported at this location\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"summary":"Pickup ETAs","tags":["Public"]}},"/profile":{"get":{"description":"The v1 of this endpoint returns the user's ID, v2 will return more general info about the user. We require authentication for this endpoint, so we extract the user ID from the access token.\n","operationId":"GetProfile","responses":{"200":{"description":"User ID was found and returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profile"}}}}},"security":[{"User_Authentication":["profile"]}],"summary":"The user's general info","tags":["User"]}},"/rides":{"get":{"description":"Get a list of past & current rides for this passenger.\n","operationId":"GetRides","parameters":[{"$ref":"#/components/parameters/StartTime"},{"$ref":"#/components/parameters/OptionalEndTime"},{"$ref":"#/components/parameters/OptionalLimit"}],"responses":{"200":{"description":"An object with an array of up to `limit` rides taken by the user between `start_time` and `end_time`.\n","content":{"application/json":{"schema":{"properties":{"ride_history":{"items":{"$ref":"#/components/schemas/RideDetail"},"type":"array"}},"title":"RidesResponse","type":"object"}}}},"400":{"description":"A validation error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"User_Authentication":["rides.read"]}],"summary":"List rides","tags":["User"]},"post":{"description":"Request a Lyft come pick you up at the given location.\n","operationId":"NewRide","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ride"}}},"description":"Ride request information","required":true},"responses":{"201":{"description":"An object with high level ride information. Use `GET /v1/rides/{id}` for more details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RideRequest"}}}},"400":{"description":"The 'error' field can be one of the following:\n * `bad_parameter`: A validation error occurred\n * `no_service_in_area`: origin is not within a Lyft service area\n * `ridetype_unavailable_in_region`: ridetype not supported at origin\n * `primetime_confirmation_required`: user must accept primetime. A primetime confirmation token and\ndetails will be included in the response\n * `invalid_primetime_confirmation`: supplied token is invalid or expired\n * `destination_prohibited`: Lyft is not allowed to drop off at that destination (e.g. some airports).\n User-displayable details in the 'error_description' field\n * `client_error`: an uncategorized error. Details in the 'error_description' field\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RideRequestError"}}}},"403":{"description":"User or client does not have permission to complete this request. Specific errors include:\n * `user_payment_required`: The user does not have a valid payment method on file.\n They must use the Lyft app to add or update one.\n * `account_disabled`: The user's account has been suspended, and they must contact Lyft support.\n * `user_in_driver_mode`: The user is logged in as a driver and can't request rides until they log out\n * `verified_phone_required`: The user has not provided or verified their phone number.\n They can add one in the Lyft app\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The 'error' field will be one of the following:\n * `no_drivers_available`: No drivers are available right now\n * `user_already_in_ride`: User cannot request a ride while in a ride\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"User_Authentication":["rides.request"]}],"summary":"Request a Lyft","tags":["User"]}},"/rides/{id}":{"get":{"description":"Get the status of a ride along with information about the driver, vehicle and price of a given ride ID\n","operationId":"GetRide","parameters":[{"description":"The ID of the ride","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Detailed ride information including ride status, driver information, passenger information, vehicle information, location information and price\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RideDetail"}}}},"403":{"description":"User or client does not have permission to complete this request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No ride found with provided ride ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"User_Authentication":["rides.read"]}],"summary":"Get the ride detail of a given ride ID","tags":["User"]}},"/rides/{id}/cancel":{"post":{"description":"Cancel a ongoing ride which was requested earlier by providing the ride id.\n","operationId":"CancelRide","parameters":[{"description":"The ID of the ride","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancellationRequest"}}}},"responses":{"204":{"description":"Successfully canceled the ride"},"400":{"description":"Cancellation token required\n * `cancel_confirmation_required`: a cancelation fee applies which the user must accept\n * `invalid_cancel_confirmation`: provided token was invalid or expired\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancellationCostError"}}}},"403":{"description":"User or client does not have permission to complete this request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No ride found with provided ride ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"You cannot cancel this ride","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"User_Authentication":["rides.request"]}],"summary":"Cancel a ongoing requested ride","tags":["User"]}},"/rides/{id}/destination":{"put":{"description":"Add or update the ride's destination. Note that the ride must still be active (not droppedOff or canceled), and that destinations on Lyft Line rides can not be changed.\n","operationId":"SetRideDestination","parameters":[{"description":"The ID of the ride","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Location"}}},"description":"The coordinates and optional address of the destination","required":true},"responses":{"200":{"description":"Successfully updated the destination. Returns the new destination.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Location"}}}},"400":{"description":"The 'error' field will be one of the following:\n * `bad_parameter`: A validation error occurred\n * `invalid_destination`: Destination is generally invalid (eg. not in a Lyft service area)\n * `destination_prohibited`: Lyft drop-offs are not permitted at this location (eg. some airports).\n The 'error_description' field will contain an explaination suitable to display to the user.\n * `ride_is_lyft_line`: Cannot change the destination on Line rides\n * `ride_is_finished`: Ride has already been completed\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"User or client does not have permission to complete this request (`ride_does_not_belong_to_user`)\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No ride found with provided ride ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"User_Authentication":["rides.request"]}],"summary":"Update the destination of the ride","tags":["User"]}},"/rides/{id}/rating":{"put":{"description":"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.\n","operationId":"SetRideRating","parameters":[{"description":"The ID of the ride","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RatingRequest"}}},"description":"The rating and optional feedback","required":true},"responses":{"204":{"description":"Successfully added the rating"},"400":{"description":"The 'error' field will be one of the following:\n * `bad_parameter`: A validation error occurred\n * `user_cannot_rate_this_ride`: Rides can only be rated once, within 24 hours of drop-off, and before\n the user starts another ride\n * `tip_too_large`: tip amount is too large for this ride\n * `tip_currency_not_accepted`: That tip currency is not accepted\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The 'error' field will be:\n * `ride_not_finished`: Ride is still in progress (not yet in the droppedOff status)\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"User_Authentication":["rides.request"]}],"summary":"Add the passenger's rating, feedback, and tip","tags":["User"]}},"/rides/{id}/receipt":{"get":{"description":"Get the receipt information of a processed ride by providing the ride id. Receipts will only be available to view once the payment has been processed. In the case of canceled ride, cancellation penalty is included if applicable.\n","operationId":"GetRideReceipt","parameters":[{"description":"The ID of the ride","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Detailed ride receipt information including cancel penalty if applicable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RideReceipt"}}}},"403":{"description":"User or client does not have permission to complete this request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No ride receipt found with provided ride ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"User_Authentication":["rides.read"]}],"summary":"Get the receipt of the rides.","tags":["User"]}},"/ridetypes":{"get":{"description":"The ride types endpoint returns information about what kinds of Lyft rides you can request at a given location.\n","operationId":"GetRideTypes","parameters":[{"$ref":"#/components/parameters/LatParam"},{"$ref":"#/components/parameters/LngParam"},{"$ref":"#/components/parameters/OptionalRideType"}],"responses":{"200":{"description":"An object with an array of available Ride Types for the given location","content":{"application/json":{"schema":{"properties":{"ride_types":{"items":{"$ref":"#/components/schemas/RideType"},"type":"array"}},"title":"RideTypesResponse","type":"object"}}}},"400":{"description":"A validation error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"summary":"Types of rides","tags":["Public"]}},"/sandbox/primetime":{"put":{"description":"Preset a Prime Time percentage in the region surrounding the specified location. This Prime Time percentage will be applied when requesting cost, or when requesting a ride in sandbox mode.\n","operationId":"SetPrimeTime","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxPrimetime"}}},"description":"Prime Time to be preset in the region surrounding the lat, lng","required":true},"responses":{"204":{"description":"Successfully applied Prime Time in sandbox"},"400":{"description":"Validation error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"summary":"Preset Prime Time percentage","tags":["Sandbox"]}},"/sandbox/rides/{id}":{"put":{"description":"Propagate a sandbox-ride through various ride status\n","operationId":"SetRideStatus","parameters":[{"description":"The ID of the ride","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRideStatus"}}},"description":"status to propagate the ride into","required":true},"responses":{"200":{"description":"An object with the Ride ID and the new status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRideUpdate"}}}},"400":{"description":"Validation error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"User or client does not have permission to complete this request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"User_Authentication":["rides.request"]}],"summary":"Propagate ride through ride status","tags":["Sandbox"]}},"/sandbox/ridetypes":{"put":{"description":"The sandbox-ridetypes endpoint allows you to preset the ridetypes in the region surrounding the specified latitude and longitude to allow testing different scenarios\n","operationId":"SetRideTypes","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRideType"}}},"description":"Ridetypes to be preset in the region surrounding the lat, lng","required":true},"responses":{"200":{"description":"An object listing the ridetypes at a given location","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRideType"}}}},"400":{"description":"Validation error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"summary":"Preset types of rides for sandbox","tags":["Sandbox"]}},"/sandbox/ridetypes/{ride_type}":{"put":{"description":"Set driver availability for the provided ride_type in the city/region surrounding the specified location\n","operationId":"SetRideTypeAvailability","parameters":[{"$ref":"#/components/parameters/RideStatusParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxDriverAvailability"}}},"description":"Driver availability to be preset in the region surrounding the lat, lng","required":true},"responses":{"204":{"description":"Successfully set driver availability in sandbox"},"400":{"description":"Validation error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"ride_type provided in the path is not supported in the current area","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"summary":"Driver availability for processing ride request","tags":["Sandbox"]}}},"servers":[{"url":"https://api.lyft.com/v1"}],"components":{"parameters":{"LatParam":{"description":"Latitude of a location","in":"query","name":"lat","required":true,"schema":{"type":"number","format":"double"}},"LngParam":{"description":"Longitude of a location","in":"query","name":"lng","required":true,"schema":{"type":"number","format":"double"}},"OptionalDestLatParam":{"description":"Latitude of destination location","in":"query","name":"destination_lat","required":false,"schema":{"type":"number","format":"double"}},"OptionalDestLngParam":{"description":"Longitude of destination location","in":"query","name":"destination_lng","required":false,"schema":{"type":"number","format":"double"}},"OptionalEndTime":{"description":"Restrict to rides starting before this point in time. The earliest supported date is 2015-01-01T00:00:00+00:00\n","in":"query","name":"end_time","required":false,"schema":{"type":"string","format":"date-time"}},"OptionalLimit":{"description":"The maximum number of rides to return. The default limit is 10 if not specified. The maximum allowed value is 50, an integer greater that 50 will return at most 50 results.\n","in":"query","name":"limit","schema":{"type":"integer","format":"int32","minimum":0,"maximum":50,"exclusiveMinimum":true,"exclusiveMaximum":false,"default":10}},"OptionalRideType":{"description":"ID of a ride type","in":"query","name":"ride_type","required":false,"schema":{"type":"string","enum":["lyft","lyft_line","lyft_plus","lyft_premier","lyft_lux","lyft_luxsuv"]}},"RideStatusParam":{"in":"path","name":"ride_type","required":true,"schema":{"type":"string","enum":["lyft","lyft_line","lyft_plus","lyft_premier","lyft_lux","lyft_luxsuv"]}},"StartTime":{"description":"Restrict to rides starting after this point in time. The earliest supported date is 2015-01-01T00:00:00+00:00\n","in":"query","name":"start_time","required":true,"schema":{"type":"string","format":"date-time"}}},"securitySchemes":{"Client_Authentication":{"description":"OAuth 2.0 - Application Only Credentials","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.lyft.com/oauth/token","scopes":{"public":"Access public information such as ETAs and cost estimates"}}}},"User_Authentication":{"description":"OAuth 2.0 - User Credentials","type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://api.lyft.com/oauth/authorize","tokenUrl":"https://api.lyft.com/oauth/token","scopes":{"profile":"Access profile information about the user","public":"Access public information such as ETAs and cost estimates","rides.read":"Access information about the user's current and past rides","rides.request":"Request a ride for the user. Cancel an existing request.\n"}}}}},"schemas":{"ApiError":{"description":"Details about why a request failed, such as missing or invalid parameters","properties":{"error":{"description":"A \"slug\" that serves as the error code (eg. \"bad_parameter\")","type":"string"},"error_description":{"description":"A user-friendly description of the error (appropriate to show to an end-user)","type":"string"},"error_detail":{"items":{"$ref":"#/components/schemas/ErrorDetail"},"type":"array"}}},"CancellationCost":{"allOf":[{"$ref":"#/components/schemas/Cost"},{"properties":{"token":{"description":"Token used to confirm the fee when cancelling a request","type":"string"},"token_duration":{"description":"How long, in seconds, before the token expires","format":"int32","minimum":0,"type":"integer"}},"type":"object"}],"type":"object"},"CancellationCostError":{"allOf":[{"$ref":"#/components/schemas/CancellationCost"},{"$ref":"#/components/schemas/ApiError"}],"example":{"amount":500,"currency":"USD","error":"cancel_confirmation_required","error_detail":[{"cancel_confirmation":"a valid cancel_confirmation_token is required to cancel a ride"}],"token":"656a91d","token_duration":60},"type":"object"},"CancellationRequest":{"example":{"cancel_confirmation_token":"656a91d"},"properties":{"cancel_confirmation_token":{"description":"Token affirming the user accepts the cancellation fee. Required if a cancellation fee is in effect.","type":"string"}}},"Charge":{"properties":{"amount":{"description":"The line item amount","format":"int32","type":"integer"},"currency":{"description":"The currency for the amount","type":"string"},"payment_method":{"description":"The payment method display name.","type":"string"}},"required":["amount","currency","payment_method"]},"Cost":{"example":{"amount":500,"currency":"USD","description":"Total cost"},"properties":{"amount":{"description":"Total price of the ride","format":"int32","type":"integer"},"currency":{"description":"The ISO 4217 currency code for the amount (e.g. USD)","type":"string"},"description":{"description":"The description for the cost","type":"string"}},"required":["amount","currency","description"]},"CostEstimate":{"description":"A non-guaranteed estimate of price","example":{"cost_token":"EupdCgIzy17lJoRmiO5","display_name":"Lyft","estimated_cost_cents_max":1080,"estimated_cost_cents_min":1390,"estimated_distance_miles":12.4,"estimated_duration_seconds":540,"is_valid_estimate":true,"primetime_confirmation_token":"EupdCgIzy17lJoRmiO5","primetime_percentage":"25%","ride_type":"lyft"},"properties":{"cost_token":{"description":"A token that confirms the user has accepted current Prime Time and/or fixed price charges. See 'Request a Lyft' for more details","type":"string"},"currency":{"description":"The ISO 4217 currency code for the amount (e.g. 'USD')","type":"string"},"display_name":{"description":"A human readable description of the ride type","type":"string"},"estimated_cost_cents_max":{"description":"Estimated upper bound for trip cost, in minor units (cents). Estimates are not guaranteed, and only provide a reasonable range based on current conditions.\n","format":"int32","type":"integer"},"estimated_cost_cents_min":{"description":"Estimated lower bound for trip cost, in minor units (cents). Estimates are not guaranteed, and only provide a reasonable range based on current conditions.\n","format":"int32","type":"integer"},"estimated_distance_miles":{"description":"Estimated distance for this trip\n","format":"double","type":"number"},"estimated_duration_seconds":{"description":"Estimated time to get from the start location to the end.\n","format":"int32","type":"integer"},"is_valid_estimate":{"description":"The validity of the cost estimate returned","type":"boolean"},"primetime_confirmation_token":{"description":"This token is needed when requesting rides. (Deprecated)","type":"string"},"primetime_percentage":{"description":"Current Prime Time Percentage. Prime Time adds a percentage to ride costs, prior to other applicable fees. When ride requests greatly outnumber available drivers, our system will automatically turn on Prime Time.\nIf Prime Time is inactive, the value returned will be '0%'.\nNote: The returned estimate already has Prime Time factored in. The value is returned here for reference and to allow users to confirm/accept Prime Time prior to initiating a ride.\n","type":"string"},"ride_type":{"$ref":"#/components/schemas/RideTypeEnum"}}},"CurrentRideLocation":{"allOf":[{"$ref":"#/components/schemas/LatLng"},{"properties":{"bearing":{"description":"Bearing of the driver's car in degrees","format":"double","type":"number"}},"type":"object"}],"example":{"bearing":134.8789520264,"lat":37.776157,"lng":-122.393817},"type":"object"},"DriverDetail":{"example":{"first_name":"Joe","image_url":"http://example.com/lyft.png","phone_number":"+15554445000","rating":"4.9","user_id":"123456789"},"properties":{"first_name":{"description":"The driver's first name","type":"string"},"image_url":{"description":"The driver's image url","type":"string"},"phone_number":{"description":"The driver's contact phone number. Must be E.164 formatted.\n","format":"phone","type":"string"},"rating":{"description":"The driver's rating based in 0-5 scale","type":"string"},"user_id":{"description":"The driver's id","type":"string"}},"required":["first_name","phone_number","rating","image_url","user_id"]},"ErrorDetail":{"description":"An object with a single key-value pair, where the key is the name of the invalid parameter, and the value is a description of the error.\n","example":{"lat":"(latitude) Missing required parameter in the query string"},"properties":{"field_name":{"description":"description of the error","type":"string"}}},"Eta":{"description":"Estimated Time of Arrival","example":{"display_name":"Lyft Line","eta_seconds":120,"is_valid_estimate":true,"ride_type":"lyft_line"},"properties":{"display_name":{"description":"A human readable description of the ride type","type":"string"},"eta_seconds":{"description":"Estimated seconds for a driver to arrive","format":"int32","type":"integer"},"eta_seconds_max":{"description":"Estimated upper bound of seconds for a driver to arrive","format":"int32","type":"integer"},"is_valid_estimate":{"description":"The validity of the ETA estimate returned","type":"boolean"},"ride_type":{"$ref":"#/components/schemas/RideTypeEnum"}}},"LatLng":{"example":{"lat":36.9442175,"lng":-123.8679133},"properties":{"lat":{"description":"The latitude component of a location","format":"double","type":"number"},"lng":{"description":"The longitude component of a location","format":"double","type":"number"}},"required":["lat","lng"]},"LineItem":{"properties":{"amount":{"description":"The line item amount","format":"int32","type":"integer"},"currency":{"description":"The currency for the amount","type":"string"},"type":{"description":"The line item display name for a charge item","type":"string"}},"required":["type","amount","currency"]},"Location":{"allOf":[{"$ref":"#/components/schemas/LatLng"},{"properties":{"address":{"description":"A human readable address at/near the given location","type":"string"}},"type":"object"}],"example":{"address":"123 Main St, Anytown, CA","lat":36.9442175,"lng":-123.8679133},"type":"object"},"NearbyDriver":{"properties":{"locations":{"description":"the lastest recorded driver locations up to 5 sorted in chronological order.","items":{"$ref":"#/components/schemas/LatLng"},"type":"array"}}},"NearbyDriversByRideType":{"properties":{"drivers":{"description":"list of nearby drivers group by ride type sorted by eta","items":{"$ref":"#/components/schemas/NearbyDriver"},"type":"array"},"ride_type":{"description":"driver's ride type. if driver is eligable for several ride types, he will be duplicated.","type":"string"}}},"PassengerDetail":{"allOf":[{"$ref":"#/components/schemas/UserDetail"},{"properties":{"last_name":{"description":"The passenger's last name","type":"string"},"user_id":{"description":"The passenger's lyft user id","type":"string"}},"type":"object"}],"example":{"first_name":"Jane","image_url":"https://public-api.lyft.com/static/images/user.png","last_name":"Doe","rating":4.9},"type":"object"},"PickupDropoffLocation":{"allOf":[{"$ref":"#/components/schemas/Location"},{"properties":{"time":{"description":"Server time when the location object is created","format":"date-time","type":"string"}},"type":"object"}],"example":{"address":"123 Main St, Anytown, CA","lat":36.9442175,"lng":-123.8679133,"time":"2025-04-15T13:49:50.932Z"},"type":"object"},"PricingDetails":{"example":{"base_charge":175,"cancel_penalty_amount":500,"cost_minumum":500,"cost_per_mile":116,"cost_per_minute":23,"currency":"USD","trust_and_service":155},"properties":{"base_charge":{"description":"The base charge of the trip","format":"int32","type":"integer"},"cancel_penalty_amount":{"description":"The charge amount if cancel penalty is involved","format":"int32","type":"integer"},"cost_minimum":{"description":"The minimum charge for the trip","format":"int32","type":"integer"},"cost_per_mile":{"description":"The cost per mile","format":"int32","type":"integer"},"cost_per_minute":{"description":"The cost per minute","format":"int32","type":"integer"},"currency":{"description":"The ISO 4217 currency code for the amount (e.g. USD)","type":"string"},"trust_and_service":{"description":"Service fee","format":"int32","type":"integer"}}},"Profile":{"description":"Represents the general information about a user.","properties":{"first_name":{"description":"The first name of this user","type":"string"},"has_taken_a_ride":{"description":"Indicates whether this user has taken at least one Lyft ride","type":"boolean"},"id":{"description":"The unique ID of this user","type":"string"},"last_name":{"description":"The last name of this user","type":"string"}},"required":["id","first_name","last_name","has_taken_a_ride"],"type":"object"},"RatingRequest":{"description":"Rating and optional feedback and tip","example":{"feedback":"Great ride!","rating":5,"tip":{"amount":100,"currency":"USD"}},"properties":{"feedback":{"description":"The passenger's written feedback about this ride","type":"string"},"rating":{"description":"The passenger's rating of this ride from 1 to 5","format":"int32","maximum":5,"minimum":1,"type":"integer"},"tip":{"allOf":[{"$ref":"#/components/schemas/TipParams"}],"description":"Tip amount in minor units and tip currency","type":"object"}},"required":["rating"]},"Ride":{"description":"Represents a requested, ongoing, or finished Lyft ride","properties":{"cost_token":{"description":"A token that confirms the user has accepted current Prime Time and/or fixed price charges","type":"string"},"destination":{"allOf":[{"$ref":"#/components/schemas/Location"}],"description":"The *requested* location for passenger drop off","type":"object"},"origin":{"allOf":[{"$ref":"#/components/schemas/Location"}],"description":"The *requested* location for passenger pickup","type":"object"},"primetime_confirmation_token":{"description":"A token that confirms the user has accepted current primetime charges (Deprecated)","type":"string"},"ride_type":{"$ref":"#/components/schemas/RideTypeEnum"}},"required":["ride_type","origin"],"type":"object"},"RideDetail":{"description":"Detail information about a ride","example":{"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":"2025-04-15T13:49:50.932Z"},"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":"2025-04-15T13:49:50.932Z"},"price":{"amount":905,"currency":"USD","description":"Total ride price"},"primetime_percentage":"50%","requested_at":"2025-04-15T13:49:50.932Z","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"}},"properties":{"beacon_color":{"description":"Hex color code of the driver AMP device.","type":"string"},"can_cancel":{"items":{"description":"The array of actors who may cancel the ride at this point","enum":["driver","passenger","dispatcher"],"type":"string"},"type":"array"},"canceled_by":{"description":"The role of user who canceled the ride (if applicable)","type":"string"},"cancellation_price":{"allOf":[{"$ref":"#/components/schemas/CancellationCost"}],"description":"The cost of cancellation if there would be a penalty","type":"object"},"destination":{"allOf":[{"$ref":"#/components/schemas/RideLocation"}],"description":"The *requested* location for passenger drop off","type":"object"},"distance_miles":{"description":"The distance, in miles, that this ride traveled. This field is only present after drop-off","format":"float","type":"number"},"driver":{"$ref":"#/components/schemas/DriverDetail"},"dropoff":{"allOf":[{"$ref":"#/components/schemas/PickupDropoffLocation"}],"description":"The *actual* location of passenger drop off","type":"object"},"duration_seconds":{"description":"Duration of the ride in seconds from pickup to drop-off. This field is only present after drop-off.","format":"int32","type":"integer"},"feedback":{"description":"The written feedback the user left for this ride","type":"string"},"generated_at":{"description":"The request timestamp in date and time","format":"date-time","type":"string"},"line_items":{"description":"The break down of cost","items":{"$ref":"#/components/schemas/LineItem"},"type":"array"},"location":{"allOf":[{"$ref":"#/components/schemas/CurrentRideLocation"}],"description":"The *current* location info of the ride","type":"object"},"origin":{"allOf":[{"$ref":"#/components/schemas/RideLocation"}],"description":"The *requested* location for passenger pickup","type":"object"},"passenger":{"$ref":"#/components/schemas/PassengerDetail"},"pickup":{"allOf":[{"$ref":"#/components/schemas/PickupDropoffLocation"}],"description":"The *actual* location of passenger pickup","type":"object"},"price":{"allOf":[{"$ref":"#/components/schemas/Cost"}],"description":"The total price for the current ride","type":"object"},"pricing_details_url":{"description":"The web view showing the pricing structure for the geographic area where the ride was taken\n","type":"string"},"primetime_percentage":{"description":"The Prime Time percentage applied to the base price","type":"string"},"rating":{"description":"The rating the user left for this ride, from 1 to 5","format":"int32","type":"integer"},"requested_at":{"description":"The ride requested timestamp in date and time","format":"date-time","type":"string"},"ride_id":{"description":"The unique ID of this ride","type":"string"},"ride_profile":{"allOf":[{"$ref":"#/components/schemas/RideProfileEnum"}],"description":"Indicates whether the ride was requested from the business profile or personal profile of the user.\n","type":"object"},"ride_type":{"$ref":"#/components/schemas/RideTypeEnumWithOther"},"route_url":{"description":"The web view showing the passenger, driver, and route for this ride. This field will only be present for rides created through this API, or that have been shared through the \"Share my Route\" feature\n","type":"string"},"status":{"$ref":"#/components/schemas/RideStatusEnum"},"vehicle":{"$ref":"#/components/schemas/VehicleDetail"}},"type":"object"},"RideLocation":{"allOf":[{"$ref":"#/components/schemas/Location"},{"properties":{"eta_seconds":{"description":"Estimated seconds for a driver to pickup or reach destination based on ride status","format":"int32","type":"integer"}},"type":"object"}],"example":{"address":"123 Main St, Anytown, CA","eta_seconds":200,"lat":36.9442175,"lng":-123.8679133},"type":"object"},"RideProfileEnum":{"description":"The payment profile which the user has picked for the ride","enum":["personal","business"],"type":"string"},"RideReceipt":{"description":"Receipt information of a processed ride.","example":{"charges":[{"amount":500,"currency":"USD","payment_method":"Card"},{"amount":405,"currency":"USD","payment_method":"Lyft Credit"}],"line_items":[{"amount":500,"currency":"USD","type":"Ride"},{"amount":250,"currency":"USD","type":"Prime Time"},{"amount":155,"currency":"USD","type":"Service fee"}],"price":{"amount":905,"currency":"USD","description":"Total ride price"},"requested_at":"2025-04-15T13:49:50.932Z","ride_id":123456789,"ride_profile":"personal"},"properties":{"charges":{"description":"The break down of charge method","items":{"$ref":"#/components/schemas/Charge"},"type":"array"},"line_items":{"description":"The break down of line items","items":{"$ref":"#/components/schemas/LineItem"},"type":"array"},"price":{"allOf":[{"$ref":"#/components/schemas/Cost"}],"description":"The total price for the current ride","type":"object"},"requested_at":{"description":"The ride requested timestamp in date and time","format":"date-time","type":"string"},"ride_id":{"description":"The unique ID of this ride","type":"string"},"ride_profile":{"allOf":[{"$ref":"#/components/schemas/RideProfileEnum"}],"description":"Indicates whether the ride was requested from the business profile or personal profile of the user.\n","type":"object"}},"type":"object"},"RideRequest":{"description":"Minimal set of ride details","example":{"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"},"properties":{"destination":{"allOf":[{"$ref":"#/components/schemas/Location"}],"description":"The *requested* location for passenger drop off","type":"object"},"origin":{"allOf":[{"$ref":"#/components/schemas/Location"}],"description":"The *requested* location for passenger pickup","type":"object"},"passenger":{"$ref":"#/components/schemas/PassengerDetail"},"ride_id":{"description":"The ID of the requested ride","type":"string"},"status":{"$ref":"#/components/schemas/RideStatusEnum"}}},"RideRequestError":{"description":"Details about why a request failed, such as missing or invalid parameters","properties":{"cost_token":{"description":"A token that confirms the user has accepted current Prime Time and/or fixed price charges","type":"string"},"error":{"description":"A \"slug\" that serves as the error code (eg. \"bad_parameter\")","type":"string"},"error_description":{"description":"A user-friendly description of the error (appropriate to show to an end-user)","type":"string"},"error_detail":{"items":{"$ref":"#/components/schemas/ErrorDetail"},"type":"array"},"error_uri":{"description":"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)","type":"string"},"primetime_confirmation_token":{"description":"A token that confirms the user has accepted current Prime Time charges (Deprecated)","type":"string"},"primetime_multiplier":{"description":"Current Prime Time multiplier (eg. if primetime_percentage is 100%, primetime_multiplier will be 2.0)","format":"float","type":"number"},"primetime_percentage":{"description":"Current Prime Time percentage","type":"string"},"token_duration":{"description":"Validity of the token in seconds","type":"string"}},"required":["error"]},"RideStatusEnum":{"description":"The status of the ride","enum":["pending","accepted","arrived","pickedUp","droppedOff","canceled","scheduled","unknown"],"type":"string"},"RideType":{"example":{"ride_types":[{"display_name":"Lyft Line","image_url":"https://cdn.lyft.com/assets/car_standard.png","pricing_details":{"base_charge":200,"cancel_penalty_amount":500,"cost_minimum":475,"cost_per_mile":115,"cost_per_minute":23,"currency":"USD","trust_and_service":155},"ride_type":"lyft_line","seats":2},{"display_name":"Lyft","image_url":"https://cdn.lyft.com/assets/car_standard.png","pricing_details":{"base_charge":200,"cancel_penalty_amount":500,"cost_minimum":500,"cost_per_mile":115,"cost_per_minute":23,"currency":"USD","trust_and_service":155},"ride_type":"lyft","seats":4},{"display_name":"Lyft Plus","image_url":"https://cdn.lyft.com/assets/car_plus.png","pricing_details":{"base_charge":300,"cancel_penalty_amount":500,"cost_minimum":700,"cost_per_mile":200,"cost_per_minute":30,"currency":"USD","trust_and_service":155},"ride_type":"lyft_plus","seats":6}]},"properties":{"display_name":{"description":"A human readable description of the ride type","type":"string"},"image_url":{"description":"The URL of an image representing this ride type","type":"string"},"pricing_details":{"$ref":"#/components/schemas/PricingDetails"},"ride_type":{"$ref":"#/components/schemas/RideTypeEnum"},"scheduled_pricing_details":{"$ref":"#/components/schemas/PricingDetails"},"seats":{"description":"The maximum number of seats available for rides requested with this ride type","type":"integer"}}},"RideTypeEnum":{"description":"The ID of the ride type","enum":["lyft","lyft_line","lyft_plus","lyft_premier","lyft_lux","lyft_luxsuv"],"type":"string"},"RideTypeEnumWithOther":{"description":"The ID of the ride type","enum":["lyft","lyft_line","lyft_plus","lyft_premier","lyft_lux","lyft_luxsuv","other"],"type":"string"},"SandboxDriverAvailability":{"example":{"driver_availability":true,"lat":37.7833,"lng":-122.4167},"properties":{"driver_availability":{"description":"The availability of driver in a region","type":"boolean"},"lat":{"description":"The latitude component of a location","format":"double","type":"number"},"lng":{"description":"The longitude component of a location","format":"double","type":"number"}},"required":["lat","lng","driver_availability"]},"SandboxPrimetime":{"example":{"lat":37.7833,"lng":-122.4167,"primetime_percentage":"25%"},"properties":{"lat":{"description":"The latitude component of a location","format":"double","type":"number"},"lng":{"description":"The longitude component of a location","format":"double","type":"number"},"primetime_percentage":{"description":"The Prime Time to be applied as a string, e.g., '25%'","type":"string"}},"required":["lat","lng","primetime_percentage"]},"SandboxRideStatus":{"example":{"status":"lyft"},"properties":{"status":{"$ref":"#/components/schemas/RideStatusEnum"}},"required":["status"]},"SandboxRideType":{"example":{"lat":37.7833,"lng":-122.4167,"ride_types":["lyft","lyft_line","lyft_plus"]},"properties":{"lat":{"description":"The latitude component of a location","format":"double","type":"number"},"lng":{"description":"The longitude component of a location","format":"double","type":"number"},"ride_types":{"items":{"$ref":"#/components/schemas/RideTypeEnum"},"type":"array"}},"required":["lat","lng","ride_types"]},"SandboxRideUpdate":{"description":"Response when a sandbox ride is propagated through ride status","example":{"ride_id":123456789,"status":"accepted"},"properties":{"ride_id":{"description":"The ID of the ride","type":"string"},"status":{"$ref":"#/components/schemas/RideStatusEnum"}},"type":"object"},"Tip":{"example":{"amount":300,"currency":"USD"},"properties":{"amount":{"description":"A tip for the driver in cents. To be charged to the user's default charge account.","format":"int32","minimum":0,"type":"integer"},"currency":{"description":"The currency in which you want to tip. e.g. USD","type":"string"}}},"TipParams":{"allOf":[{"$ref":"#/components/schemas/Tip"}],"type":"object"},"UserDetail":{"example":{"first_name":"Jane","image_url":"https://public-api.lyft.com/static/images/user.png","rating":4.9},"properties":{"first_name":{"description":"The passenger's first name","type":"string"},"image_url":{"description":"The passenger's profile image","type":"string"},"rating":{"description":"The passenger's rating","type":"string"}},"required":["first_name","image_url","rating"]},"VehicleDetail":{"example":{"color":"black","image_url":"http://example.com/lyft.png","license_plate":"AAAAAAA","license_plate_state":"CA","make":"Audi","model":"A4","year":2016},"properties":{"color":{"description":"The vehicle's color","type":"string"},"image_url":{"description":"The vehicle's image url","type":"string"},"license_plate":{"description":"The vehicle's license plate","type":"string"},"license_plate_state":{"description":"The vehicle's license plate state","type":"string"},"make":{"description":"The vehicle's maker","type":"string"},"model":{"description":"The vehicle's model","type":"string"},"year":{"description":"The vehicle's model year","format":"int32","type":"integer"}},"required":["make","model","year","license_plate","license_plate_state","color","image_url"]}}}}