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
| Header | Required | Description |
|---|---|---|
client-id | Yes | Secure Client ID |
client-secret | Yes | Secure Client Secret Key |
Content-Type | Yes | Must 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:
| Field | Type | Required | Validation | Description |
|---|---|---|---|---|
client_referenceId | String | Yes | max:30 | Unique Client Reference ID |
trace_id | String | Yes | min:4 | Trace ID from booking response |
token | String | Yes | — | Booking token from successful booking |
pnr | String | Yes | alpha_num, min:4 | Passenger Name Record |
booking_id | Integer | Yes | greater than 0 | Unique booking identifier |
price_change_accepted | String | No | nullable | Accept 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
| Field | Type | Required | Validation | Description |
|---|---|---|---|---|
client_referenceId | String | Yes | max:30 | Unique Client Reference ID |
trace_id | String | Yes | min:4 | Trace ID from booking response |
token | String | Yes | — | Booking token from successful booking |
passengers | Array | Yes | max:9 | Array of passenger objects |
Passenger Object Structure
Each passenger object in the passengers array must contain:
| Field | Type | Required | Validation | Description |
|---|---|---|---|---|
title | String | Yes | in:Mr,Mrs,Mstr,Ms | Passenger title |
fname | String | Yes | max:255, regex:/^[A-Za-z\s]+$/ | First name |
lname | String | Yes | max:255, regex:/^[A-Za-z\s]+$/ | Last name |
mobile | String | Yes | regex:/^(+?\d4[-\s]?)?.../ | Mobile number |
email | String | Yes | Email address | |
passenger_type | String | Yes | in:adult,child,infant | Type: adult, child, or infant |
dob | Date | No | format:Y-m-d | Date of birth |
gender | String | Yes | in:M,F | Gender (M/F) |
address | String | Yes | max:255 | Address |
city | String | Yes | max:255 | City |
country | String | Yes | max:255 | Country |
country_code | String | Yes | max:5 | Country code (e.g., "IN") |
ff_airline_code | String | No | nullable | Frequent flyer airline code |
ff_number | String | No | nullable | Frequent flyer number |
Guardian Details (Required for Infants)
| Field | Type | Required if Infant | Validation | Description |
|---|---|---|---|---|
guardian_details.title | String | Yes | in:Mr,Mrs,Mstr,Ms | Guardian title |
guardian_details.fname | String | Yes | max:255, regex:/^[A-Za-z\s]+$/ | Guardian first name |
guardian_details.lname | String | Yes | max:255, regex:/^[A-Za-z\s]+$/ | Guardian last name |
guardian_details.passport_number | String | No | regex:/^[A-Za-z0-9]+$/, max:20 | Guardian passport number |
guardian_details.pan | String | No | regex:/^[A-Z]5[0-9]4[A-Z]1$/ | Guardian PAN number |
Passport Details (Optional)
| Field | Type | Required | Validation | Description |
|---|---|---|---|---|
passport.passport_number | String | No | regex:/^[A-Za-z0-9]+$/, max:20 | Passport number |
passport.passport_issued_on | Date | No | format:Y-m-d, before_or_equal:passport_expiry | Passport issue date |
passport.passport_expiry | Date | No | format:Y-m-d, after:passport_issued_on | Passport expiry date |
Optional Services
Baggage, Meal, Seat, and Special Services - Each service follows the same structure:
| Field | Type | Required if Exists | Validation | Description |
|---|---|---|---|---|
*.code | String | Yes | max:10 | Service code |
*.origin | String | Yes | max:255 | Origin airport code |
*.destination | String | Yes | max:255 | Destination airport code |
GST Details (Optional)
| Field | Type | Required if Exists | Validation | Description |
|---|---|---|---|---|
gst.gst_company_name | String | Yes | max:100 | Company name |
gst.gst_number | String | Yes | max:15 | GST registration number |
gst.gst_company_address | String | Yes | max:255 | Company address |
gst.gst_company_mobile | String | Yes | regex:/^(+?\d4[-\s]?)?.../ | Company mobile number |
gst.gst_company_email | String | Yes | email, max:100 | Company 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:
| Field | Type | Description |
|---|---|---|
status | String | Response status (SUCCESS/FAILED) |
status_code | String | HTTP status code |
message | String | Response message |
data | Object | Ticket data object |
Data Object Components
Flight Information
pnr- Passenger Name Recordbooking_id- Unique booking identifierjourney_type- Type of journey (OneWay, Return, etc.)domestic- Boolean indicating domestic/internationalsource- Airline sourceairline_code- IATA airline codelast_ticket_date- Last date for ticketingis_lcc- Boolean indicating Low Cost Carrierfare_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
- Airline Type Detection: The API automatically determines whether to use Non-LCC or LCC format based on the airline
- Passenger Validation: For LCC airlines, all passenger details must be provided and validated according to the specified rules
- Guardian Details: Required only when
passenger_typeis "infant" - Optional Services: Include baggage, meal, seat, or special services only if selected during booking
- 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.