@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Flight Offers Search
@base https://test.api.amadeus.com/v2
@version 2.2.0
@endpoints 2
@toc shopping(2)

@endpoint POST /shopping/flight-offers
@desc Return list of Flight Offers based on posted searching criteria.
@required {X-HTTP-Method-Override: any # the HTTP method to apply, getFlightOffersBody: any # list of criteria to retrieve a list of flight offers}
@returns(200) Successful Operation
@errors {400: code    | title                                  ------- | -------------------------------------  425     | INVALID DATE 477     | INVALID FORMAT 2668    | PARAMETER COMBINATION INVALID/RESTRICTED 4926    | INVALID DATA RECEIVED 10661   | MAXIMUM NUMBER OF OCCURRENCES EXCEEDED  32171   | MANDATORY DATA MISSING}

@endpoint GET /shopping/flight-offers
@desc Return list of Flight Offers based on searching criteria.
@required {originLocationCode: any # city/airport [IATA code](http://www.iata.org/publications/Pages/code-search.aspx) from which the traveler will depart, e.g. BOS for Boston, destinationLocationCode: any # city/airport [IATA code](http://www.iata.org/publications/Pages/code-search.aspx) to which the traveler is going, e.g. PAR for Paris, departureDate: any # the date on which the traveler will depart from the origin to go to the destination. Dates are specified in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) YYYY-MM-DD format, e.g. 2017-12-25, adults: any # the number of adult travelers (age 12 or older on date of departure).}
@optional {returnDate: any # 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](https://en.wikipedia.org/wiki/ISO_8601) YYYY-MM-DD format, e.g. 2018-02-28, children: any # 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: any # 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: any # 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: any # 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](http://www.iata.org/publications/Pages/code-search.aspx) and are comma-separated, e.g. 6X,7X,8X, excludedAirlineCodes: any # 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](http://www.iata.org/publications/Pages/code-search.aspx) and are comma-separated, e.g. 6X,7X,8X, nonStop: any # if set to true, the search will find only flights going from the origin to the destination with no stop in between, currencyCode: any # the preferred currency for the flight offers. Currency is specified in the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format, e.g. EUR for Euro, maxPrice: any # maximum price per traveler. By default, no limit is applied. If specified, the value should be a positive number with no decimals, max: any # maximum number of flight offers to return. If specified, the value should be greater than or equal to 1}
@returns(200) Successful Operation
@errors {400: code    | title                                  ------- | -------------------------------------  425     | INVALID DATE 477     | INVALID FORMAT 2668    | PARAMETER COMBINATION INVALID/RESTRICTED 4926    | INVALID DATA RECEIVED 10661   | MAXIMUM NUMBER OF OCCURRENCES EXCEEDED  32171   | MANDATORY DATA MISSING}

@end
