Train/

Train booking JSON Json

Train booking JSON Json
This JSON contains information about a confirmed train booking, including the booking ID, train name and number, source and destination stations, departure and arrival times, passenger details such as names, ages, genders, and seat numbers, as well as the total fare and booking status.

JSON Data:

1{ 2 "booking_id": "1234-5678-9012", 3 "train_name": "Express", 4 "train_number": "12345", 5 "source": "New York", 6 "destination": "Washington", 7 "departure_time": "2023-03-01T10:00:00-05:00", 8 "arrival_time": "2023-03-01T12:00:00-05:00", 9 "passengers": [ 10 { 11 "name": "John Doe", 12 "age": 35, 13 "gender": "male", 14 "seat_number": "A1" 15 }, 16 { 17 "name": "Jane Doe", 18 "age": 30, 19 "gender": "female", 20 "seat_number": "A2" 21 } 22 ], 23 "total_fare": 150.00, 24 "status": "confirmed" 25} 26

 

Description:

This JSON represents the response from a real-time train booking API. Let's go through the different parts of the JSON:

  • The booking_id field specifies a unique identifier for the booking.

  • The train_name field specifies the name of the train.

  • The train_number field specifies the train number.

  • The source field specifies the name of the source station.

  • The destination field specifies the name of the destination station.

  • The departure_time field specifies the departure time of the train in ISO 8601 format with timezone offset.

  • The arrival_time field specifies the arrival time of the train in ISO 8601 format with timezone offset.

  • The passengers field is an array that contains information about the passengers that are part of the booking. Each passenger has a name, age, gender, and seat_number.

  • The total_fare field specifies the total fare for the booking.

  • The status field specifies the status of the booking. It can be "confirmed", "cancelled", or "pending" depending on the current state of the booking.

Overall, this JSON provides all the necessary information about a train booking, including the train details, the source and destination stations, the passengers, and the booking status. This response can be used to confirm a booking or to display the booking details to the user.

episyche logo

Developed by

Episyche Technologies

Copyright © 2022-2024 Episyche Technologies. All rights reserved.

twitter
linkedin