Download OpenAPI specification:Download
A comprehensive transportation booking platform API.
Retrieves a list of all reservations made by the currently authenticated user. Can be filtered by status.
status | string Enum: "UPCOMING_TRIP" "PAST_TRIP" "CANCELLED" "PENDING_PAYMENT" Optional filter to get reservations by a specific status (e.g., UPCOMING_TRIP, PAST_TRIP, CANCELLED). |
Creates a new user account. Requires either an email or a phone number.
firstName required | string^[A-Za-z ''-]{1,100}$ |
lastName required | string^[A-Za-z ''-]{1,100}$ |
city required | string [ 0 .. 100 ] characters |
password required | string [ 8 .. 2147483647 ] characters |
string | |
phoneNumber | string^\+?[1-9][0-9\s().-]{7,20}$ |
{- "firstName": "string",
- "lastName": "string",
- "city": "string",
- "password": "stringst",
- "email": "string",
- "phoneNumber": "string"
}
Verifies the provided OTP and, if valid, returns a JWT access token and user information to complete the login process.
contactInfo required | string |
otp required | string [ 4 .. 6 ] characters |
{- "contactInfo": "string",
- "otp": "string"
}
Requests a One-Time Password (OTP) to be sent to the user's registered email or phone number for passwordless login.
contactInfo required | string |
{- "contactInfo": "string"
}
Public endpoint to retrieve the full details for a single ticket, including vehicle-specific information and services, before a user commits to booking.
trip_id required | integer <int64> |
ageCategory required | string Enum: "ADULT" "CHILD" "BABY" |
{- "trip_id": 0,
- "ageCategory": "ADULT"
}
Public endpoint to search for one-way tickets based on criteria like origin, destination, date, and vehicle type. Authentication is not required.
originCity required | string |
originProvince | string |
originCountry | string |
destinationCity required | string |
destinationProvince | string |
destinationCountry | string |
departureDate required | string <date> |
object (LocalTime) | |
vehicleCompany | string |
tripVehicle required | string Enum: "TRAIN" "BUS" "FLIGHT" |
ageCategory | string Enum: "ADULT" "CHILD" "BABY" |
minPrice | number |
maxPrice | number |
busClass | string Enum: "VIP" "STANDARD" "SLEEPER" |
flightClass | string Enum: "ECONOMY_CLASS" "BUSINESS_CLASS" "FIRST_CLASS" |
trainStars | integer <int32> |
{- "originCity": "string",
- "originProvince": "string",
- "originCountry": "string",
- "destinationCity": "string",
- "destinationProvince": "string",
- "destinationCountry": "string",
- "departureDate": "2019-08-24",
- "departureTime": {
- "hour": 0,
- "minute": 0,
- "second": 0,
- "nano": 0
}, - "vehicleCompany": "string",
- "tripVehicle": "TRAIN",
- "ageCategory": "ADULT",
- "minPrice": 0,
- "maxPrice": 0,
- "busClass": "VIP",
- "flightClass": "ECONOMY_CLASS",
- "trainStars": 0
}
Processes the payment for a reserved booking using the specified payment method (e.g., WALLET, CARD). On success, this finalizes the booking and updates the reservation status to 'PAID'.
reservationId required | integer <int64> |
paymentMeans required | string Enum: "CARD" "WALLET" "CRYPTO" |
{- "reservationId": 0,
- "paymentMeans": "CARD"
}
Initiates a new two-way reservation for an outgoing and return ticket. Expects an array of two ticket selections. This holds the tickets for 10 minutes, awaiting payment.
trip_id required | integer <int64> |
ageCategory required | string Enum: "ADULT" "CHILD" "BABY" |
[- {
- "trip_id": 0,
- "ageCategory": "ADULT"
}
]
Initiates a new one-way reservation for a single selected ticket. This holds the ticket for 10 minutes, awaiting payment.
trip_id required | integer <int64> |
ageCategory required | string Enum: "ADULT" "CHILD" "BABY" |
{- "trip_id": 0,
- "ageCategory": "ADULT"
}
Allows an authenticated user to submit a report related to a reservation or ticket. The report is then reviewable by an admin.
linkType required | string Enum: "RESERVATION" "TICKET" |
linkId required | integer <int64> |
topic required | string [ 0 .. 100 ] characters |
content required | string |
{- "linkType": "RESERVATION",
- "linkId": 0,
- "topic": "string",
- "content": "string"
}
Updates the seat number for a specific ticket leg within a reservation.
reservationId required | integer <int64> |
tripId required | integer <int64> |
newSeatNumber required | integer <int32> |
{- "reservationId": 0,
- "tripId": 0,
- "newSeatNumber": 0
}
Processes the cancellation of a reservation. This is the final step and is irreversible. It updates the reservation status and refunds the user to their wallet after deducting penalties.
reservationId required | integer <int64> |
{- "reservationId": 0
}
Calculates the penalty fee and total refund amount for cancelling a reservation without actually performing the cancellation. Useful for showing the user the cost beforehand.
reservationId required | integer <int64> |
{- "reservationId": 0
}
Allows an authenticated user to update their own profile information, such as name, city, and contact details.
firstName | string [ 0 .. 100 ] characters |
lastName | string [ 0 .. 100 ] characters |
city | string [ 0 .. 100 ] characters |
string | |
phoneNumber | string^\+?[1-9][0-9\s().-]{7,20}$ |
birthdayDate | string <date> |
{- "firstName": "string",
- "lastName": "string",
- "city": "string",
- "email": "string",
- "phoneNumber": "string",
- "birthdayDate": "2019-08-24"
}