<<

OAG Schedules OnDemand

User Guide

Updated: July 2015

OAG Schedules OnDemand | User Guide

Table of Contents

Table of Contents ...... 2 1 Introduction ...... Error! Bookmark not defined. 2 Direct Flights Lookup ...... 4 2.1 Directs ...... 4 2.1.1 Locations ...... 4 2.1.2 Time of ...... 4 2.1.3 Response ...... 5 2.1.4 Wildcard Searches ...... 6 3 Connections Lookup ...... 8 3.1 Connections ...... 8 3.1.1 Locations ...... 8 3.1.2 Carriers ...... 9 3.1.3 Time of Travel ...... 9 3.1.4 Response ...... 10 4 Lookup ...... 13 5 Appendix A: Formats - dates, times and frequency ...... 15 5.1 Date and Time Format ...... 15 5.1.1 Output Date time ...... 15 5.1.2 Input Date and Time ...... 15 5.1.3 Frequency ...... 16 6 Appendix B: Web Services Methods...... 17 6.1 Authentication: ...... 17 6.2 On Demand Web Service Methods...... 17 6.2.1 getDirectFlights() ...... 17 6.2.2 getConnections() ...... 20 6.2.3 flightLookup() ...... 25 7 Appendix C: Test Harness ...... 27 7.1 What is it?...... 27 7.2 Where is it? ...... 27 7.3 How to use it ...... 27 8 Traffic Restrictions ...... 28 8.1 Display of Restricted Flight Legs ...... 28 8.2 Traffic Restriction Decodes and Descriptions ...... 29 9 Troubleshooting ...... 32 9.1 .Net Users ...... 32 9.2 Java Users ...... 32 9.3 PHP Users ...... 32

Confidential Information | 2 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

Introduction

The OAG OnDemand Web Service will offer access to passenger schedules information on all supported by the OAG schedules database. OAG OnDemand is designed for customers to retrieve flight information for any given city/ pair or flight number. The service is designed to be a transactional request/response service for the web environment.

In summary the service provides the following flight lookups:

 Direct Flights Lookup This function provides a schedules lookup facility to access all direct flights for operating and code share airlines based on a city or airport pair. Requests can be made for a single day or date range.

 Connections Lookup This function provides a connection building facility using OAG’s comprehensive schedules data. The connection lookup is city/airport pair driven and based on a given day. Connections returned can be fine-tuned using other parameters. The facility provides single and double connections. Low Cost Carrier connection lookup is also available.1

 Flight Number lookup This function provides a direct flight lookup for a given carrier, service number and date of operation.

This document aims to describe each function listing the input parameters available to refine the flight search and the items of information which will be returned when a call is made.

Authentication In addition to the input parameters described in the main body of this document, each call to the web service must be accompanied by a login account. Appendix B describes how users should access the web service.

Test Harness Application

For demonstration purposes, OAG has built a test harness that can be used by customers to play with the various parameters and study the responses. Details of the test harness are provided in Appendix C.

1 OAG defines Low Cost Carrier connections as connections that include at least 1 leg that is operated by a LCC

Confidential Information | 3 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

1 Direct Flights Lookup

This function provides a schedules lookup facility to access all direct flights for operating and code share airlines based on a city or airport pair for a given date or date range.

1.1 Directs

The parameter set provided in the web service xsd (cbwsPublicRequest) is shared between direct and connection request functions. This means some parameters are optional or not used at all for direct flight searches. This section describes the parameters required for a direct search.

See Appendix B for further technical details.

To make a request for direct flights (getDirectFlights), the call to the OAG OnDemand web service should contain the following input parameters:

1.1.1 Locations

 originCriteria – a valid 3 letter IATA location code specifiying the departure point. This can be a city or an airport. To specify the type of departure point (originCriteriaLocationType) set:  M - for city  A – for airport

 destinationCriteria – a valid 3 letter IATA location code specifiying the arrival point. This can be a city or an airport. To specify the type of arrival point (destinationCriteriaLocationType) set:  M – for city  A – for airport

1.1.2 Time of Travel

Users can carry out single date searches by populating the requestDate and requestTime parameters OR date range searches (e.g. 2013-09-03 to 2013-09-10) by populating the requestDateEffectiveFrom and requestDateEffectiveTo parameters.

One of following options must be populated:

 requestDate: Preferred date of travel. Required format (YYYY-MM-DD) and requestTime: Preferred time of travel. 24 hour clock in the format (HH:MM:SS). This finds all valid flights from the specified request time.

Confidential Information | 4 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

 requestDateEffectiveFrom and requestDateEffectiveTo: Preferred period of travel. This finds all valid flights from the specified DateFrom to the specified DateTo. Required format (YYYY-MM-DD).

Additionally, the following optional parameters may be used to refine the search:

 carrier1Criteria: A comma separated list of IATA/ICAO codes. Only flights on the listed airlines will be returned. If no airlines are specified the web service will return all airlines that fly the city/airport pair.  excludeCarrierCriteria: A comma separated list of IATA/ICAO airline codes. Flights for the listed airlines will be excluded from the response. If no airlines are specified the web service will return all airlines that fly the route.  allowRestrictedFlights: A “True/False” parameter that is set to ‘false’ by default. If set to ‘true’ this will allow restricted flight legs to be included in the response. The Restriction Code and description will be returned in the Comments field in the response XML.  sortOrder: Determines the sort order of the returned flights.  ‘D’ – specifies departure date/time order.  ‘A’ – specifies arrival date/time order.  ‘E’ – specifies elapsed time order.

