Ticket

Flight Ticket API

The Flight Ticket API allows you to generate and retrieve flight tickets after successful booking. This endpoint provides detailed ticket information including passenger details, flight segments, fare breakdown, and ticket status.

Endpoint Information

Method: POST URL: /flight/ticket Content-Type: application/json

Headers

HeaderRequiredDescription
client-idYesSecure Client ID
client-secretYesSecure Client Secret Key
Content-TypeYesMust be application/json

Request Structure

The request requires the following core parameters:

Required Parameters

ParameterTypeDescription
client_referenceIdStringUnique Client Reference ID
trace_idStringTrace ID from booking response
tokenStringBooking token from successful booking
passengersArrayArray of passenger objects with detailed information

Passenger Object Structure

Each passenger object must contain:

FieldTypeRequiredDescription
titleStringYesPassenger title (Mr, Mrs, Ms, Mstr)
fnameStringYesFirst name
lnameStringYesLast name
mobileStringYesMobile number
emailStringYesEmail address
passenger_typeStringYesType: adult, child, or infant
dobStringYesDate of birth (YYYY-MM-DD format)
genderStringYesGender (M/F)
addressStringYesAddress
cityStringYesCity
countryStringYesCountry
country_codeStringYesCountry code (e.g., "IN")

Optional Services

FieldTypeDescription
mealArrayMeal preferences with code, origin, destination
seatArraySeat selection with code, origin, destination
baggageArrayAdditional baggage with code, origin, destination
gstObjectGST details for business travelers

GST Object (Optional)

FieldTypeDescription
gst_company_nameStringCompany name
gst_numberStringGST registration number
gst_company_addressStringCompany address
gst_company_mobileStringCompany mobile number
gst_company_emailStringCompany email address

Example Request

{
    "trace_id": "677e0e8c-69f6-4480-b3c8-b89308f1b0bd",
    "token": "OB1[TBO]S9a5lR2o0QHK0o8iMWljRgbmWZqovIQEzU87SKg6ytvttV7Jc/utqVv4x2NQlXAyvm9gdbIuc5GmbH7AGLHaq4UNp6HOpLwqGqswqHfy71aMbsrPLSWkqO78TAHFxwrAPExCV29Arbn/EPMAFHNs5rrBvaavofcC9knXwFHEQoz3A555BxjweddITjHYOiRDt2zxvu3ChjbsHFXsCjivk0MPEVGnZJa0hNx/isOM90AiDHZSlLgPOc2oRR3RPtSqbh2jSM6byyYrdQqe88bhb5ZNAER4YgJB30FM1OOjps1cUDT1p/RlE2+lIYvRAbeWkLnM7Igd8hJTriEaVk8EeifOI8z58zjlYgMAkDTru1EFkk0Kmo5WczcvWTL+MVj2lNRhYq5lSzs8MR97DtJTWzzXanGhiYo4DWAV1FtHWH/m8/52X0gCa4Wh6qiLaY0WFk/oi5/3hOSawTm0Url3aWqsKJ256gDVLiGj217YvxE32Qxihtt5op/PvOR+BG+W3kidaLxCGqy3acorqoXA4rIdR3yJI4NFGLI4J2UFEvc3bFaV/+zEz0g5SIE1cx+/wLI11b7wRuj12cv1bLxbACZkD8IG5Gy7m/6pvwf9VWbysRmBfZJT0ThCx5w5eDdzoj6Yk7Cmp0iYBG0PO8FSrSKIVzhOuzXRDfCY0peudVA=",
    "client_referenceId": "swg776774338278w",
    "passengers": [
        {
            "title": "Mr",
            "fname": "John",
            "lname": "Doe",
            "mobile": "8973674563",
            "email": "[email protected]",
            "passenger_type": "adult",
            "dob": "1985-05-10",
            "gender": "M",
            "address": "123 Street Name",
            "city": "Mumbai",
            "country": "India",
            "country_code": "IN",
            "meal": [
                {
                    "code": "VGML",
                    "origin": "DEL",
                    "destination": "BOM"
                }
            ],
            "seat": [
                {
                    "code": "6F",
                    "origin": "DEL",
                    "destination": "BOM"
                }
            ],
            "gst": {
                "gst_company_name": "Example Pvt Ltd",
                "gst_number": "27ABCDE1234F1Z5",
                "gst_company_address": "456 Corporate Avenue",
                "gst_company_mobile": "+911234567890",
                "gst_company_email": "[email protected]"
            }
        }
    ]
}

Response Structure

Success Response (200)

The API returns comprehensive ticket information including:

FieldTypeDescription
statusStringResponse status (SUCCESS/FAILED)
status_codeStringHTTP status code
messageStringResponse message
dataObjectTicket data object

Data Object Components

