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: https://api.aeronpay.in/api/serviceapi-prod/api/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 API supports two different request formats depending on the airline type:

For Non-LCC Airlines

For non-Low Cost Carrier (Non-LCC) airlines, the request requires minimal parameters:

FieldTypeRequiredValidationDescription
client_referenceIdStringYesmax:30Unique Client Reference ID
trace_idStringYesmin:4Trace ID from booking response
tokenStringYesBooking token from successful booking
pnrStringYesalpha_num, min:4Passenger Name Record
booking_idIntegerYesgreater than 0Unique booking identifier
price_change_acceptedStringNonullableAccept price changes if any

Non-LCC Request Example

{
    "client_referenceId": "",
    "trace_id": "",
    "token": "",
    "pnr": "",
    "booking_id": "",
    "price_change_accepted": ""
}

For LCC Airlines (Detailed Parameters)

For Low Cost Carrier (LCC) airlines, detailed passenger information is required:

Core Parameters

FieldTypeRequiredValidationDescription
client_referenceIdStringYesmax:30Unique Client Reference ID
trace_idStringYesmin:4Trace ID from booking response
tokenStringYesBooking token from successful booking
passengersArrayYesmax:9Array of passenger objects

Passenger Object Structure

Each passenger object in the passengers array must contain:

FieldTypeRequiredValidationDescription
titleStringYesin:Mr,Mrs,Mstr,MsPassenger title
fnameStringYesmax:255, regex:/^[A-Za-z\s]+$/First name
lnameStringYesmax:255, regex:/^[A-Za-z\s]+$/Last name
mobileStringYesregex:/^(+?\d4[-\s]?)?.../Mobile number
emailStringYesemailEmail address
passenger_typeStringYesin:adult,child,infantType: adult, child, or infant
dobDateNoformat:Y-m-dDate of birth
genderStringYesin:M,FGender (M/F)
addressStringYesmax:255Address
cityStringYesmax:255City
countryStringYesmax:255Country
country_codeStringYesmax:5Country code (e.g., "IN")
ff_airline_codeStringNonullableFrequent flyer airline code
ff_numberStringNonullableFrequent flyer number

Guardian Details (Required for Infants)

FieldTypeRequired if InfantValidationDescription
guardian_details.titleStringYesin:Mr,Mrs,Mstr,MsGuardian title
guardian_details.fnameStringYesmax:255, regex:/^[A-Za-z\s]+$/Guardian first name
guardian_details.lnameStringYesmax:255, regex:/^[A-Za-z\s]+$/Guardian last name
guardian_details.passport_numberStringNoregex:/^[A-Za-z0-9]+$/, max:20Guardian passport number
guardian_details.panStringNoregex:/^[A-Z]5[0-9]4[A-Z]1$/Guardian PAN number

Passport Details (Optional)

FieldTypeRequiredValidationDescription
passport.passport_numberStringNoregex:/^[A-Za-z0-9]+$/, max:20Passport number
passport.passport_issued_onDateNoformat:Y-m-d, before_or_equal:passport_expiryPassport issue date
passport.passport_expiryDateNoformat:Y-m-d, after:passport_issued_onPassport expiry date

Optional Services

Baggage, Meal, Seat, and Special Services - Each service follows the same structure:

FieldTypeRequired if ExistsValidationDescription
*.codeStringYesmax:10Service code
*.originStringYesmax:255Origin airport code
*.destinationStringYesmax:255Destination airport code

GST Details (Optional)

FieldTypeRequired if ExistsValidationDescription
gst.gst_company_nameStringYesmax:100Company name
gst.gst_numberStringYesmax:15GST registration number
gst.gst_company_addressStringYesmax:255Company address
gst.gst_company_mobileStringYesregex:/^(+?\d4[-\s]?)?.../Company mobile number
gst.gst_company_emailStringYesemail, max:100Company email address

Complete LCC Request Example

