@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api LH Public API
@base https://api.lufthansa.com/v1
@version 1.0
@auth OAuth2
@common_fields {Accept: any # http header: application/json or application/xml (Acceptable values are: "application/json", "application/xml")}
@endpoints 15
@toc references(6), offers(2), operations(5), cargo(2)

@group references
@endpoint GET /references/countries/{countryCode}
@desc Countries
@required {countryCode: any # 2-letter ISO 3166-1 country code}
@optional {lang: any # 2 letter ISO 3166-1 language code, limit: any # Number of records returned per request. Defaults to 20, maximum is 100 (if a value bigger than 100 is given, 100 will be taken), offset: any # Number of records skipped. Defaults to 0}
@returns(200)

@endpoint GET /references/cities/{cityCode}
@desc Cities
@required {cityCode: any # 3-letter IATA city code}
@optional {lang: any # 2 letter ISO 3166-1 language code, limit: any # Number of records returned per request. Defaults to 20, maximum is 100 (if a value bigger than 100 is given, 100 will be taken), offset: any # Number of records skipped. Defaults to 0}
@returns(200)

@endpoint GET /references/airports/{airportCode}
@desc Airports
@required {airportCode: any # 3-letter IATA airport code}
@optional {lang: any # 2-letter ISO 3166-1 language code, limit: any # Number of records returned per request. Defaults to 20, maximum is 100 (if a value bigger than 100 is given, 100 will be taken), offset: any # Number of records skipped. Defaults to 0, LHoperated: any # Restrict the results to locations with flights operated by LH (false=0, true=1)}
@returns(200)

@endpoint GET /references/airports/nearest/{latitude},{longitude}
@desc Nearest Airports
@required {latitude: any # Latitude in decimal format to at most 3 decimal places, longitude: any # Longitude in decimal format to at most 3 decimal places}
@optional {lang: any # 2 letter ISO 3166-1 language code}
@returns(200)

@endpoint GET /references/airlines/{airlineCode}
@desc Airlines
@required {airlineCode: any # 2-character IATA airline/carrier code}
@optional {limit: any # Number of records returned per request. Defaults to 20, maximum is 100 (if a value bigger than 100 is given, 100 will be taken), offset: any # Number of records skipped. Defaults to 0}
@returns(200)

@endpoint GET /references/aircraft/{aircraftCode}
@desc Aircraft
@required {aircraftCode: any # 3-character IATA aircraft code}
@optional {limit: any # Number of records returned per request. Defaults to 20, maximum is 100 (if a value bigger than 100 is given, 100 will be taken), offset: any # Number of records skipped. Defaults to 0}
@returns(200)

@endgroup

@group offers
@endpoint GET /offers/seatmaps/{flightNumber}/{origin}/{destination}/{date}/{cabinClass}
@desc Seat Maps
@required {flightNumber: any # Flight number including carrier code and any suffix (e.g. 'LH2037'), origin: any # Departure airport. 3-letter IATA airport code (e.g. 'TXL'), destination: any # Destination airport. 3-letter IATA airport code (e.g. 'MUC'), date: any # Departure date (YYYY-MM-DD), cabinClass: any # Cabin class: 'M', 'E', 'C', 'F'. Some flights have fewer classes (Acceptable values are: "M", "E", "C", "F")}
@returns(200)

@endpoint GET /offers/lounges/{location}
@desc Lounges
@required {location: any # 3-leter IATA airport or city code (e.g. 'ZRH')}
@optional {cabinClass: any # Cabin class: 'M', 'E', 'C', 'F' (Acceptable values are: "", "M", "E", "C", "F"), tierCode: any # Frequent flyer level ('FTL', 'SGC', 'SEN', 'HON') (Acceptable values are: "", "FTL", "SGC", "SEN", "HON"), lang: any # Language code.}
@returns(200)

@endgroup

@group operations
@endpoint GET /operations/flightstatus/{flightNumber}/{date}
@desc Flight Status
@required {flightNumber: any # Flight number including carrier code and any suffix (e.g. 'LH400'), date: any # The departure date (YYYY-MM-DD) in the local time of the departure airport}
@optional {limit: any # Number of records returned per request. Defaults to 20, maximum is 100 (if a value bigger than 100 is given, 100 will be taken), offset: any # Number of records skipped. Defaults to 0}
@returns(200)

@endpoint GET /operations/flightstatus/route/{origin}/{destination}/{date}
@desc Flight Status by Route
@required {origin: any # 3-letter IATA airport (e.g. 'FRA'), destination: any # 3-letter IATA airport code (e.g. 'JFK'), date: any # Departure date (YYYY-MM-DD) in local time of departure airport}
@optional {limit: any # Number of records returned per request. Defaults to 20, maximum is 100 (if a value bigger than 100 is given, 100 will be taken), offset: any # Number of records skipped. Defaults to 0}
@returns(200)

@endpoint GET /operations/flightstatus/arrivals/{airportCode}/{fromDateTime}
@desc Flight Status at Arrival Airport
@required {airportCode: any # 3-letter IATA aiport code (e.g. 'ZRH'), fromDateTime: any # Start of time range in local time of arrival airport (YYYY-MM-DDTHH:mm)}
@optional {limit: any # Number of records returned per request. Defaults to 20, maximum is 100 (if a value bigger than 100 is given, 100 will be taken), offset: any # Number of records skipped. Defaults to 0}
@returns(200)

@endpoint GET /operations/flightstatus/departures/{airportCode}/{fromDateTime}
@desc Flight Status at Departure Airport
@required {airportCode: any # Departure airport. 3-letter IATA airport code (e.g. 'HAM'), fromDateTime: any # Start of time range in local time of departure airport (YYYY-MM-DDTHH:mm)}
@optional {limit: any # Number of records returned per request. Defaults to 20, maximum is 100 (if a value bigger than 100 is given, 100 will be taken), offset: any # Number of records skipped. Defaults to 0}
@returns(200)

@endpoint GET /operations/schedules/{origin}/{destination}/{fromDateTime}
@desc Flight Schedules
@required {origin: any # Departure airport. 3-letter IATA airport code (e.g. 'ZRH'), destination: any # Destination airport. 3-letter IATA airport code (e.g. 'FRA'), fromDateTime: any # Local departure date and optionally departure time (YYYY-MM-DD or YYYY-MM-DDTHH:mm). When not provided, time is assumed to be 00:01}
@optional {directFlights: any # Show only direct flights (false=0, true=1). Default is false, limit: any # Number of records returned per request. Defaults to 20, maximum is 100 (if a value bigger than 100 is given, 100 will be taken), offset: any # Number of records skipped. Defaults to 0}
@returns(200)

@endgroup

@group cargo
@endpoint GET /cargo/shipmentTracking/{aWBPrefix}-{aWBNumber}
@desc Shipment Tracking
@required {aWBPrefix: any # aWBPrefix : Represents the airline that is the owner of this AWB, i.e. "020" = Lufthansa Cargo, format : [0-9]{3} e.g. 020, aWBNumber: any # aWBNumber : The Air Waybill Number , format : [0-9]{8} e.g. 08002050}
@returns(200)

@endpoint GET /cargo/getRoute/{origin}-{destination}/{fromDate}/{productCode}
@desc Retrieve all flights
@required {origin: any # Departure Airport : 3-letter IATA airport code, e.g. FRA., destination: any # Arrival airport : 3-letter IATA airport code, e.g. HKG., fromDate: any # Departure date in the local time of the departure airport. Based on LAT (Latest Acceptance Time). format : yyyy-MM-dd eg : 2017-07-15, productCode: any # Product code for requested service and specials : 3-letter eg: YNZ}
@returns(200)

@endgroup

@end
