Overview
Admin trip management APIs allow administrators to oversee trip operations, manage bookings, handle cancellations, and assign replacement drivers. All endpoints requireAdminPolicy authorization.
Get Cancelled Trips
Retrieve all cancelled trips with optional filtering.Query Parameters
Filter by driver ID
Filter by origin city
Filter by destination city
Filter by cancellation date (from)
Filter by cancellation date (to)
Filter by departure date (from)
Filter by departure date (to)
Page number
Number of results per page
Response
Operation status
Status message
Array of cancelled trip information
Total number of cancelled trips
Current page number
Results per page
Total number of pages
Cancel Trip (Admin)
Administrators can cancel any trip with a reason.Path Parameters
Trip identifier
Body Parameters
Reason for cancellation
Response
Operation status
Status message
Cancelled trip identifier
Get Trip Booking Requests
Retrieve all booking requests for a specific trip.Path Parameters
Trip identifier
Query Parameters
Filter by booking status (pending, confirmed, cancelled)
Accept Booking Request
Accept a pending booking request for a trip.Path Parameters
Trip identifier
Booking identifier
Body Parameters
Admin notes about the acceptance
Reject Booking Request
Reject a pending booking request for a trip.Path Parameters
Trip identifier
Booking identifier
Body Parameters
Reason for rejection
Add Passenger to Trip
Directly add a passenger to a trip without going through the booking request flow.Path Parameters
Trip identifier
Body Parameters
Passenger identifier
Number of seats to book
Payment method (Cash, Wallet, Moyasar, BankTransfer)
Admin notes about the booking
Remove Passenger from Trip
Remove a passenger from a trip.Path Parameters
Trip identifier
Passenger identifier
Query Parameters
Reason for removal
Replace Trip with New Driver
Create a new trip with a different driver to replace a cancelled trip. All confirmed bookings are transferred.Path Parameters
Cancelled trip identifier
Body Parameters
New driver identifier
Vehicle identifier for the new trip
Whether to transfer all confirmed bookings to the new trip
Admin notes about the replacement
Replace Trip with Existing Trip
Transfer bookings from a cancelled trip to an existing scheduled trip.Path Parameters
Cancelled trip identifier
Body Parameters
Existing trip identifier to receive the bookings
Whether to transfer all confirmed bookings
Admin notes about the replacement
Get Replacement Options
Get matching trips and available drivers for replacing a cancelled trip.Path Parameters
Cancelled trip identifier
Response
Returns matching trips (same route) and available drivers (no overlapping trips) that can replace the cancelled trip.Get Available Drivers
Get available drivers who can replace a cancelled trip, with optional search.Path Parameters
Cancelled trip identifier
Query Parameters
Search by driver name or phone number
Response
Returns available drivers (active, approved, no overlapping trips) with vehicles that have enough seats.Delete Cancelled Trip
Permanently delete a cancelled trip (logical deletion).Path Parameters
Cancelled trip identifier
Only cancelled trips can be deleted. This performs a logical deletion, not a hard delete from the database.