Flight Information

  • pnr - Passenger Name Record
  • booking_id - Unique booking identifier
  • journey_type - Type of journey (OneWay, Return, etc.)
  • domestic - Boolean indicating domestic/international
  • source - Airline source
  • airline_code - IATA airline code
  • last_ticket_date - Last date for ticketing

Segments Array

Each segment contains:

  • Flight details (number, airline, fare class)
  • Origin and destination airport information
  • Departure and arrival times
  • Duration and baggage allowance
  • Flight status

Passengers Array

Each passenger includes:

  • Personal information
  • Fare breakdown
  • Seat assignments
  • Meal preferences
  • Baggage details
  • Ticket information with barcode details

Fare Details

  • Base fare, taxes, and total amount
  • Additional service charges
  • Currency information

Fare Rules

  • Cancellation and reissue policies
  • Time-based charge structure
  • Online modification availability

Example Response

{
    "status": "SUCCESS",
    "status_code": "200",
    "message": "Flight Booking successful.",
    "data": {
        "trace_id": "677e0e8c-69f6-4480-b3c8-b89308f1b0bd",
        "result": {
            "pnr": "I2JMRK",
            "booking_id": 1984869,
            "journey_type": "OneWay",
            "domestic": true,
            "source": "Indigo",
            "origin": "DEL",
            "destination": "BOM",
            "airline_code": "6E",
            "last_ticket_date": "2025-05-24 11:12:08",
            "segments": [
                {
                    "flight_number": "675",
                    "airline_code": "6E",
                    "airline_name": "IndiGo",
                    "fare_class": "QR",
                    "origin": {
                        "airport_code": "DEL",
                        "airport_name": "Indira Gandhi Airport",
                        "terminal": "1D",
                        "city_name": "Delhi",
                        "departure_time": "2025-06-05 08:00:00"
                    },
                    "destination": {
                        "airport_code": "BOM",
                        "airport_name": "Chhatrapati Shivaji International Airport",
                        "terminal": "2",
                        "city_name": "Mumbai",
                        "arrival_time": "2025-06-05 10:10:00"
                    },
                    "duration": "2h 10m",
                    "flight_status": "Confirmed"
                }
            ],
            "passengers": [
                {
                    "passenger_id": 3223416,
                    "title": "Mr",
                    "fname": "John",
                    "lname": "Doe",
                    "passenger_type": "adult",
                    "is_lead_passenger": true,
                    "dob": "1985-05-10",
                    "gender": "M",
                    "mobile": "8973674563",
                    "email": "[email protected]",
                    "fare": {
                        "currency": "INR",
                        "basefare": 5180,
                        "tax_and_surcharges": 841,
                        "total_fare": 7171,
                        "total_meal_charges": 400,
                        "total_seat_charges": 750
                    },
                    "seat": [
                        {
                            "code": "6F",
                            "row_no": "6",
                            "seat_no": "F",
                            "seat_type": "Window",
                            "price": 750,
                            "currency": "INR"
                        }
                    ],
                    "meal": [
                        {
                            "code": "VGML",
                            "airline_desc": "Veg Meal",
                            "price": 400,
                            "currency": "INR"
                        }
                    ],
                    "ticket": {
                        "ticket_id": 2263870,
                        "ticket_number": "I2JMRK",
                        "issue_date": "2025-05-24 10:47:09",
                        "status": "OK"
                    },
                    "barcode_details": {
                        "Barcode": [
                            {
                                "Format": "PDF417",
                                "Content": "M1DOE/JOHN             I2JMRK DELBOM6E 0675 156Y006F00000000"
                            }
                        ]
                    }
                }
            ],
            "fare": {
                "currency": "INR",
                "basefare": 5180,
                "tax_and_surcharges": 841,
                "total_fare": 7171,
                "total_meal_charges": 400,
                "total_seat_charges": 750
            },
            "fare_rules": [
                {
                    "origin": "DEL",
                    "destination": "BOM",
                    "airline": "6E",
                    "fare_rules": "The FareBasisCode is: Q0IP<br />Temp Fare Rules..."
                }
            ],
            "mini_fare_rules": [
                {
                    "journey_points": "DEL-BOM",
                    "type": "Cancellation",
                    "from": "0",
                    "to": "3",
                    "unit": "DAYS",
                    "charges": "INR 3999"
                }
            ]
        }
    }
}

Error Handling

The API returns appropriate error codes and messages for various scenarios:

  • 400 Bad Request: Invalid parameters or missing required fields
  • 401 Unauthorized: Invalid client credentials
  • 404 Not Found: Booking not found or expired
  • 500 Internal Server Error: System error during ticket generation

Always check the status field in the response to confirm successful ticket generation before proceeding with travel arrangements.

Language
Click Try It! to start a request and see the response here!