openapi: 3.1.1
info:
  title: ContractItem
  version: 2.0.0
  description: A line item within a Contract, linking an accepted Offer and ordered Item with quantity and price.
  license:
    name: CC-BY-NC-SA 4.0 International
  contact:
    name: Beckn Labs
    url: https://beckn.io
components:
  schemas:
    ContractItem:
      x-iri: https://schema.nfh.global/ContractItem/v2.0
      description: A line item within a Contract, linking an accepted Offer and ordered Item with quantity and price.
      title: ContractItem
      x-tags:
      - common
      type: object
      properties:
        acceptedOffer:
          description: Offer applied to this line (if different from contract-level)
          x-jsonld:
            '@id': schema:acceptedOffer
          $ref: https://schema.nfh.global/Offer/v2.1/attributes.yaml#/components/schemas/Offer
        itemId:
          x-jsonld:
            '@id': schema:orderedItem
          $ref: https://schema.nfh.global/Item/v2.1/attributes.yaml#/components/schemas/Item
        lineId:
          description: Unique line id within contract
          type: string
        contractItemAttributes:
          description: Line-level Attribute Pack (options, substitutions, ESG, etc.)
          $ref: https://schema.nfh.global/Attributes/v2.0/attributes.yaml#/components/schemas/Attributes
        price:
          description: Line price composition (unit/tax/delivery/discount)
          x-jsonld:
            '@id': schema:priceSpecification
          $ref: https://schema.nfh.global/PriceSpecification/v2.1/attributes.yaml#/components/schemas/PriceSpecification
        quantity:
          x-jsonld:
            '@id': beckn:quantity
          $ref: https://schema.nfh.global/Quantity/v2.0/attributes.yaml#/components/schemas/Quantity
      required:
      - itemId
      additionalProperties: false
