Ride Estimate


GET /v1/products

Your user will be able to know the cost of a trip even before/without booking a ride. Access the following information by providing the location (latitude & longitude) of your user.

  • Estimated cost of a trip depending upon
    • Category selected
    • Distance (km) between pickup and drop locations provided
    • Estimated ride time (min)
    • Peak pricing (when applicable)
  • Variable range- Minimum cost and Maximum cost
  • Peak pricing, when applicable, will also be specified (e.g. 1x/1.5x)
  • Value in Rupee currency only.

Note : Know more about fares and peak pricing by visiting our website.



Name Data Type Description Type
pickup_lat float The latitude part of the pickup location. Payload
pickup_lng float The longitude part of the pickup location. Payload
drop_lat float The latitude part of the drop location. Payload
drop_lng float The longitude part of the drop location. Payload
category string

[Optional] Category id of the product

Possible values:

  1. micro
  2. mini
  3. sedan
  4. prime
  5. lux
  6. suv
  7. rental
  8. share
  9. outstation
Payload
X-APP-TOKEN string Key which identifies the partner Header

Example Request

GET

https://devapi.olacabs.com/v1/products?pickup_lat=12.9491416&pickup_lng=77.64298&drop_lat=12.96&drop_lng=77.678&category=prime

Examples Response


{
  "categories": [
    {
      "id": "prime",
      "display_name": "Prime Sedan",
      "currency": "INR",
      "distance_unit": "kilometre",
      "time_unit": "minute",
      "eta": 2,
      "distance": "0.4",
      "ride_later_enabled": "true",
      "image": "http://d1foexe15giopy.cloudfront.net/prime.png",
      "fare_breakup": [
        {
          "type": "flat_rate",
          "minimum_distance": "4",
          "minimum_time": "0",
          "base_fare": "80",
          "minimum_fare": "0",
          "cost_per_distance": "13",
          "waiting_cost_per_minute": "0",
          "ride_cost_per_minute": "1",
          "rates_higher_than_usual": false,
          "surcharge": []
        },
        {
          "type": "airport_rate",
          "minimum_distance": "25",
          "minimum_time": "0",
          "base_fare": "499",
          "minimum_fare": "0",
          "cost_per_distance": "16",
          "waiting_cost_per_minute": "0",
          "ride_cost_per_minute": "1",
          "rates_higher_than_usual": false,
          "surcharge": []
        }
      ],
      "cancellation_policy": {
        "cancellation_charge": 75,
        "currency": "INR",
        "cancellation_charge_applies_after_time": 5,
        "time_unit": "minute"
      }
    }
  ],
  "ride_estimate": [
    {
      "category": "prime",
      "distance": 5.99,
      "travel_time_in_minutes": 36,
      "amount_min": 151,
      "amount_max": 173
    }
  ]
}