TUI Meta Partner Packages & Flights API

Metasearch partner interface for the Nordic region (Sweden, Denmark, Finland, Norway). Documented operations are GET /{market}/flights/search/{agent}, GET /{market}/flights/{agent}/route-feed, GET /{market}/packages/{pax}, GET /{market}/live-search/packages/{agent} and GET /{market}/live-search/packages/{agent}/locations. OAuth 2.0 client credentials.

OpenAPI Specification

tui-group-tui-meta-partner-packages-flights-openapi.yml Raw ↑
openapi: 3.0.0
components:
  examples: {}
  headers: {}
  parameters: {}
  requestBodies: {}
  responses: {}
  schemas:
    FlightsRoute:
      properties:
        origin:
          type: string
        destination:
          type: string
        days_of_week:
          type: string
        effective_start:
          type: string
        effective_end:
          type: string
      required:
        - origin
        - destination
        - days_of_week
        - effective_start
        - effective_end
      type: object
      additionalProperties: false
    ApiAccommodation:
      properties:
        id:
          type: string
        configurationId:
          type: string
        name:
          type: string
        href:
          type: string
        imagesHref:
          type: string
        allInclusive:
          type: boolean
        destinationName:
          type: string
        climateCompensated:
          type: boolean
      required:
        - id
        - name
        - href
        - imagesHref
        - allInclusive
      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
    ApiPrice:
      properties:
        priceOriginal:
          type: number
          format: double
        currentPrice:
          type: number
          format: double
        currency:
          type: string
        available:
          type: number
          format: double
        seatsAvailable:
          type: number
          format: double
        flightClassName:
          type: string
        urlToBooking:
          type: string
        roomTags:
          items:
            type: string
          type: array
        roomGroupCode:
          type: string
        roomTypeCode:
          type: string
        roomTypeName:
          type: string
        numberOfOrdinaryBeds:
          type: number
          format: double
        numberOfExtraBeds:
          type: number
          format: double
        campaignCode:
          type: string
          nullable: true
        campaignName:
          type: string
          nullable: true
        boardIncluded:
          type: string
      required:
        - priceOriginal
        - currentPrice
        - currency
        - flightClassName
        - urlToBooking
        - roomTypeCode
        - roomTypeName
        - boardIncluded
      type: object
      additionalProperties: false
    ApiPackage:
      properties:
        id:
          type: string
        name:
          type: string
        departureCode:
          type: string
        departureName:
          type: string
        departureDate:
          type: string
        departureTime:
          type: string
        returnDate:
          type: string
        duration:
          type: string
        countryName:
          type: string
        destinationCode:
          type: string
        destinationName:
          type: string
        adults:
          type: number
          format: double
        youths:
          type: number
          format: double
        children:
          type: number
          format: double
        infants:
          type: number
          format: double
        accommodation:
          $ref: "#/components/schemas/ApiAccommodation"
        priority:
          type: number
          format: double
        flightClimateCompensated:
          type: boolean
        charterFlight:
          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/ApiPrice"
          type: array
      required:
        - departureCode
        - departureDate
        - departureTime
        - returnDate
        - duration
        - destinationCode
        - adults
        - youths
        - children
        - infants
        - accommodation
        - priority
        - flightClimateCompensated
        - charterFlight
        - outboundFlightLegs
        - homeboundFlightLegs
        - prices
      type: object
      additionalProperties: false
    ApiPackages:
      properties:
        next:
          type: string
          nullable: true
        totalNumberOfItems:
          type: number
          format: double
        version:
          type: string
        items:
          items:
            $ref: "#/components/schemas/ApiPackage"
          type: array
      required:
        - next
        - totalNumberOfItems
        - version
        - items
      type: object
      additionalProperties: false
    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
          nullable: true
      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
          enum:
            - null
          nullable: true
        previous:
          type: number
          enum:
            - null
          nullable: true
        totalNumberOfItems:
          type: number
          format: double
        first:
          type: string
        next:
          type: string
          nullable: true
        items:
          items:
            $ref: "#/components/schemas/ApiFlightOnly"
          type: array
      required:
        - last
        - previous
        - totalNumberOfItems
        - first
        - next
        - items
      type: object
      additionalProperties: false
    LocationModel:
      properties:
        id:
          type: string
        name:
          type: string
      required:
        - id
        - name
      type: object
      additionalProperties: false
    LocationResponseModel:
      properties:
        total:
          type: number
          format: double
        items:
          items:
            $ref: "#/components/schemas/LocationModel"
          type: array
      required:
        - total
        - items
      type: object
      additionalProperties: false
  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
info:
  title: Meta Partner Packages & Flights
  description: >-
    The Meta Partner Packages & Flights provides a suite of RESTful endpoints that enable meta
    partners to search 

    for and retrieve up-to-date information on flights and travel packages.

    It allows clients to integrate real-time availability and pricing into their
    applications.
  version: 1.0.0
