Create Trip

Create a trip in the TRUXX logistics platform.

Use this endpoint to create a new trip request in TRUXX logistics. The API validates the selected vehicle type, requires customer contact details, and creates the trip only when the request data is valid for the target environment.

EndpointPOST
Path/api/Trips/create-trip
Test base URLhttps://hub-sandbox-api.truxx.ae
Live base URLhttps://hub-api.truxx.ae
Authenticationx-api-key required

Request example

Send pickup and destination coordinates, customer contact details, and one approved vehicle type. departureTime is optional and should be sent as a UAE date-time when provided.

curl --location 'https://hub-sandbox-api.truxx.ae/api/Trips/create-trip' \
--header 'Content-Type: application/json' \
--header 'x-api-key: truxx_sk_test_25d003e5789c483ab47793ad8cc3704f' \
--data '{
  "fromLat": 23.004475,
  "fromLng": 53.350864,
  "toLat": 25.968739,
  "toLng": 56.137327,
  "mobileNumber": "541112233",
  "phoneCode": "971",
  "firstName": "John",
  "lastName": "Doe",
  "vehicleTypeId": 1,
  "departureTime": "2026-03-18T05:36"
}'

Required fields

fromLat, fromLngRequired. Pickup coordinates inside the UAE coverage area.
toLat, toLngRequired. Destination coordinates inside the UAE coverage area.
vehicleTypeIdRequired. Must be one of the approved TRUXX HUB vehicle types.
mobileNumberRequired. Customer mobile number without formatting characters.
phoneCodeRequired. Country calling code such as 971.
firstName, lastNameRequired. Customer name used for trip creation.
departureTimeOptional. UAE date-time, or omit/null to create the trip using the current UAE time.

Response example

A successful response returns the created trip identifier and the calculated trip fare.

{
  "success": true,
  "code": 200,
  "message": "OK",
  "data": {
    "tripID": 23220,
    "tripFare": 1402.7
  }
}

Approved vehicle types

Vehicle Type ID: 9VIP Recovery Truck
Vehicle Type ID: 4Standard Recovery Truck
Vehicle Type ID: 3Truck 3 Ton
Vehicle Type ID: 1Pickup Truck
Vehicle Type ID: 5Sports Recovery Truck

Common trip creation errors

Invalid vehicle typeThe selected vehicleTypeId is not available in TRUXX HUB.
Pickup location is outside the UAEThe pickup coordinates must be within the supported UAE service area.
Destination is outside the UAEThe dropoff coordinates must be within the supported UAE service area.
Invalid mobile number lengthThe mobile number must match the expected local format after normalization.
Invalid mobile numberThe mobile number must contain digits only.
Wallet not foundNo active wallet is available for the authenticated account.
Wallet balance is already negativeThe wallet must be topped up before creating a new trip.
Balance will become less than -500 AEDTop up the wallet or enable auto recharge before creating the trip.
Failed to create tripThe trip request could not be completed successfully.