1.1.3 Response

The following items of information will be returned with the xml RESPONSE for directs:

 Flight ID ( unique system identifier)  Departure o country – code and name o sub-country – code and name o state –code and name o city – code and name ~

o airport – code and name o terminal – code and name

 Arrival o country – code and name o sub-country – code and name o state –code and name o city – code and name o airport – code and name o terminal – code and name

 Departure Date and Time (see Appendix A for date time formats) (When a date range search is being carried out, the date part of this field is irrelevant and will be set to the effective from date of the segment)  Arrival Date and Time (see Appendix A for date time formats) (When a date range search is being carried out, the date part of this field is irrelevant and will be set to the effective to date of the segment)

Confidential Information | 5 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

 Arrival Day Offset (-1 previous day/ 0-same day / 1 – next day/ 2 – 2 days time)  Elapsed Time  Frequency – returned in numeric format e.g. 123 5 7 means Monday, Tuesday. Wednesday, Friday and Sunday  Effective From  Effective To  Number of Stops – numeric format listing number of stops that are scheduled to occur en route  Carrier o Carrier code and name o Flight Number  Operating carrier o Carrier code and name, o Flight Number  Equipment o aircraft code and name o equipment_change_ind o aircraft change en route  Classes o First – Meals and PRBD (Passenger Reservation Booking Designators) o Business – Meals and PRBD o Economy – Meals and PRBD  Highest Priority code share partner o OAG_OpByCarrier o OAG_OpByCarrierName o OAG_OpByFlightNo  SAD o SAD_indicator o carrier code, o carrier_name, o carrier_longname  Aircraft Owner code  Cockpit crew employer code  Comments – free text supplementary data, including Traffic Restrictions and flight comments

1.1.4 Wildcard Searches

NB: Wildcard searches are only available to customers that have Wildcard access included in the service contract with OAG. If you require Wildcard access to be enabled, or would like more information, please contact your OAG representative or email [email protected]

It is possible for users to perform Wildcard searches against the web service for direct scheduled flights either to or from a specified airport/city and date of travel: for example, all the below searches can be made using the Wildcard parameter:  Retrieve all direct flights departing from LHR (London Heathrow Airport) for 30Sep2014

Or

Confidential Information | 6 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

 Retrieve all direct flights arriving into LHR for 30Sep2014

Or  Retrieve all direct flights departing from LON metro area (London, GB) for 30Sep14 Or  Retrieve all direct flights arriving into LON metro area (London, GB) for 30Sep14

For Wildcard departing flights: The destinationCriteria must specify a city/airport.  originCriteria – input *** (three asterisks). The departure point type (originCriteriaLocationType) must still be set:  M - for city  A – for airport

For Wildcard arriving flights: The originCriteria must specify a city airport.  destinationCriteria – input *** (three asterisks). The arriving point type (destinationCriteriaLocationType) must still be specified:  M - for city  A – for airport

Wildcard search parameter is not available for Connections or Flight Number lookups.

Confidential Information | 7 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

2 Connections Lookup

Unlike direct flights, connection processing has the responsibility of ensuring that only the most efficient connections are generated. Successful connection generation must: 1. avoid creating “inefficient” connections (e.g. flying from Los Angeles to London (UK) then back out to Hawaii) 2. ensure that flights on an indirect route are returned if they can be achieved in less time than more direct connections

OAG OnDemand employs complex connection building logic to achieve these two aims within the connection generation service function.

2.1 Connections

OAG OnDemand’s dynamic connection procedures sieve through a large number of connections to find the best connections. Often this is a huge calculation process that is happening in real time and so responses can take slightly longer to return than direct flight search requests.

The parameter set provided in the web service xsd (cbwsPublicRequest) is shared between direct and connection request functions. This section describes the parameters required for a connection search.

See Appendix B for further technical details.

2.1.1 Locations

 originCriteria – a valid 3 letter IATA location code specifiying the departure point. This can be a city or an airport. To specify the type of departure point (originCriteriaLocationType) set:  M - for city  A – for airport

 destinationCriteria – a valid 3 letter IATA location code specifiying the arrival point. This can be a city or an airport. To specify the type of arrival point (destinationCriteriaLocationType) set:  M - for city  A – for airport

 via1Criteria – a valid 3 letter IATA location code specifiying the via1 point of a connection. This can be a city or an airport. For any via point this should be set to ***. Via1 criteria must always be set for singles and doubles. To specify the type of via point (via1CriteriaLocationType) set:  M - for city  A – for airport

Confidential Information | 8 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

 via2Criteria – a valid 3 letter IATA location code specifiying the via2 point of a connection. This can be a city or an airport. For any via point this should be set to ***. It is optionally set if double connections are required. To specify the type of via point (via1CriteriaLocationType) set:  M - for city  A – for airport

2.1.2 Carriers

 carrier1Criteria: A comma separated list of IATA/ICAO airline codes. Only flights on the listed airlines will be considered for leg1 of the connection. If set to *** then all airlines that operate the city/airport pair will be considered in the search. This parameter must be set for all connection requests.

 carrier2Criteria: A comma separated list of IATA/ICAO airline codes. Only flights on the listed airlines will be considered for leg2 of the connection. If set to *** then all airlines that operate the city/airport pair will be considered in the search. This parameter must be set for all connection requests.

 carrier3Criteria: A comma separated list of IATA/ICAO airline codes. Only flights on the listed airlines will be considered for leg3 of the connection. If set to *** then all airlines that operate the city/airport pair will be considered in the search. This parameter must be set for double connection requests.

