openapi: 3.1.0
info:
  title: MonitoredCall
  version: 2.0.0
  description: Schema definition for the MonitoredCall entity in the Beckn Mobility
  license:
    name: CC-BY-NC-SA 4.0 International
    url: https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en
  contact:
    name: Beckn Labs
    url: https://beckn.io
components:
  schemas:
    MonitoredCall:
      x-iri: https://schema.nfh.global/MonitoredCall/v2.0
      type: object
      title: MonitoredCall
      description: A real-time arrival or departure prediction for a specific vehicle
        at a specific stop within a monitored journey.
      x-tags:
        - mobility
        - ride-hailing
      properties:
        stopPointRef:
          description: Reference to the stop point for this call
          $ref: https://schema.nfh.global/StopPoint/v2.0/attributes.yaml#/components/schemas/StopPoint
        visitNumber:
          description: Visit sequence number for loop services
          type: number
        vehicleAtStop:
          description: Whether the vehicle is currently at the stop
          type: boolean
        expectedArrivalTime:
          description: Predicted arrival time at this stop
          type: string
          format: date-time
        expectedDepartureTime:
          description: Predicted departure time from this stop
          type: string
          format: date-time
        aimedArrivalTime:
          description: Scheduled arrival time from the timetable
          type: string
          format: date-time
        aimedDepartureTime:
          description: Scheduled departure time from the timetable
          type: string
          format: date-time
        arrivalStatus:
          description: Arrival status (e.g. onTime, delayed, early)
          type: string
        departureStatus:
          description: Departure status (e.g. onTime, delayed, early)
          type: string
        id:
          description: Unique identifier for the tracking record
          type: string
        url:
          description: URL endpoint for real-time tracking information
          type: string
          format: uri
        status:
          description: Current tracking status
          $ref: https://schema.nfh.global/State/v2.0/attributes.yaml#/components/schemas/State
        validity:
          description: Validity period for this tracking record
          $ref: https://schema.nfh.global/TimePeriod/v2.0/attributes.yaml#/components/schemas/TimePeriod
      additionalProperties: false
