openapi: 3.0.1
info:
  title: Aviation Data Hub API - Baggage Vertical
  description: Aviation Data Hub acts as a central data repository for all functions, which affect the efficient functioning of an airport. Data can be ingested from various sources via standardized interfaces. The way of getting data out of it is similar; there are standardized REST and MQTT interfaces to fetch the data. The data structure is based on industry standards such as IATA's AIDM and ACI's ACRIS combined with decades of Siemens Logistics industry knowledge.
  contact:
    name: Siemens Logistics GmbH
    url: https://www.siemens-logistics.com
    email: adh-devportal@siemens-logistics.com
  license:
    name: Property of Siemens Logistics GmbH
  version: 20.2.0
tags:
  - name: Bag Tag Store
    externalDocs:
      description: The bag tag store contains methods to access and insert or modify bag tag data.
      url: https://devportal.aviationdatahub.siemens.cloud/en/baggage-vertical/overview
paths:
  /bagtags:
    get:
      tags:
        - Bag Tag Store
      summary: Query bag tags based on given search criteria.
      description: If no query parameter is set the search will be reduced to the last 24 hours. If no maxResult is set a maximum of 1000 records will be returned.
      operationId: queryBagTags
      parameters:
        - name: tag
          in: query
          description: The tag number of the bag tag.
          required: false
          schema:
            type: string
        - name: carrier
          in: query
          description: The iata code of the operating carrier. 2-digit code is expected.
          required: false
          schema:
            type: string
        - name: flight-number
          in: query
          description: The (numeric) flight number of operating airline.
          required: false
          schema:
            type: string
        - name: operational-suffix
          in: query
          description: Operational suffix of flight segment. Used to distinguish two flights having the same flight number and departing from their respective origin stations on the same date.
          required: false
          schema:
            type: string
        - name: origin-date
          in: query
          description: The day of operation, i.e. local day of schedule off-block time in UTC at first departure airport of flight.
          required: false
          schema:
            type: string
        - name: origin-iata-code
          in: query
          description: The iata code of an airport as origin airport of a flight leg the bag is booked on.
          required: false
          schema:
            type: string
        - name: destination-iata-code
          in: query
          description: The iata code of an airport as destination airport of a flight leg the bag is booked on.
          required: false
          schema:
            type: string
        - name: created-from
          in: query
          description: "Object creation time by ADH: the start point of the interval in UTC (included). e.g. 2020-01-31T12:30:00.000Z."
          required: false
          schema:
            type: string
        - name: created-to
          in: query
          description: "Object creation time by ADH: the end point of the interval in UTC (excluded). e.g. 2020-01-31T12:30:00.000Z."
          required: false
          schema:
            type: string
        - name: updated-from
          in: query
          description: "Last object modification time by ADH: the start point of the interval in UTC (included). e.g. 2020-01-31T12:30:00.000Z."
          required: false
          schema:
            type: string
        - name: updated-to
          in: query
          description: "Last object modification time by ADH: the end point of the interval in UTC (excluded). e.g. 2020-01-31T12:30:00.000Z."
          required: false
          schema:
            type: string
        - name: secondary-identifier
          in: query
          description: A secondary identifier given to the bag tag.
          required: false
          schema:
            type: string
        - name: bag-tag-id
          in: query
          description: The unique bag-tag-id provided by adh. Looked up in bag-tag-id and merged-bag-tag-id.
          required: false
          schema:
            type: string
        - name: container-tag
          in: query
          description: The container tag that was submitted in containerization events.
          required: false
          schema:
            type: string
        - name: max-results
          in: query
          description: The maximum number of results.
          required: false
          schema:
            type: integer
            format: int32
      responses:
        "200":
          description: default response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/BagTag"
        "400":
          description: "Bad Request: e.g. invalid parameter."
          content:
            application/json: {}
        "401":
          description: "Unauthorized: please login first."
        "403":
          description: "Forbidden: not allowed to perform this request."
  /bagtags/{id}:
    get:
      tags:
        - Bag Tag Store
      summary: Query bag tag by unique bag-tag-id provided by adh.
      operationId: getBagTagREST
      parameters:
        - name: id
          in: path
          description: The unique bag-tag-id provided by adh. Searches for this in bag-tag-id or merged-bag-tag-id.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: "Ok: Default response."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BagTag"
        "400":
          description: "Bad Request: e.g. invalid parameter."
          content:
            application/json: {}
        "401":
          description: "Unauthorized: please login first."
        "403":
          description: "Forbidden: not allowed to perform this request."
        "404":
          description: "Not Found: bag tag with given id not found."
  /bagtags/segments:
    get:
      tags:
        - Bag Tag Store
      summary: Query bag tags by flight segment based on given search criteria.
      description: If no query parameter is set the search will be reduced to the last 24 hours. If no maxResult is set a maximum of 1000 records will be returned.
      operationId: queryFlightSegmentBagTags
      parameters:
        - name: tag
          in: query
          description: The tag number of the bag tag.
          required: false
          schema:
            type: string
        - name: carrier
          in: query
          description: The iata code of the operating carrier.
          required: false
          schema:
            type: string
        - name: flight-number
          in: query
          description: The (numeric) flight number of operating airline.
          required: false
          schema:
            type: string
        - name: operational-suffix
          in: query
          description: Used to distinguish two flights having the same flight number and departing from their respective origin stations on the same date.
          required: false
          schema:
            type: string
        - name: origin-date
          in: query
          description: The day of operation, i.e. local day of schedule off-block time in UTC at first departure airport of flight.
          required: false
          schema:
            type: string
        - name: origin-iata-code
          in: query
          description: The iata code of an airport as origin airport of a flight leg the bag is booked on.
          required: false
          schema:
            type: string
        - name: destination-iata-code
          in: query
          description: The iata code of an airport as destination airport of a flight leg the bag is booked on.
          required: false
          schema:
            type: string
        - name: created-from
          in: query
          description: "Object creation time by ADH: the start point of the interval in UTC (included). e.g. 2020-01-31T12:30:00.000Z."
          required: false
          schema:
            type: string
        - name: created-to
          in: query
          description: "Object creation time by ADH: the end point of the interval in UTC (excluded). e.g. 2020-01-31T12:30:00.000Z."
          required: false
          schema:
            type: string
        - name: updated-from
          in: query
          description: "Last object modification time by ADH: the start point of the interval in UTC (included). e.g. 2020-01-31T12:30:00.000Z."
          required: false
          schema:
            type: string
        - name: updated-to
          in: query
          description: "Last object modification time by ADH: the end point of the interval in UTC (excluded). e.g. 2020-01-31T12:30:00.000Z."
          required: false
          schema:
            type: string
        - name: secondary-identifier
          in: query
          description: A secondary identifier given to the bag tag.
          required: false
          schema:
            type: string
        - name: bag-tag-id
          in: query
          description: The unique bag-tag-id provided by adh. Looked up in bag-tag-id and merged-bag-tag-id.
          required: false
          schema:
            type: string
        - name: max-results
          in: query
          description: The maximum number of results.
          required: false
          schema:
            type: integer
            format: int32
      responses:
        "200":
          description: default response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/FlightSegmentBagTag"
        "400":
          description: "Bad Request: e.g. invalid parameter."
          content:
            application/json: {}
        "401":
          description: "Unauthorized: please login first."
        "403":
          description: "Forbidden: not allowed to perform this request."
  /bagtags/events:
    get:
      tags:
        - Bag Tag Store
      summary: Query bag events based on given search criteria.
      description: If no query parameter is set the search will be reduced to the last 24 hours. If no maxResult is set a maximum of 1000 records will be returned.
      operationId: queryBagEvents
      parameters:
        - name: tag
          in: query
          description: The tag number of the bag tag.
          required: false
          schema:
            type: string
        - name: from
          in: query
          description: The start point of the interval in UTC. e.g. 2020-01-31T12:30:00.000Z. If used the from and the to parameter has to be set.
          required: false
          schema:
            type: string
        - name: to
          in: query
          description: The end point of the interval in UTC. e.g. 2020-01-31T13:30:00.000Z. If used the from and the to parameter has to be set.
          required: false
          schema:
            type: string
        - name: carrier
          in: query
          description: The iata code of the operating carrier.
          required: false
          schema:
            type: string
        - name: flight-number
          in: query
          description: The (numeric part of) flight number of operating airline.
          required: false
          schema:
            type: string
        - name: operational-suffix
          in: query
          description: Used to distinguish two flights having the same flight number and departing from their respective Origin Stations on the same date.
          required: false
          schema:
            type: string
        - name: origin-date
          in: query
          description: The day of operation, i.e. local day of schedule off-block time in UTC at first departure airport of flight. e.g. 2020-01-31T12:30:00.000Z.
          required: false
          schema:
            type: string
        - name: origin-iata-code
          in: query
          description: The iata code of the departure airport.
          required: false
          schema:
            type: string
        - name: destination-iata-code
          in: query
          description: The iata code of the arrival airport.
          required: false
          schema:
            type: string
        - name: event-type
          in: query
          description: The event type.
          required: false
          schema:
            enum:
              - BAG_CHECK_IN_EVENT
              - BAG_CANCEL_EVENT
              - BAG_CHANGE_EVENT
              - BAG_ROUTE_EVENT
              - BAG_REFLIGHT_EVENT
              - BAG_CONTAINERIZATION_EVENT
              - BAG_TRACKING_EVENT
              - BAG_SCREENING_EVENT
              - BAG_LOAD_INTO_ULD_EVENT
        - name: tracking-event-sub-type
          in: query
          description: The tracking event sub-type.
          required: false
          schema:
            enum:
              - BHS_INDUCTION
              - ATR
              - MES
              - BVS
              - EBS_IN
              - EBS_OUT
              - MUP_DISCHARGE
              - RECONCILED
              - CART_LOAD
              - LOAD
              - DEPARTED_FROM_MUP
              - ARRIVED_AT_BAY
              - DEPARTED_FROM_BAY
              - ARRIVED_AT_TRANSFER_LATERAL
              - ARRIVED_AT_RECLAIM_BELT
              - UNLOAD
              - ULD_UNLOAD
              - RECLAIM_BELT_INDUCTION
              - DELIVERED
        - name: secondary-identifier
          in: query
          description: A secondary identifier given to the bag tag.
          required: false
          schema:
            type: string
        - name: bag-tag-id
          in: query
          description: One or more bag-tag-ids. If searching for events of a bagTag pass in bag-tag-id and all merged-bag-tag-id to find all events, even merged ones.
          required: false
          schema:
            type: array
            items:
              type: string
        - name: container-tag
          in: query
          description: Tag of the a container to search for.
          required: false
          schema:
            type: string
        - name: location
          in: query
          description: Location of the event to search for.
          required: false
          schema:
            type: string
        - name: source
          in: query
          description: Source of the event to search for.
          required: false
          schema:
            type: string
        - name: max-results
          in: query
          description: The maximum number of results.
          required: false
          schema:
            type: integer
            format: int32
      responses:
        "200":
          description: default response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/BagEvent"
        "400":
          description: "Bad Request: e.g. invalid parameter."
          content:
            application/json: {}
        "401":
          description: "Unauthorized: please login first."
        "403":
          description: "Forbidden: not allowed to perform this request."
  /bagtags/{id}/segments:
    get:
      tags:
        - Bag Tag Store
      summary: Query bag tags by flight segment for given bag tag id based on given search criteria.
      description: If no query parameter is set the search will be reduced to the last 24 hours. If no maxResult is set a maximum of 1000 records will be returned.
      operationId: queryFlightSegmentBagTagsForBagTag
      parameters:
        - name: id
          in: path
          description: The unique bag-tag-id provided by adh. Searches for this in bag-tag-id or merged-bag-tag-id.
          required: true
          schema:
            type: string
        - name: tag
          in: query
          description: The tag number of the bag tag.
          required: false
          schema:
            type: string
        - name: carrier
          in: query
          description: The iata code of the operating carrier.
          required: false
          schema:
            type: string
        - name: flight-number
          in: query
          description: The (numeric) flight number of operating airline.
          required: false
          schema:
            type: string
        - name: operational-suffix
          in: query
          description: Used to distinguish two flights having the same flight number and departing from their respective origin stations on the same date.
          required: false
          schema:
            type: string
        - name: origin-date
          in: query
          description: The day of operation, i.e. local day of schedule off-block time in UTC at first departure airport of flight. e.g. 2020-01-31T12:30:00.000Z.
          required: false
          schema:
            type: string
        - name: origin-iata-code
          in: query
          description: The iata code of an airport as origin airport of a flight leg the bag is booked on.
          required: false
          schema:
            type: string
        - name: destination-iata-code
          in: query
          description: The iata code of an airport as destination airport of a flight leg the bag is booked on.
          required: false
          schema:
            type: string
        - name: created-from
          in: query
          description: "Object creation time by ADH: the start point of the interval in UTC (included). e.g. 2020-01-31T12:30:00.000Z."
          required: false
          schema:
            type: string
        - name: created-to
          in: query
          description: "Object creation time by ADH: the end point of the interval in UTC (excluded). e.g. 2020-01-31T12:30:00.000Z."
          required: false
          schema:
            type: string
        - name: updated-from
          in: query
          description: "Last object modification time by ADH: the start point of the interval in UTC (included). e.g. 2020-01-31T12:30:00.000Z."
          required: false
          schema:
            type: string
        - name: updated-to
          in: query
          description: "Last object modification time by ADH: the end point of the interval in UTC (excluded). e.g. 2020-01-31T12:30:00.000Z."
          required: false
          schema:
            type: string
        - name: secondary-identifier
          in: query
          description: A secondary identifier given to the bag tag.
          required: false
          schema:
            type: string
        - name: max-results
          in: query
          description: The maximum number of results.
          required: false
          schema:
            type: integer
            format: int32
      responses:
        "200":
          description: default response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/FlightSegmentBagTag"
        "400":
          description: "Bad Request: e.g. invalid parameter."
          content:
            application/json: {}
        "401":
          description: "Unauthorized: please login first."
        "403":
          description: "Forbidden: not allowed to perform this request."
  /bagtags/{id}/events:
    get:
      tags:
        - Bag Tag Store
      summary: Query bag events for given bag tag id based on given search criteria.
      description: If no query parameter is set the search will be reduced to the last 24 hours. If no maxResult is set a maximum of 1000 records will be returned.
      operationId: queryBagEventsForBagTag
      parameters:
        - name: id
          in: path
          description: The unique bag-tag-id provided by adh. Searches for this in bag-tag-id or merged-bag-tag-id.
          required: true
          schema:
            type: string
        - name: tag
          in: query
          description: The tag number of the bag tag.
          required: false
          schema:
            type: string
        - name: from
          in: query
          description: The start point of the interval in UTC. e.g. 2020-01-31T12:30:00.000Z. If used the from and the to parameter has to be set.
          required: false
          schema:
            type: string
        - name: to
          in: query
          description: The end point of the interval in UTC. e.g. 2020-01-31T12:30:00.000Z. If used the from and the to parameter has to be set.
          required: false
          schema:
            type: string
        - name: carrier
          in: query
          description: The iata code of the operating carrier.
          required: false
          schema:
            type: string
        - name: flight-number
          in: query
          description: The (numeric part of) flight number of operating airline.
          required: false
          schema:
            type: string
        - name: operational-suffix
          in: query
          description: Used to distinguish two flights having the same flight number and departing from their respective Origin Stations on the same date.
          required: false
          schema:
            type: string
        - name: origin-date
          in: query
          description: The day of operation, i.e. local day of schedule off-block time in UTC at first departure airport of flight. e.g. 2020-01-31T12:30:00.000Z.
          required: false
          schema:
            type: string
        - name: origin-iata-code
          in: query
          description: The iata code of the departure airport.
          required: false
          schema:
            type: string
        - name: destination-iata-code
          in: query
          description: The iata code of the arrival airport.
          required: false
          schema:
            type: string
        - name: event-type
          in: query
          description: The event type.
          required: false
          schema:
            enum:
              - BAG_CHECK_IN_EVENT
              - BAG_CANCEL_EVENT
              - BAG_CHANGE_EVENT
              - BAG_ROUTE_EVENT
              - BAG_REFLIGHT_EVENT
              - BAG_CONTAINERIZATION_EVENT
              - BAG_TRACKING_EVENT
              - BAG_SCREENING_EVENT
              - BAG_LOAD_INTO_ULD_EVENT
        - name: tracking-event-sub-type
          in: query
          description: The tracking event sub-type.
          required: false
          schema:
            enum:
              - BHS_INDUCTION
              - ATR
              - MES
              - BVS
              - EBS_IN
              - EBS_OUT
              - MUP_DISCHARGE
              - RECONCILED
              - CART_LOAD
              - LOAD
              - DEPARTED_FROM_MUP
              - ARRIVED_AT_BAY
              - DEPARTED_FROM_BAY
              - ARRIVED_AT_TRANSFER_LATERAL
              - ARRIVED_AT_RECLAIM_BELT
              - UNLOAD
              - ULD_UNLOAD
              - RECLAIM_BELT_INDUCTION
              - DELIVERED
        - name: secondary-identifier
          in: query
          description: A secondary identifier given to the bag tag.
          required: false
          schema:
            type: string
        - name: container-tag
          in: query
          description: Tag of the a container to search for.
          required: false
          schema:
            type: string
        - name: location
          in: query
          description: Location of the container event to search for.
          required: false
          schema:
            type: string
        - name: source
          in: query
          description: Source of the container event to search for.
          required: false
          schema:
            type: string
        - name: max-results
          in: query
          description: The maximum number of results.
          required: false
          schema:
            type: integer
            format: int32
      responses:
        "200":
          description: default response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/BagEvent"
        "400":
          description: "Bad Request: e.g. invalid parameter."
          content:
            application/json: {}
        "401":
          description: "Unauthorized: please login first."
        "403":
          description: "Forbidden: not allowed to perform this request."
  /bagtags/events/checkin:
    post:
      tags:
        - Bag Tag Store
      summary: Post a bag check in event.
      description: Transfers a bag check in event to ADH. This may change the state of the bag tag. New data is processed asynchronously and may need some time to be updated.
      operationId: postBagCheckInEvent
      requestBody:
        description: A BagCheckInEvent JSON structure.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BagCheckInEvent"
        required: true
      responses:
        "200":
          description: default response
        "400":
          description: "Bad Request: e.g. invalid parameter."
          content:
            application/json: {}
        "401":
          description: "Unauthorized: please login first."
        "403":
          description: "Forbidden: not allowed to perform this request."
  /bagtags/events/cancel:
    post:
      tags:
        - Bag Tag Store
      summary: Post a bag cancel event.
      description: Transfers a bag cancel event to ADH. This may change the state of the bag tag. New data is processed asynchronously and may need some time to be updated.
      operationId: postBagCancelEvent
      requestBody:
        description: A BagCancelEvent JSON structure.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BagCancelEvent"
        required: true
      responses:
        "200":
          description: default response
        "400":
          description: "Bad Request: e.g. invalid parameter."
          content:
            application/json: {}
        "401":
          description: "Unauthorized: please login first."
        "403":
          description: "Forbidden: not allowed to perform this request."
  /bagtags/events/change:
    post:
      tags:
        - Bag Tag Store
      summary: Post a bag change event.
      description: Transfers a bag change event to ADH. This may change the state of the bag tag. New data is processed asynchronously and may need some time to be updated.
      operationId: postBagChangeEvent
      requestBody:
        description: A BagChangeEvent JSON structure.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BagChangeEvent"
        required: true
      responses:
        "200":
          description: default response
        "400":
          description: "Bad Request: e.g. invalid parameter."
          content:
            application/json: {}
        "401":
          description: "Unauthorized: please login first."
        "403":
          description: "Forbidden: not allowed to perform this request."
  /bagtags/events/containerization:
    post:
      tags:
        - Bag Tag Store
      summary: Post a bag containerization event.
      description: Transfers a bag containerization event to ADH. This may change the state of the bag tag. New data is processed asynchronously and may need some time to be updated.
      operationId: postBagContainerizationEvent
      requestBody:
        description: A BagContainerizationEvent JSON structure. Either outbound or inbound segment is set dependent on whether the event occurs on the departure or arrival airport.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BagContainerizationEvent"
        required: true
      responses:
        "200":
          description: default response
        "400":
          description: "Bad Request: e.g. invalid parameter."
          content:
            application/json: {}
        "401":
          description: "Unauthorized: please login first."
        "403":
          description: "Forbidden: not allowed to perform this request."
  /bagtags/events/tracking:
    post:
      tags:
        - Bag Tag Store
      summary: Post a bag tracking event.
      description: Transfers a bag tracking event to ADH. This may change the state of the bag tag. New data is processed asynchronously and may need some time to be updated.
      operationId: postBagTrackingEvent
      requestBody:
        description: A BagTrackingEvent JSON structure.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BagTrackingEvent"
        required: true
      responses:
        "200":
          description: default response
        "400":
          description: "Bad Request: e.g. invalid parameter."
          content:
            application/json: {}
        "401":
          description: "Unauthorized: please login first."
        "403":
          description: "Forbidden: not allowed to perform this request."
  /bagtags/events/screening:
    post:
      tags:
        - Bag Tag Store
      summary: Post a bag screening event.
      description: Transfers a bag screening event to ADH. This may change the state of the bag tag.New data is processed asynchronously and may need some time to be updated.
      operationId: postBagScreeningEvent
      requestBody:
        description: A BagScreeningEvent JSON structure.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BagScreeningEvent"
        required: true
      responses:
        "200":
          description: default response
        "400":
          description: "Bad Request: e.g. invalid parameter."
          content:
            application/json: {}
        "401":
          description: "Unauthorized: please login first."
        "403":
          description: "Forbidden: not allowed to perform this request."
  /bagtags/events/loadintould:
    post:
      tags:
        - Bag Tag Store
      summary: DEPRECATED! Post a bag load into uld event.
      description: Transfers a bag load into uld event to ADH. This may change the state of the bag tag.New data is processed asynchronously and may need some time to be updated.
      operationId: postBagLoadIntoUldEvent
      requestBody:
        description: A BagLoadIntoUldEvent JSON structure. Either outbound or inbound segment is set dependent on whether the event occurs on the departure or arrival airport.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BagLoadIntoUldEvent"
        required: true
      responses:
        "200":
          description: default response
        "400":
          description: "Bad Request: e.g. invalid parameter."
          content:
            application/json: {}
        "401":
          description: "Unauthorized: please login first."
        "403":
          description: "Forbidden: not allowed to perform this request."
      deprecated: true
