Documentation

FlightOffers
in package

A namespaced client for the "/v2/shopping/flight-offers" endpoints.

Access via the Amadeus client object.

$amadeus = Amadeus::builder("clientId", "secret")->build(); $amadeus->getShopping()->getFlightOffers();

Table of Contents

$amadeus  : Amadeus
$prediction  : Prediction
A namespaced client for the "/v2/shopping/flight-offers/prediction" endpoints.
$pricing  : Pricing
A namespaced client for the "/v1/shopping/flight-offers/pricing" endpoints.
__construct()  : mixed
get()  : array<string|int, FlightOffer>
Flight Offers Search API:
getPrediction()  : Prediction
Get a namespaced client for the "/v2/shopping/flight-offers/prediction" endpoints.
getPricing()  : Pricing
Get a namespaced client for the "/v1/shopping/flight-offers/pricing" endpoints.
post()  : array<string|int, mixed>
Flight Offers Search API:

Properties

$prediction

A namespaced client for the "/v2/shopping/flight-offers/prediction" endpoints.

private Prediction $prediction

$pricing

A namespaced client for the "/v1/shopping/flight-offers/pricing" endpoints.

private Pricing $pricing

Methods

get()

Flight Offers Search API:

public get(array<string|int, mixed> $params) : array<string|int, FlightOffer>

The Flight Offers Search API allows to get the cheapest flight recommendations on a given journey. It provides a list of flight recommendations and fares from a given origin, for a given date and for a given list of passengers. Additional information such as bag allowance, first ancillary bag prices or fare details are also provided.

 $flightOffers = $amadeus->getShopping()->getFlightOffers()->get(
     array(
         "originLocationCode" => "LON",
         "destinationLocationCode" => "NYC",
         "departureDate" => "2022-07-06",
         "adults" => "1",
         "max" => 20
     )
 );
Parameters
$params : array<string|int, mixed>

the parameters to send to the API

Tags
link
https://developers.amadeus.com/self-service/category/air/api-doc/flight-offers-search/api-reference
throws
ResponseException

when an exception occurs

Return values
array<string|int, FlightOffer>

an API resource

getPrediction()

Get a namespaced client for the "/v2/shopping/flight-offers/prediction" endpoints.

public getPrediction() : Prediction
Return values
Prediction

getPricing()

Get a namespaced client for the "/v1/shopping/flight-offers/pricing" endpoints.

public getPricing() : Pricing
Return values
Pricing

post()

Flight Offers Search API:

public post(string $body) : array<string|int, mixed>

The Flight Offers Search API allows to get the cheapest flight recommendations on a given journey. It provides a list of flight recommendations and fares from a given origin, for a given date and for a given list of passengers. Additional information such as bag allowance, first ancillary bag prices or fare details are also provided.

 $flightOffers = $amadeus->getShopping()->getFlightOffers()->post($body);
Parameters
$body : string

the parameters to send to the API as a String

Tags
link
https://developers.amadeus.com/self-service/category/air/api-doc/flight-offers-search/api-reference
throws
ResponseException

when an exception occurs

Return values
array<string|int, mixed>

an API resource

Search results