{
  "$id": "https://schema.nfh.global/Item/v2.1",
  "x-iri": "https://schema.nfh.global/Item/v2.1",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Schema definition for Item in the Beckn Protocol v2.0.1",
  "title": "Item",
  "type": "object",
  "properties": {
    "availabilityWindow": {
      "description": "Time periods when the item is available",
      "type": "array",
      "items": {
        "$ref": "https://schema.nfh.global/TimePeriod/v2.1/schema.json"
      }
    },
    "availableAt": {
      "description": "Physical locations where the item is available",
      "type": "array",
      "items": {
        "$ref": "https://schema.nfh.global/Location/v2.0/schema.json"
      }
    },
    "category": {
      "$ref": "https://schema.nfh.global/CategoryCode/v2.1/schema.json"
    },
    "constraints": {
      "type": "array",
      "items": {
        "$ref": "https://schema.nfh.global/Constraint/v2.0/schema.json"
      }
    },
    "descriptor": {
      "$ref": "https://schema.nfh.global/Descriptor/v2.1/schema.json"
    },
    "id": {
      "description": "Unique identifier for the item",
      "type": "string",
      "example": "gaming-laptop-001"
    },
    "isActive": {
      "description": "Whether the item is active",
      "type": "boolean",
      "default": true
    },
    "itemAttributes": {
      "$ref": "https://schema.nfh.global/Attributes/v2.0/schema.json"
    },
    "networkId": {
      "description": "Array of network identifiers for the BAP (Beckn App Provider) that offers this item",
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "bap.net/electronics",
        "bap.net/tech"
      ]
    },
    "policies": {
      "type": "array",
      "items": {
        "$ref": "https://schema.nfh.global/Policy/v2.0/schema.json"
      }
    },
    "provider": {
      "$ref": "https://schema.nfh.global/Provider/v2.1/schema.json"
    },
    "rateable": {
      "description": "Whether the item can be rated by customers",
      "type": "boolean",
      "example": true
    },
    "rating": {
      "$ref": "https://schema.nfh.global/Rating/v2.1/schema.json"
    }
  },
  "required": [
    "id",
    "descriptor",
    "provider",
    "itemAttributes"
  ],
  "additionalProperties": false,
  "x-tags": [
    "common"
  ]
}