2.1.3 Time of Travel

Users can carry out single date searches by populating the requestDate and requestTime parameters.

The following must be populated:

 requestDate: Preferred date of travel. Required format (YYYY-MM-DD) and requestTime: Preferred time of travel. 24 hour clock in the format (HH:MM:SS). Finds all valid flights from the specified request time.

NB: Date range facility is limited to one calendar week (7 days) for Connections lookups

Additionally, the following optional parameters may be used to refine the search:  enableOnline – if this option is set to “true” then connecting flights that have the same airline on each leg of the connection will be built. Default is false.  interAirportConnections – if this option is set to “true” then connecting flights that connect through a city but at different (e.g., LHR/LGW) will be considered alongside connections that connect at the same airport. Default is false.

Confidential Information | 9 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

 lowCostConnectionsIndicator – this indicates whether low cost connections are required in the response. It can take the following values: o “ “ (empty character) - connections that follow industry standard requirements are returned. This is the default behaviour if the parameter is not set at all. o “L” – connections that have a low cost airline on at least one of the legs of the connection are returned. Note low cost connections do not follow the industry standard rules for connection building (eg, IATA restrictions). o “B” – combined result sets of the above two request types are returned.  maxCT1 – maximum connecting time for single connections at via point 1. The format of the parameter is HHMM. If not set the default is 0400 (4 hours). If set, the value is capped at 2400.  maxCT2 – maximum connecting time for double connections at via point 1 and 2. The format of the parameter is HHMM. If not set the default is 0800 (8 hours). If set, the value is capped at 2400.  maxElapsedTime – maximum elapsed time of the overall connection. The format of the parameter is HHMM. If not set the default is 2400 (24 hours). If set, the value is capped at 4800.  maxCircuity - circuity is the ratio of the distance travelled on a connection (leg1 + leg2 etc), against the distance between the origin airport and the final destination airport. It is represented as a percentage value. If not set the default is 170 (percent). If set, the value is capped at 250 (percent).  overrideMinCT1 – provides the ability to override the minimum connecting time at via1 for single connections. The format of the parameter is HHMM. If not set the default is to use the industry standard value from OAG’s MCT database for the via point airport. If set, the value used in the parameter is applied to all connections.  overrideMinCT2 – provides the ability to override the minimum connecting time at via1 and via2 for double connections. The format of the parameter is HHMM. If not set the default is to use the industry standard value from OAG’s MCT database for the via point airport. If set, the value used in the parameter is applied to all connections.  maxSinglesRoute – the number of fastest routes by estimated elapsed time considered for connection building. A may have 200 routes where most are very slow and not useful. This parameter sets the top fastest ‘n’ routes for single connections. If not set the default is 25 routes. If set, the value is capped at 25 routes.  maxDoublesRoute – the number of fastest routes by estimated elapsed time considered for connection building. A city pair may have 200 routes where most are very slow and not useful. This parameter sets the top fastest ‘n’ routes for double connections. If not set the default is 15 routes. If set, the value is capped at 15 routes.  excludeCarrierCriteria: A comma separated list of IATA/ICAO airline codes. Flights for the listed airlines will be excluded from the connection build and response. If no airlines are specified the web service will consider all airlines.  preferredCarrierCriteria: A comma separated list of IATA/ICAO airline codes. Only connections involving the listed airlines will be selected for the connection build and response. If no airlines are specified the web service will consider all airlines.  sortOrder: Determines the sort order of the returned flights. o ‘D’ – specifies departure date/time order. o ‘A’ – specifies arrival date/time order. o ‘E’ – specifies elapsed time order.  Please ignore any other parameters listed that are not mentioned here.

2.1.4 Response

Confidential Information | 10 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

The following items will be returned with the xml RESPONSE for connections.

 Leg 1 ID (unique Flight identifier)  Leg 2 ID  Departure o city – code and name o airport – code and name  VIA o Arrival . city – code and name . airport – code and name o Departure . city – code and name . airport – code and name  Arrival o city – code and name o airport – code and name

 Leg 1 Carrier o Carrier code and name o Flight Number  Leg 1 Operating carrier o Carrier code and name o Flight Number  Leg 2 Carrier o Carrier code and name o Flight Number  Leg 2 Operating carrier o Carrier code and name o Flight Number

 Leg 1 Departure Date and Time  Leg 1 Arrival Date Time  Leg 1 Arrival Day Offset (-1 Previous Day/0-same day / 1–next day/ 2–2 days time)  Leg 1 Elapsed Time  Leg 1 Frequency – returned in the format eg, 123 5 7 means Monday, Tuesday, Wednesday, Friday and Sunday  Leg 1 Effective From  Leg 1 Effective To  Leg 1 Number of Stops

 Leg 2 Departure Date and Time  Leg 2 Arrival Date Time  Leg 2 Arrival Day Offset (0-same day / 1 – next day/ 2 – 2 days time)  Leg 2 Elapsed Time  Leg 2 Frequency – returned in numeric format eg, 123 5 7 means Monday, Tuesday, Wednesday, Friday and Sunday.  Leg 2 Effective From  Leg 2 Effective To  Leg 2 Number of Stops

 Ground Time at Via point

