Retrieve all coach trips with a GET request:
GET /reports/coach-trips
| Parameter | Type | Description | Example | Required |
|---|---|---|---|---|
page |
Integer | Number of page (min: 1) | 1 | No |
per_page |
Integer | Number of items per page (max: 1000) | 10 | No |
start_date |
Date | Start date for date range query | 2025-08-01 | Yes |
end_date |
Date | End date for date range query | 2025-08-31 | Yes |
coach_type |
Integer | Filter by coach type (1: AC, 2: Non-AC) | 1 | No |
coach_id |
Integer | Filter by specific coach | 2 | No |
route_id |
Integer | Filter by specific route | 1 | No |
bus_id |
Integer | Filter by specific bus | 1 | No |
schedule_id |
Integer | Filter by specific schedule | 1 | No |
{
"status": "success",
"code": 200,
"message": "Coach trip instances retrieved successfully",
"data": {
"current_page": 1,
"data": [
{
"id": 2,
"trip_id": 2,
"trip_date": "2025-08-17",
"trip_date_formatted": "Sunday, August 17, 2025",
"status": 1,
"status_name": "Active",
"coach_type": 1,
"coach_type_name": "AC",
"migrated_trip_id": null,
"coach_id": 2,
"coach": {
"id": 2,
"coach_no": "101",
"seat_plan_id": 1,
"coach_type": "1",
"coach_type_name": "AC",
"status": 1
},
"bus_id": 1,
"bus": {
"id": 1,
"registration_number": "123",
"manufacturer_company": "ad",
"model_year": 2000,
"color": null,
"status": 1
},
"schedule_id": 1,
"schedule": {
"id": 1,
"name": "11:00",
"status": 0
},
"route_id": 1,
"route": {
"id": 1,
"start_id": 2,
"end_id": 2,
"distance": 1300,
"duration": "02:45",
"status": "1",
"start_district": {
"id": 2,
"name": "Updated District 1",
"code": "UD1"
},
"end_district": {
"id": 2,
"name": "Updated District 1",
"code": "UD1"
},
"route_display": "Updated District 1 → Updated District 1"
},
"driver_id": null,
"driver": {
"id": null,
"name": null,
"contact_no": null,
"email": null,
"license_no": null,
"license_expired_date": null,
"status": null
},
"supervisor_id": null,
"supervisor": {
"id": null,
"name": null,
"contact_no": null,
"email": null,
"status": null
},
"seat_plan_id": 1,
"seat_plan": {
"id": 1,
"name": "Bus A",
"floor": null,
"rows": 6,
"cols": 4,
"layout_type": "2-2"
},
"total_seats": 24,
"seat_inventory_summary": {
"total_seats": 24,
"available_seats": 24,
"booked_seats": 0,
"blocked_seats": 0,
"occupancy_percentage": 0,
"has_inventory": true
},
"is_ac": true,
"is_active": true,
"is_migrated": false,
"migrated_trip": null,
"created_by": 2,
"updated_by": null,
"migrated_by": null,
"created_at": "2025-08-14T10:21:22.000000Z",
"updated_at": "2025-08-14T10:21:22.000000Z"
}
],
"first_page_url": "http://127.0.0.1:8000/api/reports/coach-trips?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "http://127.0.0.1:8000/api/reports/coach-trips?page=1",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "http://127.0.0.1:8000/api/reports/coach-trips?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"next_page_url": null,
"path": "http://127.0.0.1:8000/api/reports/coach-trips",
"per_page": 15,
"prev_page_url": null,
"to": 2,
"total": 2
}
}
| Value | Status | Description |
|---|---|---|
0 |
Inactive | Trip is disabled/cancelled |
1 |
Active | Trip is active and bookable |
2 |
Migrated | Trip has been migrated to another trip |
| Value | Type | Description |
|---|---|---|
1 |
AC | Air-conditioned coach |
2 |
Non-AC | Non air-conditioned coach |
| Value | Status | Description |
|---|---|---|
1 |
Available | Seat is available for booking |
2 |
Booked | Seat is confirmed and booked |
3 |
Blocked | Seat is temporarily blocked |
0 |
Cancelled | Seat booking was cancelled |