amadeus4dev / amadeus-node

Node library for the Amadeus Self-Service travel APIs
https://developers.amadeus.com
MIT License
191 stars 66 forks source link

how I can get all the necessary information? #164

Closed SyedHasibRahman closed 2 years ago

SyedHasibRahman commented 2 years ago

I am trying to build a flight engine and follow some fling booking engines. so when I search from LONDON to SAN FRANCISCO they show this data. and from Amadeus API I got this data. So could you please tell me how I can get all the necessary information?

image

and my search data is below. API: https://test.api.amadeus.com/v2/shopping/flight-search?originCode=LON&destinationCode=SFO&dateOfDeparture=2022-09-01`

{ "meta": { "count": 1, "links": { "self": "https://test.api.amadeus.com/v2/shopping/flight-offers?originLocationCode=LON&destinationLocationCode=SFO&departureDate=2022-08-23&adults=1&currencyCode=BDT&max=1" } }, "data": [ { "type": "flight-offer", "id": "1", "source": "GDS", "instantTicketingRequired": false, "nonHomogeneous": false, "oneWay": false, "lastTicketingDate": "2022-08-18", "numberOfBookableSeats": 9, "itineraries": [ { "duration": "PT30H5M", "segments": [ { "departure": { "iataCode": "LGW", "terminal": "S", "at": "2022-08-23T16:25:00" }, "arrival": { "iataCode": "LIS", "terminal": "1", "at": "2022-08-23T19:10:00" }, "carrierCode": "TP", "number": "1337", "aircraft": { "code": "32Q" }, "operating": { "carrierCode": "TP" }, "duration": "PT2H45M", "id": "1", "numberOfStops": 0, "blacklistedInEU": false }, { "departure": { "iataCode": "LIS", "terminal": "1", "at": "2022-08-24T09:50:00" }, "arrival": { "iataCode": "SFO", "terminal": "I", "at": "2022-08-24T14:30:00" }, "carrierCode": "TP", "number": "237", "aircraft": { "code": "339" }, "operating": { "carrierCode": "TP" }, "duration": "PT12H40M", "id": "2", "numberOfStops": 0, "blacklistedInEU": false } ] } ], "price": { "currency": "BDT", "total": "38556.00", "base": "14890.00", "fees": [ { "amount": "0.00", "type": "SUPPLIER" }, { "amount": "0.00", "type": "TICKETING" } ], "grandTotal": "38556.00", "additionalServices": [ { "amount": "7204", "type": "CHECKED_BAGS" } ] }, "pricingOptions": { "fareType": [ "PUBLISHED" ], "includedCheckedBagsOnly": false }, "validatingAirlineCodes": [ "TP" ], "travelerPricings": [ { "travelerId": "1", "fareOption": "STANDARD", "travelerType": "ADULT", "price": { "currency": "BDT", "total": "38556.00", "base": "14890.00" }, "fareDetailsBySegment": [ { "segmentId": "1", "cabin": "ECONOMY", "fareBasis": "UUKDSI0D", "class": "U", "includedCheckedBags": { "quantity": 0 } }, { "segmentId": "2", "cabin": "ECONOMY", "fareBasis": "UUKDSI0D", "brandedFare": "DISCOUNT", "class": "U", "includedCheckedBags": { "quantity": 0 } } ] } ] } ], "dictionaries": { "locations": { "LIS": { "cityCode": "LIS", "countryCode": "PT" }, "SFO": { "cityCode": "SFO", "countryCode": "US" }, "LGW": { "cityCode": "LON", "countryCode": "GB" } }, "aircraft": { "339": "AIRBUS A330-900NEO", "32Q": "AIRBUS A321NEO" }, "currencies": { "BDT": "BANGLADESH TAKA" }, "carriers": { "TP": "TAP PORTUGAL" } } }

minjikarin commented 2 years ago

@SyedHasibRahman Hello! thanks for the question. can you please help me to understand further what element is missing? for me all information from your screenshot is returned from Flight Offer Search API : Aircraft, # of bookable seats, durations, terminal etc.

in addition, the data from test environment can be informational as the data is from Cache data. if you are talking about the accuracy of information, i suggest you to use APIs in Production.

minjikarin commented 2 years ago

@SyedHasibRahman waiting for your response :)

minjikarin commented 2 years ago

closed the issue due to no response. please let us know if you have further question. :)