openapi: 3.1.1
info:
  title: Item
  version: 2.1.0
  description: Schema definition for Item in the Beckn Protocol v2.0.1
  license:
    name: CC-BY-NC-SA 4.0 International
  contact:
    name: Beckn Labs
    url: https://beckn.io
components:
  schemas:
    Item:
      x-iri: https://schema.nfh.global/Item/v2.1
      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/attributes.yaml#/components/schemas/TimePeriod
        availableAt:
          description: Physical locations where the item is available
          type: array
          items:
            $ref: https://schema.nfh.global/Location/v2.0/attributes.yaml#/components/schemas/Location
        category:
          $ref: https://schema.nfh.global/CategoryCode/v2.1/attributes.yaml#/components/schemas/CategoryCode
        constraints:
          type: array
          items:
            $ref: https://schema.nfh.global/Constraint/v2.0/attributes.yaml#/components/schemas/Constraint
        descriptor:
          $ref: https://schema.nfh.global/Descriptor/v2.1/attributes.yaml#/components/schemas/Descriptor
        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/attributes.yaml#/components/schemas/Attributes
        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/attributes.yaml#/components/schemas/Policy
        provider:
          $ref: https://schema.nfh.global/Provider/v2.1/attributes.yaml#/components/schemas/Provider
        rateable:
          description: Whether the item can be rated by customers
          type: boolean
          example: true
        rating:
          $ref: https://schema.nfh.global/Rating/v2.1/attributes.yaml#/components/schemas/Rating
      required:
      - id
      - descriptor
      - provider
      - itemAttributes
      additionalProperties: false
      x-tags:
      - common
