Documentation

Prediction
in package

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

Access via the Amadeus client object.

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

Table of Contents

$amadeus  : Amadeus
__construct()  : mixed
Constructor
post()  : array<string|int, FlightOffer>
Flight Choice Prediction API:
postWithFlightOffers()  : array<string|int, FlightOffer>
Flight Choice Prediction API:

Properties

Methods

__construct()

Constructor

public __construct(Amadeus $amadeus) : mixed
Parameters
$amadeus : Amadeus
Return values
mixed

post()

Flight Choice Prediction API:

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

This Machine Learning API is based on a prediction model that takes the response of a flight search as input (Flight Offers Search) and predicts, for each itinerary, the probability to be selected.

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

JSON body of flight offers as String to price

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

when an exception occurs

Return values
array<string|int, FlightOffer>

an API resource

postWithFlightOffers()

Flight Choice Prediction API:

public postWithFlightOffers(array<string|int, mixed> $flightOffers) : array<string|int, FlightOffer>

This Machine Learning API is based on a prediction model that takes the response of a flight search as input (Flight Offers Search) and predicts, for each itinerary, the probability to be selected.

 $flightOffers = $amadeus->getShopping()->getFlightOffers()->get($params);
 $amadeus->getShopping()->getFlightOffers()->getPrediction()->postWithFlightOffers($flightOffers);
Parameters
$flightOffers : array<string|int, mixed>

Lists of flight offers as FlightOffer[]

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

when an exception occurs

Return values
array<string|int, FlightOffer>

an API resource

Search results