openapi: 3.2.0 info: title: Meta Partner Packages Flights API description: "The Meta Partner Packages & Flights provides a suite of RESTful endpoints that enable meta partners to search \nfor and retrieve up-to-date information on flights and travel packages.\nIt allows clients to integrate real-time availability and pricing into their applications." version: 1.0.0 servers: - url: https://prod.api.tui/sales/pip-package/partner description: Prod Server - url: https://pre-prod.api.tui/sales/pip-package/partner description: Pre-prod Server tags: - name: Flights paths: /{market}/flights/search/{agent}: get: operationId: GetFlights responses: '200': description: Ok content: application/json: schema: $ref: '#/components/schemas/ApiFlightsOnly' description: This endpoint returns available flights. tags: - Flights security: - tsoa_auth_prod: [] - tsoa_auth_preprod: [] parameters: - description: 'The source market code. Accepted values: dk, fi, no, se.' in: path name: market required: true schema: type: string pattern: ^dk$|^fi$|^no$|^se$ - description: Your agent code. This will be used for generating the url for the next request. in: path name: agent required: true schema: type: string pattern: ^\w+$ - description: Mandatory. Number of adults. Any integer between 1 and 6. in: query name: adults required: true schema: format: double type: number minimum: 1 maximum: 6 - description: 'A comma separated string with child ages. No space after comma. Example: childAges=0,5,14. Age ranges are, infant: 0-1, child: 2-12, youth: 13-17, adults: 18+.' in: query name: childAges required: false schema: type: string pattern: ^\d+(,\d+)*$ - description: Code of the departure airport. Any valid IATA airport code. in: query name: departureCode required: false schema: type: string - description: 'Date of departure. Date must be compatible with ISO 8601. Example: departuredate=2035-01-31.' in: query name: departureDate required: false schema: type: string pattern: ^\d{4}\-(0[1-9]|(1[0-2]))\-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$ - description: Code of the destination airport. Any valid IATA airport code. in: query name: destinationCode required: false schema: type: string - description: 'Date of return. Date must be compatible with ISO 8601. Example: returnDate=2035-01-31.' in: query name: returnDate required: false schema: type: string pattern: ^\d{4}\-(0[1-9]|(1[0-2]))\-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$ - description: Number of nights between departure date and return date. in: query name: duration required: false schema: format: int32 type: integer - description: If true then only one way flights are returned, if false then one way flights are not returned. If omitted then all flights are returned. in: query name: oneWay required: false schema: type: boolean - description: 'The number of items to return. Default: 100, maximum: 1000.' in: query name: limit required: false schema: default: 100 format: int32 type: integer maximum: 1000 - description: Used for pagination. For performance reasons, do not use without adding other query parameters. in: query name: offset required: false schema: default: 0 format: int32 type: integer - description: If true returns flights from TUIfly Nordic and TUI Airways. If false or omitted returns all airlines. in: query name: tuiOnly required: false schema: type: boolean components: schemas: ApiFlightPrice: properties: priceOriginal: type: number format: double currentPrice: type: number format: double priceReduced: type: number format: double currency: type: string available: type: number format: double seatsAvailable: type: number format: double flightClassCode: type: string flightClassName: type: string urlToBooking: type: string campaignName: type: - string - 'null' required: - priceOriginal - currentPrice - priceReduced - currency - available - seatsAvailable - flightClassCode - flightClassName - urlToBooking - campaignName type: object additionalProperties: false ApiFlightOnly: properties: id: type: string name: type: string href: type: string departureCode: type: string departureName: type: string departureDate: type: string departureTime: type: string returnDate: type: string duration: type: number format: double destinationCode: type: string destinationName: type: string isOneWay: type: boolean adults: type: number format: double youths: type: number format: double children: type: number format: double infants: type: number format: double flightClimateCompensated: type: boolean outboundTravelTime: type: string outboundFlightLegs: items: $ref: '#/components/schemas/ApiFlightLeg' type: array homeboundTravelTime: type: string homeboundFlightLegs: items: $ref: '#/components/schemas/ApiFlightLeg' type: array prices: items: $ref: '#/components/schemas/ApiFlightPrice' type: array required: - id - name - href - departureCode - departureDate - departureTime - duration - destinationCode - isOneWay - adults - youths - children - infants - flightClimateCompensated - outboundFlightLegs - homeboundFlightLegs - prices type: object additionalProperties: false ApiFlightsOnly: properties: last: type: - number - 'null' enum: - null previous: type: - number - 'null' enum: - null totalNumberOfItems: type: number format: double first: type: string next: type: - string - 'null' items: items: $ref: '#/components/schemas/ApiFlightOnly' type: array required: - last - previous - totalNumberOfItems - first - next - items type: object additionalProperties: false ApiFlightLeg: properties: typeOfFlightName: type: string typeOfFlightCode: type: string airlineName: type: string airlineCode: type: string flightCode: type: string flightNumber: type: string arrivalTime: type: string arrivalDate: type: string arrivalName: type: string arrivalCode: type: string departureTime: type: string departureDate: type: string departureName: type: string departureCode: type: string legNumber: type: number format: double required: - airlineCode - flightCode - arrivalTime - arrivalDate - arrivalCode - departureTime - departureDate - departureCode - legNumber type: object securitySchemes: tsoa_auth_prod: type: oauth2 description: Production OAuth2 flows: clientCredentials: tokenUrl: https://prod.api.tui/oauth2/token scopes: read:sales-meta-package: Read access tsoa_auth_preprod: type: oauth2 description: Pre-production OAuth2 flows: clientCredentials: tokenUrl: https://pre-prod.api.tui/oauth2/token scopes: read:sales-meta-package: Read access