Confidential Information | 11 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

 Total Connection Elapsed time  Required MCT

 Leg 1 Equipment o aircraft code and name o equipment_change_ind o aircraft change en route  Leg 2 Equipment o aircraft code and name o equipment_change_ind o aircraft change en route

 Leg1 code_share_indicator – used to process code share info  Leg 2 code_share_indicator – used to process code share info

 Leg1 Comments - free text supplementary data, including Traffic Restrictions and flight comments  Leg2 Comments - free text supplementary data, including Traffic Restrictions and flight comments

Please note the above response describes data items for a single connection request. For double connections the response is very similar but will contain additional Leg 3 and Via 2 elements within the xml.

Confidential Information | 12 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

3 Flight Number Lookup

The Flight Number Lookup functionality allows the user to retrieve detailed information of a flight using the flight number and requested date (this should be the departure date of the first leg). Every Leg of the flight is returned.

To use the Flight Number Lookup, the call to the OAG OnDemand web service should contain the following input parameters. See Appendix B for further technical details.

 Carrier code e.g.BA  Flight Number –e.g. 007  Request Date in the format YYYY-MM-DD

Additionally, the following optional parameters may be used to refine the search:

 allowRestrictedFlights: A “True/False” parameter that is set to ‘false’ by default. If set to ‘true’ this will allow restricted flight legs to be included in the response. The Restriction Code and description will be returned in the Comments field in the response XML.

The following items will be returned with the xml RESPONSE for each LEG:

 Leg sequence Number  Leg ID (unique Flight identifier)  Departure o country – code and name o sub-country – code and name o state –code and name o city – code and name o airport – code and name o terminal – code and name  Arrival o country – code and name o sub-country – code and name o state –code and name o city – code and name o airport – code and name o terminal – code and name

 Carrier o Carrier code and name o Flight Number  Operating carrier o Carrier code and name

o Flight Number

 Arrival Day Offset (0-same day / 1 – next day/ 2 – 2 days time)  Departure Date and Time

Confidential Information | 13 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

 Arrival Date Time  Elapsed Time  Frequency – returned in numeric format eg, 123 5 7 means Monday, Tuesday. Wednesday, Friday and Sunday  Number of Stops  Equipment o aircraft code and name  Classes o First – Meals and PRBD (Passenger Reservation Booking Designators) o Business – Meals and PRBD o Economy – Meals and PRBD  Comments - free text supplementary data, including Traffic Restrictions and flight comments  Code_share_indicator – used to process code share info  SAD o SAD_indicator o carrier code, o carrier_name, o carrier_longname  Aircraft Owner  Cockpit crew employer

Confidential Information | 14 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

4 Appendix A: Formats - dates, times and frequency

4.1 Date and Time Format

4.1.1 Output Date time

All output DateTime fields use the following ISO format:

CCYY-MM-DDTHH:MM:SS

Example:

“23 minutes past 8 in the evening on February 2nd, 2002” = DateTime field: 2002-01-02T20:23:00

For a single date request the dep time is set to the request date + time of departure of the flight and the arr time is set to the request date + arrival day + time of arrival of the flight.

Date Range

During date range searches, the date part of the datetime field will be set to effective from (for dep time) and effective to (for arr time). Only use the time part of this field.

Example:

“Arrival time of Noon for a flight which is valid over a range of dates” 1899-12-31T12:00:00

NB: effective from / to dates with 1899-12-31 signifies the flight is “open dated”

4.1.2 Input Date and Time

The requestDate field should be in the format:

YYYY-MM-DD

The requestTime field should in the format: HH:MM:SS

Date Range

The DateFrom and DateTo fields used for date range searches are in the following format:

YYYY-MM-DD Example: “February 3rd, 2002”

Confidential Information | 15 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

= Date field: 2002-02-03

4.1.3 Frequency

The Frequency attribute of the DEP element identifies the days of operation for the flight (Monday-Sunday) and is represented as numerical list of numbers from 1 – 7.

Example: 12 7 - means Monday, Tuesday and Sunday

Confidential Information | 16 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

Appendix B: Web Services Methods

There are several methods that are available to the OAG OnDemand web service:

 getDirectFlights()  getConnections()  flightLookup()

This appendix aims to define the Web Services methods and describes how you would call the Web Service programmatically. Details of the parameters are described in the sections above.

The public SOAP interface for the Web Service methods is defined at the following location:

 WSDL (programmatic interface for web service toolkits): http://ondemand.oag.com/CBWebServicePublic/CBWSPublicPort?wsdl

 Description of corresponding parameters and their types: http://ondemand.oag.com/CBWebServicePublic/CBWSPubliclPort?xsd=1

4.2 Authentication:

To use the web service you will be required to pass a username and password (username/ password params) into the method that you are invoking. If you do not have a username/password please contact OAG Customer Support via [email protected].

Each method listed in the previous sections has username and password parameters. These must be passed each time the service is called. The first time the service is called a slight delay will be experienced whilst authentication is taking place, however subsequent calls will be faster as the user details will be cached on our server.

4.3 On Demand Web Service Methods

4.3.1 getDirectFlights()

The getDirectFlights() method is used to retrieve direct flight services for a given city/airport pair.