paths:
  /{market}/flights/{agent}/route-feed:
    get:
      operationId: GetFlightsRouteFeed
      responses:
        "200":
          description: Ok
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/FlightsRoute"
                type: array
      description: This endpoint returns the current flights route feed.
      tags:
        - Route Feed
      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 monitoring purposes.
          in: path
          name: agent
          required: true
          schema:
            type: string
            pattern: ^\w+$
  /{market}/packages/{pax}:
    get:
      operationId: GetPackages
      responses:
        "200":
          description: Ok
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiPackages"
      description: "This endpoint returns all available packages.\r

        Very important! Remember to add your own agent string
        {&agent=youragentstring} to the urlToBooking link in each package."
      tags:
        - Packages
      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: "The pax configuration. Accepted values: 2000 for two adults, 2010
            for two adults and one child, 2020 for two adults and two children."
          in: path
          name: pax
          required: true
          schema:
            type: string
            pattern: ^2.[0-2].$
        - description: Your agent code. Use the same for every request made.
          in: query
          name: agent
          required: true
          schema:
            type: string
            pattern: ^\w+$
        - description: The package id to start from. Items retrieved will have an id that
            comes after the given value when sorted in ascending order.
          in: query
          name: fromid
          required: false
          schema:
            default: ""
            type: string
        - 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: 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: Number of nights in the accommodation.
          in: query
          name: duration
          required: false
          schema:
            format: int32
            type: integer
        - description: The id of the accommodation to retrieve.
          in: query
          name: accommodationid
          required: false
          schema:
            type: string
        - description: Maximum number of days to departure. Items returned will have a
            departure date that is equal or fewer days away from today.
          in: query
          name: maxdaystodeparture
          required: false
          schema:
            format: int32
            type: integer
        - description: "Date of departure. Date must be compatible with ISO 8601. Example:
            departuredatefrom=2035-01-31"
          in: query
          name: departuredatefrom
          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: "Date of departure. Date must be compatible with ISO 8601. Example:
            departuredatetill=2035-01-31"
          in: query
          name: departuredatetill
          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])$
  /{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
  /{market}/live-search/packages/{agent}/locations:
    get:
      operationId: GetLocations
      responses:
        "200":
          description: Ok
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LocationResponseModel"
      description: Get all locations for a specific market
      tags:
        - Live Search Packages (Beta)
      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. Use the same for every request made.
          in: path
          name: agent
          required: true
          schema:
            type: string
            pattern: ^\w+$
  /{market}/live-search/packages/{agent}:
    get:
      operationId: GetLiveSearch
      responses:
        "200":
          description: Ok
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiPackages"
      description: This endpoint returns available packages.
      tags:
        - Live Search Packages (Beta)
      security:
        - tsoa_auth_prod: []
        - tsoa_auth_preprod: []
      parameters:
        - description: "Your agent code. Use the same for every request made.\r

            \r

            Example - tui"
          in: path
          name: agent
          required: true
          schema:
            type: string
            pattern: ^\w+$
        - description: "The source market code.\r

            \r

            Accepted values: dk, fi, no, se."
          in: path
          name: market
          required: true
          schema:
            type: string
            pattern: ^dk$|^fi$|^no$|^se$
        - description: "Number of Adults in the request.\r

            \r

            Accepted Values - 1 to 6"
          in: query
          name: adults
          required: true
          schema:
            format: int32
            type: integer
            minimum: 1
            maximum: 6
        - description: "Ages of Children in the request separated by comma. If no children
            are sent in the request, this parameter should not be sent (or sent
            as ?childAges=).\r

            \r

            For 2 children with age 5 and 7, the value should be 5,7.\r

            Age ranges are, infant: 0-1, child: 2-12, youth: 13-17."
          in: query
          name: childages
          required: false
          schema:
            default: ""
            type: string
            pattern: ^$|^(1[0-7]|[0-9])(,(1[0-7]|[0-9]))*$
        - description: "The G- code value for each destination that is mapped through the
            locations endpoint.\r

            Multiple destinations can be sent in the request separated by
            comma.\r

            \r

            Example: G-000000234,G-000000256,G-000000293,G-000000293"
          in: query
          name: destinations
          required: true
          schema:
            type: string
        - description: "Date of arrival from. Date must be compatible with ISO 8601.
            Example: arrivaldatefrom=2035-01-31"
          in: query
          name: arrivaldatefrom
          required: true
          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: "Date of arrival to.\r

            Date must be compatible with ISO 8601.\r

            \r

            Example: arrivaldateto=2035-01-31"
          in: query
          name: arrivaldateto
          required: true
          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: "A list of one or more stay durations. Example: 3,5,7,14"
          in: query
          name: durations
          required: true
          schema:
            type: string
            pattern: ^\d+(,\d+)*$
        - description: "A list of airportcodes separated by comma that are requested by
            user as Departure locations.\r

            \r

            Example: ARN,GOT,CPH"
          in: query
          name: airportcodes
          required: false
          schema:
            default: ""
            type: string
        - description: "The number of items to return. Maximum: 100."
          in: query
          name: limit
          required: false
          schema:
            default: 20
            format: int32
            type: integer
            maximum: 100
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