components:
  schemas:
    BagActivities:
      type: object
      properties:
        check-in:
          $ref: "#/components/schemas/BagActivity"
        cancel:
          $ref: "#/components/schemas/BagActivity"
        reflight:
          $ref: "#/components/schemas/BagActivity"
        reroute:
          $ref: "#/components/schemas/BagActivity"
        screening:
          $ref: "#/components/schemas/ScreeningActivity"
        bhs-induction:
          $ref: "#/components/schemas/BagActivity"
        atr:
          $ref: "#/components/schemas/BagActivity"
        bvs:
          $ref: "#/components/schemas/BagActivity"
        mes:
          $ref: "#/components/schemas/BagActivity"
        ebs-in:
          $ref: "#/components/schemas/BagActivity"
        ebs-out:
          $ref: "#/components/schemas/BagActivity"
        mup-discharge:
          $ref: "#/components/schemas/BagActivity"
        depart-mup:
          $ref: "#/components/schemas/BagActivity"
        arrive-bay:
          $ref: "#/components/schemas/BagActivity"
        depart-bay:
          $ref: "#/components/schemas/BagActivity"
        arrive-transfer-lateral:
          $ref: "#/components/schemas/BagActivity"
        arrive-reclaim-belt:
          $ref: "#/components/schemas/BagActivity"
        load-into-uld:
          $ref: "#/components/schemas/LoadIntoUldActivity"
        unload-uld:
          $ref: "#/components/schemas/ContainerizationActivity"
        remove-from-uld:
          $ref: "#/components/schemas/ContainerizationActivity"
        remove-from-aircraft:
          $ref: "#/components/schemas/ContainerizationActivity"
        reconciled:
          $ref: "#/components/schemas/BagActivity"
        unload:
          $ref: "#/components/schemas/ContainerizationActivity"
        delivered:
          $ref: "#/components/schemas/BagActivity"
        load-into-aircraft:
          $ref: "#/components/schemas/ContainerizationActivity"
        merge:
          $ref: "#/components/schemas/ContainerizationActivity"
        induct-reclaim-belt:
          $ref: "#/components/schemas/BagActivity"
      description: Information on performed BagActivities on a bag segment.
    BagActivity:
      type: object
      properties:
        location-type:
          type: string
          description: Type of location.
          enum:
            - SEGMENT
            - OUTBOUND
            - INBOUND
        timestamp:
          type: string
          description: Timestamp in UTC.
          format: date-time
        location:
          type: string
          description: Location.
      description: Details on a specific bag activity on a bag segment.
    BagCancelEvent:
      required:
        - bag-segments
        - event-time
        - event-type
        - source
        - tag
      type: object
      description: Entity for Bag Cancel Business Events.
      allOf:
        - $ref: "#/components/schemas/BagEvent"
        - type: object
          properties:
            event-type:
              type: string
              description: Type of event for the concrete subclass.
              enum:
                - BAG_CANCEL_EVENT
            bag-segments:
              maxItems: 15
              minItems: 1
              type: array
              description: Bag segments.
              items:
                $ref: "#/components/schemas/BagEventSegmentListElement"
            inbound-segment:
              $ref: "#/components/schemas/BagSegment"
            outbound-segment:
              $ref: "#/components/schemas/BagSegment"
    BagChangeEvent:
      required:
        - bag-segments
        - event-time
        - event-type
        - source
        - tag
      type: object
      description: Entity for Bag Change Business Events.
      allOf:
        - $ref: "#/components/schemas/BagEvent"
        - type: object
          properties:
            event-type:
              type: string
              description: Type of event for the concrete subclass.
              enum:
                - BAG_CHANGE_EVENT
            bag-segments:
              maxItems: 15
              minItems: 1
              type: array
              description: Changed bag segments.
              items:
                $ref: "#/components/schemas/BagEventSegmentListElement"
            inbound-segment:
              $ref: "#/components/schemas/BagSegment"
            outbound-segment:
              $ref: "#/components/schemas/BagSegment"
    BagCheckInEvent:
      required:
        - bag-segments
        - event-time
        - event-type
        - source
        - tag
      type: object
      description: Entity for Bag Check-In Business Events.
      allOf:
        - $ref: "#/components/schemas/BagEvent"
        - type: object
          properties:
            event-type:
              type: string
              description: Type of event for the concrete subclass.
              enum:
                - BAG_CHECK_IN_EVENT
            bag-segments:
              maxItems: 15
              minItems: 1
              type: array
              description: "bag segments. Additional constraints apply: Must contain between 1 and 15 segments. Difference in origin-date of first and last segment must be no more than 30 days, event-time must be no more than 30 days before first segment and no more than 3030 days after last segment.  "
              items:
                $ref: "#/components/schemas/BagEventSegmentListElement"
            inbound-segment:
              $ref: "#/components/schemas/BagSegment"
            outbound-segment:
              $ref: "#/components/schemas/BagSegment"
    BagContainerizationEvent:
      required:
        - bag-segments
        - event-time
        - event-type
        - function
        - source
        - tag
      type: object
      description: Entity for bag containerization Business Events.
      allOf:
        - $ref: "#/components/schemas/BagEvent"
        - type: object
          properties:
            event-type:
              type: string
              description: Type of event for the concrete subclass.
              enum:
                - BAG_CONTAINERIZATION_EVENT
            function:
              type: string
              description: Type of event activity.
              enum:
                - LOAD
                - OFFLOAD
                - REMOVE
                - MERGE
            container-tag:
              type: string
              description: Identifier for journey of the Container.
              example: A234223423
            container-type:
              type: string
              description: Container type like ULD/dolly/aircraft.
              example: ULD
            sequence-number:
              type: integer
              description: Loading sequence number of bag into container.
              format: int32
              example: 2
            bag-segments:
              maxItems: 15
              minItems: 1
              type: array
              description: Segments.
              items:
                $ref: "#/components/schemas/BagEventSegment"
            inbound-segment:
              $ref: "#/components/schemas/BagSegment"
            outbound-segment:
              $ref: "#/components/schemas/BagSegment"
    BagEvent:
      required:
        - event-time
        - event-type
        - source
        - tag
      type: object
      properties:
        meta:
          $ref: "#/components/schemas/BagEventMeta"
        event-type:
          type: string
          description: Type of event, must match the type defined for the concrete subclass.
        event-time:
          type: string
          description: Timestamp when the event occurred in UTC.
          format: date-time
        location:
          type: string
          description: Location id where the event occured.
          example: TRA_12
        source:
          type: string
          description: System generating the event.
          example: Scanner TRA_12
        secondary-identifiers:
          uniqueItems: true
          type: array
          description: Additionally identifiers used by BHS etc.
          items:
            $ref: "#/components/schemas/BagTagIdentifier"
        tag:
          type: string
          description: Tag number of the bag tag. Latest tag number in case of re-tagging. Must not start or end with space.
          example: Tag1234
        bag-type:
          type: string
          description: Bag type identifier.
          example: Hard Shell
        passenger:
          $ref: "#/components/schemas/Passenger"
      description: Entity for bag Business Events. Use concrete subclass.
      discriminator:
        propertyName: event-type
      oneOf:
        - $ref: "#/components/schemas/BagCheckInEvent"
        - $ref: "#/components/schemas/BagCancelEvent"
        - $ref: "#/components/schemas/BagChangeEvent"
        - $ref: "#/components/schemas/BagReRouteEvent"
        - $ref: "#/components/schemas/BagReFlightEvent"
        - $ref: "#/components/schemas/BagTrackingEvent"
        - $ref: "#/components/schemas/BagScreeningEvent"
        - $ref: "#/components/schemas/BagLoadIntoUldEvent"
        - $ref: "#/components/schemas/BagContainerizationEvent"
    BagEventMeta:
      type: object
      properties:
        created-at:
          type: string
          description: Timestamp when event was first created in DH, in case of REST call, the timestamp of REST call, in case iof entry be MQTT, first processing in DH.
          format: date-time
          readOnly: true
        created-by:
          $ref: "#/components/schemas/User"
        modified-count:
          type: integer
          description: Number of modifications in DH. Not set if never modified.
          format: int64
          readOnly: true
        modified-at:
          type: string
          description: Timestamp of last modification in DH, for Events this is the timestamp when enrichment was added, not set otherwise.
          format: date-time
          readOnly: true
        tag-id:
          type: string
          description: Unique id of the bag tag in the data hub for an unlimited period of time.
      description: Metadata added by ADH to events.
      readOnly: true
    BagEventSegment:
      required:
        - identifier
      type: object
      properties:
        identifier:
          $ref: "#/components/schemas/FlightSegmentIdentifier"
        class-of-travel:
          type: string
          description: Class of travel.
          example: M
        is-rush-bag:
          type: boolean
          description: Flags if this is a rush bag.
        passenger-is-crew-member:
          type: boolean
          description: Flags if bag belongs to a crew member. Put false or 0 to set it to non-crew member. Everything greater than 0 will be interpreted as true.
        is-inbound:
          type: boolean
          description: Is segment inbound?
        is-outbound:
          type: boolean
          description: Is segment outbound?
        segmentInbound:
          type: boolean
        segmentOutbound:
          type: boolean
      description: Description of bag segment. For use in bag events.
    BagEventSegmentListElement:
      required:
        - identifier
        - sequence-number
      type: object
      properties:
        sequence-number:
          type: integer
          description: Sequence number of bag segment within bag journey.
          format: int32
        identifier:
          $ref: "#/components/schemas/FlightSegmentIdentifier"
        class-of-travel:
          type: string
          description: Class of travel.
          example: M
        is-rush-bag:
          type: boolean
          description: Flags if this is a rush bag.
        passenger-is-crew-member:
          type: boolean
          description: Flags if bag belongs to a crew member. Put false or 0 to set it to non-crew member. Everything greater than 0 will be interpreted as true.
        is-inbound:
          type: boolean
          description: Is segment inbound?
        is-outbound:
          type: boolean
          description: Is segment outbound?
        segmentInbound:
          type: boolean
        segmentOutbound:
          type: boolean
      description: Description of bag segment within bag journey. Includes sequence number of bag segment. For use in bag events.
    BagFlightSegment:
      type: object
      properties:
        identifier:
          $ref: "#/components/schemas/FlightSegmentIdentifier"
      description: Defining the flight segment of the bag with additional qualifiers.
    BagLoadIntoUldEvent:
      required:
        - event-time
        - event-type
        - outbound-segment
        - source
        - tag
        - uld-tag
      type: object
      description: Entity for bag load into uld Business Events.
      allOf:
        - $ref: "#/components/schemas/BagEvent"
        - type: object
          properties:
            event-type:
              type: string
              description: Type of event for the concrete subclass.
              enum:
                - BAG_LOAD_INTO_ULD_EVENT
            uld-tag:
              type: string
              description: ULD tag.
              example: A12345678
            outbound-segment:
              $ref: "#/components/schemas/BagEventSegment"
            sequence-number:
              minimum: 1
              type: integer
              description: Loading sequence number of bag in uld. Must be 1 or greater.
              format: int32
              example: 1
    BagReFlightEvent:
      required:
        - bag-segments
        - event-time
        - event-type
        - source
        - tag
      type: object
      description: Entity for Bag Re-Flight Business Events.
      allOf:
        - $ref: "#/components/schemas/BagEvent"
        - type: object
          properties:
            event-type:
              type: string
              description: Type of event for the concrete subclass.
              enum:
                - BAG_REFLIGHT_EVENT
            bag-segments:
              maxItems: 15
              minItems: 1
              type: array
              description: New or updated bag segments.
              items:
                $ref: "#/components/schemas/BagEventSegmentListElement"
            retired-tag:
              type: string
              description: Retired tag number for the bag, if tag number has been updated.
              example: R12345678
            inbound-segment:
              $ref: "#/components/schemas/BagSegment"
            outbound-segment:
              $ref: "#/components/schemas/BagSegment"
    BagReRouteEvent:
      required:
        - bag-segments
        - event-time
        - event-type
        - source
        - tag
      type: object
      description: Entity for Bag Re-Route Business Events.
      allOf:
        - $ref: "#/components/schemas/BagEvent"
        - type: object
          properties:
            event-type:
              type: string
              description: Type of event for the concrete subclass.
              enum:
                - BAG_ROUTE_EVENT
            bag-segments:
              maxItems: 15
              minItems: 1
              type: array
              description: New bag segments.
              items:
                $ref: "#/components/schemas/BagEventSegmentListElement"
            retired-tag:
              type: string
              description: Retired tag number for the bag, if tag number has changed.
            inbound-segment:
              $ref: "#/components/schemas/BagSegment"
            outbound-segment:
              $ref: "#/components/schemas/BagSegment"
    BagScreeningEvent:
      required:
        - cleared
        - event-time
        - event-type
        - outbound-segment
        - screening-level
        - source
        - tag
      type: object
      description: Entity for Bag Screening Business Events.
      allOf:
        - $ref: "#/components/schemas/BagEvent"
        - type: object
          properties:
            event-type:
              type: string
              description: Type of event for the concrete subclass.
              enum:
                - BAG_SCREENING_EVENT
            screening-level:
              type: integer
              description: Screening level.
              format: int32
            cleared:
              type: boolean
              description: Cleared.
            outbound-segment:
              $ref: "#/components/schemas/BagEventSegment"
    BagSegment:
      type: object
      properties:
        sequence-number:
          type: integer
          description: Sequence number of bag segment within bag journey.
          format: int32
        flight-segment:
          $ref: "#/components/schemas/BagFlightSegment"
        tag:
          type: string
          description: Tag number of the bag tag used on this segment.
          example: B12345678
        class-of-travel:
          type: string
          description: Class of travel.
          example: M
        is-rush-bag:
          type: boolean
          description: Flags if this is a rush bag.
        passenger-is-crew-member:
          type: boolean
          description: Flags if bag belongs to a crew member. Put false or 0 to set it to non-crew member. Everything greater than 0 will be interpreted as true.
        bag-activities:
          $ref: "#/components/schemas/BagActivities"
        oldest-inbound-activity-type:
          type: string
          description: Type of oldest inbound activity.
        oldest-inbound-activity:
          $ref: "#/components/schemas/BagActivity"
        newest-inbound-activity-type:
          type: string
          description: Type of newest inbound activity.
        newest-inbound-activity:
          $ref: "#/components/schemas/BagActivity"
        oldest-outbound-activity-type:
          type: string
          description: Type of oldest outbound activity.
        oldest-outbound-activity:
          $ref: "#/components/schemas/BagActivity"
        newest-outbound-activity-type:
          type: string
          description: Type of newest outbound activity.
        newest-outbound-activity:
          $ref: "#/components/schemas/BagActivity"
      description: Object holding a the state of a bag represented by bag tag for a flight segment.
    BagTag:
      type: object
      properties:
        meta:
          $ref: "#/components/schemas/ObjectMeta"
        bag-tag-id:
          type: string
          description: Unique id of the bag tag in the data hub for an unlimited period of time.
          example: ABCD-1234
        merged-bag-tag-id:
          uniqueItems: true
          type: array
          description: Unique IDs of bag tags that have ended their life cycle and are merged into this one.
          items:
            type: string
            description: Unique IDs of bag tags that have ended their life cycle and are merged into this one.
        tag:
          type: string
          description: Tag number of the bag tag. Latest tag number in case of re-tagging.
          example: B12345678
        secondary-identifiers:
          uniqueItems: true
          type: array
          description: Additional identifiers for the bag tag used by BHS etc.
          items:
            $ref: "#/components/schemas/BagTagIdentifier"
        bag-type:
          type: string
          description: Bag type identifier.
          example: Hard Shell
        passenger:
          $ref: "#/components/schemas/Passenger"
        bag-segments:
          type: array
          description: Bag segments.
          items:
            $ref: "#/components/schemas/BagSegment"
        inbound-segment:
          $ref: "#/components/schemas/BagSegment"
        outbound-segment:
          $ref: "#/components/schemas/BagSegment"
      description: Object holding the state of a bag journey represented by bag tag.
    BagTagIdentifier:
      required:
        - created
        - identifier
        - source
      type: object
      properties:
        identifier:
          type: string
          description: Internal identifier for the bag.
          example: ABCD-1234
        created:
          type: string
          description: Timestamp of creation of internal identifier for the bag.
          format: date-time
        source:
          type: string
          description: Source creating the internal identifier for the bag.
      description: Additional identifiers for bag tags used by airport systems etc.
    BagTrackingEvent:
      required:
        - event-time
        - event-type
        - source
        - tag
        - tracking-point-type
      type: object
      description: Entity for Bag Tracking Business Events. Be aware that either the inbound or the outbound segement needs to be set.
      allOf:
        - $ref: "#/components/schemas/BagEvent"
        - type: object
          properties:
            event-type:
              type: string
              description: Type of event for the concrete subclass.
              enum:
                - BAG_TRACKING_EVENT
            tracking-point-type:
              type: string
              description: Type of tracking point. Depending on the type use either outbound-segment(BHS_INDUCTION, ATR, MES, BVS, EBS_IN, EBS_OUT, MUP_DISCHARGE, RECONCILED, CART_LOAD, LOAD, DEPARTED_FROM_MUP, ARRIVED_AT_BAY, ULD_SECURE_STORE_IN, ULD_SECURE_STORE_OUT)or inbound-segment(DEPARTED_FROM_BAY, ARRIVED_AT_TRANSFER_LATERAL, ARRIVED_AT_RECLAIM_BELT, UNLOAD, ULD_UNLOAD, RECLAIM_BELT_INDUCTION, DELIVERED, PROBLEM_AREA_DISCHARGE, DEPARTED_FROM_PROBLEM_AREA), never fill both.
              enum:
                - BHS_INDUCTION
                - ATR
                - MES
                - BVS
                - EBS_IN
                - EBS_OUT
                - MUP_DISCHARGE
                - RECONCILED
                - CART_LOAD
                - LOAD
                - DEPARTED_FROM_MUP
                - ARRIVED_AT_BAY
                - ULD_SECURE_STORE_IN
                - ULD_SECURE_STORE_OUT
                - DEPARTED_FROM_BAY
                - ARRIVED_AT_TRANSFER_LATERAL
                - ARRIVED_AT_RECLAIM_BELT
                - UNLOAD
                - ULD_UNLOAD
                - RECLAIM_BELT_INDUCTION
                - DELIVERED
                - PROBLEM_AREA_DISCHARGE
                - DEPARTED_FROM_PROBLEM_AREA
            tracking-state:
              type: string
              description: State of tracking.
              enum:
                - SUCCESS
                - NO_READ
                - TRACKING_LOST
                - MULTIPLE_READ
                - NO_BSM
                - SEND_TO_PROBLEM
            inbound-segment:
              $ref: "#/components/schemas/BagEventSegment"
            outbound-segment:
              $ref: "#/components/schemas/BagEventSegment"
            transport-state:
              type: string
              description: State of transport within BHS.
    ContainerizationActivity:
      type: object
      properties:
        location-type:
          type: string
          description: Type of location.
          enum:
            - SEGMENT
            - OUTBOUND
            - INBOUND
        timestamp:
          type: string
          description: Timestamp in UTC.
          format: date-time
        location:
          type: string
          description: Location.
        container-tag:
          type: string
          description: Container tag.
          example: A12345678
        container-activity:
          type: string
          description: Container activity.
          enum:
            - LOAD
            - OFFLOAD
            - REMOVE
            - MERGE
        container-type:
          type: string
          description: Container type like ULD/dolly/aircraft. The activity is dependent to this type.
          example: ULD
      description: BagActivity for Containerization.
    FlightSegmentBagTag:
      type: object
      properties:
        meta:
          $ref: "#/components/schemas/ObjectMeta"
        bag-tag-id:
          type: string
          description: Unique id of the bag tag in the data hub for an unlimited period of time.
          example: ABCD-1234
        merged-bag-tag-id:
          uniqueItems: true
          type: array
          description: Unique ids of bag tags that have ended their live cycle and are merged into this one.
          items:
            type: string
            description: Unique ids of bag tags that have ended their live cycle and are merged into this one.
        tag:
          type: string
          description: Tag number of the bag tag. Latest tag number in case of re-tagging.
          example: B12345678
        secondary-identifiers:
          uniqueItems: true
          type: array
          description: Additionally identifiers for the bag tag used by BHS etc.
          items:
            $ref: "#/components/schemas/BagTagIdentifier"
        bag-type:
          type: string
          description: Bag type identifier.
        passenger:
          $ref: "#/components/schemas/Passenger"
        bag-segment:
          $ref: "#/components/schemas/BagSegment"
        previous-segment:
          $ref: "#/components/schemas/BagFlightSegment"
        next-segment:
          $ref: "#/components/schemas/BagFlightSegment"
      description: Object holding a the state of a bag represented by bag tag assigned to a flight segment.
    FlightSegmentIdentifier:
      required:
        - carrier
        - destination-iata-code
        - flight-number
        - identifier-string
        - origin-date
        - origin-iata-code
      type: object
      properties:
        carrier:
          type: string
          description: 2-digit IATA code of operating carrier.
          example: ZZ
        flight-number:
          type: string
          description: The flight number of the operating carrier. Should contain not more than 4 chars and must not include whitespaces
          example: "997"
        operational-suffix:
          type: string
          description: Used to distinguish two flights having the same flight number and departing from their respective origin stations on the same date.
          example: B
        origin-date:
          type: string
          description: UTC scheduled date of departure of the first leg of the flight. Must be between 2010-01-01 and 2210-01-01.
          format: date
        origin-iata-code:
          type: string
          description: 3-digit IATA code of origin airport.
          example: AAA
        destination-iata-code:
          type: string
          description: 3-digit IATA code of destination airport.
          example: ZZZ
        identifier-string:
          type: string
          description: Automatically generated unique flight ID using format CARRIERFLIGHTNUMBER-DATE-ORIGIN-DESTINATION.
      description: Object holding identifying information for a flight segment.
    LoadIntoUldActivity:
      type: object
      properties:
        location-type:
          type: string
          description: Type of location.
          enum:
            - SEGMENT
            - OUTBOUND
            - INBOUND
        timestamp:
          type: string
          description: Timestamp in UTC.
          format: date-time
        location:
          type: string
          description: Location.
        uld-tag:
          type: string
          description: ULD tag . Deprecated - use containerTag instead.
        container-tag:
          type: string
          description: Container tag.
          example: A12345678
        container-type:
          type: string
          description: Container type like ULD/dolly/aircraft. The activity is dependent to this type.
          example: ULD
        container-activity:
          type: string
          description: Container activity.
          enum:
            - LOAD
            - OFFLOAD
            - REMOVE
            - MERGE
      description: BagActivity for ULD load/unload.
    ObjectMeta:
      type: object
      properties:
        created-at:
          type: string
          description: Timestamp when object was first created in DH.
          format: date-time
          readOnly: true
        created-by:
          $ref: "#/components/schemas/User"
        created-event-type:
          type: string
          description: Event-type of event which caused the object to be created.
          readOnly: true
        created-event-time:
          type: string
          description: Event-time of event which caused the object to be created.
          format: date-time
          readOnly: true
        modified-count:
          type: integer
          description: Number of modifications in DH.
          format: int64
          readOnly: true
        modified-at:
          type: string
          description: Timestamp of last modification in DH.
          format: date-time
          readOnly: true
        modified-by:
          $ref: "#/components/schemas/User"
        modified-event-type:
          type: string
          description: Event-type of event which caused the object to be modified.
          readOnly: true
        modified-event-time:
          type: string
          description: Event-time of event which caused the object to be modified.
          format: date-time
          readOnly: true
      description: Metadata of DH objects.
      readOnly: true
    Passenger:
      required:
        - name
      type: object
      properties:
        pnr:
          type: string
          description: Unique passenger number.
        name:
          type: string
          description: Passenger name.
          example: Smith
        first-name:
          type: string
          description: Passenger first name.
          example: John
        gender:
          type: string
          description: Passenger gender.
          example: male
        title:
          type: string
          description: Passenger title.
          example: Mr.
        phone:
          type: string
          description: Passenger contact phone number.
          example: 001 123 456 789
        email:
          type: string
          description: Passenger contact email adress.
          example: passenger@test.com
        id:
          type: string
          description: Unique id of the passenger in the data hub for an unlimited period of time.
          example: ABCD-1234
        secondary-identifiers:
          uniqueItems: true
          type: array
          description: Additionally identifiers for the passenger used by airports etc.
          items:
            $ref: "#/components/schemas/SecondaryIdentifier"
      description: Passenger attributes for bag tag.
    ScreeningActivity:
      type: object
      properties:
        location-type:
          type: string
          description: Type of location.
          enum:
            - SEGMENT
            - OUTBOUND
            - INBOUND
        timestamp:
          type: string
          description: Timestamp in UTC.
          format: date-time
        location:
          type: string
          description: Location.
        level:
          type: integer
          description: Screening level.
          format: int32
        cleared:
          type: boolean
          description: Cleared.
      description: BagActivity for screening.
    SecondaryIdentifier:
      required:
        - created
        - identifier
        - source
      type: object
      properties:
        identifier:
          type: string
          description: Secondary identifier .
        created:
          type: string
          description: Timestamp of creation of secondary identifier in UTC.
          format: date-time
        source:
          type: string
          description: Source creating the secondary identifier.
      description: Additional identifiers for flight legs or segments used by airport systems etc.
    User:
      type: object
      properties:
        user-id:
          type: string
          description: Unique user id.
          readOnly: true
        user-name:
          type: string
          description: Readable user name
          readOnly: true
      description: Metadata of DH objects.
      readOnly: true
