Create a journey
Creates a new journey request for a ride.
❗️ Prerequisites
Before creating a journey, you must call the /estimates endpoint and use the returned product.id as product_id in this request. This guarantees that the product is available at the pickup location and provides accurate pricing shown to drivers.
The estimate should be created within 5 minutes of the journey request.
Journey States
After creation, the journey progresses through these states:
- hire - Searching for available drivers
- hired - Driver assigned and en route
- arrived - Driver at pickup location
- pick up - Passenger in vehicle
- drop off - Journey completed
- terminated - Receipt generated (after ~2 hours) For a detailed explanation of journey states and their transitions, see Journey States.
📘 Booking a Journey (Reservation)
Creating a reservation is similar to creating an ASAP journey, except for the start_at field, which should contain a future date-time value in the format "YYYY-MM-DD HH:MM:SS", expressed in the local time of the pickup location.
Use the same start_at value you provided to the /estimates endpoint to ensure consistent product availability and pricing between the estimate and the journey creation.
Important constraints:
- Reservations must be created at least 30 minutes before the start time
- Reservations can be scheduled up to 60 days in advance
⚠️ Sandbox Testing
In the sandbox environment, pickup locations must be within central Madrid (approximately 40.4361°, -3.7014°). See Sandbox Environment for details.
Request body
Example request
{
"label_slug": null,
"message": "Test message for driver",
"product_id": "75dd566797369d1f0927102e5356ce59",
"reason": "Test reason for driver",
"requester_id": "081a70a52cfc11ecbb03a25a490feee4",
"rider": {
"email": "riderEmail@example.com",
"locale": "ES",
"mobile": {
"mobile_cc": "34",
"mobile_num": "123456789"
},
"name": "Jhon Doe"
},
"start_at": "2022-07-01 10:00:00",
"stops": [
{
"addr": "Madrid Barajas T1",
"city": "Madrid",
"contact": {
"mobile_cc": "34",
"mobile_num": "123456789",
"name": "Jhon Doe",
"stop_action": "pickup"
},
"country": "ES",
"loc": [
40.4722,
-3.5608
],
"location_id": "location-4",
"meeting_point": {
"id": "mp-loc4-1",
"loc": [
40.4722,
-3.5608
],
"name": "Terminal 1"
},
"name": "Work",
"num": "1428"
},
{
"addr": "Calle de la cruz",
"city": "Madrid",
"country": "ES",
"loc": [
40.4169335,
-3.7061872
]
}
]
}Response
Success
Example response
{
"id": "0397896-19aa-11ed-b6fe-7aaea8067492"
}