Input: cbwsPublicRequest parameter set

String atcPercentageRouting – not used by direct lookup String bothWays – not used by direct lookup String carrier1Criteria – if specified filters the response by airline String carrier2Criteria – not used by direct lookup String carrier3Criteria – not used by direct lookup String destinationCriteria – destination point String destinationCriteriaLocationType – type of destination point (M for city, A for airport) String enableOnline – not used by direct lookup String interAirportConnections – not used by direct lookup String logicalPathOnly – not used by direct lookup

Confidential Information | 17 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

String lowCostConnectionsIndicator – not used by direct lookup String maxCT1 – not used by direct lookup String maxCT2 – not used by direct lookup String maxCircuity – not used by direct lookup String maxDoublesRoute – not used by direct lookup String maxElapsedTime – not used by direct lookup String maxSinglesRoute – not used by direct lookup String originCriteria – origin point String originCriteriaLocationType – type of origin point (M for city, A for airport) String overrideMinCT1 – not used by direct lookup String overrideMinCT2 – not used by direct lookup String password – password provided by customer services String requestDate – date of departure from origin String requestDateEffectiveFrom – date range from date String requestDateEffectiveTo – date range to date String requestTime – time of departure from origin String rtnRequestDate – not used by direct lookup String rtnRequestTime – not used by direct lookup String sortOrder – sort order of response (D for departure time, A for arrival time, E for elapsed) String useForwardRoutes – not used by direct lookup String username – username provided by customer services String via1Criteria – not used by direct lookup String via1CriteriaLocationType – not used by direct lookup String via2Criteria – not used by direct lookup String via2CriteriaLocationType – not used by direct lookup String preferredCarrierCriteria – not used by direct lookup String excludeCarrierCriteria – excludes flights for carriers listed String allowRestrictedFlights – allows inclusion of flight legs that have traffic restrictions applied

Output Parameters cbXmlResponse (xml string) contained inside cbwsPublicResponse. See section 2 for a detailed list of the items of information being returned by this method. Example contains 2 direct flights for request CHI – LON on 2010-09-06.

Sample XML Returned for getDirectFlights()

1899-12-31 2010-10-29 Boeing 767-300 Passenger bmi british midland Chicago Chicago O'Hare International Apt USA Illinois Terminal 1 Dinner Breakfast

Confidential Information | 18 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

Dinner Snack or Brunch

Confidential Information | 19 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

4.3.2 getConnections()

The getConnections() method is used to retrieve connecting flight information for singles and doubles for a given city / airport pair on a given day.

Input: cbwsPublicRequest parameter set

String atcPercentageRouting – not used by connection lookup String bothWays – if set to true will perform the return journey request as well as the outbound String carrier1Criteria – if specified filters the response by airline for leg1 of the connection – can be a list or any (wild card ***) String carrier2Criteria – if specified filters the response by airline for leg2 of the connection – can be a list or any (wild card ***) String carrier3Criteria – if specified filters the response by airline for leg3 of the connection – can be a list or any (wild card ***) String destinationCriteria – destination point String destinationCriteriaLocationType – type of destination point (M for city, A for airport) String enableOnline – if set to true will build online (same airline) connections String interAirportConnections – if set to true will build inter-airport connections for the via city String logicalPathOnly – not used by connection lookup String lowCostConnectionsIndicator – if specified will build ‘low cost’ connections, normal connections or both combined String maxCT1 – maximum connecting time for single connections String maxCT2 – maximum connecting time for double connections String maxCircuity – maximum circuity String maxDoublesRoute – maximum double routes to use to build connections String maxElapsedTime – maximum elapsed time for a connection String maxSinglesRoute – maximum single routes to use to build connections String originCriteria – origin point String originCriteriaLocationType – type of origin point (M for city, A for airport) String overrideMinCT1 – minimum connecting time for single connections String overrideMinCT2 – minimum connecting time for double connections String password – password provided by customer services String requestDate – date of departure from origin String requestDateEffectiveFrom – not used by connection lookup String requestDateEffectiveTo – not used by connection lookup String requestTime – time of departure from origin String rtnRequestDate – date of departure from origin for return String rtnRequestTime – time of departure from origin for return String sortOrder – sort order of response (D for departure time, A for arrival time, E for elapsed) String useForwardRoutes – used with the bothways parameter – will use reversed outbound routes to create the return connections String username – username provided by customer services String via1Criteria – specifies the via1 criteria – can be a list or any (wild card ***) String via1CriteriaLocationType – specfies the location type of via 1 (M for city, A for airport) String via2Criteria – specifies the via2 criteria – can be a list or any (wild card ***) – must be specified if doubles required String via2CriteriaLocationType – specfies the location type of via 2 (M for city, A for airport) String preferredCarrierCriteria – only listed carriers will be considered String excludeCarrierCriteria – excludes flights for carriers listed String allowRestrictedFlights – not used by connection lookup

Output Parameters cbXmlResponse (xml string) contained inside cbwsPublicResponse. See section 3 for a detailed list of the items of information being returned by this method.

Confidential Information | 20 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

Example contains 3 single connections for request CHI – LON on 2010-09-06.

Sample XML Returned for getConnections()

