cURL
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 } } } }
Calculate estimated fare for a trip before creation
CUP
USD
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" }'
stops