Retrieve a specific fare by ID:
GET /fares/{id}
{
"status": "success",
"message": "Fare retrieved successfully",
"data": {
"id": 1,
"route_id": 1,
"start_id": 1,
"end_id": 2,
"start_name": "Dhaka",
"end_name": "Chittagong",
"distance": 244,
"duration": "5:30",
"route_status": 1,
"seat_plan_id": 1,
"seat_plan_name": "AC Business",
"coach_type": 1,
"seat_type": "Business Class",
"from_date": "2024-01-01",
"to_date": "2024-12-31",
"amount": 1500,
"status": 1,
"created_by": 1,
"updated_by": 1,
"created_at": "2024-01-01T12:00:00",
"updated_at": "2024-01-01T12:00:00",
"deleted_at": null
}
}
| Field | Type | Description |
|---|---|---|
| seat_type | String | Service class: Suite Class, Business Class, Sleeper, Economy |
| amount | Integer | Fare price in smallest currency unit (e.g., cents) |
| coach_type | Integer | 1 = AC (Air Conditioned), 2 = Non-AC |
| from_date | Date | Start date of fare validity (null = no start limit) |
| to_date | Date | End date of fare validity (null = no end limit) |