1899-12-31 2010-09-11 Canadair Regional Jet 700 American Airlines Chicago Chicago O'Hare International Apt USA Illinois Terminal 3 Refreshments - Complimentary Food For Purchase Washington Washington Ronald Reagan National Apt USA District of Columbia Terminal B 1899-12-31 2010-10-29 Boeing 777 Passenger Continental Airlines Washington Washington Dulles International Apt USA District of Columbia

Confidential Information | 21 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

London London Heathrow Apt United Kingdom Terminal 1 1899-12-31 2010-09-11 Canadair Regional Jet 700 American Airlines Chicago Chicago O'Hare International Apt USA Illinois Terminal 3 Refreshments - Complimentary Food For Purchase Washington

Confidential Information | 22 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

Washington Ronald Reagan National Apt USA District of Columbia Terminal B 1899-12-31 2010-10-29 Boeing 777 Passenger bmi british midland Washington Washington Dulles International Apt USA District of Columbia Dinner Breakfast Dinner Snack or Brunch London London Heathrow Apt United Kingdom Terminal 1 1899-12-31 2010-09-11 Canadair Regional Jet 700 American Airlines Chicago Chicago O'Hare International Apt USA Illinois Terminal 3 Refreshments - Complimentary

Confidential Information | 23 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

Food For Purchase Washington Washington Ronald Reagan National Apt USA District of Columbia Terminal B 1899-12-31 2010-10-29 Boeing 777 Passenger United Airlines Washington Washington Dulles International Apt USA District of Columbia Dinner Breakfast Dinner Snack or Brunch Dinner Snack or Brunch

Confidential Information | 24 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

London London Heathrow Apt United Kingdom Terminal 1

4.3.3 flightLookup()

The flightLookup() method is used to retrieve detailed information about a flight using the flight number and requested departure date. Every leg of the flight is then returned. See the sample XML below.

Input: cbwsPublicFlightLookupRequest parameter set

String carrierCode – airline code String serviceNumber – service number of the flight String requestDate – date of departure from the point of origin String preferredCarrierCriteria – not used for flight number lookup String excludeCarrierCriteria – not used for flight number lookup String allowRestrictedFlights – allows inclusion of flight legs that have traffic restrictions applied

Output: cbXmlResponse (xml string) contained inside cbwsPublicResponse. See section 4 above for the items of information being returned. Example is for BA009 on 2009-09-05.

Sample XML returned for GetFlightNumber()

null British Airways London London Heathrow Apt United Kingdom Flight exists but may not operate on day selected or may not operate as a direct flight due to IATA restrictions. Bangkok Bangkok Suvarnabhumi International Apt Thailand 1899-12-31

Confidential Information | 25 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

2010-10-01 Boeing 747-400 (Passenger) British Airways Bangkok Bangkok Suvarnabhumi International Apt Thailand Meal served appropriate to time of day. Meal served appropriate to time of day. Meal served appropriate to time of day. Sydney Sydney Kingsford Smith Apt Australia New South Wales 1 (International)

Confidential Information | 26 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

Appendix C: Test Harness

4.4 What is it? The test harness is a front end web test tool used to demonstrate the web service. Each page in the harness allows the end user to experiment with the web service parameters and view the response returned in xml format or in tabular html format. When submitting the request the harness will make a real call to the web service interface.

4.5 Where is it? The test harness can be found at the following location:

URL: http://ondemandtestharness.oag.com/CBWSTestHarnessPublic

4.6 How to use it The test harness consists of three pages that can be used to make calls to the web service methods described in previous sections. The options can be selected using the top menu on each page:

 Connection Request (default) – calls the getConnections() method. See section 3 for parameter details.  Direct Request – calls the getDirects() method. See section 2 for parameter details.  Flight Lookup Request – calls the flightLookup() method. See section 4 for parameter details.

In order to use each page of the harness, the request requires the user to enter a username and password. This will be the username/password given when trialling or purchasing the web service. If you do not have a username/password please contact OAG Customer Support via [email protected].

Once the parameters have been set up on the request page the response can be invoked from the harness in two ways:  By clicking on the “Generate XML” button – this returns the response in XML in the text panel at the bottom of the page.  By clicking on the “Generate results in table” button – this returns the response in HTML tabular format in a new window.

Sometimes a response may not be returned. This can be caused by various factors when connection building. By adjusting the parameters connections can be brought through. Key parameters that have influence over the building of connections are:  Maximum circuity  Maximum connecting time  Maximum elapsed time

Of course it may not be possible to build connections at all for a given city/airport pair however much the parameters are adjusted. This will be due to internal build rule criteria not being matched.

Confidential Information | 27 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

5 Traffic Restrictions

5.1 Display of Restricted Flight Legs

Airlines will sometimes apply traffic restrictions to flight legs: the application of traffic restrictions, as per accordance with IATA SSIM guidelines are outlined in the below table.

If traffic restriction codes A, I, K, N, O and Y are applied to passenger flights it denotes that the airline does not have traffic rights and the segment is not open for sale or display. Usually these flight legs are suppressed from display in the OAG OnDemand web service response.

However for customers that want to view the full flight detail for restricted legs, the ‘allow RestrictedFlights’ parameter can be activated in the request XML and the restricted flight legs will be included in the response.

The exposure of restricted flight legs in OAG OnDemand is for information purposes only.

It is imperative that OAG OnDemand clients handle this content sensitively and respect the traffic restrictions that the airline has applied.

Confidential Information | 28 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

5.2 Traffic Restriction Decodes and Descriptions

