Get Timetable

This method retrieves schedule info. It lists all flights in requested route and operation days in a week.

 

Input

requestHeader

Name Description Type Required

clientUsername

Client Username String Yes

channel

Channel info (WEB/MOBIL) Yes

clientTransactionId

A unique id to identify transaction String Yes

clientCode

Client Code String No

airlineCode

Airline info String (TK,AJ) Yes

languageCode

Language Code String (TR,EN) Yes

agencyOfficeCode

Agency Office Code String (ITT) No

extraParameters

The model object which contains key, value Model[] No

requestHeader.extraParameters

Name Description Type Required

key

Key of the extra parameter String Yes

value

Value of the extra parameter String Yes
Name Description Type Required

scheduleType

W for weekly schedule, M for monthly, D for daily String (W, M, D) Yes

tripType

O for one way, R for round trip String (O, R) Yes

returnDate

Return Date String YYYY-MM-DD Optional

OTA_AirScheduleRQ

Name Description Type Required

AirlineCode

2-letter airline code String (i.e. "TK", "AJ") No

OTA_AirScheduleRQ.OriginDestinationInformation.DepartureDateTime

Name Description Type Required

Date

Departure day and month String YYYY-MM-DD Yes

WindowAfter

How many days should be return after departure date. (If it is P3D, 3 days of schedule will be returned briefly. If it is P0D, only that day in departureDateTime will be returned with all flights.) String (P0D, P3D) Yes

WindowBefore

