Estimated Price

Estimate trip fare from pickup and dropoff coordinates.

Use this endpoint to calculate an estimated fare, distance, and travel time for a trip before creation. Send pickup and dropoff latitude and longitude, the target vehicle type, and optionally a UAE departure time.

EndpointPOST
Path/api/Trips/get-estimated-price
Test base URLhttps://hub-sandbox-api.truxx.ae
Live base URLhttps://hub-api.truxx.ae
Authenticationx-api-key required

Request example

The request body must include pickup and dropoff coordinates plus a valid vehicleTypeId. departureTime is optional and should be provided as a UAE date-time when used.

curl --location 'https://hub-sandbox-api.truxx.ae/api/Trips/get-estimated-price' \
--header 'Content-Type: application/json' \
--header 'x-api-key: truxx_sk_test_6d0f0e50dc9a428ba54d65d7754b4aec' \
--data '{
    "fromLat": 24.4667,
    "fromLng": 54.3667,
    "toLat": 25.2048,
    "toLng": 55.2708,
    "vehicleTypeId": 1,
    "departureTime": "2026-03-18T05:36"
}'

Request fields

fromLatRequired. Pickup latitude.
fromLngRequired. Pickup longitude.
toLatRequired. Dropoff latitude.
toLngRequired. Dropoff longitude.
vehicleTypeIdRequired. Must reference a vehicle type available in TRUXX HUB.
departureTimeOptional. UAE date-time string, or omit/null to use the current UAE time.

Response example

A successful response returns the estimated fare together with calculated route metrics and resolved pickup and dropoff address details.

{
  "success": true,
  "code": 200,
  "message": "OK",
  "data": {
    "estimatedFare": 353.3,
    "estimatedDistance": 141.33,
    "estimatedTime": 89.6,
    "fromLat": 24.4667,
    "fromLng": 54.3667,
    "toLat": 25.2048,
    "toLng": 55.2708,
    "vehicleTypeId": 1,
    "fromAddress": "Hazza Bin Zayed St / SKMC - F988+MMP - المنهل - غرب 14 2 - أبو ظبي - United Arab Emirates",
    "fromAreaName": "غرب 14 2",
    "toAddress": "673C+W8M Alsaillkabeer Saudi Arabia - Al Wasl - Dubai - United Arab Emirates",
    "toAreaName": "Al Wasl"
  }
}

Response fields

  • estimatedFare: Calculated trip fare for the selected vehicle type
  • estimatedDistance: Route distance in kilometers
  • estimatedTime: Estimated travel time in minutes
  • fromAddress and toAddress: Resolved route addresses when available
  • fromAreaName and toAreaName: Area labels returned from route resolution when available