openapi: 3.0.1
info:
  title: Track & Trace Callback
  version: '3.1.3'
servers:
  - url: https://<url-specified-by-consumer>/v1
tags:
  - name: Tracking
  - name: Predictions
  - name: Train Plans
  - name: Subscription Notification
paths:
  /subscription-message:
    post:
      tags:
        - Subscription Notification
      summary: posts messages to an existing subscription of the consumer.
      description: Posts messages to an existing subscription of the consumer. E.g. consumer is called if the subscription needs to be confirmed again or if it leads to no messages.
      operationId: postSubscriptionMessage
      requestBody:
        description: Subscription messages being delivered to consumer
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SubscriptionMessage"
        required: true
      responses:
        200:
          description: Successfully delivered, but some messages may not have been processed (see body).
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Response'
  /train-events:
    patch:
      tags:
        - Tracking
      summary: Transmit a list of messages about new, changed, or deleted train tracking events
      description: Transmits a list of messages about new, changed, or deleted train tracking events.
      operationId: patchTrainEvents
      requestBody:
        description: Train tracking event being delivered to consumer
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/TrainTrackingPatchMessage'
        required: true
      responses:
        200:
          description: Successfully delivered, but some messages may not have been processed (see body).
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Response'
  /train-predictions:
    patch:
      tags:
        - Predictions
      summary: Transmit a list of messages about new, changed, or deleted train predictions
      description: Transmits a list of messages about new, changed, or deleted train predictions.
      operationId: patchTrainPredictions
      requestBody:
        description: Train predictions being delivered to consumer
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/TrainPredictionPatchMessage'
        required: true
      responses:
        200:
          description: Successfully delivered, but some messages may not have been processed (see body).
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Response'
  /train-plans:
    patch:
      tags:
        - Train Plans
      summary: Transmit a list of messages about new, changed, or deleted train plans
      description: Transmits a list of messages about new, changed, or deleted train plans.
      operationId: patchTrainPlan
      requestBody:
        description: Train Plan being delivered to consumer
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/TrainPlanPatchMessage'
        required: true
      responses:
        200:
          description: Successfully delivered, but some messages may not have been processed (see body).
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Response'
  /wagon-events:
    patch:
      tags:
        - Tracking
      summary: Transmit a list of messages about new, changed, or deleted wagon tracking events
      description: Transmits list of messages about new, changed, or deleted wagon tracking events.
      operationId: patchWagonEvents
      requestBody:
        description: Wagon tracking event being delivered to consumer
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/WagonTrackingPatchMessage'
        required: true
      responses:
        200:
          description: Successfully delivered, but some messages may not have been processed (see body).
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Response'
  /wagon-predictions:
    patch:
      tags:
        - Predictions
      summary: Transmit a list of messages about new, changed, or deleted wagon predictions
      description: Transmits a list of messages about new, changed, or deleted wagon predictions.
      operationId: patchWagonPredictions
      requestBody:
        description: Wagon predictions being delivered to consumer
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/WagonPredictionPatchMessage'
        required: true
      responses:
        200:
          description: Successfully delivered, but some messages may not have been processed (see body).
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Response'
  /loading-unit-events:
    patch:
      tags:
        - Tracking
      summary: Transmit a list of messages about new, changed, or deleted loading unit tracking events
      description: Transmits list of messages about new, changed, or deleted loading unit tracking events.
      operationId: patchLoadingUnitEvents
      requestBody:
        description: Loading unit tracking events being delivered to consumer
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/LoadingUnitTrackingPatchMessage'
        required: true
      responses:
        200:
          description: Successfully delivered, but some messages may not have been processed (see body).
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Response'
components:
  schemas:
    TrainTrackingPatchMessage:
      required:
        - op
        - path
        - value
      type: object
      properties:
        subscriptionId:
          type: integer
          format: int64
          description: id of the subscription
        op:
          type: string
          enum:
            - add
            - remove
            - replace
        path:
          type: integer
          format: int64
          example: 5498484
        value:
          $ref: '#/components/schemas/TrainTrackingMessage'
    TrainPredictionPatchMessage:
      required:
        - op
        - path
        - value
      type: object
      properties:
        subscriptionId:
          type: integer
          format: int64
          description: id of the subscription
        op:
          type: string
          enum:
            - "add"
            - "remove"
            - "replace"
        path:
          type: integer
          format: int64
          example: 5498484
        value:
          $ref: '#/components/schemas/TrainPredictionMessage'
    WagonPredictionPatchMessage:
      required:
        - op
        - path
        - value
      type: object
      properties:
        subscriptionId:
          type: integer
          format: int64
          description: id of the subscription
        op:
          type: string
          enum:
            - "add"
            - "remove"
            - "replace"
        path:
          type: integer
          format: int64
          example: 5498484
        value:
          $ref: '#/components/schemas/WagonPredictionMessage'
    WagonTrackingPatchMessage:
      required:
        - op
        - path
        - value
      type: object
      properties:
        subscriptionId:
          type: integer
          format: int64
          description: id of the subscription
        op:
          type: string
          enum:
            - add
            - remove
            - replace
        path:
          type: integer
          format: int64
          example: 5498484
        value:
          $ref: '#/components/schemas/WagonTrackingMessage'
    LoadingUnitTrackingPatchMessage:
      required:
        - op
        - path
        - value
      type: object
      properties:
        subscriptionId:
          type: integer
          format: int64
          description: id of the subscription
        op:
          type: string
          enum:
            - add
            - remove
            - replace
        path:
          type: integer
          format: int64
          example: 5498484
        value:
          $ref: '#/components/schemas/LoadingUnitTrackingMessage'
    TrainPlanPatchMessage:
      required:
        - op
        - path
        - value
      type: object
      properties:
        subscriptionId:
          type: integer
          format: int64
          description: id of the subscription
        op:
          type: string
          enum:
            - "add"
            - "remove"
            - "replace"
        path:
          type: integer
          format: int64
          example: 5498484
        value:
          $ref: '#/components/schemas/TrainPlanMessage'
    Response:
      required:
        - acknowledged
      type: object
      properties:
        acknowledged:
          type: boolean
          description: Whether the according message was processed successfully by the consumer.
        message:
          type: string
          description: Optional message by the consumer giving information about the processing of a message, in particular in case of errors.
    TrainTrackingMessage:
      type: object
      properties:
        train:
          $ref: '#/components/schemas/InternationalTrainIdentifier'
        trainChain:
          $ref: '#/components/schemas/TrainChainIdentifier'
        trainStatus:
          type: string
          description: |
            Current status of the train
              * BeforeStart - Train has not departed its initial location yet
              * Started - Train is currently travelling
              * Stabled - Train is currently stabled
              * Arrived - Train has arrived at its final destination
          example: Started
          enum:
            - BeforeStart
            - Started
            - Stabled
            - Arrived
        movedFrom:
          type: object
          properties:
            train:
              $ref: '#/components/schemas/InternationalTrainIdentifierWithoutNationalTrains'
            eventId:
              type: integer
              format: int64
              example: 5498484
        movedTo:
          type: object
          properties:
            train:
              $ref: '#/components/schemas/InternationalTrainIdentifierWithoutNationalTrains'
            eventId:
              type: integer
              format: int64
              example: 5498484
        orderReferences:
          $ref: '#/components/schemas/OrderReferences'
        event:
          $ref: '#/components/schemas/TrackingEvent'
    TrainPredictionMessage:
      type: object
      properties:
        train:
          $ref: '#/components/schemas/InternationalTrainIdentifier'
        trainChain:
          $ref: '#/components/schemas/TrainChainIdentifier'
        movedFrom:
          type: object
          properties:
            train:
              $ref: '#/components/schemas/InternationalTrainIdentifierWithoutNationalTrains'
            eventId:
              type: integer
              format: int64
              example: 5498484
        movedTo:
          type: object
          properties:
            train:
              $ref: '#/components/schemas/InternationalTrainIdentifierWithoutNationalTrains'
            eventId:
              type: integer
              format: int64
              example: 5498484
        orderReferences:
          $ref: '#/components/schemas/OrderReferences'
        prediction:
          $ref: '#/components/schemas/Prediction'
    WagonPredictionMessage:
      type: object
      properties:
        orderNumber:
          type: string
          description: Number of order(transportOrder/ZAB) for which the wagon is used
          example: "80201812104009305"
        wagonNumber:
          type: string
          description: Number of the wagon
          example: "218024624551"
        prediction:
          $ref: '#/components/schemas/Prediction'
    WagonTrackingMessage:
      type: object
      properties:
        wagonNumber:
          type: string
          example: "218024624551"
        orderReferences:
          $ref: '#/components/schemas/OrderReferences'
        wagonReferences:
          type: array
          items:
            type: string
        event:
          $ref: '#/components/schemas/TrackingEvent'
    LoadingUnitTrackingMessage:
      type: object
      properties:
        loadingUnit:
          $ref: '#/components/schemas/LoadingUnitIdentifier'
        event:
          $ref: '#/components/schemas/TrackingEvent'
    TrainPlanMessage:
      type: object
      properties:
        train:
          $ref: '#/components/schemas/InternationalTrainIdentifier'
        trainPlan:
          $ref: '#/components/schemas/TrainPlan'
    InternationalTrainIdentifierWithoutNationalTrains:
      type: object
      properties:
        trainId:
          type: string
          description: Train ID; internationally unique identifier of a train according to TAF TSI
          example: "TR2180-------47111012019"
        startDate:
          type: string
          description: Start date, i.e., date of first departure in first country
          format: date
          example: "2019-02-08"
        wagonNumber:
          type: string
          description: Wagon number identifying a train chain member (only used for intermodal tracking subscriptions)
          example: "365743326"
    TrainChainIdentifier:
      type: object
      properties:
        trainChainId:
          type: string
          description: Train Chain ID; Slightly modified version of the Train ID of the first train in the chain
          example: 'IT218048570-------002021'
        startDate:
          type: string
          description: Start date of the first (international) train in the train chain
          format: date
          example: "2019-02-08"
        trains:
          type: array
          description: Ordered list of identifiers of the international trains which are member of the train chain
          items:
            $ref: '#/components/schemas/InternationalTrainIdentifierWithoutNationalTrains'
    WagonInOrderIdentifier:
      type: object
      properties:
        orderNumber:
          type: string
          description: Number of order for which the wagon is used
          example: "80201812104009305"
        wagonNumber:
          type: string
          description: Number of the wagon
          example: "218024624551"
    LoadingUnitIdentifier:
      type: object
      properties:
        loadingUnitSign:
          type: string
          description: loading unit sign of the loading unit
          example: INHO
        loadingUnitNumber:
          type: string
          description: loading unit number of the loading unit
          example: "1071166"
        intermodalOrderNumber:
          type: string
          description: number of the LPK order for which the loading unit is used
          example: "56540268"
    SubscriptionMessage:
      type: object
      required:
        - subscriptionId
        - type
      properties:
        subscriptionId:
          type: integer
          format: int64
          description: ID of the subscription
        type:
          type: string
          enum: [CONFIRMATION_NEEDED, SUBSCRIPTION_ENDED, TRACKING_ADDED, TRACKING_REMOVED]
          description: >
            Type of status message:

             * `CONFIRMATION_NEEDED` - Confirmation needs to be sent until `confirmationNeededUntil` to prevent subscription from expiring
             * `SUBSCRIPTION_ENDED` - Subscription has been deleted due to expiration
             * `TRACKING_ADDED` - A new object is now being tracked (either `wagon` or `train` or `trainChain` or `loadingUnit`)
             * `TRACKING_REMOVED` - An object is no longer being tracked (either `wagon` or `train` or `trainChain` or `loadingUnit`)
        confirmationNeededUntil:
          type: string
          format: date-time
          example: "2018-12-12T09:37:42Z"
          description: Time until the subscriptions needs to be confirmed before it expires
        wagon:
          $ref: '#/components/schemas/WagonInOrderIdentifier'
        train:
          $ref: '#/components/schemas/InternationalTrainIdentifier'
        trainChain:
          $ref: '#/components/schemas/TrainChainIdentifier'
        loadingUnit:
          $ref: '#/components/schemas/LoadingUnitIdentifier'
    TrackingEvent:
      type: object
      required:
        - type
        - time
      properties:
        eventId:
          type: integer
          format: int64
          description: Technical ID of the event, used to refer to the event in updates or deletions
        referencedEventId:
          type: integer
          format: int64
          example: 5498484
          description: Event ID of Delay event that is enriched with details of this message
        type:
          type: string
          description: (Main) type of event
          enum:
            - "Departure"
            - "Arrival"
            - "PassThrough"
            - "LocationChange"
            - "Activation"
            - "Completion"
            - "ForcedCompletion"
            - "Parking"
            - "Handover"
            - "Takeover"
            - "PreNotification"
            - "Stabling"
            - "Continuation"
            - "Delay"
            - "DelayCauseDetails"
            - "DelayReason"
            - "Loading"
            - "Unloading"
            - "Shock"
            - "Remark"
            - "TransportStart"
            - "MajorDisruption"
            - "TrainFormation"
            - "WagonInspection"
            - "TractionUnitAttachment"
            - "PriorityChange"
        subtype:
          type: string
          description: Subtype of event; present in combination with some of the (main) types of event
          enum:
            - "Start"
            - "End"
            - "AtUnloadingPoint"
            - "Preparation"
            - "FromFacility"
            - "ToFacility"
            - "ToLoader"
            - "ToUnloader"
        time:
          type: string
          format: date-time
          description: Time of event
          example: "2018-12-12T09:37:42Z"
        source:
          type: string
          description: IT system that provided the event to the API
          example: "TRACE"
        corrected:
          type: boolean
          description: Whether the event time was corrected
          example: false
        reporter:
          type: string
          description: Identifier of organization that generated the event
          example: "80"
        location:
          $ref: "#/components/schemas/Location"
        geoLocation:
          $ref: "#/components/schemas/GeoLocation"
        currentTrain:
          $ref: "#/components/schemas/NationalTrainIdentifier"
        currentTransport:
          $ref: '#/components/schemas/InternationalTrainIdentifier'
        currentTripType:
          type: string
          description: Type of the current trip (train trip or shunting trip)
          example: "Train"
          enum:
            - "Train"
            - "Shunting"
        delay:
          $ref: "#/components/schemas/Delay"
        majorDisruption:
          $ref: '#/components/schemas/MajorDisruption'
        orderingPosition:
          type: integer
          description: Position of the wagon in the ordering of its current train
          example: 14
        orderNumber:
          type: string
          description: "Number of order for which the wagon is currently used"
          example: "80201812104009305"
        wagonNumber:
          type: string
          description: "Number of the current wagon (only for wagon events)"
          example: "218024624551"
        movementState:
          type: string
          description: >
            Indicates whether the wagon is moving, standing (for a short period of time)  or parking (for a longer period of time)

          enum:
            - "moving"
            - "standing"
            - "parking"
          example: "moving"
        handoverTakeover:
          $ref: "#/components/schemas/HandoverTakeover"
        remark:
          type: string
          maxLength: 4000
          description: Remark for a train for external users
          example: "Track occupied."
        creationTime:
          type: string
          format: date-time
          description: Time at which the event was created by the API
          example: "2018-12-12T09:37:42Z"
        priority:
          type: string
          description: Manually adjusted priority of a train.
          example: "AAA"
          minLength: 1
        shock:
          $ref: "#/components/schemas/Shock"
        stabling:
          $ref: "#/components/schemas/Stabling"
        continuation:
          $ref: "#/components/schemas/Continuation"
    Prediction:
      type: object
      required:
        - type
        - time
      properties:
        predictionId:
          type: integer
          format: int64
          description: Technical ID of the prediction, used to refer to the prediction in updates or deletions
        type:
          type: string
          description: Type of prediction
          enum:
            - "Arrival"
            - "Departure"
        time:
          type: string
          format: date-time
          description: Estimated time of prediction
          example: "2018-12-12T09:37:42Z"
        source:
          type: string
          description: IT system that provided the prediction to the API
          example: "ETA"
        location:
          $ref: "#/components/schemas/Location"
        currentTrain:
          $ref: "#/components/schemas/NationalTrainIdentifier"
        creationTime:
          type: string
          format: date-time
          description: Time at which the prediction was created by the API
          example: "2018-12-12T09:37:42Z"
        predictionQuality:
          type: number
          description: Confidence of the prediction (value between 0 and 1)
          example: 0.98
    TrainPlan:
      type: object
      required:
        - type
        - time
      properties:
        trainPlanId:
          type: integer
          format: int64
          description: Technical ID of the train plan, used to refer to the train plan in updates or deletions
        type:
          type: string
          description: Type of train plan
          enum:
            - "LatestTimeOfArrival"
            - "LatestTimeOfDeparture"
        time:
          type: string
          format: date-time
          description: Time of train plan
          example: "2018-12-12T09:37:42Z"
        source:
          type: string
          description: IT system that provided the train plan to the API
          example: "ETA"
        location:
          $ref: "#/components/schemas/Location"
        currentTrain:
          $ref: "#/components/schemas/NationalTrainIdentifier"
        creationTime:
          type: string
          format: date-time
          description: Time at which the train plan was created by the API
          example: "2018-12-12T09:37:42Z"
        scheduledTime:
          type: string
          format: date-time
          description: Scheduled time of event at the reported location
          example: "2018-12-12T09:37:42Z"
        reporter:
          type: string
          description: Identifier of organization that generated the train plan
          example: "2180"
    Location:
      type: object
      properties:
        name:
          type: string
          description: Name of location
          example: "Mannheim Rbf"
        country:
          type: string
          description: Country (ISO code)
          example: "DE"
        uicRailAuthorityCode:
          type: integer
          description: UIC code of rail authority
          example: 80
        networkLocationNumber:
          type: string
          description: Network location number (Netzbahnstellennummer)
          example: "33862"
        commercialLocationNumber:
          type: string
          description: Commercial location number (Bestimmungsstellennummer)
          example: "210922"
        tafTsiPrimaryLocationCode:
          type: string
          description: TAF TSI primary location code
          example: "16746"
        longitude:
          type: number
          description: Geographical longitude from master data
          example: 49.59643162
        latitude:
          type: number
          description: Geographical latitude from master data
          example: 8.51099044
        distanceFromReferencePoint:
          type: number
          description: DEPRECATED Distance of actual location from named reference point (in kilometers)
          example: 0.14
        directionFromReferencePoint:
          type: string
          description: DEPRECATED Direction of actual location from named reference point
          example: "NW"
        precision:
          type: integer
          description: DEPRECATED Precision of actual location (in meters)
          example: 30
        objectKeyA:
          type: string
          description: SD-LSO object key A; uniquely identifies the location in combination with objectKeySE
          example: "MANNHEIM RBF W/O"
        objectKeySE:
          type: integer
          description: SD-LSO object key SE; uniquely identifies the location in combination with objectKeyA
          example: 1
        rl100:
          type: string
          description: Schedule code defined by DB Netz
          example: SSR
        freightCarLocation:
          type: object
          properties:
            name:
              type: string
              description: Name of freight car location
              example: "Einfahrgruppe RMR K"
            objectKeyA:
              type: string
              description: SD-LSO object key A of the freight car location within the overall location; only filled when the location is a freight car location; uniquely identifies the freight car location in combination with objectKeySEOfFreightCarLocation
              example: "140137.0000"
            objectKeySE:
              type: integer
              description: SD-LSO object key SE of the freight car location within the overall location; only filled when the location is a freight car location; uniquely identifies the freight car location in combination with objectKeyAOfFreightCarLocation
              example: 2
    GeoLocation:
      type: object
      properties:
        longitude:
          type: number
          description: Precise geographical longitude of the wagon
          example: 49.59643162
        latitude:
          type: number
          description: Precise geographical latitude of the wagon
          example: 8.51099044
        distanceFromReferencePoint:
          type: number
          description: Distance of actual location from named reference point (in kilometers)
          example: 0.14
        directionFromReferencePoint:
          type: string
          description: Direction of actual location from named reference point
          example: "NW"
        precision:
          type: integer
          description: Precision of actual location (in meters)
          example: 30
        geofenceName:
          type: string
          description: Name of the assigned geofence
          example: "MANNHEIM RBF W/O"
    Shock:
      type: object
      required:
        - timestampMeasure
        - shockDuration
        - xaxis
        - xaxisTriggered
        - yaxis
        - yaxisTriggered
        - zaxis
        - zaxisTriggered
      properties:
        timestampMeasure:
          type: string
          format: date-time
          description: Time of shock detection
          example: "2018-12-12T09:37:42Z"
        shockDuration:
          type: integer
          description: duration of shock in ms
          example: 150
        xaxis:
          type: number
          description: maximum acceleration in x-direction during shock in units of milli g (g=9.81m/s^2)
          example: 200
        xaxisTriggered:
          type: boolean
          description: indicates if shock-detection was triggered in x-direction
          example: false
        yaxis:
          type: number
          description: maximum acceleration in y-direction during shock in units of milli g (g=9.81m/s^2)
          example: 200
        yaxisTriggered:
          type: boolean
          description: indicates if shock-detection was triggered in y-direction
          example: false
        zaxis:
          type: number
          description: maximum acceleration in z-direction during shock in units of milli g (g=9.81m/s^2)
          example: -2200
        zaxisTriggered:
          type: boolean
          description: indicates if shock-detection was triggered in z-direction
          example: true
    InternationalTrainIdentifier:
      type: object
      properties:
        trainId:
          type: string
          description: Train ID; internationally unique identifier of a train according to TAF TSI
          example: "TR2180-------47111012019"
        trainIdDate:
          type: string
          format: date
          description: Start date generated by TIS based on which national train arrives in TIS first; this field is part of the business key together with trainId
          example: "2019-02-08"
        startDate:
          type: string
          format: date
          description: Start date, i.e., date of first departure in first country
          example: "2019-02-08"
        nationalTrains:
          type: array
          description: Identifiers of the national sections of the international train
          items:
            $ref: "#/components/schemas/NationalTrainIdentifier"
    NationalTrainIdentifier:
      type: object
      properties:
        country:
          type: string
          description: Country of the train (ISO code)
          example: "DE"
        trainNumber:
          type: string
          description: National train number
          example: "47111"
        productionDate:
          type: string
          format: date
          description: National production date, i.e., date of first departure in the given country
          example: "2019-02-08"
        trainTypeMainNumber:
          type: string
          description: Train type main number ("Zuggattungshauptnummer")
          example: "55"
        trainTypeSubNumber:
          type: string
          description: Train type sub number ("Zuggattungsunternummer")
          example: "1"
    HandoverTakeover:
      type: object
      properties:
        consigningRU:
          type: string
          description: "Code of railway undertaking handing over a train"
          example: "2180"
        acceptingRU:
          type: string
          description: "Code of railway undertaking taking over a train"
          example: "0054"
    Delay:
      type: object
      properties:
        delta:
          type: integer
          description: Current absolute delay (in minutes) compared to schedule
          example: 15
        additionalDelay:
          type: integer
          description: Additional delay in minutes at this location that can be assigned to the reason of given delay code (Zusatzverspaetung)
          example: 5
        type:
          type: string
          description: Type Of Delay
          example: "Arrival"
          enum:
            - "Arrival"
            - "Departure"
            - "PassThrough"
        networkDelayCode:
          type: integer
          description: Code of reason for delay according to Ril 420.9001 (Netzcode)
          example: 28
        expectedNetworkDelayCode:
          type: integer
          description: Network delay code that ist expected with given DB Cargo delay code. May vary from actual network delay code reported by infrastructure company
          example: 56
        networkDelay:
          type: string
          description: Plain text reason for delay (in German) according to Netword Delay Code master data
          example: "Oberleitungsstoerung"
        dbCargoDelayCode:
          type: integer
          description: Code of detailed reason for delay (Feincode)
          example: 1302
        dbCargoDelay:
          type: string
          description: Plain text reason for delay (in German) according to DB Cargo Delay Code master data
          example: "besetzte Gleise im Kundenanschluss"
        dbCargoDelayText:
          type: string
          description: Additional reasoning given by a dispatcher in plain text format.
        dbCargoKnockOnDelay:
          type: string
          description: Plain text reason for knock-on delay (in German).
          example: "Problem an Ladeeinheit"
        scheduledTime:
          type: string
          format: date-time
          description: Scheduled time of arrival, departure or pass through (see type) at the reported location
          example: "2018-12-12T09:37:42Z"
        recordingTime:
          type: string
          format: date-time
          description: Time at which the infrastructure company has informed DB Cargo of NetworkDelayCode (Lieferzeitpunkt)
          example: "2018-12-12T10:37:42Z"
        delayCausingNationalTrainNumber:
          description: OTN of another train responsible for this delay (for example due to slow train ahead)
          type: string
          example: "47111"
        occurrence:
          type: string
          description: Did the delay occur on the start location of a train or during train run (Anfangs- oder Unterwegsverspaetung)
          example: "StartDelay"
          enum:
            - "StartDelay"
            - "RunningDelay"
        delayCausingWagons:
          type: array
          description: Numbers of the wagons responsible for this delay (for example due to damage)
          items:
            type: string
        delayCausingLocomotives:
          type: array
          description: Numbers of the locomotives responsible for this delay (for example due to damage)
          items:
            type: string
        status:
          type: string
          description: Current status of the delay data set. 1. *EiuIndicated* dmeans that the delay was caused by the infrastructure manager and cannot be edited by DBCargo. 2. *Minor* indicates that the delay minutes are below a certain threshold and thus were coded automatically. 3. *Unedited* means that no DB Cargo user has yet added any further data to the delay. 4. *Edited* indicates that a user has added information to the delay but it has not yet be confirmed by an authorized user. 5. *Confirmed* means that information was edited and the information was confirmed by an authorized user
          example: "Confirmed"
          enum:
            - "EiuIndicated"
            - "Minor"
            - "Unedited"
            - "Edited"
            - "Confirmed"
        reactivated:
          type: boolean
          description: true if this dataset has been deleted and reactivated. Null or false if not
        approvalTimestamp:
          type: string
          format: date-time
          description: Timestamp of approval of the manual entries
          example: "2018-12-12T09:50:42Z"
        currentResponsibility:
          type: string
          description: Current responsibility for revision of this data set
          example: "ShortDistance"
          enum:
            - "ShortDistance"
            - "LongDistance"
            - "CooperationPartner"
        responsibilityTransfers:
          type: array
          description: Responsibility can be transferred. Each transfer generates an entry here.
          items:
            $ref: '#/components/schemas/ResponsibilityTransfers'
    ResponsibilityTransfers:
      type: object
      required:
        - transferFrom
        - transferTo
        - transferTime
      properties:
        transferFrom:
          type: string
          description: Responsibility before transfer
          example: ShortDistance
          enum:
            - "ShortDistance"
            - "LongDistance"
            - "CooperationPartner"
        transferTo:
          type: string
          description: Responsibility after transfer
          example: "LongDistance"
          enum:
            - "ShortDistance"
            - "LongDistance"
            - "CooperationPartner"
        transferTime:
          type: string
          format: date-time
          description: Timestamp of the transfer
          example: "2018-12-12T09:01:42Z"
    MajorDisruption:
      type: object
      properties:
        name:
          type: string
          description: Concise name of the major disruption
          example: "Signalstörung"
        description:
          type: string
          description: A more detailed description of the major disruption
          example: 'Großschaden- Streckensperrung'
        commencementTime:
          type: string
          format: date-time
          description: Point in time when the major disruption commenced
          example: "2018-05-19T21:05:53Z"
        endTime:
          type: string
          format: date-time
          description: Point in the when the major disruption ended or is expected to end
          example: "2018-05-21T15:17:22Z"
    OrderReferences:
      type: object
      properties:
        senderReference:
          type: string
    Stabling:
      type: object
      properties:
        kuna:
          type: string
          format: date-time
          description: Latest KUNA of the transport. Time that was communicated to a customer.
          example: '2022-07-20T00:00:00'
        editingTeam:
          type: string
          description: Name of the team that last modified the stabling
          example: 'Team West'
        stablingStage:
          type: string
          example: WAITING_FOR_TRACTION
          description: State of transport
          enum:
            - WAITING_FOR_TRACTION
            - BACK_TO_PLANNING_TEAM
            - STABLED
        stablingReason:
          type: string
          description: German description of the masterdata entry of the current reason for Stabling
          example: 'Dienstruhe'
        responsibleTeam:
          type: string
          description: 'name of the team that is currently responsible for the stabling'
          example: 'Team West'
        spotTrain:
          type: boolean
          description: 'German: Sonderzug. Determined by the train type or manually entered for the stabling by a user'
          example: true
        goodsOfTransport:
          type: string
          description: 'description of the content of the transport during the stabling'
          example: Aceton
        tractionUnitOnTrain:
          type: boolean
          description: 'Indicates if there is currently a loco on the train'
          example: true
        tractionUnitType:
          type: string
          enum:
            - E
            - V
            - D
          description: 'Type of loco required or currently on the train. It is either an electric (E), combustion (V) or dual (D)loco'
          example: 'E'
        dangerousGood:
          type: boolean
          description: 'Indicates if there is dangerous good on the  during stabling'
          example: true
        bza:
          type: boolean
          example: false
        dangerOfTheft:
          type: boolean
          description: 'Indicates if the content of the transport is a danger for theft'
          example: true
        connectionToWaterCarriage:
          type: boolean
          example: false
        axles:
          type: integer
          minimum: 0
          example: 4
        track:
          type: string
          maxLength: 12
          example: '10'
        stablingLength:
          type: integer
          minimum: 0
          example: 120
        weight:
          type: integer
          minimum: 0
          example: 999
        plannedDeparture:
          type: string
          format: date-time
          example: '2019-08-24T14:48:22Z'
        serviceSchemeId:
          type: string
          description: ID of the service scheme assigned to the transport if available
          example: 'Desa'
        plannedContinuation:
          type: string
          format: date-time
          example: '2021-01-30T08:30:00Z'
        utilisationOfSimilarOrDifferentTrainPaths:
          description: 'Indicates if the process "Durchschieben/Verschieben" could be used for this transport'
          type: boolean
          example: false
        plannedContinuationNationalTrain:
          $ref: "#/components/schemas/NationalTrainIdentifier"
        plannedContinuationTrain:
          $ref: "#/components/schemas/InternationalTrainIdentifier"
    Continuation:
      type: object
      properties:
        splitUpTrain:
          description: 'Indicate a train is split-up'
          type: boolean
          example: false
        stabledNationalTrain:
          $ref: "#/components/schemas/NationalTrainIdentifier"
        stabledTrain:
          $ref: "#/components/schemas/InternationalTrainIdentifier"
