openapi: 3.1.0
info:
  title: TripUpdate
  version: 2.0.0
  description: Schema definition for the TripUpdate entity in the Beckn Mobility domain.
  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:
    TripUpdate:
      x-iri: https://schema.nfh.global/TripUpdate/v2.0
      type: object
      title: TripUpdate
      description: A multi-dimensional update to an in-progress or upcoming mobility
        trip, covering contract modifications (added/removed services, route changes),
        status notifications (driver arriving, trip started), and real-time tracking
        endpoint information.
      x-tags:
        - mobility
        - ride-hailing
      properties:
        contractChanges:
          description: Items added or modified in the trip contract (new stop, route
            change, add-on service)
          $ref: https://schema.nfh.global/ContractItem/v2.0/attributes.yaml#/components/schemas/ContractItem
        cancelledItems:
          description: Items removed from the original trip contract
          $ref: https://schema.nfh.global/ContractItem/v2.0/attributes.yaml#/components/schemas/ContractItem
        stateUpdate:
          description: Status notification for the traveler (e.g. driver arriving,
            trip started, trip ended, driver changed)
          $ref: https://schema.nfh.global/State/v2.0/attributes.yaml#/components/schemas/State
        trackingEndpoint:
          description: Real-time tracking endpoint including URL, protocol, and data
            schema reference
          $ref: https://schema.nfh.global/Tracking/v2.1/attributes.yaml#/components/schemas/Tracking
        driverRef:
          description: Reference to the current driver if changed from the originally
            assigned driver
          $ref: https://schema.nfh.global/Driver/v2.0/attributes.yaml#/components/schemas/Driver
        updatedAt:
          description: Timestamp when this trip update was issued
          type: string
          format: date-time
        id:
          description: Unique identifier for the trip update
          type: string
        descriptor:
          description: Human-readable description of the trip update
          $ref: https://schema.nfh.global/Descriptor/v2.0/attributes.yaml#/components/schemas/Descriptor
      additionalProperties: false
