{
  "$id": "https://schema.nfh.global/ContractItem/v2.0",
  "x-iri": "https://schema.nfh.global/ContractItem/v2.0",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "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/schema.json"
    },
    "itemId": {
      "x-jsonld": {
        "@id": "schema:orderedItem"
      },
      "$ref": "https://schema.nfh.global/Item/v2.1/schema.json"
    },
    "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/schema.json"
    },
    "price": {
      "description": "Line price composition (unit/tax/delivery/discount)",
      "x-jsonld": {
        "@id": "schema:priceSpecification"
      },
      "$ref": "https://schema.nfh.global/PriceSpecification/v2.1/schema.json"
    },
    "quantity": {
      "x-jsonld": {
        "@id": "beckn:quantity"
      },
      "$ref": "https://schema.nfh.global/Quantity/v2.0/schema.json"
    }
  },
  "required": [
    "itemId"
  ],
  "additionalProperties": false
}
