Create Itinerary
This API creates an itinerary in the database based on the user-selected flights and fetches the latest price details from the supplier/airline.
API Request Response Structure
Request Body Structure
Key | Type | Description |
---|---|---|
items | Array | List of selected flights for the itinerary. |
traceId | String | Unique identifier for tracking the search request. |
items
Array
items
ArrayEach item represents a selected flight and has the following structure:
Key | Type | Description |
---|---|---|
type | String | Type of travel service (e.g., "FLIGHT" ). |
resultIndex | String | Unique reference ID of the selected flight result. |
Sample Request Payload
{
"items": [
{
"type": "FLIGHT",
"resultIndex": "04726d37-c4d8-40fe-850f-784c5a338ccf"
},
{
"type": "FLIGHT",
"resultIndex": "bc3df4cf-4d9e-4e8a-86ba-8e7defca0b4d"
}
],
"traceId": "b9754c9f-8bdc-4300-97db-696031eec680"
}
Response Body Structure
1. Basic Itinerary Details
The response includes the following fields:
Field | Description |
---|---|
paxCount | Total number of passengers in the itinerary. |
adultCount | Number of adult passengers. |
childCount | Number of child passengers. |
infantCount | Number of infant passengers. |
itineraryCode | Unique identifier for the itinerary. |
traceId | Unique identifier for tracking the API request. |
isDomestic | Indicates if the flight is domestic (true or false ). |
totalAmount | Total amount for the itinerary including all charges. |
isPriceChanged | Indicates if the fare has changed since the last request. |
isBaggageChanged | Indicates if the baggage rules have changed. |
isHoldAllowed | Specifies if the booking can be placed on hold. |
2. Fare Details
Fare details are provided under the fareQuote
node.
Field | Description |
---|---|
baseFare | Base fare of the flight. |
taxAndSurcharge | Total tax and surcharge applicable. |
finalFare | Final fare including taxes and surcharges. |
isDiscountApplied | Indicates if any discount has been applied. |
3. Flight Segment Details
Each itinerary contains flight segment details inside the itineraryItems
array.
Field | Description |
---|---|
origin | Departure airport code (e.g., DEL ). |
destination | Arrival airport code (e.g., DXB ). |
airlineName | Name of the airline operating the flight. |
flightNumber | Flight number assigned by the airline. |
departureAt | Flight departure date & time (UTC format). |
arrivalAt | Flight arrival date & time (UTC format). |
isLCC | Indicates if the flight is a low-cost carrier (true or false ). |
isRefundable | Specifies if the flight is refundable. |
stopCount | Number of stops in the journey. |
fareIdentifier | Specifies the fare type (e.g., "Economy Comfort"). |
4. Passenger Rules (paxRules)
The paxRules
node defines the mandatory and optional passenger details required during booking.
Field | Visibility | Mandatory If Visible | Description |
---|---|---|---|
dateOfBirth | true | true | Date of birth of the passenger. |
contactNumber | true | true | Contact number of the passenger. |
true | true | Email ID of the passenger. | |
passportNumber | true | true | Passport number (mandatory for international flights). |
passportExpiry | true | true | Passport expiry date. |
nationality | true | true | Passenger’s nationality (ISO country code). |
gstNumber | true | false | GST number (optional). |
seat | true | false | Seat preference (if applicable). |
meal | false | false | Meal preference (if applicable). |
baggage | false | false | Additional baggage details (if applicable). |
💡 Note: Ensure that all fields marked as mandatory (true
) are included in the request in passenger api request to avoid errors.
Sample API Response
{
"results": {
"paxCount": 1,
"adultCount": 1,
"childCount": 0,
"infantCount": 0,
"itineraryCode": "itrjieq",
"traceId": "d380f8d1-3406-40c8-808a-618ab89f080a",
"addONs": null,
"isDomestic": false,
"previousTotalAmount": 16128,
"totalAmount": 16128,
"isPriceChanged": false,
"isBaggageChanged": true,
"insuranceAmount": 0,
"baseFare": 13785,
"taxAndSurcharge": 2343,
"tcDiscount": 0,
"isHoldAllowed": true,
"totalHoldCharges": 0,
"FFAirlineCodes": [
"AI"
],
"itineraryItems": [
{
"itemCode": "itmj0vk",
"type": "FLIGHT",
"itemFlight": {
"resultIndex": "eb0dd017-c953-408e-b85d-05dbf4f333f3",
"origin": "DEL",
"isLCC": false,
"isRefundable": false,
"destination": "DXB",
"airlineName": "Air India",
"flightNumber": "929",
"journeyType": 1,
"provider": "P2",
"distributor": "D1",
"isDomestic": false,
"departureAt": "2024-09-21T07:00:00.000Z",
"arrivalAt": "2024-09-21T09:30:00.000Z",
"fareIdentifier": {
"name": "Others",
"code": "fothers",
"colorCode": "#EC008F"
},
"stopCount": {
"stops": 0
},
"airlineRemark": null,
"isHoldAllowed": true,
"fareQuote": {
"resultIndex": "eb0dd017-c953-408e-b85d-05dbf4f333f3",
"isLCC": false,
"currency": "INR",
"baseFare": 13785,
"finalFare": 16128,
"taxAndSurcharge": 2343,
"isDiscountApplied": false,
"originalFinalFare": null,
"tcDiscount": 0
},
"fareRule": [],
"segments": [
[
{
"bg": "KG025",
"cBg": "7Kg",
"cC": 2,
"al": {
"alC": "AI",
"alN": "Air India",
"fN": "929",
"fC": "T",
"oC": null,
"fCFC": "T_ECO COMFORT"
},
"nOSA": null,
"or": {
"aC": "DEL",
"aN": "Delhi Indira Gandhi Intl",
"tr": "Terminal 3",
"cC": "DEL",
"cN": "Delhi",
"dT": "2024-09-21T07:00:00",
"cnN": "India"
},
"ds": {
"aC": "DXB",
"aN": "Dubai Intl Arpt",
"tr": "Terminal 1",
"cC": "DXB",
"cN": "Dubai",
"aT": "2024-09-21T09:30:00",
"cnN": "United Arab Emirates"
},
"aD": 240,
"dr": 240,
"gT": 0,
"sO": false,
"sP": "",
"sD": 0
}
]
],
"pnrDetails": [
{
"origin": "DEL",
"destination": "DXB",
"pnr": null
}
]
}
}
],
"passengers": [],
"airportMetaData": [
{
"airportCode": "DXB",
"cityCode": "DXB",
"cityName": "Dubai",
"countryCode": "AE",
"countryName": "United Arab Emirates",
"latitude": "25.252800",
"longitude": "55.364399"
}
],
"agentInfo": null,
"paxRules": {
"leadPax": {
"isPassportIssueDateRequired": {
"isVisible": true,
"isMandatoryIfVisible": true
},
"dateOfBirth": {
"isVisible": true,
"isMandatoryIfVisible": true
},
"cellCountryCode": {
"isVisible": true,
"isMandatoryIfVisible": true
},
"contactNumber": {
"isVisible": true,
"isMandatoryIfVisible": true
},
"email": {
"isVisible": true,
"isMandatoryIfVisible": true
},
"passportNumber": {
"isVisible": true,
"isMandatoryIfVisible": true
},
"passportExpiry": {
"isVisible": true,
"isMandatoryIfVisible": true
},
"gstCompanyAddress": {
"isVisible": true,
"isMandatoryIfVisible": false
},
"gstCompanyContactNumber": {
"isVisible": true,
"isMandatoryIfVisible": false
},
"gstCompanyEmail": {
"isVisible": true,
"isMandatoryIfVisible": false
},
"gstCompanyName": {
"isVisible": true,
"isMandatoryIfVisible": false
},
"gstNumber": {
"isVisible": true,
"isMandatoryIfVisible": false
},
"ssr": {
"isVisible": true,
"isMandatoryIfVisible": false
},
"meal": {
"isVisible": false,
"isMandatoryIfVisible": false
},
"baggage": {
"isVisible": false,
"isMandatoryIfVisible": false
},
"seat": {
"isVisible": true,
"isMandatoryIfVisible": false
},
"paxType": {
"isVisible": true,
"isMandatoryIfVisible": true
},
"title": {
"isVisible": true,
"isMandatoryIfVisible": true
},
"firstName": {
"isVisible": true,
"isMandatoryIfVisible": true
},
"lastName": {
"isVisible": true,
"isMandatoryIfVisible": true
},
"nationality": {
"isVisible": true,
"isMandatoryIfVisible": true
},
"frequentFlyerNumber": {
"isVisible": true,
"isMandatoryIfVisible": false
},
"frequentFlyerAirlineCode": {
"isVisible": true,
"isMandatoryIfVisible": false
}
},
"adult": {
"isPassportIssueDateRequired": {
"isVisible": true,
"isMandatoryIfVisible": true
},
"dateOfBirth": {
"isVisible": true,
"isMandatoryIfVisible": true
},
"cellCountryCode": {
"isVisible": false,
"isMandatoryIfVisible": false
},
"contactNumber": {
"isVisible": false,
"isMandatoryIfVisible": false
},
"email": {
"isVisible": false,
"isMandatoryIfVisible": false
},
"passportNumber": {
"isVisible": true,
"isMandatoryIfVisible": true
},
"passportExpiry": {
"isVisible": true,
"isMandatoryIfVisible": true
},
"gstCompanyAddress": {
"isVisible": false,
"isMandatoryIfVisible": false
},
"gstCompanyContactNumber": {
"isVisible": false,
"isMandatoryIfVisible": false
},
"gstCompanyEmail": {
"isVisible": false,
"isMandatoryIfVisible": false
},
"gstCompanyName": {
"isVisible": false,
"isMandatoryIfVisible": false
},
"gstNumber": {
"isVisible": false,
"isMandatoryIfVisible": false
},
"ssr": {
"isVisible": true,
"isMandatoryIfVisible": false
},
"meal": {
"isVisible": false,
"isMandatoryIfVisible": false
},
"baggage": {
"isVisible": false,
"isMandatoryIfVisible": false
},
"seat": {
"isVisible": true,
"isMandatoryIfVisible": false
},
"paxType": {
"isVisible": true,
"isMandatoryIfVisible": true
},
"title": {
"isVisible": true,
"isMandatoryIfVisible": true
},
"firstName": {
"isVisible": true,
"isMandatoryIfVisible": true
},
"lastName": {
"isVisible": true,
"isMandatoryIfVisible": true
},
"nationality": {
"isVisible": true,
"isMandatoryIfVisible": true
},
"frequentFlyerNumber": {
"isVisible": true,
"isMandatoryIfVisible": false
},
"frequentFlyerAirlineCode": {
"isVisible": true,
"isMandatoryIfVisible": false
}
}
},
"traceIdDetails": {
"traceId": "d380f8d1-3406-40c8-808a-618ab89f080a",
"remainingTime": 8690,
"createdAt": "2024-07-29T12:27:45"
}
}
}
6. Key Takeaways
- The Create Itinerary API generates an itinerary with flight and fare details.
- It provides necessary information on passengers, fare quotes, and airline policies.
- Ensure that mandatory passenger fields (from
paxRules
) are included in the booking request. - Use the
itineraryCode
andtraceId
for further processing (e.g., passenger info submission, booking). - Check
isPriceChanged
andisBaggageChanged
to identify any fare or baggage updates. - If
isHoldAllowed
istrue
, the booking can be placed on hold before finalizing.
API Reference
Updated 20 days ago