openapi: 3.1.1
info:
  title: Driver
  version: 2.0.0
  description: Schema definition for the Driver entity in the Beckn Logistics domain.
  license:
    name: CC-BY-NC-SA 4.0 International
  contact:
    name: Beckn Labs
    url: https://beckn.io
components:
  schemas:
    LogisticsDriver:
      x-iri: https://schema.nfh.global/LogisticsDriver/v2.0
      type: object
      title: Driver
      description: 'A Driver is an individual who operates a vehicle for logistics delivery. Drivers are assigned to shipments and responsible for physical transport. Maps to beckn:Agent.

        '
      required:
      - id
      - name
      - licenseNumber
      properties:
        id:
          type: string
          description: Unique driver identifier
          example: DRV-00456
        name:
          type: string
          description: Full name of the driver
          example: Suresh Patil
        phone:
          type: string
          example: '+919845001234'
        email:
          type: string
          format: email
        profilePhoto:
          type: string
          format: uri
        licenseNumber:
          type: string
          description: Driving license number
          example: MH1420210012345
        licenseExpiry:
          type: string
          format: date
          description: License expiry date
        rating:
          type: number
          minimum: 1
          maximum: 5
          example: 4.5
        currentLocation:
          type: object
          description: Real-time GPS location
          properties:
            lat:
              type: number
              example: 12.9716
            lng:
              type: number
              example: 77.5946
            updatedAt:
              type: string
              format: date-time
        status:
          type: string
          enum:
          - AVAILABLE
          - ASSIGNED
          - ON_ROUTE
          - OFFLINE
          example: ON_ROUTE
        vehicle:
          $ref: https://schema.nfh.global/Vehicle/v2.0/attributes.yaml#/components/schemas/Vehicle
        experienceYears:
          type: integer
          description: Years of driving experience
          example: 5
        backgroundVerified:
          type: boolean
          description: Whether background verification is complete
          example: true
        languagesSpoken:
          type: array
          items:
            type: string
          example:
          - Hindi
          - Kannada
        operatingZones:
          type: array
          description: Geographic zones the driver operates in
          items:
            type: string
          example:
          - Bangalore North
          - Bangalore East
