openapi: 3.1.0 info: title: Trip version: 2.0.0 description: Schema definition for the Trip 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: Trip: type: object title: Trip description: A confirmed and booked journey from an origin to a destination, representing a completed mobility service order. x-tags: - mobility - ride-hailing properties: tripId: description: Unique identifier for the trip type: string origin: description: Pickup location $ref: https://schema.beckn.io/Location/v2.0/attributes.yaml#/components/schemas/Location destination: description: Dropoff location $ref: https://schema.beckn.io/Location/v2.0/attributes.yaml#/components/schemas/Location startTime: description: Actual start time of the trip type: string format: date-time endTime: description: Actual end time of the trip type: string format: date-time distance: description: Total distance of the trip in kilometres type: number driverRef: description: Reference to the driver for this trip $ref: https://schema.beckn.io/Driver/v2.0/attributes.yaml#/components/schemas/Driver vehicleRef: description: Reference to the vehicle for this trip $ref: https://schema.beckn.io/Vehicle/v2.0/attributes.yaml#/components/schemas/Vehicle id: description: Unique identifier for the contract type: string descriptor: description: Human-readable description of the contract $ref: https://schema.beckn.io/core/v2.0/Descriptor/attributes.yaml#components/schemas/Descriptor items: description: Line items within the contract $ref: https://schema.beckn.io/ContractItem/v2.0/attributes.yaml#/components/schemas/ContractItem fulfillments: description: Fulfillments associated with this contract $ref: https://schema.beckn.io/Fulfillment/v2.1/attributes.yaml#/components/schemas/Fulfillment state: description: Current state of the contract $ref: https://schema.beckn.io/State/v2.0/attributes.yaml#/components/schemas/State additionalProperties: false