IATA IATA Code Meaning and Description Code Description output in OnDemand - Traffic (refer to IATA SSIM Manual for full comments field Restriction display and connection rules) Code A NO LOCAL TRAFFIC This flight cannot be used as a direct service or as part of No traffic may be enplaned at the board any Transfer Connection point for carriage to, and subsequent deplaning at the off point. See also Restriction I. B LOCAL TRAFFIC ONLY This flight cannot be used as part of a Transfer No restriction applies, but the segment is Connection not to be used as part of any published connection. C LOCAL AND DOMESTIC CONNECTING A passenger may travel on this flight as a direct service. TRAFFIC ONLY No restriction applies, but A passenger may also travel on this flight as part of a the segment is not to be used as Domestic Transfer Connection connections. part of any published connection where the preceding connecting segment, or where the following connecting segment, is an international flight segment. D QUALIFIED INTERNATIONAL ONLINE A passenger may only travel on this flight as part of an CONNECTING OR STOPOVER TRAFFIC International Online Transfer Connection or as part of a ONLY through international journey within which a stopover is The ‘D’ restriction equals the ‘Q’ restriction being made and onward travel is on the same airline. in that it restricts the segment to Further restrictions apply when constructing connections. international online connecting and international online stopover traffic only. Additionally, the trip will be invalid if the ‘D’, ‘E’ or ‘G’ restriction exists into and out of all online connect points for the carrier(s) filing the restriction. → For further guidance, see also Appendix H: Traffic Restriction Codes D/E/G. E QUALIFIED ONLINE CONNECTING OR A passenger may only travel on this flight as part of an STOPOVER TRAFFIC ONLY Online Transfer Connection or as part of a through The ‘E’ restriction equals the ‘X’ restriction journey within which a stopover is being made and in that it restricts the segment to online onward travel is on the same airline. Further restrictions connecting and online stopover traffic only. apply when constructing connections. Additionally, the trip will be invalid if the ‘D’, ‘E’ or ‘G’ restriction exists into and out of all online connect points for the carrier(s) filing the restriction. → For further guidance, see also Appendix H: Traffic Restriction Codes D/E/G. F LOCAL AND ONLINE CONNECTING A passenger may travel on this flight as a direct service. TRAFFIC ONLY. A passenger may also travel on this flight as part of an No restriction applies, but the segment is Online Transfer Connection not to be used as part of any published interline connecting segment.

Confidential Information | 29 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

G QUALIFIED ONLINE CONNECTING A passenger may only travel on this flight as part of an TRAFFIC ONLY. Online Transfer Connection. A further restriction applies The ‘G’ restriction equals the ‘Y’ restriction when constructing connections as the connection is not in that it restricts the segment to online valid if all legs have this restriction connecting traffic only. Additionally, the trip will be invalid if the ‘D’, ‘E’ or ‘G’ restrictions exist into and and out of all online connect points for the carrier(s) filing the restriction. → For further guidance, see also Appendix H: Traffic Restriction Code D/E/G. H SEGMENT NOT TO BE DISPLAYED No This segment must not be displayed restriction applies, but the segment is not to be displayed or used as part of any published connection. I TECHNICAL LANDING Due to non- Technical Landing commercial (technical) landing no traffic may be enplaned at the board point for carriage to, and subsequent deplaning at the off point. All segments, where the board point and/or off point is a technical stop, should be restricted using Code I. K CONNECTING TRAFFIC ONLY Carriage is A passenger may only travel on this flight as part of a limited to connecting traffic only. The Transfer Connection segment must have at least one connection. M INTERNATIONAL ONLINE STOPOVER A passenger may only travel on this flight if it forms part TRAFFIC ONLY Carriage is limited to of a through international journey within which a stopover international online stopover traffic only; is being made and onward travel is on the same airline traffic may be carried if all conditions are satisfied. In respect of carriage of cargo and/or mail, this code is interpreted as Traffic Restriction Code A. N INTERNATIONAL CONNECTING A passenger may only travel on this flight if it forms part TRAFFIC ONLY Carriage is limited to of an International Transfer Connection international connecting traffic only. The segment must have at least one international connection. All connecting segments must be from/to a station in another country. O INTERNATIONAL ONLINE CONNECTING A passenger may only travel on this flight if it forms part TRAFFIC ONLY Carriage is limited to of an International Online Transfer Connection international online connecting traffic only. The segment must have at least one international online connection. All connecting segments must be from/to a station in another country with the same airline designator. Q INTERNATIONAL ONLINE CONNECTING A passenger may only travel on this flight as part of an OR STOPOVER TRAFFIC ONLY Carriage International Online Transfer Connection or if it forms is limited to international online connecting part of a through international journey within which a or international online stopover traffic only; stopover is being made and onward travel is on the same traffic may be carried if either set of airline conditions is satisfied. In respect of carriage of cargo and/or mail, this code is interpreted as Traffic Restriction Code O.

Confidential Information | 30 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

