Create a new coach configuration with a POST request:
POST /coach-configurations
{
"coach_id": 1,
"schedule_id": 2,
"bus_id": 3,
"seat_plan_id": 4,
"route_id": 5,
"coach_type": 1,
"status": 1,
"boarding_dropping_points": [
{
"counter_id": 1,
"type": 1,
"time": "08:00",
"starting_point_status": true,
"ending_point_status": false,
"status": 1
},
{
"counter_id": 2,
"type": 1,
"time": "08:30",
"starting_point_status": false,
"ending_point_status": false,
"status": 1
},
{
"counter_id": 3,
"type": 2,
"time": "14:00",
"starting_point_status": false,
"ending_point_status": false,
"status": 1
},
{
"counter_id": 4,
"type": 2,
"time": "14:30",
"starting_point_status": false,
"ending_point_status": true,
"status": 1
}
]
}
{
"success": true,
"message": "Coach configuration created successfully",
"data": {
"data": {
"id": 1,
"coach_id": 1,
"schedule_id": 2,
"bus_id": 3,
"seat_plan_id": 4,
"route_id": 5,
"coach_type": 1,
"status": 1,
"created_by": 1,
"updated_by": null,
"created_at": "2025-08-10T10:00:00.000000Z",
"updated_at": "2025-08-10T10:00:00.000000Z",
"coach": {
"id": 1,
"name": "Express Coach 001",
"code": "EC001"
},
"schedule": {
"id": 2,
"name": "Morning Schedule",
"departure_time": "08:00:00"
},
"boarding_droppings": [
{
"id": 1,
"coach_configuration_id": 1,
"counter_id": 1,
"type": 1,
"time": "08:00:00",
"starting_point_status": 1,
"ending_point_status": 0,
"status": 1,
"counter": {
"id": 1,
"name": "Kallyanpur Counter",
"location": "Kallyanpur, Dhaka"
}
}
]
}
}
}