How many days should be return before departure date. (If it is P3D, 3 days of schedule before DepartureDateTime will be returned briefly. If it is P0D, only that day in departureDateTime will be returned with all flights. String (P0D, P3D) Yes

OTA_AirScheduleRQ.OriginDestinationInformation.OriginLocation

Name Description Type Required

LocationCode

IATA portcode String (IST, LHR) Yes

MultiAirportCityInd

If that city has more than one airport, this should be set as true to get flights departing from all airports in that city. Boolean Yes

OTA_AirScheduleRQ.OriginDestinationInformation.DestinationLocation

Name Description Type Required

LocationCode

IATA portcode String (IST, LHR) Yes

MultiAirportCityInd

If that city has more than one airport, this should be set as true to get flights departing from all airports in that city. Boolean Yes

Output

extendedOTAAirScheduleRS.extraOTAAirScheduleRS.extraOTAAirScheduleRSListType.flightExtraInfo

Name Description Type

totalDuration

Total of flight and transfer durations. "P0Y0M0DT1H5M0S”: it shows duration of flight/journey/transfer in day, hour and minutes. 0y -> year, 0M -> month, 0D -> day, 1H -> one hour, 5M -> 5 minutes String

flightDuration.

Flight duration of a route (including connected flights in total). "P0Y0M0DT1H5M0S”: it shows duration of flight/journey/transfer in day, hour and minutes. 0y -> year, 0M -> month, 0D -> day, 1H -> one hour, 5M -> 5 minutes String

transferDuration

For connected flights, it shows transfer duration or waits for nex flights. "P0Y0M0DT1H5M0S”: it shows duration of flight/journey/transfer in day, hour and minutes. 0y -> year, 0M -> month, 0D -> day, 1H -> one hour, 5M -> 5 minutes String

RPH

"RPH":"0_1" -> first digit (0) shows number of flight option listed. Second digit (1) shows number of connected flight of a flight option. “0_1” means first flight in the list has only one flight (no connected flight) String

extendedOTAAirScheduleRS.OTA_AirScheduleRS.OriginDestinationOptions

Name Description Type

DestinationCode

Requested destination port code String

OriginCode

Requested origin port code String

..OriginDestinationOptions.OriginDestinationOption.FlightSegment

Name Description Type

ScheduleValidStartDate

It shows valid start date in a week of that schedule String

ScheduleValidEndDate

It shows valid end date in a week of that schedule String

StopQuantity

Count of stopover points String

RPH

First digit shows count of flights, second one shows connected flight count. (i.e. 0_2: 0 for first flight; 2 for connected flights) String

DepartureDateTime

Departure date and time String

ArrivalDateTime

Arrival date and time String

FlightNumber

Flight number String

JourneyDuration

Total flight duration including stopover waits String

....FlightSegment.DepartureAirport

Name Description Type

LocationCode

Port Code String

....FlightSegment.ArrivalAirport

Name Description Type

LocationCode

Port Code String

....FlightSegment.MarketingAirline

Name Description Type

Value

It describes marketing airline name String

Code

It shows marketing airline 2-letter code String

....FlightSegment.Equipment

Name Description Type

Value

Equipment (i.e. AIRBUS A320-200) String

AirEquipType

Troya equipment code (i.e. 32P, 2AJ) String

....FlightSegment.OperatingAirline

Name Description Type

FlightNumber

It shows 2-letter airline code with 4 digit flight number. String

Value

It describes operating airline name String

Code

It shows operating airline 2-letter code. String

....FlightSegment.DaysOfOperation.OperationSchedule.OperationTimes.OperationTime

Name Description Type

Text

It shows operation days of a flight in a week. If a flight is not operated a day of a week, it will be shown with dot (.) String

Request

			
{
   "requestHeader": {
	"clientUsername": "OPENAPI",
	"clientTransactionId": "CLIENT_TEST_1",
	"channel": "WEB",
	"languageCode":"TR",
	"airlineCode":"TK"
  },
  "OTA_AirScheduleRQ":{
    "OriginDestinationInformation":{
      "DepartureDateTime":{
        "WindowAfter":"P3D",
        "WindowBefore":"P3D",
        "Date":"2017-10-14"
      },
      "OriginLocation":{
        "LocationCode":"IST",
        "MultiAirportCityInd":true
      },
      "DestinationLocation":{
        "LocationCode":"ESB",
        "MultiAirportCityInd":false
      }
    },
    "AirlineCode":"TK",
    "FlightTypePref":{
      "DirectAndNonStopOnlyInd":false
    }
  },
  "returnDate":"2017-10-20",
  "scheduleType":"W",
  "tripType":"R"
}
		

Response


{
  "status":"SUCCESS",
  "message":{
    "code":"TK-0000",
    "description":"Request Processed Successfully."
  },
  "data":{
    "extendedOTAAirScheduleRS":{
      "extraOTAAirScheduleRS":{
        "extraOTAAirScheduleRSListType":{
          "flightExtraInfo":[
            {
              "totalDuration":"P0Y0M0DT1H5M0S",
              "flightDuration":"P0Y0M0DT1H5M0S",
              "RPH":"0_1",
              "transferDuration":"P0Y0M0DT0H0M0S"
            },
            {
              "totalDuration":"P0Y0M0DT1H5M0S",
              "flightDuration":"P0Y0M0DT1H5M0S",
              "RPH":"1_1",
              "transferDuration":"P0Y0M0DT0H0M0S"
            }
          ]
        }
      },
      "OTA_AirScheduleRS":{
        "OriginDestinationOptions":{
          "DestinationCode":"ESB",
          "OriginCode":"IST",
          "OriginDestinationOption":[
            {
              "FlightSegment":{
                "DepartureAirport":{
                  "CodeContext":"IATA",
                  "LocationCode":"SAW"
                },
                "ScheduleValidStartDate":"2017-10-11",
                "ScheduleValidEndDate":"2017-10-18",
                "ArrivalAirport":{
                  "CodeContext":"IATA",
                  "LocationCode":"ESB"
                },
                "MarketingAirline":{
                  "Value":"TURKISH AIRLINES",
                  "Code":"TK"
                },
                "StopQuantity":"0",
                "DaysOfOperation":{
                  "OperationSchedule":{
                    "OperationTimes":{
                      "OperationTime":{
                        "Text":"12345.."
                      }
                    }
                  }
                },
                "RPH":"0_1",
                "Equipment":{
                  "Value":"UNKNOWN_PLANE",
                  "AirEquipType":"78G"
                },
                "DepartureDateTime":"2017-10-11T10:00:00",
                "ArrivalDateTime":"2017-10-11T11:05:00",
                "FlightNumber":"TK2968",
                "OperatingAirline":{
                  "FlightNumber":"TK2968",
                  "Value":"TURKISH AIRLINES",
                  "Code":"TK"
                },
                "JourneyDuration":"P0DT1H5M0.000S"
              }
            },
            {
              "FlightSegment":{
                "DepartureAirport":{
                  "CodeContext":"IATA",
                  "LocationCode":"SAW"
                },
                "ScheduleValidStartDate":"2017-10-11",
                "ScheduleValidEndDate":"2017-10-18",
                "ArrivalAirport":{
                  "CodeContext":"IATA",
                  "LocationCode":"ESB"
                },
                "MarketingAirline":{
                  "Value":"TURKISH AIRLINES",
                  "Code":"TK"
                },
                "StopQuantity":"0",
                "DaysOfOperation":{
                  "OperationSchedule":{
                    "OperationTimes":{
                      "OperationTime":{
                        "Text":"1234567"
                      }
                    }
                  }
                },
                "RPH":"1_1",
                "Equipment":{
                  "Value":"UNKNOWN_PLANE",
                  "AirEquipType":"78G"
                },
                "DepartureDateTime":"2017-10-11T07:30:00",
                "ArrivalDateTime":"2017-10-11T08:35:00",
                "FlightNumber":"TK2964",
                "OperatingAirline":{
                  "FlightNumber":"TK2964",
                  "Value":"TURKISH AIRLINES",
                  "Code":"TK"
                },
                "JourneyDuration":"P0DT1H5M0.000S"
              }
            }
          ]
        },
        "Version":"0"
      }
    }
  }
}
		

You can find how to test an API in documentation page.