@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api LH Partner API
@base https://api.lufthansa.com/v1
@version 1.0
@auth OAuth2
@endpoints 16
@toc promotions(1), references(1), orders(1), preflight(1), baggage(1), offers(11)

@group promotions
@endpoint GET /promotions/priceoffers/flights/ond/{origin}/{destination}
@desc Price Offers
@required {origin: any # Departure city. 3-letter IATA city code, destination: any # Destination city. 3-letter IATA city code, departureDate: any # Departure date in local time (YYYY-MM-DD), returnDate: any # Return date in local time (YYYY-MM-DD)}
@optional {service: any # Optional parameter.}
@returns(200)

@endgroup

@group references
@endpoint GET /references/seatdetails/{aircraftCode}/{cabinCode}
@desc Seat Details
@required {aircraftCode: any # Aircraft type. 3-character IATA equipment code, Accept: any # http header: application/json or application/xml (Acceptable values are: "application/json", "application/xml"), cabinCode: any # Cabin class: M, E, C, F (Acceptable values are: "", "M", "E", "C", "F")}
@optional {lang: any # 2-letter ISO 3166-1 language code}
@returns(200)

@endgroup

@group orders
@endpoint GET /orders/orders/{orderID}/{name}
@desc Orders
@required {orderID: any # Unique order identifier, Accept: any # http header: application/json or application/xml (Acceptable values are: "application/json", "application/xml"), name: any # Surname of traveller}
@returns(200)

@endgroup

@group preflight
@endpoint PUT /preflight/autocheckin/{ticketnumber}
@desc Auto Check-In
@required {ticketnumber: any # Ticket number, emailAddress: any # Email address, Accept: any # http header: application/json or application/xml (Acceptable values are: "application/json", "application/xml")}
@returns(200)

@endgroup

@group baggage
@endpoint GET /baggage/baggagetripandcontact/{searchID}
@desc Baggage Trip and Contact
@required {searchID: any # Bag tag number, PNR, boarding card or FQTV ID, Accept: any # http header: application/json or application/xml (Acceptable values are: "application/json", "application/xml")}
@returns(200)

@endgroup

@group offers
@endpoint GET /offers/fares/fares
@desc Fares
@required {catalogues: any # Search fares from these carriers' catalogues - currently active for Germanwings only  (4U), segments: any # Journey details  e.g. (origin=TXL;destination=CGN;travel-date=2016-12-15;return-date=2016-12-20;cabin=Economy), carriers: any # Include fares for these carriers e.g. ('4U;LH'), Accept: any # http header: application/json or application/xml (Acceptable values are: "application/json", "application/xml")}
@optional {travelers: any # Type and number of travelers e.g. (adult=1;child=1;infant=1), fare-types: any # Fares family: basic,smart, best, smartflex, bestflex - Germanwings only (Acceptable values are: "", "basic", "smart", "best", "smartflex", "bestflex")}
@returns(200)

@endpoint GET /offers/fares/allfares
@desc All Fares
@required {catalogues: any # Specifies in which catalogue the fares need to be searched (e.g.'4U;OS')., origin: any # Enter journey origin (e.g 'FRA')., destination: any # Enter journey destination (e.g 'MAD')., travel-date: any # Enter journey travel-date (e.g 2016-10-20)}
@optional {return-date: any # Enter journey return-date (e.g 2016-10-31)'., cabin-class: any # Enter the required cabin class (e.g econonmy, business etc.). (Acceptable values are: "", "economy", "premium economy", "business", "first"), travelers: any # Specifies the type and number of travelers (e.g. '(adult=2;child=2;infant=1)') For LH only (adult=1) possible., fare-family: any # Mandatory for 4U. Specifies, which fares to be returned, such as basic, smart, best, smartflex, bestflex . (Acceptable values are: "", "basic", "smart", "best", "smartflex", "bestflex"), trackingid: any # Austrian Airlines only - specify the web tracking id to be used in OS Deep link., Accept: any # Mandatory http header:  application/xml or application/json}
@returns(200)

@endpoint GET /offers/fares/lowestfares
@desc Lowest Fares
@required {catalogues: any # Search fares from these carriers' catalogues e.g. '4U;OS;LH', origin: any # Journey origin. 3-letter IATA aiport code e.g. 'FRA', destination: any # Journey destination. 3-letter IATA airport code e.g. 'MAD', travel-date: any # Journey travel-date YYYY-MM-DD, Accept: any # http header: application/json or application/xml (Acceptable values are: "application/json", "application/xml")}
@optional {return-date: any # Journey return-date - mandatory for OS and LH searches YYYY-MM-DD, cabin-class: any # Cabin class: 'economy', 'premium_economy', 'business', 'first' (Acceptable values are: "", "economy", "premium_economy", "business", "first"), travelers: any # Type and number of travelers e.g. '(adult=2;child=2;infant=1)'. For LH only (adult=1) possible, fare-family: any # Fare family: basic, smart, best, smartflex, bestflex - Germanwings only (Acceptable values are: "", "basic", "smart", "best", "smartflex", "bestflex"), country: any # Country code of requestor. 2-letter ISO 3166-1 country code (e.g. 'de')}
@returns(200)

@endpoint GET /offers/fares/bestfares
@desc Best Fares
@required {catalogues: any # Search fares from these carriers' catalogues (e.g. '4U;OS;LH'), origin: any # Journey origin. 3-letter IATA airport code (e.g. 'FRA'), destination: any # Journey destination. 3-letter IATA airport code (e.g. 'MAD'), travel-date: any # Journey travel-date (YYYY-MM-DD), trip-duration: any # Trip duration in days (e.g. '7'), range: any # Fare range: 'byday' or 'bymonth' (Acceptable values are: "byday", "bymonth"), Accept: any # http header: application/json or application/xml (Acceptable values are: "application/json", "application/xml")}
@optional {cabin-class: any # Cabin class: 'economy', 'premium_economy', 'business', 'first' (Acceptable values are: "", "economy", "premium_economy", "business", "first"), country: any # Country code of requestor. 2-letter ISO 3166-1 country code (e.g. 'de'), trackingid: any # Austrian Airlines only - specify the web tracking id to be used in OS Deep link., fare-family: any # Fare family: basic, smart, best, smartflex, bestflex - Germanwings only (Acceptable values are: "", "basic", "smart", "best", "smartflex", "bestflex")}
@returns(200)

@endpoint GET /offers/fares/subscriptions
@desc Fares Subscriptions
@required {origin: any # Journey origin. 3-leter IATA airport code (e.g. 'FRA'), destination: any # Journey destination. 3-letter IATA airport code (e.g. 'MAD'), cabin-class: any # Cabin class: 'economy', 'premium_economy', 'business', 'first' (Acceptable values are: "", "economy", "premium_economy", "business", "first"), trip-duration: any # Trip duration in days (e.g. '7'), email: any # Email Address'), lang: any # 2-letter ISO 3166-1 language code, Accept: any # http header: application/json or application/xml (Acceptable values are: "application/json", "application/xml")}
@optional {country: any # 2-letter ISO 3166-1 country code, trackingid: any # Tracking parameter}
@returns(200)

@endpoint GET /offers/fares/deeplink/ffp
@desc LH Deep Links - FFP
@required {catalogues: any # Carrier for which the deep link will be created (e.g. 'LH'), origin: any # Journey origin. 3-letter IATA airport or city code (e.g. 'FRA'), destination: any # Journey destination. 3-letter IATA airport or city code (e.g. 'MAD'), travel-date: any # Journey travel-date (YYYY-MM-DD), trackingid: any # Deep link tracking ID, country: any # 2-letter ISO 3166-1 country code, lang: any # 2-letter ISO 3166-1 language code, Accept: any # http header: application/json or application/xml (Acceptable values are: "application/json", "application/xml")}
@optional {return-date: any # Journey return-date (YYYY-MM-DD), cabin-class: any # Cabin class: 'economy', 'premium_economy', 'business', 'first' (Acceptable values are: "", "economy", "premium_economy", "business", "first"), travelers: any # Type and number of travelers (e.g. '(adult=2;child=2;infant=1)'), partnerid: any # Deep link partner id (e.g. '1247'), encryption-key: any # Deep link encryption-key}
@returns(200)

@endpoint GET /offers/fares/deeplink/itco
@desc LH Deep Links - ITCO
@required {catalogues: any # Carrier for which the deep link will be created (e.g. 'LH'), origin: any # Journey origin. 3-letter IATA airport or city code (e.g. 'FRA'), destination: any # Journey destination. 3-letter IATA airport or city code (e.g. 'MAD'), travel-date: any # Journey travel-date (YYYY-MM-DD), outbound-segments: any # Outbound flight segments in the sequence of travel (e.g. 'LH096;LH480'), fare: any # Travel fare (e.g. '1341.45'), fare-currency: any # Fare currency (e.g. 'EUR'), trackingid: any # Deep link tracking ID, country: any # 2-letter ISO 3166-1 country code, lang: any # 2-letter ISO 3166-1 language code, Accept: any # http header: application/json or application/xml (Acceptable values are: "application/json", "application/xml")}
@optional {return-date: any # Journey return-date (YYYY-MM-DD), cabin-class: any # Cabin class: 'economy', 'premium_economy', 'business', 'first' (Acceptable values are: "", "economy", "premium_economy", "business", "first"), return-segments: any # Flight segments in the sequence of travel (e.g. 'LH7465;LH431'), travelers: any # Type and number of travelers (e.g. '(adult=2;child=2;infant=1)'), net-fare: any # Travel net fare. Total fare less taxes and charges (e.g. '1140'), partnerid: any # Deep link partner id (e.g. '1247'), encryption-key: any # Deep link encryption-key}
@returns(200)

@endpoint GET /offers/fares/deeplink
@desc Deep Links
@required {catalogues: any # Carrier for which the deep link will be created (e.g. 'LH'), trackingid: any # Deep link tracking ID, country: any # 2-letter ISO 3166-1 country code, lang: any # 2-letter ISO 3166-1 language code, Accept: any # http header: application/json or application/xml (Acceptable values are: "application/json", "application/xml")}
@optional {origin: any # Journey origin. 3-letter IATA airport or city code (e.g. 'FRA'), origin-name: any # Journey origin airport or city name (e.g. 'frankfurt'), destination: any # Journey destination. 3-letter IATA airport or city code (e.g. 'MAD'), destination-name: any # Journey destination airport or city name (e.g. 'madrid'), travel-date: any # Journey travel-date (YYYY-MM-DD), return-date: any # Journey return-date (YYYY-MM-DD), cabin-class: any # Cabin class: 'economy', 'premium_economy', 'business', 'first' (Acceptable values are: "", "economy", "premium_economy", "business", "first"), outbound-segments: any # Outbound flight segments in the sequence of travel (e.g. 'LH096;LH480'), return-segments: any # Flight segments in the sequence of travel (e.g. 'LH7465;LH431'), travelers: any # Type and number of travelers (e.g. '(adult=2;child=2;infant=1)'), fare: any # Travel fare (e.g. '1341.45'), net-fare: any # Travel net fare. Total fare less taxes and charges (e.g. '1140'), fare-currency: any # Fare currency (e.g. 'EUR'), partnerid: any # Deep link partner id (e.g. '1247'), encryption-key: any # Deep link encryption-key}
@returns(200)

@endpoint GET /offers/ond/route/{origin}/{destination}
@desc OND Route
@required {origin: any # Enter either the orgin city or orgin country code (e.g 'FRA' or 'DE'). Enter '*' for all, destination: any # Enter either the destination city or country code (e.g 'MAD' or 'ES'). Enter '*' for all, Accept: any # Mandatory http header:  application/xml or application/json}
@optional {catalogues: any # Carrier for which the OND will be retrieved (e.g. 'LH'), 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 /offers/ond/top
@desc Top OND
@required {Accept: any # Mandatory http header:  application/xml or application/json}
@optional {catalogues: any # Carrier for which the OND will be retrieved (e.g. 'LH'), origin: any # Enter the origin country code (e.g. 'DE'). Leave empty to search Top OND across all countries}
@returns(200)

@endpoint GET /offers/ond/status
@desc OND Status
@required {Accept: any # Mandatory http header:  application/xml or application/json}
@optional {catalogues: any # Carrier for which the OND will be retrieved (e.g. 'LH'), new-routes: any # Enter if newly added routes should be returned in the response. (Acceptable values are: "", "true", "false"), old-routes: any # Enter if old (deleted) routes should be returned in the response. (Acceptable values are: "", "true", "false")}
@returns(200)

@endgroup

@end