T ONLINE STOPOVER TRAFFIC ONLY A passenger may only travel on this flight as part of a Carriage is limited to online stopover traffic through journey within which a stopover is being made only. The segment must have at least one and onward travel is on the same airline online stopover. All stopover segments must be online. In respect of carriage of cargo and/or mail, this code is interpreted as Traffic Restriction Code A. V CONNECTING OR STOPOVER TRAFFIC A passenger may only travel on this flight as part of a ONLY Carriage is limited to connecting or Transfer Connection or if it forms part of a journey within stopover traffic only; traffic may be carried if which a stopover is being made either condition is satisfied. In respect of the carriage of cargo and/or mail, this code is interpreted as Traffic Restriction Code K. W INTERNATIONAL CONNECTING OR A passenger may only travel on this flight as part of an STOPOVER TRAFFIC ONLY Carriage is International Transfer Connection or if it forms part of a limited to international connecting or through international journey within which a stopover is international stopover traffic only; traffic being made may be carried if either set of conditions is satisfied. In respect of carriage of cargo and/or mail, this code is interpreted as Traffic Restriction Code N. X ONLINE CONNECTING OR STOPOVER A passenger may only travel on this flight as part of an TRAFFIC ONLY Carriage is limited to Online Transfer Connection or as part of a through online connecting or online stopover traffic journey within which a stopover is being made and only; traffic may be carried if either set of onward travel is on the same airline conditions is satisfied. In respect of carriage of cargo and/or mail, this code is interpreted as Traffic Restriction Code Y. Y ONLINE CONNECTING TRAFFIC ONLY This flight can only be used as part of an on-line Transfer Carriage is limited to online connecting Connection traffic only. The segment must have at least one online connection. All connecting segments must be online. Z Traffic restrictions do not apply equally to n/a passenger/cargo/mail and/or Multiple traffic restrictions apply. Refer to associated Data Element Identifiers 170 through 173.

Confidential Information | 31 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

6 Troubleshooting

6.1 .Net Users TBD

6.2 Java Users TBD

6.3 PHP Users The following provides a code sample for calling the web service using PHP. onDemandTestWrapper.php:

$s = new OnDemandSoap();

$s->wsdl = 'http://ondemand.oag.com/CBWebServicePublic/CBWSPublicPort?wsdl'; $s->username = 'user-name' ; $s->password = 'password' ; $s->destinationCriteria = 'JFK'; $s->destinationCriteriaLocationType = 'A'; $s->originCriteria = 'LHR'; $s->originCriteriaLocationType = 'A' ; $s->requestDate = '2010-12-01'; $s->requestTime = '00:00:00' ; $s->requestDateEffectiveFrom = '2010-12-01' ; $s->requestDateEffectiveTo = '2011-01-31' ;

$s->showXML = false;

if(preg_match('/your-domain/i',$_SERVER['SERVER_NAME']) != 0 ){ $config = array( 'trace'=>1, 'CURLOPT_HEADER'=>1,'CURLOPT_SSL_VERIFYPEER'=>0,' CURLOPT_PROXY'=>'your-proxy:80','CURLOPT_HTTPPROXYTUNNEL'=>1, 'proxy_host'=> 'your-proxy','proxy_port'=> 80);

$s->soapConfig = $config ; }

try{

$s->getOnDemand();

echo '

'.$s->rawReturnResult.'
';

//echo 'Service Returned '.$s ;

} catch(Exception $e){ echo $e->getMessage(); } //var_dump($s->rtnResult);

Confidential Information | 32 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

?>

OnDemandSoap.php:

public function getOnDemand(){

$client = new SoapClient($this->wsdl,$this->soapConfig);

$arg = array('arg0'=>array( 'destinationCriteria'=>$this->destinationCriteria, 'destinationCriteriaLocationType'=>$this- >destinationCriteriaLocationType, 'originCriteria'=>$this->originCriteria, 'originCriteriaLocationType'=>$this->originCriteriaLocationType, 'requestDate'=>$this->requestDate, 'requestTime'=>$this->requestTime, 'requestDateEffectiveFrom'=>$this->requestDateEffectiveFrom, 'requestDateEffectiveTo'=>$this->requestDateEffectiveTo, 'password'=>$this->password, 'username'=> $this->username) );

//var_dump($arg);

try{

$result = $client->getDirectFlights($arg);

$this->rawReturnResult = (string) $client->__last_response;

} catch(Exception $e){

throw $e; } } public function __set($key, $val){

$this->$key = $val ;

} public function __get($key)

Confidential Information | 33 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved OAG Schedules OnDemand | User Guide

{ return $this->$key; }

}

?> Notes: You will need to change the username / password variables to the ones you have for accessing the webservice in onDemandTestWrapper.php .

$s->username = 'user-name' ; $s->password = 'password' ;

Also if you are behind a firewall you will need to change the $config array so that it will configure the php soap object to access via a proxy.

To do this…

Change or remove the regex which checks for your local domain so that if you are in local network it takes that into account and sets up the soap config to use a proxy. Set the CURLOPT_PROXY , proxy_host elements of the $config array to your proxy settings , the relevant code snippet is given below again this is in onDemandTestWrapper.php

if(preg_match('/your-domain/i',$_SERVER['SERVER_NAME']) != 0 ){

$config = array( 'trace'=>1, 'CURLOPT_HEADER'=>1,'CURLOPT_SSL_VERIFYPEER'=>0,' CURLOPT_PROXY'=>'your- proxy:80','CURLOPT_HTTPPROXYTUNNEL'=>1, 'proxy_host'=> 'your-proxy','proxy_port'=> 80);

$s->soapConfig = $config ; }

Confidential Information | 34 Copyright 2016, OAG Aviation Worldwide Limited. All rights reserved