Retrieve Booking
Discover how to use Retrieve API calls to retrieve existing bookings. This can be called directly with your API key with booking reference id. It returns details about a booking details associated with the booking id along with cancel links to cancel the booking.
Parameters
Name
Description
Accept
string
( header )
Must be application/json
Accept - Encoding
string
( header )
Must be gzip
Authorization
string
( header )
Must be Your PID
Must be Your API Key
Customer-Ip
string
( header )
Must be IP address of the customer, as captured by your integration. Send IPV4 addresses only.
Ensure your integration passes the customer’s IP, not your own. This value helps determine their location and other settings.
Also used for fraud recovery and other important analytics.
Definition and request parameters to get flight booking details
action
string
( query )
Must be "getBookingDetails" as parameter
Action methods in Web API controller can have one or more parameters of different types. It can be either primitive type or complex type. Web API binds action method parameters either with URL's query string or with request body depending on the parameter type.
ModeType
string
( query )
Must be either "Test" or "LIVE"
Your application must be approved from Adivaha Personnel. All the transactions will be treated as LIVE once the parameter is set to LIVE.
BookingId
string
( query )
Unique booking id of the >successful booking
PNR
string
( query )
PNR
TraceId
string
( query )
Trace Id
REQUEST
API Endpoint: https://your-end-point/api/v1/travel-api/flights/
header: array( 'Content-Type:application/json', 'Accept-encoding: gzip', 'PID:'ADD-YOUR-KEY', 'x-api-key:'ADD-YOUR-KEY' ); POST: { "action": "getBookingDetails", "mode": "Test", "TraceId": "5e43160c-8953-4c6e-bd4b-47267e644d00", "BookingId": "1697020", "PNR": "EYVFPN" }
Response
The API returns an HTTP response, which generally includes the result of the request invocation
{ "Response": { "Error": { "ErrorCode": 0, "ErrorMessage": "" }, "ResponseStatus": 1, "TraceId": "5e43160c-8953-4c6e-bd4b-47267e644d00", "FlightItinerary": { "AgentRemarks": "", "CommentDetails": null, "IsAutoReissuanceAllowed": true, "IssuancePcc": "otaapi", "JourneyType": 1, "TripIndicator": 1, "BookingAllowedForRoamer": true, "BookingId": 1697020, "IsCouponAppilcable": true, "IsManual": false, "PNR": "EYVFPN", "AgentReferenceNo": "1084776888", "IsDomestic": true, "ResultFareType": "RegularFare", "Source": 44, "Origin": "DEL", "Destination": "JAI", "AirlineCode": "G8", "LastTicketDate": "9999-12-31T00:00:00", "ValidatingAirlineCode": "G8", "AirlineRemark": "G8 di G8I", "AirlineTollFreeNo": "9876543210", "IsLCC": true, "NonRefundable": false, "FareType": "PUB", "CreditNoteNo": null, "Fare": { "Currency": "INR", "BaseFare": 17859, "Tax": 2807, "TaxBreakup": [ { "key": "K3", "value": 962 }, { "key": "UDF", "value": 63 }, { "key": "YR", "value": 60 }, { "key": "YQTax", "value": 750 }, { "key": "TotalTax", "value": 2807 }, { "key": "OtherTaxes", "value": 922 } ], "YQTax": 750, "AdditionalTxnFeeOfrd": 0, "AdditionalTxnFeePub": 0, "PGCharge": 0, "OtherCharges": 64, "ChargeBU": [ { "key": "TBOMARKUP", "value": 0 }, { "key": "GLOBALPROCUREMENTCHARGE", "value": 0 }, { "key": "OTHERCHARGE", "value": 64 }, { "key": "CONVENIENCECHARGE", "value": 0 } ], "Discount": 0, "PublishedFare": 20730, "CommissionEarned": 0, "PLBEarned": 0, "IncentiveEarned": 0, "OfferedFare": 20730, "TdsOnCommission": 0, "TdsOnPLB": 0, "TdsOnIncentive": 0, "ServiceFee": 0, "TotalBaggageCharges": 0, "TotalMealCharges": 0, "TotalSeatCharges": 0, "TotalSpecialServiceCharges": 0 }, "CreditNoteCreatedOn": null, "Passenger": [ { "PaxId": 2826188, "Title": "Mr", "FirstName": "Test", "LastName": "Booking", "PaxType": 1, "DateOfBirth": "1995-07-17T00:00:00", "Gender": 1, "IsPANRequired": false, "IsPassportRequired": false, "PAN": "", "PassportNo": "", "AddressLine1": "D-88 Ground Floor Sector 17 Vashi, Navi mumbai", "Fare": { "Currency": "INR", "BaseFare": 17859, "Tax": 2807, "TaxBreakup": [ { "key": "K3", "value": 962 }, { "key": "UDF", "value": 63 }, { "key": "YR", "value": 60 }, { "key": "YQTax", "value": 750 }, { "key": "TotalTax", "value": 2807 }, { "key": "OtherTaxes", "value": 922 } ], "YQTax": 750, "AdditionalTxnFeeOfrd": 0, "AdditionalTxnFeePub": 0, "PGCharge": 0, "OtherCharges": 64, "ChargeBU": [ { "key": "TBOMARKUP", "value": 0 }, { "key": "GLOBALPROCUREMENTCHARGE", "value": 0 }, { "key": "OTHERCHARGE", "value": 64 }, { "key": "CONVENIENCECHARGE", "value": 0 } ], "Discount": 0, "PublishedFare": 20730, "CommissionEarned": 0, "PLBEarned": 0, "IncentiveEarned": 0, "OfferedFare": 20730, "TdsOnCommission": 0, "TdsOnPLB": 0, "TdsOnIncentive": 0, "ServiceFee": 0, "TotalBaggageCharges": 0, "TotalMealCharges": 0, "TotalSeatCharges": 0, "TotalSpecialServiceCharges": 0 }, "City": "Navi Mumbai", "CountryCode": "IN", "Nationality": "IN", "ContactNo": "9988776655", "Email": "test@gmail.com", "IsLeadPax": true, "FFAirlineCode": null, "FFNumber": null, "Baggage": [ { "AirlineCode": "G8", "FlightNumber": "2501", "WayType": 2, "Code": "NONE ", "Description": 2, "Weight": 0, "Currency": "INR", "Price": 0, "Origin": "DEL", "Destination": "JAI", "Text": "" } ], "Ssr": [ ], "Ticket": { "TicketId": 1974505, "TicketNumber": "EYVFPN", "IssueDate": "2021-08-12T17:47:49", "ValidatingAirline": "82*", "Remarks": "", "ServiceFeeDisplayType": "ShowInTax", "Status": "OK", "ConjunctionNumber": " ", "TicketType": "N" }, "SegmentAdditionalInfo": [ { "FareBasis": "AO9RBINX", "NVA": "", "NVB": "", "Baggage": "15KG", "Meal": "0 Platter", "Seat": "", "SpecialService": "" }, { "FareBasis": "AO9RBINX", "NVA": "", "NVB": "", "Baggage": "15KG", "Meal": "0 Platter", "Seat": "", "SpecialService": "" } ] } ], "CancellationCharges": null, "Segments": [ { "Baggage": null, "CabinBaggage": null, "CabinClass": 2, "TripIndicator": 1, "SegmentIndicator": 1, "Airline": { "AirlineCode": "G8", "AirlineName": "GoAir", "FlightNumber": "2501", "FareClass": "A", "OperatingCarrier": "" }, "AirlinePNR": "", "Origin": { "Airport": { "AirportCode": "DEL", "AirportName": "Indira Gandhi Airport", "Terminal": "2", "CityCode": "DEL", "CityName": "Delhi", "CountryCode": "IN", "CountryName": "India" }, "DepTime": "2021-09-09T02:40:00" }, "Destination": { "Airport": { "AirportCode": "BOM", "AirportName": "Mumbai", "Terminal": "2", "CityCode": "BOM", "CityName": "Mumbai", "CountryCode": "IN", "CountryName": "India" }, "ArrTime": "2021-09-09T04:45:00" }, "Duration": 125, "GroundTime": 0, "Mile": 0, "StopOver": false, "FlightInfoIndex": "1", "StopPoint": "", "StopPointArrivalTime": null, "StopPointDepartureTime": null, "Craft": "32N", "Remark": null, "IsETicketEligible": true, "FlightStatus": "Confirmed", "Status": "HK" }, { "Baggage": null, "CabinBaggage": null, "CabinClass": 2, "TripIndicator": 1, "SegmentIndicator": 2, "Airline": { "AirlineCode": "G8", "AirlineName": "GoAir", "FlightNumber": "2607", "FareClass": "A", "OperatingCarrier": "" }, "AirlinePNR": "", "Origin": { "Airport": { "AirportCode": "BOM", "AirportName": "Mumbai", "Terminal": "2", "CityCode": "BOM", "CityName": "Mumbai", "CountryCode": "IN", "CountryName": "India" }, "DepTime": "2021-09-09T16:10:00" }, "Destination": { "Airport": { "AirportCode": "JAI", "AirportName": "Sanganeer", "Terminal": "2", "CityCode": "JAI", "CityName": "Jaipur", "CountryCode": "IN", "CountryName": "India" }, "ArrTime": "2021-09-09T18:00:00" }, "AccumulatedDuration": 920, "Duration": 110, "GroundTime": 685, "Mile": 0, "StopOver": false, "FlightInfoIndex": "2", "StopPoint": "", "StopPointArrivalTime": null, "StopPointDepartureTime": null, "Craft": "32N", "Remark": null, "IsETicketEligible": true, "FlightStatus": "Confirmed", "Status": "HK" } ], "FareRules": [ { "Origin": "DEL", "Destination": "BOM", "Airline": "G8", "FareBasisCode": "AO9RBINX", "FareRuleDetail": "The FareBasisCode is: AO9RBINX
", "FareRestriction": "", "FareFamilyCode": "", "FareRuleIndex": "" }, { "Origin": "BOM", "Destination": "JAI", "Airline": "G8", "FareBasisCode": "AO9RBINX", "FareRuleDetail": "Please refer above
", "FareRestriction": "", "FareFamilyCode": "", "FareRuleIndex": "" } ], "PenaltyCharges": { "ReissueCharge": "", "CancellationCharge": "" }, "Status": 5 } } }