amadeus.flightofferssearch
Module amadeus.flightofferssearch
Definitions
ballerinax/amadeus.flightofferssearch Ballerina library
Overview
This is a generated connector for Amadeus Flight Offers Search API OpenAPI specification.
This Amadeus Flight Offers Search API provides the capability to search for the cheapest flight for a given itinerary.
Prerequisites
Before using this connector in your Ballerina application, complete the following:
- Create Amadeus account
- Obtain clientId and clientSecret following this guide
Clients
amadeus.flightofferssearch: Client
This is a generated connector for Amadeus Flight Offers Search API OpenAPI specification. This Amadeus Flight Offers Search API provides the capability to search for the cheapest flight for a given itinerary.
Constructor
Gets invoked to initialize the connector
.
The connector initialization requires clientId and clientSecret.
Please create Amadeus account and Obtain clientId and clientSecret following this guide
init (ClientConfig clientConfig, string serviceUrl)
- clientConfig ClientConfig - The configurations to be used when initializing the
connector
- serviceUrl string "https://test.api.amadeus.com/v2" - URL of the target service
getFlightOffers
function getFlightOffers(string originLocationCode, string destinationLocationCode, string departureDate, int adults, string? returnDate, int? children, int? infants, string? travelClass, string? includedAirlineCodes, string? excludedAirlineCodes, boolean nonStop, string? currencyCode, int? maxPrice, int max) returns Success|error
Return list of Flight Offers based on searching criteria.
Parameters
- adults int - the number of adult travelers (age 12 or older on date of departure).
- returnDate string? (default ()) - the date on which the traveler will depart from the destination to return to the origin. If this parameter is not specified, only one-way itineraries are found. If this parameter is specified, only round-trip itineraries are found. Dates are specified in the ISO 8601 YYYY-MM-DD format, e.g. 2018-02-28
- children int? (default ()) - the number of child travelers (older than age 2 and younger than age 12 on date of departure) who will each have their own separate seat. If specified, this number should be greater than or equal to 0
- infants int? (default ()) - the number of infant travelers (whose age is less or equal to 2 on date of departure). Infants travel on the lap of an adult traveler, and thus the number of infants must not exceed the number of adults. If specified, this number should be greater than or equal to 0
- travelClass string? (default ()) - most of the flight time should be spent in a cabin of this quality or higher. The accepted travel class is economy, premium economy, business or first class. If no travel class is specified, the search considers any travel class
- includedAirlineCodes string? (default ()) - This option ensures that the system will only consider these airlines. This can not be cumulated with parameter excludedAirlineCodes. Airlines are specified as IATA airline codes and are comma-separated, e.g. 6X,7X,8X
- excludedAirlineCodes string? (default ()) - This option ensures that the system will ignore these airlines. This can not be cumulated with parameter includedAirlineCodes. Airlines are specified as IATA airline codes and are comma-separated, e.g. 6X,7X,8X
- nonStop boolean (default false) - if set to true, the search will find only flights going from the origin to the destination with no stop in between
- maxPrice int? (default ()) - maximum price per traveler. By default, no limit is applied. If specified, the value should be a positive number with no decimals
- max int (default 250) - maximum number of flight offers to return. If specified, the value should be greater than or equal to 1
searchFlightOffers
Return list of Flight Offers based on posted searching criteria.
Parameters
- xHttpMethodOverride string - the HTTP method to apply
- payload byte[] - list of criteria to retrieve a list of flight offers
Records
amadeus.flightofferssearch: AdditionalInformation
Fields
- chargeableCheckedBags boolean? - If true, returns the price of the first additional bag when the airline is an "Amadeus Ancillary Services" member.
- brandedFares boolean? - If true, returns the fare family name for each flight-offer which supports fare family
amadeus.flightofferssearch: AdditionalService
Fields
- amount string? -
- 'type AdditionalServiceType? - additional service type
amadeus.flightofferssearch: AdditionalServicesRequest
Fields
- chargeableCheckedBags BaggageAllowance? - baggageAllowance
- chargeableSeatNumber string? - seat number
- otherServices ServiceName[]? - Other services to add
amadeus.flightofferssearch: AircraftEntry
Fields
- 'key string? -
amadeus.flightofferssearch: AircraftEquipment
information related to the aircraft
Fields
- code string? - IATA aircraft code (http://www.flugzeuginfo.net/table_accodes_iata_en.php)
amadeus.flightofferssearch: AllotmentDetails
Fields
- tourName string? -
- tourReference string? -
amadeus.flightofferssearch: BaggageAllowance
baggageAllowance
Fields
- quantity int? - Total number of units
- weight int? - Weight of the baggage allowance
- weightUnit string? - Code to qualify unit as pounds or kilos
amadeus.flightofferssearch: CabinRestriction
Fields
- cabin TravelClass? - quality of service offered in the cabin where the seat is located in this flight. Economy, premium economy, business or first class
- coverage Coverage? - part of the trip covered by the travel class restriction (ALL_SEGMENTS if ommited)
- originDestinationIds string[]? - The list of originDestination identifiers for which the cabinRestriction applies
amadeus.flightofferssearch: CarrierEntry
Fields
- 'key string? -
amadeus.flightofferssearch: CarrierRestrictions
Restriction towards carriers.
Fields
- blacklistedInEUAllowed boolean? - This flag enable/disable filtering of blacklisted airline by EU. The list of the banned airlines is published in the Official Journal of the European Union, where they are included as annexes A and B to the Commission Regulation. The blacklist of an airline can concern all its flights or some specific aircraft types pertaining to the airline
- excludedCarrierCodes string[]? - This option ensures that the system will only consider these airlines.
- includedCarrierCodes string[]? - This option ensures that the system will only consider these airlines.
amadeus.flightofferssearch: ClientConfig
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- auth OAuth2ClientCredentialsGrantConfig - Configurations related to client authentication
- httpVersion string(default "1.1") - The HTTP version understood by the client
- http1Settings ClientHttp1Settings(default {}) - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings(default {}) - Configurations related to HTTP/2 protocol
- timeout decimal(default 60) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded
/x-forwarded
header
- followRedirects FollowRedirects?(default ()) - Configurations associated with Redirection
- poolConfig PoolConfiguration?(default ()) - Configurations associated with request pooling
- cache CacheConfig(default {}) - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding
) header
- circuitBreaker CircuitBreakerConfig?(default ()) - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig RetryConfig?(default ()) - Configurations associated with retrying
- cookieConfig CookieConfig?(default ()) - Configurations associated with cookies
- responseLimits ResponseLimitConfigs(default {}) - Configurations associated with inbound response size limits
- secureSocket ClientSecureSocket?(default ()) - SSL/TLS-related options
amadeus.flightofferssearch: Co2Emission
Fields
- weight int? - Weight of Co2 emitted for the concerned segment
- weightUnit string? - Code to qualify unit as pounds or kilos
- cabin TravelClass? - quality of service offered in the cabin where the seat is located in this flight. Economy, premium economy, business or first class
amadeus.flightofferssearch: CollectionLinks
Fields
- self string? -
- next string? -
- previous string? -
- last string? -
- first string? -
- up string? -
amadeus.flightofferssearch: CollectionMeta
Fields
- count int? -
- oneWayCombinations OneWayCombinations[]? -
amadeus.flightofferssearch: CollectionMetaLink
Fields
- count int? -
- links CollectionLinks? -
amadeus.flightofferssearch: ConnectionRestriction
Restriction towards number of connections.
Fields
- maxNumberOfConnections decimal? - The maximal number of connections for each itinerary. Value can be 0, 1 or 2.
- airportChangeAllowed boolean? - Allow to change airport during connection
- technicalStopsAllowed boolean? - This option allows the single segment to have one or more intermediate stops (technical stops).
amadeus.flightofferssearch: CurrencyEntry
Fields
- 'key string? -
amadeus.flightofferssearch: DateTimeRange
Fields
- dateWindow string? - Either 1, 2 or 3 extra days around the local date (IxD for +/- x days - Ex: I3D), Either 1 to 3 days after the local date (PxD for +x days - Ex: P3D), or 1 to 3 days before the local date (MxD for -x days - Ex: M3D) Can not be combined with "originRadius" or "destinationRadius".
- time string? - Local time. hh:mm:ss format, e.g 10:30:00
- timeWindow string? - 1 to 12 hours around (both +and -) the local time. Possibly limited by the number of extra days when specified, i.e. in some situations, it may not be used to exceed the maximum date range. [1-12]H format, e.g. 6H Can not be combined with "originRadius" or "destinationRadius".
amadeus.flightofferssearch: Dictionaries
Fields
- locations LocationEntry? -
- aircraft AircraftEntry? -
- currencies CurrencyEntry? -
- carriers CarrierEntry? -
amadeus.flightofferssearch: Error400
Fields
- errors Issue[] -
amadeus.flightofferssearch: Error500
Fields
- errors Issue[] -
amadeus.flightofferssearch: ExtendedPrice
price information
Fields
- margin string? - BOOK step ONLY - The price margin percentage (plus or minus) that the booking can tolerate. When set to 0, then no price magin is tolerated.
- grandTotal string? - Total amount paid by the user (including fees and selected additional services).
- billingCurrency string? - Currency of the payment. It may be different than the requested currency
- additionalServices AdditionalService[]? -
- Fields Included from *Price
amadeus.flightofferssearch: ExtendedPricingOptions
fare filter options
Fields
- includedCheckedBagsOnly boolean? - If true, returns the flight-offers with included checked bags only
- refundableFare boolean? - If true, returns the flight-offers with refundable fares only
- noRestrictionFare boolean? - If true, returns the flight-offers with no restriction fares only
- noPenaltyFare boolean? - If true, returns the flight-offers with no penalty fares only
amadeus.flightofferssearch: FareDetailsBySegment
Fare details of the segment
Fields
- segmentId string - Id of the segment
- cabin TravelClass? - quality of service offered in the cabin where the seat is located in this flight. Economy, premium economy, business or first class
- fareBasis string? - Fare basis specifying the rules of a fare. Usually, though not always, is composed of the booking class code followed by a set of letters and digits representing other characteristics of the ticket, such as refundability, minimum stay requirements, discounts or special promotional elements.
- brandedFare string? - The name of the Fare Family corresponding to the fares. Only for the GDS provider and if the airline has fare families filled
- 'class string? - The code of the booking class, a.k.a. class of service or Reservations/Booking Designator (RBD)
- isAllotment boolean? - True if the corresponding booking class is in an allotment
- allotmentDetails AllotmentDetails? -
- sliceDiceIndicator SliceDiceIndicator? - slice and Dice indicator, such as Local Availability, Sub OnD(Origin and Destination) 1 Availability and Sub OnD 2 Availability
- includedCheckedBags BaggageAllowance? - baggageAllowance
- additionalServices AdditionalServicesRequest? -
amadeus.flightofferssearch: Fee
a fee
Fields
- amount string? -
- 'type FeeType? - type of fee
amadeus.flightofferssearch: FlightEndPoint
departure or arrival information
Fields
- Fields Included from *OriginalFlightEndPoint
amadeus.flightofferssearch: FlightFilters
Fields
- crossBorderAllowed boolean? - Allows to search a location outside the borders when a radius around a location is specified. Default is false.
- moreOvernightsAllowed boolean? - This flag enables/disables the possibility to have more overnight flights in Low Fare Search
- returnToDepartureAirport boolean? - This option force to retrieve flight-offer with a departure and a return in the same airport
- railSegmentAllowed boolean? - This flag enable/disable filtering of rail segment (TGV AIR, RAIL ...)
- busSegmentAllowed boolean? - This flag enable/disable filtering of bus segment
- maxFlightTime decimal? - Maximum flight time as a percentage relative to the shortest flight time available for the itinerary
- carrierRestrictions CarrierRestrictions? - Restriction towards carriers.
- cabinRestrictions CabinRestriction[]? - Restriction towards cabins.
- connectionRestriction ConnectionRestriction? - Restriction towards number of connections.
amadeus.flightofferssearch: FlightOffer
Fields
- 'type string - the resource name
- id string - Id of the flight offer
- 'source FlightOfferSource? - source of the flight offer
- instantTicketingRequired boolean? - If true, inform that a ticketing will be required at booking step.
- disablePricing boolean? - BOOK step ONLY - If true, allows to book a PNR without pricing. Only for the source "GDS"
- nonHomogeneous boolean? - If true, upon completion of the booking, this pricing solution is expected to yield multiple records (a record contains booking information confirmed and stored, typically a Passenger Name Record (PNR), in the provider GDS or system)
- oneWay boolean? - If true, the flight offer can be combined with other oneWays flight-offers to complete the whole journey (one-Way combinable feature).
- paymentCardRequired boolean? - If true, a payment card is mandatory to book this flight offer
- lastTicketingDate string? - If booked on the same day as the search (with respect to timezone), this flight offer is guaranteed to be thereafter valid for ticketing until this date (included). Unspecified when it does not make sense for this flight offer (e.g. no control over ticketing once booked). YYYY-MM-DD format, e.g. 2019-06-07
- numberOfBookableSeats decimal? - Number of seats bookable in a single request. Can not be higher than 9.
- itineraries Itineraries[]? -
- price ExtendedPrice? - price information
- pricingOptions PricingOptions? -
- validatingAirlineCodes string[]? - This option ensures that the system will only consider offers with these airlines as validating carrier.
- travelerPricings TravelerPricing[]? - Fare information for each traveler/segment
amadeus.flightofferssearch: FlightSegment
defining a flight segment; including both operating and marketing details when applicable
Fields
- departure FlightEndPoint? - departure or arrival information
- arrival FlightEndPoint? - departure or arrival information
- carrierCode string? - providing the airline / carrier code
- number string? - the flight number as assigned by the carrier
- aircraft AircraftEquipment? - information related to the aircraft
- operating OperatingFlight? - information about the operating flight
- stops FlightStop[]? - information regarding the different stops composing the flight segment. E.g. technical stop, change of gauge...
amadeus.flightofferssearch: FlightStop
details of stops for direct or change of gauge flights
Fields
- Fields Included from *OriginalFlightStop
amadeus.flightofferssearch: GetFlightOffersQuery
Fields
- originDestinations OriginDestination[] - Origins and Destinations must be properly ordered in time (chronological order in accordance with the timezone of each location) to describe the journey consistently. Dates and times must not be past nor more than 365 days in the future, according to provider settings.Number of Origins and Destinations must not exceed the limit defined in provider settings.
- travelers Traveler[] - travelers in the trip. Maximum number of passengers older than 2 yo (CHILD, ADULT, YOUGHT): 9. Each adult can travel with one INFANT so maximum total number of passengers: 18
- sources FlightOfferSource[] - Allows enable one or more sources. If present in the list, these sources will be called by the system.
- searchCriteria SearchCriteria? -
amadeus.flightofferssearch: Issue
Fields
- status int? - the HTTP status code applicable to this error
- code int? - an application-specific error code
- title string? - a short summary of the error
- detail string? - explanation of the error
- 'source IssueSource? - an object containing references to the source of the error
amadeus.flightofferssearch: IssueSource
an object containing references to the source of the error
Fields
- pointer string? - a JSON Pointer [RFC6901] to the associated entity in the request document
- 'parameter string? - a string indicating which URI query parameter caused the issue
- example string? - a string indicating an example of the right value
amadeus.flightofferssearch: Itineraries
Fields
- segments Segment[] -
amadeus.flightofferssearch: LocationEntry
Fields
- 'key string? -
amadeus.flightofferssearch: LocationValue
Fields
- cityCode string? - City code associated to the airport
- countryCode string? - Country code of the airport
amadeus.flightofferssearch: OAuth2ClientCredentialsGrantConfig
OAuth2 Client Credintials Grant Configs
Fields
- Fields Included from *OAuth2ClientCredentialsGrantConfig
- tokenUrl string
- clientId string
- clientSecret string
- scopes string[]
- defaultTokenExpTime decimal
- clockSkew decimal
- optionalParams map<string>
- credentialBearer CredentialBearer
- clientConfig ClientConfiguration
- tokenUrl string(default "https://test.api.amadeus.com/v1/security/oauth2/token") - Token URL
amadeus.flightofferssearch: OneWayCombinations
Fields
- originDestinationId string? -
- flightOfferIds string[]? -
amadeus.flightofferssearch: OperatingFlight
information about the operating flight
Fields
- carrierCode string? - providing the airline / carrier code
amadeus.flightofferssearch: OriginalFlightEndPoint
departure or arrival information
Fields
- iataCode string? - IATA airline codes
- terminal string? - terminal name / number
amadeus.flightofferssearch: OriginalFlightStop
details of stops for direct or change of gauge flights
Fields
- iataCode string? - IATA airline codes
amadeus.flightofferssearch: OriginDestination
Fields
- id string? -
- originRadius decimal? - Include other possible locations around the point, located less than this distance in kilometers away. Max:300 Can not be combined with "dateWindow" or "timeWindow".
- destinationRadius decimal? - Include other possible locations around the point, located less than this distance in kilometers away. Max:300 Can not be combined with "dateWindow" or "timeWindow".
- departureDateTimeRange DateTimeRange? -
- arrivalDateTimeRange DateTimeRange? -
- includedConnectionPoints string[]? - List of included connections points. When an includedViaPoints option is specified, all FlightOffer returned must at least go via this Connecting Point. Currently, only the locations defined in IATA are supported. Used only by the AMADEUS provider
- excludedConnectionPoints string[]? - List of excluded connections points. Any FlightOffer with these connections points will be present in response. Currently, only the locations defined in IATA are supported. Used only by the AMADEUS provider
amadeus.flightofferssearch: Price
Fields
- currency string? -
- total string? - Total amount paid by the user
- base string? - Amount without taxes
- fees Fee[]? - List of applicable fees
- taxes Tax[]? -
- refundableTaxes string? - The amount of taxes which are refundable
amadeus.flightofferssearch: PricingOptions
Fields
- fareType PricingOptionsFareType? - type of fare of the flight-offer
- includedCheckedBagsOnly boolean? - If true, returns the flight-offers with included checked bags only
- refundableFare boolean? - If true, returns the flight-offers with refundable fares only
- noRestrictionFare boolean? - If true, returns the flight-offers with no restriction fares only
- noPenaltyFare boolean? - If true, returns the flight-offers with no penalty fares only
amadeus.flightofferssearch: SearchCriteria
Fields
- excludeAllotments boolean? - This option allows to exclude the isAllotment flag associated to a booking class in the search response when it exist.
- addOneWayOffers boolean? - This option allows activate the one-way combinable feature
- maxFlightOffers decimal? - Maximum number of flight offers returned (Max 250)
- maxPrice int? - maximum price per traveler. By default, no limit is applied. If specified, the value should be a positive number with no decimals
- allowAlternativeFareOptions boolean? - This option allows to default to a standard fareOption if no offers are found for the selected fareOption.
- oneFlightOfferPerDay boolean? - Requests the system to find at least one flight-offer per day, if possible, when a range of dates is specified. Default is false.
- additionalInformation AdditionalInformation? -
- pricingOptions ExtendedPricingOptions? - fare filter options
- flightFilters FlightFilters? -
amadeus.flightofferssearch: Segment
Fields
- id string? - Id of the segment
- numberOfStops int? - Number of stops planned on the segment for technical or operation purpose i.e. refueling
- blacklistedInEU boolean? - When the flight has a marketing or/and operating airline that is identified as blacklisted by the European Commission. To improve travel safety, the European Commission regularly updates the list of the banned carriers from operating in Europe. It allows any Travel Agency located in the European Union to easily identify and hide any travel recommendation based on some unsafe airlines. The list of the banned airlines is published in the Official Journal of the European Union, where they are included as annexes A and B to the Commission Regulation. The blacklist of an airline can concern all its flights or some specific aircraft types pertaining to the airline
- co2Emissions Co2Emission[]? - Co2 informations
- Fields Included from *FlightSegment
- departure FlightEndPoint
- arrival FlightEndPoint
- carrierCode string
- number string
- aircraft AircraftEquipment
- operating OperatingFlight
- duration string
- stops FlightStop[]
- anydata...
amadeus.flightofferssearch: Success
Fields
- warnings Issue[]? -
- meta CollectionMetaLink? -
- data FlightOffer[] -
- dictionaries Dictionaries? -
amadeus.flightofferssearch: Success1
Fields
- warnings Issue[]? -
- meta CollectionMeta? -
- data FlightOffer[] -
- dictionaries Dictionaries? -
amadeus.flightofferssearch: Tax
a tax
Fields
- amount string? -
- code string? -
amadeus.flightofferssearch: Traveler
Fields
- id string -
- travelerType TravelerType - traveler type age restrictions : CHILD < 12y, HELD_INFANT < 2y, SEATED_INFANT < 2y, SENIOR >=60y
- associatedAdultId string? - if type="HELD_INFANT", corresponds to the adult travelers's id who will share the seat
amadeus.flightofferssearch: TravelerPricing
Fields
- travelerId string - Id of the traveler
- fareOption TravelerPricingFareOption - option specifying a group of fares, which may be valid under certain conditons Can be used to specify special fare discount for a passenger
- travelerType TravelerType - traveler type age restrictions : CHILD < 12y, HELD_INFANT < 2y, SEATED_INFANT < 2y, SENIOR >=60y
- associatedAdultId string? - if type="HELD_INFANT", corresponds to the adult traveler's id who will share the seat
- price Price? -
- fareDetailsBySegment FareDetailsBySegment[] -
String types
amadeus.flightofferssearch: AdditionalServiceType
AdditionalServiceType
additional service type
amadeus.flightofferssearch: Coverage
Coverage
part of the trip covered by the travel class restriction (ALL_SEGMENTS if ommited)
amadeus.flightofferssearch: FeeType
FeeType
type of fee
amadeus.flightofferssearch: FlightOfferSource
FlightOfferSource
source of the flight offer
amadeus.flightofferssearch: ServiceName
ServiceName
type of service
amadeus.flightofferssearch: SliceDiceIndicator
SliceDiceIndicator
slice and Dice indicator, such as Local Availability, Sub OnD(Origin and Destination) 1 Availability and Sub OnD 2 Availability
amadeus.flightofferssearch: TravelClass
TravelClass
quality of service offered in the cabin where the seat is located in this flight. Economy, premium economy, business or first class
amadeus.flightofferssearch: TravelerPricingFareOption
TravelerPricingFareOption
option specifying a group of fares, which may be valid under certain conditons Can be used to specify special fare discount for a passenger
amadeus.flightofferssearch: TravelerType
TravelerType
traveler type age restrictions : CHILD < 12y, HELD_INFANT < 2y, SEATED_INFANT < 2y, SENIOR >=60y
Import
import ballerinax/amadeus.flightofferssearch;
Metadata
Released date: over 2 years ago
Version: 1.0.0
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.0.2
GraalVM compatible: Yes
Pull count
Total: 0
Current verison: 39
Weekly downloads
Keywords
Sales & CRM/Scheduling & Booking
Cost/Freemium
Contributors