{
  "$id": "https://schema.nfh.global/Offer/v2.1",
  "x-iri": "https://schema.nfh.global/Offer/v2.1",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "description": "A generalized, cross-domain Offer that captures the terms under which one or more Resources may be committed.  Core intent: - Support multiple terms/eligibility/constraints/price points for the same Resource(s) - Support dynamic / on-the-fly offers (e.g., bundling, combinational discounts,  eligibility changes, capacity-aware pricing)  This mirrors the role of Offer in current Beckn (and schema.org patterns), but keeps the shape minimal and composable via `beckn:offerAttributes`.",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier of the offer."
    },
    "descriptor": {
      "description": "Human / agent-readable description of this offer.",
      "$ref": "https://schema.nfh.global/Descriptor/v2.1/schema.json"
    },
    "provider": {
      "$ref": "https://schema.nfh.global/Provider/v2.1/schema.json"
    },
    "resourceIds": {
      "type": "array",
      "description": "References (IDs) to resources covered by this offer.",
      "items": {
        "$ref": "#/properties/id"
      }
    },
    "addOns": {
      "type": "array",
      "description": "IDs of optional extra Offers or Resources that can be attached.",
      "items": {
        "$ref": "https://schema.nfh.global/AddOn/v2.0/schema.json"
      }
    },
    "considerationIds": {
      "type": "array",
      "items": {
        "$ref": "#/properties/id"
      }
    },
    "fulfillmentIds": {
      "description": "Details regarding the fulfillment of this offer",
      "$ref": "https://schema.nfh.global/Consideration/v2.0/schema.json"
    },
    "validity": {
      "$ref": "https://schema.nfh.global/TimePeriod/v2.1/schema.json"
    },
    "availableTo": {
      "type": "array",
      "description": "Optional visibility constraint indicating which network participants (by participantId / networkId / role) are allowed to discover or transact on this entity.  If omitted, the entity is assumed to be visible to all participants in the addressed network(s).",
      "items": {
        "type": "object",
        "required": [
          "type",
          "id"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "NETWORK",
              "PARTICIPANT",
              "ROLE"
            ],
            "description": "Scope of visibility constraint."
          },
          "id": {
            "type": "string",
            "description": "Identifier of the network, participant, or role."
          }
        }
      }
    },
    "offerAttributes": {
      "$ref": "https://schema.nfh.global/Attributes/v2.0/schema.json"
    }
  }
}
