openapi: 3.1.1
info:
  title: DeliverySlot
  version: 2.0.0
  description: Schema definition for the DeliverySlot 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:
    DeliverySlot:
      x-iri: https://schema.nfh.global/DeliverySlot/v2.0
      type: object
      title: DeliverySlot
      description: 'A DeliverySlot is a time window offered or agreed upon for delivery of a shipment. Maps to beckn:TimeSlot.

        '
      required:
      - id
      - date
      - startTime
      - endTime
      properties:
        id:
          type: string
          example: SLOT-2024-03-15-AM
        date:
          type: string
          format: date
          example: '2024-03-15'
        startTime:
          type: string
          example: '10:00'
        endTime:
          type: string
          example: '13:00'
        label:
          type: string
          description: Human-readable label
          enum:
          - EXPRESS_1HR
          - EXPRESS_2HR
          - MORNING
          - AFTERNOON
          - EVENING
          - FULL_DAY
          - NEXT_DAY
          example: MORNING
        available:
          type: boolean
          description: Whether this slot is still available
          example: true
        surcharge:
          type: object
          description: Additional charge for this slot (e.g. express slot)
          properties:
            amount:
              type: number
              example: 49
            currency:
              type: string
              example: INR
        capacity:
          type: integer
          description: Maximum deliveries in this slot
          example: 100
        remainingCapacity:
          type: integer
          example: 34
        cutoffTime:
          type: string
          format: date-time
          description: Last time to book this slot
          example: '2024-03-14T22:00:00+05:30'