{
  "client_referenceId": "swg776774338278w",
  "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=",
  "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:

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
  • is_lcc - Boolean indicating Low Cost Carrier
  • fare_type - Type of fare (RegularFare, etc.)

Segments Array

Each segment contains:

  • Flight details (number, airline, fare class)
  • Origin and destination airport information with terminals
  • Departure and arrival times
  • Duration and baggage allowance
  • Flight status and e-ticket availability

Passengers Array

Each passenger includes:

  • Personal information and contact details
  • Fare breakdown with base fare, taxes, and service charges
  • Seat assignments with detailed seat information
  • Meal preferences and special service requests
  • Baggage details and allowances
  • Ticket information with barcode details
  • SSR (Special Service Request) details

Fare Details

  • Base fare, taxes, and total amount
  • Breakdown of additional service charges
  • Currency information

Fare Rules

  • Cancellation and reissue policies
  • Time-based charge structure
  • Online modification availability
  • Mini fare rules with journey-specific charges

Complete Response Example

{
    "status": "SUCCESS",
    "status_code": "200",
    "message": "Flight Booking successful.",
    "data": {
        "trace_id": "677e0e8c-69f6-4480-b3c8-b89308f1b0bd",
        "result": {
            "pnr": "I2JMRK",
            "booking_id": 1984869,
            "price_changed": null,
            "time_changed": null,
            "seats_booked": false,
            "journey_type": "OneWay",
            "domestic": true,
            "source": "Indigo",
            "origin": "DEL",
            "destination": "BOM",
            "airline_code": "6E",
            "airline_remark": "6E main",
            "last_ticket_date": "2025-05-24 11:12:08",
            "is_lcc": true,
            "non_refundable": false,
            "coupon_applicable": true,
            "fare_type": "RegularFare",
            "segments": [
                {
                    "trip_indicator": "outbound",
                    "segment_indicator": "outbound",
                    "flight_number": "675",
                    "airline_code": "6E",
                    "airline_name": "IndiGo",
                    "fare_class": "QR",
                    "operating_carrier": "",
                    "origin": {
                        "airport_code": "DEL",
                        "airport_name": "Indira Gandhi Airport",
                        "terminal": "1D",
                        "city_code": "DEL",
                        "city_name": "Delhi",
                        "country_code": "IN",
                        "country_name": "India",
                        "departure_time": "2025-06-05 08:00:00"
                    },
                    "destination": {
                        "airport_code": "BOM",
                        "airport_name": "Chhatrapati Shivaji International Airport",
                        "terminal": "2",
                        "city_code": "BOM",
                        "city_name": "Mumbai",
                        "country_code": "IN",
                        "country_name": "India",
                        "arrival_time": "2025-06-05 10:10:00"
                    },
                    "duration": "2h 10m",
                    "baggage": {
                        "checked_baggage": null,
                        "cabin_baggage": null
                    },
                    "flight_class": null,
                    "is_stopover": false,
                    "e-ticket_available": true,
                    "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",
                    "pan_required": false,
                    "passport_required": false,
                    "mobile": "8973674563",
                    "email": "[email protected]",
                    "address": "123 Street Name",
                    "city": "Mumbai",
                    "country_code": "IN",
                    "nationality": "IN",
                    "fare": {
                        "currency": "INR",
                        "basefare": 5180,
                        "tax_and_surcharges": 841,
                        "total_fare": 7171,
                        "total_baggage_charges": 0,
                        "total_meal_charges": 400,
                        "total_seat_charges": 750,
                        "total_special_service_charges": 0
                    },
                    "seat": [
                        {
                            "code": "6F",
                            "desc": "Purchase",
                            "airline_code": "6E",
                            "flight_number": "675",
                            "craft_type": "A321-220",
                            "row_no": "6",
                            "seat_no": "F",
                            "seat_type": "Window",
                            "seat_way_type": "FullJourney",
                            "availability_type": "Open",
                            "compartment": 2,
                            "deck": 1,
                            "price": 750,
                            "currency": "INR",
                            "origin": "DEL",
                            "destination": "BOM"
                        }
                    ],
                    "meal": [
                        {
                            "code": "VGML",
                            "desc": "Direct",
                            "airline_code": "6E",
                            "airline_desc": "Veg Meal",
                            "flight_number": "675",
                            "quantity": 1,
                            "way_type": "FullJourney",
                            "price": 400,
                            "currency": "INR",
                            "origin": "DEL",
                            "destination": "BOM"
                        }
                    ],
                    "ticket": {
                        "ticket_id": 2263870,
                        "ticket_number": "I2JMRK",
                        "issue_date": "2025-05-24 10:47:09",
                        "validating_airline": "708",
                        "status": "OK",
                        "ticket_type": "N"
                    },
                    "barcode_details": {
                        "Id": 3223416,
                        "Barcode": [
                            {
                                "Index": 1,
                                "Format": "PDF417",
                                "Content": "M1DOE/JOHN             I2JMRK DELBOM6E 0675 156Y006F00000000",
                                "BarCodeInBase64": null,
                                "JourneyWayType": 3
                            }
                        ]
                    }
                }
            ],
            "fare": {
                "currency": "INR",
                "basefare": 5180,
                "tax_and_surcharges": 841,
                "total_fare": 7171,
                "total_baggage_charges": 0,
                "total_meal_charges": 400,
                "total_seat_charges": 750,
                "total_special_service_charges": 0
            },
            "fare_rules": [
                {
                    "origin": "DEL",
                    "destination": "BOM",
                    "airline": "6E",
                    "fare_rules": "The FareBasisCode is: Q0IP<br />Temp Fare Rules GG<br/> <br/><ul><li>APART FROM AIRLINE CHARGES,GST+RAF+ APPLICABLE CHARGES IF ANY, WILL BE CHARGED.</li><li>MENTIONED FEE ARE INDICATIVE PER PAX AND PER SECTOR.</li><li>FOR DOMESTIC BOOKINGS, PASSENGERS ARE REQUIRED TO SUBMIT THE CANCELLATION OR REISSUE REQUEST AT LEAST 2 HOURS BEFORE THE AIRLINES CANCELLATION AND REISSUE POLICY.</li><li>FOR INTERNATIONAL BOOKINGS, PASSENGERS ARE REQUIRED TO SUBMIT THE CANCELLATION OR REISSUE REQUEST AT LEAST 4 HOURS BEFORE THE AIRLINES CANCELLATION AND REISSUE POLICY.</li></ul>"
                }
            ],
            "mini_fare_rules": [
                {
                    "journey_points": "DEL-BOM",
                    "type": "Reissue",
                    "from": "0",
                    "to": "3",
                    "unit": "DAYS",
                    "charges": "INR 2999",
                    "online_reissue_allowed": false,
                    "online_refund_allowed": false
                },
                {
                    "journey_points": "DEL-BOM",
                    "type": "Cancellation",
                    "from": "0",
                    "to": "3",
                    "unit": "DAYS",
                    "charges": "INR 3999",
                    "online_reissue_allowed": false,
                    "online_refund_allowed": false
                }
            ]
        }
    }
}

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

Important Notes

  1. Airline Type Detection: The API automatically determines whether to use Non-LCC or LCC format based on the airline
  2. Passenger Validation: For LCC airlines, all passenger details must be provided and validated according to the specified rules
  3. Guardian Details: Required only when passenger_type is "infant"
  4. Optional Services: Include baggage, meal, seat, or special services only if selected during booking
  5. GST Information: Include GST details only for business travelers requiring GST invoices

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!