openapi: 3.1.0
info:
  title: Interchange
  version: 2.0.0
  description: Schema definition for the Interchange 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:
    Interchange:
      x-iri: https://schema.nfh.global/Interchange/v2.0
      type: object
      title: Interchange
      description: A planned transfer connection point where passengers switch between
        two or more transport services, with defined timing constraints.
      x-tags:
        - mobility
        - ride-hailing
      properties:
        minTransferTime:
          description: Minimum required transfer time in seconds
          type: number
        transferType:
          description: Type of interchange (e.g. TIMED, GUARANTEED, IN_SEAT)
          type: string
        fromStopId:
          description: The stop passengers transfer from
          $ref: https://schema.nfh.global/Stop/v2.0/attributes.yaml#/components/schemas/Stop
        toStopId:
          description: The stop passengers transfer to
          $ref: https://schema.nfh.global/Stop/v2.0/attributes.yaml#/components/schemas/Stop
        fromTripId:
          description: The vehicle journey passengers transfer from
          $ref: https://schema.nfh.global/VehicleJourney/v2.0/attributes.yaml#/components/schemas/VehicleJourney
        toTripId:
          description: The vehicle journey passengers transfer to
          $ref: https://schema.nfh.global/VehicleJourney/v2.0/attributes.yaml#/components/schemas/VehicleJourney
        stopId:
          description: Unique identifier for the stop
          type: string
        stopCode:
          description: Short public-facing code for the stop
          type: string
        stopName:
          description: Human-readable name of the stop
          type: string
        locationType:
          description: Classification of location (0=stop, 1=station, 2=entrance,
            3=generic_node, 4=boarding_area)
          type: string
        parentStation:
          description: Reference to the parent station if this is a platform
          $ref: https://schema.nfh.global/Station/v2.0/attributes.yaml#/components/schemas/Station
        wheelchairBoarding:
          description: Wheelchair accessibility (0=no info, 1=accessible, 2=not accessible)
          type: string
      additionalProperties: false
