Skip to main content
POST
/
trips
/
estimate
Estimate Trip
curl --request POST \
  --url https://api.example.com/trips/estimate \
  --header 'Content-Type: application/json' \
  --data '
{
  "vehicleCategoryId": "<string>",
  "serviceClassId": "<string>",
  "pickup": {
    "pickup.lat": 123,
    "pickup.lng": 123
  },
  "stops": [
    {
      "stops[].lat": 123,
      "stops[].lng": 123
    }
  ],
  "currency": "<string>"
}
'
{
  "success": true,
  "message": "Estimate computed",
  "data": {
    "currency": "USD",
    "surgeMultiplier": 1.0,
    "totalEstimated": 15.50,
    "breakdown": {
      "base_fare": 5.00,
      "cost_per_km": 2.50,
      "cost_per_minute": 0.50,
      "min_fare": 8.00,
      "distance_km_est": 3.2,
      "duration_min_est": 12,
      "subtotal": 15.50,
      "total": 15.50,
      "surge_multiplier": 1.0,
      "vehicle_type_name": "Sedan",
      "service_class_name": "Standard",
      "category_name": "Auto",
      "booking_fee": 0,
      "extra_fees_total": 0,
      "applied_multipliers": {
        "base": 1.0,
        "per_km": 1.0,
        "per_min": 1.0,
        "min_fare": 1.0
      }
    }
  }
}
Calculates the estimated fare for a trip based on pickup location, stops, vehicle category, and service class. This endpoint does not create a trip.
This endpoint is public and does not require authentication.

Request

Body Parameters

vehicleCategoryId
string
required
UUID of the vehicle category (Auto, Moto, Van, etc.)
serviceClassId
string
required
UUID of the service class (Standard, Premium, etc.)
pickup
object
required
Geographic coordinates of the pickup location
pickup.lat
number
required
Latitude (-90 to 90)
pickup.lng
number
required
Longitude (-180 to 180)
stops
array
required
Array of stop coordinates (minimum 1 stop required)
stops[].lat
number
required
Latitude (-90 to 90)
stops[].lng
number
required
Longitude (-180 to 180)
currency
string
Preferred currency code (e.g., CUP, USD). Defaults to system currency.

Response

success
boolean
Indicates if the request was successful
message
string
Response message
data
object
Trip quote with fare breakdown
data.currency
string
Currency code for the fare (e.g., CUP, USD)
data.surgeMultiplier
number
Current surge pricing multiplier (1.0 = no surge)
data.totalEstimated
number
Total estimated fare including all fees and surges
data.breakdown
object
Detailed fare breakdown
data.breakdown.base_fare
number
Base fare amount
data.breakdown.cost_per_km
number
Cost per kilometer
data.breakdown.cost_per_minute
number
Cost per minute
data.breakdown.min_fare
number
Minimum fare guarantee
data.breakdown.distance_km_est
number
Estimated distance in kilometers
data.breakdown.duration_min_est
number
Estimated duration in minutes
data.breakdown.subtotal
number
Subtotal before surge and extras
data.breakdown.total
number
Final total amount
data.breakdown.surge_multiplier
number
Applied surge multiplier
data.breakdown.vehicle_type_name
string
Name of the vehicle type used for calculation
data.breakdown.service_class_name
string
Name of the service class
data.breakdown.category_name
string
Name of the vehicle category
data.breakdown.booking_fee
number
Booking fee if applicable
data.breakdown.extra_fees_total
number
Total of any extra fees
data.breakdown.applied_multipliers
object
Multipliers applied to base rates
data.breakdown.applied_multipliers.base
number
Base fare multiplier
data.breakdown.applied_multipliers.per_km
number
Per-kilometer rate multiplier
data.breakdown.applied_multipliers.per_min
number
Per-minute rate multiplier
data.breakdown.applied_multipliers.min_fare
number
Minimum fare multiplier

Example

curl -X POST https://api.rodando.com/trips/estimate \
  -H "Content-Type: application/json" \
  -d '{
    "vehicleCategoryId": "cat-uuid-auto",
    "serviceClassId": "class-uuid-standard",
    "pickup": {
      "lat": 40.7580,
      "lng": -73.9855
    },
    "stops": [
      {
        "lat": 40.7614,
        "lng": -73.9776
      }
    ],
    "currency": "USD"
  }'
{
  "success": true,
  "message": "Estimate computed",
  "data": {
    "currency": "USD",
    "surgeMultiplier": 1.0,
    "totalEstimated": 15.50,
    "breakdown": {
      "base_fare": 5.00,
      "cost_per_km": 2.50,
      "cost_per_minute": 0.50,
      "min_fare": 8.00,
      "distance_km_est": 3.2,
      "duration_min_est": 12,
      "subtotal": 15.50,
      "total": 15.50,
      "surge_multiplier": 1.0,
      "vehicle_type_name": "Sedan",
      "service_class_name": "Standard",
      "category_name": "Auto",
      "booking_fee": 0,
      "extra_fees_total": 0,
      "applied_multipliers": {
        "base": 1.0,
        "per_km": 1.0,
        "per_min": 1.0,
        "min_fare": 1.0
      }
    }
  }
}

Notes

  • The estimate is calculated using current pricing policies and surge multipliers
  • Actual trip cost may vary based on real-time traffic and route changes
  • The stops array must contain at least one destination point
  • Distance and duration are estimated using routing algorithms

Build docs developers (and LLMs) love