Create Trip
Trip Endpoints
Create Trip
Request a new ride
POST
Create Trip
Endpoint
Headers
Must be
application/jsonRequest Body
Passenger user ID making the request
Service type requestedPossible values:
motocicleta- Motorcycle taxiauto- Car servicemototaxi- Motorcycle taxi with passenger cabin
Trip origin location
Trip destination location (same structure as origen)
Response
Trip creation success status
Success or error message
Created trip object
Request Example
Response Example
Trip Status Flow
After creation, a trip goes through the following states:
Alternatively, the trip can be cancelled at any point before completion.
Service Types
Motocicleta
Standard motorcycle taxi for quick trips
Auto
Car service for comfort and multiple passengers
Mototaxi
Motorcycle taxi with passenger cabin
Pricing
The estimated price is calculated based on:- Base fare: Starting price
- Distance: Price per kilometer
- Duration: Price per minute (peak hours)
- Service type: Different rates for moto/auto
- Demand: Dynamic pricing during high demand
Error Responses
Invalid request data or coordinates
User not found
Server error during trip creation
Notes
After creating a trip, use the Trip Status endpoint to monitor the trip state and driver assignment.
See Also
- Trip Status - Get trip status and updates
- Cancel Trip - Cancel a trip
- Trip History - View past trips
- Trip Pricing - Calculate trip estimates