post https://api.aeronpay.in/api/serviceapi-prod/api/flight/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
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 request requires the following core parameters:
Required Parameters
Parameter | Type | Description |
---|---|---|
client_referenceId | String | Unique Client Reference ID |
trace_id | String | Trace ID from booking response |
token | String | Booking token from successful booking |
passengers | Array | Array of passenger objects with detailed information |
Passenger Object Structure
Each passenger object must contain:
Field | Type | Required | Description |
---|---|---|---|
title | String | Yes | Passenger title (Mr, Mrs, Ms, Mstr) |
fname | String | Yes | First name |
lname | String | Yes | Last name |
mobile | String | Yes | Mobile number |
email | String | Yes | Email address |
passenger_type | String | Yes | Type: adult, child, or infant |
dob | String | Yes | Date of birth (YYYY-MM-DD format) |
gender | String | Yes | Gender (M/F) |
address | String | Yes | Address |
city | String | Yes | City |
country | String | Yes | Country |
country_code | String | Yes | Country code (e.g., "IN") |
Optional Services
Field | Type | Description |
---|---|---|
meal | Array | Meal preferences with code, origin, destination |
seat | Array | Seat selection with code, origin, destination |
baggage | Array | Additional baggage with code, origin, destination |
gst | Object | GST details for business travelers |
GST Object (Optional)
Field | Type | Description |
---|---|---|
gst_company_name | String | Company name |
gst_number | String | GST registration number |
gst_company_address | String | Company address |
gst_company_mobile | String | Company mobile number |
gst_company_email | String | Company 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:
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 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.