openapi: 3.1.0 info: title: Leg version: 2.0.0 description: Schema definition for the Leg 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: Leg: type: object title: Leg description: A single uninterrupted segment of a journey made using one transport mode or service between two consecutive locations. x-tags: - mobility - schema-org - ride-hailing properties: mode: description: Mode of fulfillment $ref: https://schema.beckn.io/FulfillmentMode/v2.0/attributes.yaml#/components/schemas/FulfillmentMode origin: description: Start location of the leg $ref: https://schema.beckn.io/Location/v2.0/attributes.yaml#/components/schemas/Location destination: description: End location of the leg $ref: https://schema.beckn.io/Location/v2.0/attributes.yaml#/components/schemas/Location startTime: description: Scheduled or actual start time of the leg type: string format: date-time endTime: description: Scheduled or actual end time of the leg type: string format: date-time distance: description: Distance of this leg in metres type: number headsign: description: Destination sign text displayed on the vehicle type: string routeRef: description: Reference to the route served on this leg $ref: https://schema.beckn.io/Route/v2.0/attributes.yaml#/components/schemas/Route id: description: Unique identifier for the fulfillment type: string type: description: Type of fulfillment (extensible term) type: string agent: description: The entity responsible for performing the fulfillment $ref: https://schema.beckn.io/FulfillmentAgent/v2.0/attributes.yaml#/components/schemas/FulfillmentAgent state: description: Current state of the fulfillment $ref: https://schema.beckn.io/State/v2.0/attributes.yaml#/components/schemas/State participants: description: Participants entitled to receive this fulfillment $ref: https://schema.beckn.io/Participant/v2.0/attributes.yaml#/components/schemas/Participant stages: description: Stages in the fulfillment lifecycle $ref: https://schema.beckn.io/FulfillmentStage/v2.0/attributes.yaml#/components/schemas/FulfillmentStage instructions: description: Instructions for fulfillment $ref: https://schema.beckn.io/core/v2.0/Descriptor/attributes.yaml#components/schemas/Descriptor additionalProperties: false