code

<!DOCTYPE html>

<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="http://code.jquery.com/jquery-1.10.1.min.js" type="text/javascript"></script>
    <title>All scheduled flights between</title>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" type="text/css">
</head>

<body>
    <div class="container">
        <br>

        <h1>Scheduled Flights</h1>

        <h2 id="FlightHeader">All scheduled flights between</h2>

        <div class="table-responsive">
            <table class="table table-striped" id="table">
                <thead>
                    <tr>
                        <td>Departure Time Local</td>

                        <td>Departure Terminal</td>

                        <td>Arrival Time Local</td>

                        <td>Arrival Terminal</td>

                        <td>Airline ID</td>

                        <td>Flight Number</td>

                        <td>Aircraft Code</td>

                        <td>Stops</td>

                        <td>Days Of Operation</td>
                    </tr>
                </thead>

                <tbody id="tbody">
                </tbody>
            </table>
        </div>
        <pre class="pre-scrollable">
		</pre>
    </div>
	<script type="text/javascript">
		var today = new Date();
	    var dd = ((today.getDate()<10) ? '0':'' )+today.getDate();
	  	//January is 0!
	    var mm = ((today.getMonth()<9) ? '0':'' )+(today.getMonth()+1); 
	    var yyyy = today.getFullYear();
	
	    var today = yyyy +'-' + mm + '-' + dd;
	
	    var host = 'api.lufthansa.com';
		var url = 'https://'+host+'/v1/operations/schedules/';
	
		var origin = "FRA";
		var destination = "ZRH";
		
		var date = "2015-04-01";
		
		var bearer_token = "hpq47zn2b8mmn4p7hb3yuzqj";
		
		//current date?
		if (true){
			url += origin + '/' + destination + '/' + today;
		} else {
			url += origin + '/' + destination + '/' + date;			
		}

		(function doGet() {
			$.ajax({
				type: 'GET',
				url: url ,
				dataType: 'xml',
				headers: {
					accept: "application/xml",
					authorization:"Bearer "+bearer_token
				}
			}).done(function(data) {
				
				$("pre").text(data.documentElement.outerHTML);
				
				var elements = data.getElementsByTagName('Schedule');
		
				var arrival = elements[0].getElementsByTagName("Arrival");
				var departure = elements[0].getElementsByTagName("Departure");
		
				var origin = departure[0].getElementsByTagName("AirportCode");
				var destination = arrival[0].getElementsByTagName("AirportCode");
		
				$("h2").text("All scheduled flights between " + origin[0].childNodes[0].nodeValue + " and " +  destination[0].childNodes[0].nodeValue);
		
				for (var i = 0; i < elements.length; i++) {
		
					var departure = elements[i].getElementsByTagName("Departure");
					var arrival = elements[i].getElementsByTagName("Arrival");
		

					$("table").find('tbody').append($('<tr id=' + i + '>'));
					
					var row = document.getElementById(i);
					

					var x = row.insertCell(-1);
					x.innerHTML = departure[0].getElementsByTagName('DateTime')[0].childNodes[0].nodeValue;
						
						
					var x = row.insertCell(-1);
					try {
						x.innerHTML = departure[0].getElementsByTagName('Name')[0].childNodes[0].nodeValue;
					} catch (e) {
						x.innerHTML = '';						
					}
		
					var x = row.insertCell(-1);
					x.innerHTML = arrival[0].getElementsByTagName('DateTime')[0].childNodes[0].nodeValue;
		
					var x = row.insertCell(-1);
					try {
						x.innerHTML = arrival[0].getElementsByTagName('Name')[0].childNodes[0].nodeValue;
					} catch (e) {
						x.innerHTML = '';
					}
		
					var x = row.insertCell(-1);
					x.innerHTML = elements[i].getElementsByTagName('AirlineID')[0].childNodes[0].nodeValue;

					var x = row.insertCell(-1);
					x.innerHTML = elements[i].getElementsByTagName('FlightNumber')[0].childNodes[0].nodeValue;

					var x = row.insertCell(-1);
					x.innerHTML = elements[i].getElementsByTagName('AircraftCode')[0].childNodes[0].nodeValue;

					var x = row.insertCell(-1);
					x.innerHTML = elements[i].getElementsByTagName('StopQuantity')[0].childNodes[0].nodeValue;

					var x = row.insertCell(-1);
					x.innerHTML = elements[i].getElementsByTagName('DaysOfOperation')[0].childNodes[0].nodeValue;
				}
			})
		})()
    </script>
</body>
</html>
Offers Operations Reference Data oAuth