openapi: 3.1.1
info:
  title: Hub
  version: 2.0.0
  description: Schema definition for the Hub 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:
    Hub:
      x-iri: https://schema.nfh.global/Hub/v2.0
      type: object
      title: Hub
      description: 'A Hub is a logistics fulfillment center, sorting facility, or distribution point where goods are consolidated, sorted, and dispatched for onward delivery. Maps to beckn:Location.

        '
      required:
      - id
      - name
      - place
      properties:
        id:
          type: string
          example: HUB-BLR-MAIN
        name:
          type: string
          example: Bengaluru Main Sorting Hub
        code:
          type: string
          description: Short hub code
          example: BLR-MAIN
        place:
          $ref: https://schema.nfh.global/LogisticsPlace/v2.0/attributes.yaml#/components/schemas/LogisticsPlace
        type:
          type: string
          enum:
          - FULFILLMENT_CENTER
          - SORTING_HUB
          - COLLECTION_POINT
          - LAST_MILE_HUB
          - DARK_STORE
          - CUSTOMS_WAREHOUSE
          example: SORTING_HUB
        operator:
          $ref: https://schema.nfh.global/Operator/v2.0/attributes.yaml#/components/schemas/Operator
        operatingHours:
          type: object
          properties:
            open:
              type: string
              example: 06:00
            close:
              type: string
              example: '23:00'
            is24x7:
              type: boolean
              example: false
        processingCapacity:
          type: object
          description: Maximum packages processed per day
          properties:
            value:
              type: integer
              example: 50000
            unit:
              type: string
              example: packages/day
        serviceablePincodes:
          type: array
          description: PIN codes serviced from this hub
          items:
            type: string
          example:
          - '560001'
          - '560002'
          - '560068'
        facilities:
          type: array
          description: Facilities available at hub
          items:
            type: string
          example:
          - cold_storage
          - hazmat_storage
          - customer_service_desk
        contactPhone:
          type: string
          example: '+918028001234'
        active:
          type: boolean
          example: true
