{
  "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/schema.json"
    },
    "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/schema.json"
    },
    "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
    }
  },
  "$id": "https://schema.nfh.global/Hub/v2.0",
  "x-iri": "https://schema.nfh.global/Hub/v2.0",
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
