Airline Code Lookup

Returns the airline name and details for a given IATA or ICAO airline code, used for translating codes into traveler-facing names.

Documentation

Specifications

Examples

Schemas & Data

OpenAPI Specification

amadeus-airline-code-lookup-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Airline Code Lookup API
  description: |
    Before using this API, we recommend you read our
    **[Authorization Guide](https://developers.amadeus.com/self-service/apis-docs/guides/authorization-262)**
    for more information on how to generate an access token.

    Please also be aware that our test environment is based on a subset of the production,
    to see what is included in test please refer to our **[data collection](https://github.com/amadeus4dev/data-collection)**.
  version: 1.2.1
  x-status: validated
  x-tags:
    - '#ama-for-dev'
  x-release-note:
    "1.2.0":
      - Migration to OAS3
    "1.1.0":
      - Correct example
      - Regroup parameter "IATACode" and "ICAOCode" under the same name "airlineCodes"
    "1.0.0":
      - initial version
      - List all airlines information (name and code)
      - Introduction of search per IATA or ICAO code
servers:
  - url: https://test.api.amadeus.com/v1
paths:
  /reference-data/airlines:
    get:
      tags:
        - airlines
      summary: Amadeus Return Airlines Information.
      operationId: getairlines
      parameters:
        - name: airlineCodes
          in: query
          description: |
            Code of the airline following IATA standard([IATA table codes](http://www.iata.org/publications/Pages/code-search.aspx)) or ICAO standard ([ICAO airlines table codes](https://en.wikipedia.org/wiki/List_of_airline_codes))

            Several airlines can be selected at once by sending a list separated by a coma (i.e. AF, SWA)
          schema:
            type: string
          examples:
            BA:
              value: BA
      responses:
        200:
          $ref: '#/components/responses/airlines'
        400:
          $ref: '#/components/responses/400'
        500:
          $ref: '#/components/responses/500'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  examples:
    INVALID_FORMAT:
      value:
        errors:
          - status: 400
            code: 477
            title: INVALID FORMAT
            detail: invalid query parameter format
            source:
              parameter: airlineCodes
              example: BA
    SYSTEM_ERROR:
      value:
        errors:
          - status: 500
            code: 141
            title: SYSTEM ERROR HAS OCCURRED
  schemas:
    Warning:
      type: object
      properties:
        code:
          type: integer
          description: an application-specific error code
          format: int64
          example: 1
        title:
          type: string
          description: a short summary of the error
          example: string-value
        detail:
          type: string
          description: explanation of the error
          example: string-value
        source:
          title: Issue_Source
          type: object
          properties:
            pointer:
              type: string
              description: "a JSON Pointer [RFC6901] to the associated entity in the request document"
              example: string-value
            parameter:
              type: string
              description: a string indicating which URI query parameter caused the issue
              example: string-value
            example:
              type: string
              description: a string indicating an example of the right value
              example: string-value
          description: an object containing references to the source of the error
    Airline:
      type: object
      properties:
        type:
          type: string
          description: the resource name
          example: airline
        iataCode:
          type: string
          description: "IATA airline code. see [IATA table codes](http://www.iata.org/publications/Pages/code-search.aspx)"
          example: WN
        icaoCode:
          type: string
          description: "IATA airline code. see [ICAO airlines table codes](https://en.wikipedia.org/wiki/List_of_airline_codes)"
          example: SWA
        businessName:
          type: string
          description: airline business name
          example: SOUTHWEST AIRLINES TEXAS
        commonName:
          type: string
          description: airline common name
          example: SW AIRLINES
    Error:
      type: object
      properties:
        status:
          type: integer
          description: the HTTP status code applicable to this error
          example: 1
        code:
          type: integer
          description: an application-specific error code
          format: int64
          example: 1
        title:
          type: string
          description: a short summary of the error
          example: string-value
        detail:
          type: string
          description: explanation of the error
          example: string-value
        source:
          title: Issue_Source
          type: object
          properties:
            pointer:
              type: string
              description: "a JSON Pointer [RFC6901] to the associated entity in the request document"
              example: string-value
            parameter:
              type: string
              description: a string indicating which URI query parameter caused the issue
              example: string-value
            example:
              type: string
              description: a string indicating an example of the right value
              example: string-value
          description: an object containing references to the source of the error
    Meta:
      title: Meta
      type: object
      properties:
        count:
          type: integer
          example: 1
        links:
          title: CollectionLinks
          type: object
          properties:
            self:
              type: string
              format: uri
              example: https://test.api.amadeus.com/v1/area/resources?...
            next:
              type: string
              format: uri
              example: https://test.api.amadeus.com/v1/area/resources?...
            previous:
              type: string
              format: uri
              example: https://test.api.amadeus.com/v1/area/resources?...
            last:
              type: string
              format: uri
              example: https://test.api.amadeus.com/v1/area/resources?...
            first:
              type: string
              format: uri
              example: https://test.api.amadeus.com/v1/area/resources?...
            up:
              type: string
              format: uri
              example: https://test.api.amadeus.com/v1/area/resources?...
          example:
            self: https://test.api.amadeus.com/v1/area/resources?param=value
  responses:
    airlines:
      description: Successful Operation
      content:
        application/vnd.amadeus+json:
          schema:
            title: Airlines
            required:
              - data
            type: object
            properties:
              meta:
                $ref: '#/components/schemas/Meta'
              warnings:
                type: array
                items:
                  $ref: '#/components/schemas/Warning'
              data:
                type: array
                items:
                  $ref: '#/components/schemas/Airline'
          examples:
            BA:
              value:
                meta:
                  count: 1
                  links:
                    self: https://test.api.amadeus.com/v1/reference-data/airlines?airlineCodes=BA
                data:
                  - type: airline
                    iataCode: BA
                    icaoCode: BAW
                    businessName: BRITISH AIRWAYS
                    commonName: BRITISH A/W
    400:
      description: |
        | code | title          |
        | ---- | -------------- |
        | 572  | INVALID OPTION |
      content:
        application/vnd.amadeus+json:
          schema:
            type: object
            title: Errors
            properties:
              errors:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
          examples:
            Invalid Format:
              $ref: '#/components/examples/INVALID_FORMAT'
    500:
      description: Unexpected Error
      content:
        application/vnd.amadeus+json:
          schema:
            type: object
            title: Errors
            properties:
              errors:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
          examples:
            500:
              $ref: '#/components/examples/SYSTEM_ERROR'