{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://agent.pricerightdigital.com/inventory-reference-schema.json",
  "title": "Price Right Digital Inventory Reference Packet",
  "description": "A preparation-only packet for inventory reference handoffs. It does not prove that a unit is available, priced correctly, discounted, finance-eligible, published, reserved, or sold.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "packet_id",
    "created_at",
    "source_system",
    "source_url",
    "official_customer_site",
    "inventory_reference",
    "claim_safety",
    "routing",
    "validation_status",
    "downstream_status"
  ],
  "properties": {
    "packet_id": {
      "type": "string",
      "description": "Unique packet identifier generated before handoff."
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "ISO 8601 timestamp when the packet was created."
    },
    "source_system": {
      "type": "string",
      "description": "System that prepared the packet, such as agent_hub, form, script, or internal_tool."
    },
    "source_url": {
      "type": "string",
      "format": "uri",
      "description": "URL where the inventory reference packet preparation originated."
    },
    "official_customer_site": {
      "type": "string",
      "format": "uri",
      "description": "Official customer-facing site for shopper inventory actions."
    },
    "inventory_reference": {
      "type": "object",
      "description": "Optional inventory reference fields. Do not infer missing unit data. Category-level references may leave unit fields blank.",
      "additionalProperties": false,
      "properties": {
        "stock_number": {
          "type": "string",
          "description": "Stock number if explicitly supplied by a current approved source. Do not require or invent it."
        },
        "vin": {
          "type": "string",
          "description": "VIN if explicitly supplied by a current approved source. Do not require or invent it."
        },
        "year": {
          "type": "string",
          "description": "Model year if supplied by a current approved source."
        },
        "make": {
          "type": "string",
          "description": "Make or manufacturer if supplied by a current approved source."
        },
        "model": {
          "type": "string",
          "description": "Model if supplied by a current approved source."
        },
        "trim": {
          "type": "string",
          "description": "Trim or floorplan if supplied by a current approved source."
        },
        "condition": {
          "type": "string",
          "description": "Condition such as new or used only if supplied by a current approved source."
        },
        "rv_type": {
          "type": "string",
          "description": "RV type such as travel trailer, fifth wheel, truck camper, or general category if supplied."
        },
        "location_name": {
          "type": "string",
          "description": "Location name only if verified for this reference. Do not infer location from old links or memory."
        },
        "location_url": {
          "type": "string",
          "description": "Official location URL if relevant and verified."
        },
        "inventory_url": {
          "type": "string",
          "description": "Official pricerightrv.com inventory category or search URL. This is not proof of availability."
        },
        "vdp_url": {
          "type": "string",
          "description": "Official vehicle detail page URL if supplied. This is not proof of current availability without verification."
        },
        "image_source_note": {
          "type": "string",
          "description": "Source note for images or photos. Do not claim photo recency or exact unit match without evidence."
        },
        "source_last_checked_at": {
          "type": "string",
          "description": "ISO timestamp when the source was checked, if checked. Leave blank if not checked."
        }
      }
    },
    "claim_safety": {
      "type": "object",
      "description": "Claim safety statuses for customer-facing inventory statements.",
      "additionalProperties": false,
      "required": [
        "availability_claim_status",
        "pricing_claim_status",
        "payment_claim_status",
        "discount_claim_status",
        "location_claim_status",
        "photo_claim_status",
        "safe_customer_facing_summary",
        "unsafe_or_unverified_claims"
      ],
      "properties": {
        "availability_claim_status": {
          "type": "string",
          "enum": [
            "verified_current",
            "verified_but_time_sensitive",
            "unverified",
            "not_claimed",
            "blocked"
          ],
          "description": "Availability claim status. Do not claim available, sold, reserved, pending, or on lot without current evidence."
        },
        "pricing_claim_status": {
          "type": "string",
          "enum": [
            "verified_current",
            "verified_but_time_sensitive",
            "unverified",
            "not_claimed",
            "blocked"
          ],
          "description": "Pricing claim status. Do not claim price, best price, discount, or guarantee without current evidence."
        },
        "payment_claim_status": {
          "type": "string",
          "enum": [
            "verified_current",
            "verified_but_time_sensitive",
            "unverified",
            "not_claimed",
            "blocked"
          ],
          "description": "Payment claim status. Do not claim payment, finance eligibility, approval, or lender outcome without evidence."
        },
        "discount_claim_status": {
          "type": "string",
          "enum": [
            "verified_current",
            "verified_but_time_sensitive",
            "unverified",
            "not_claimed",
            "blocked"
          ],
          "description": "Discount or incentive claim status. Do not claim a discount or incentive without approved evidence."
        },
        "location_claim_status": {
          "type": "string",
          "enum": [
            "verified_current",
            "verified_but_time_sensitive",
            "unverified",
            "not_claimed",
            "blocked"
          ],
          "description": "Location claim status. Do not claim a unit is at a location without current evidence."
        },
        "photo_claim_status": {
          "type": "string",
          "enum": [
            "verified_current",
            "verified_but_time_sensitive",
            "unverified",
            "not_claimed",
            "blocked"
          ],
          "description": "Photo claim status. Do not claim photos show the exact current unit condition without evidence."
        },
        "safe_customer_facing_summary": {
          "type": "string",
          "description": "Safe summary that routes shoppers to the official site when claims are not verified."
        },
        "unsafe_or_unverified_claims": {
          "type": "array",
          "description": "Claims that must not be used customer-facing without evidence.",
          "items": {
            "type": "string",
            "description": "One unsafe or unverified claim."
          }
        }
      }
    },
    "routing": {
      "type": "object",
      "description": "Safe routing URLs and UTM notes for shopper inventory paths.",
      "additionalProperties": false,
      "required": [
        "default_inventory_search_url",
        "new_inventory_url",
        "used_inventory_url",
        "specials_url",
        "clearance_url",
        "consignment_url",
        "preferred_customer_cta",
        "utm_source",
        "utm_medium",
        "utm_campaign",
        "notes"
      ],
      "properties": {
        "default_inventory_search_url": {
          "type": "string",
          "format": "uri",
          "description": "Official inventory search URL for general inventory browsing."
        },
        "new_inventory_url": {
          "type": "string",
          "format": "uri",
          "description": "Official new RV inventory URL."
        },
        "used_inventory_url": {
          "type": "string",
          "format": "uri",
          "description": "Official used RV inventory URL."
        },
        "specials_url": {
          "type": "string",
          "format": "uri",
          "description": "Official specials URL. This does not prove any specific discount."
        },
        "clearance_url": {
          "type": "string",
          "format": "uri",
          "description": "Official clearance URL. This does not prove any specific availability or price."
        },
        "consignment_url": {
          "type": "string",
          "format": "uri",
          "description": "Official consignment inventory URL."
        },
        "preferred_customer_cta": {
          "type": "string",
          "description": "Safe call to action routing shoppers to the official site to confirm details."
        },
        "utm_source": {
          "type": "string",
          "description": "Lowercase UTM source value without private customer information."
        },
        "utm_medium": {
          "type": "string",
          "description": "Lowercase UTM medium value without private customer information."
        },
        "utm_campaign": {
          "type": "string",
          "description": "Readable UTM campaign value without private customer information."
        },
        "notes": {
          "type": "string",
          "description": "Routing notes. Do not use notes as proof of availability, pricing, or downstream completion."
        }
      }
    },
    "validation_status": {
      "type": "string",
      "enum": [
        "draft",
        "ready_for_handoff",
        "blocked_missing_required_fields",
        "awaiting_source_verification",
        "source_verified",
        "failed_validation"
      ],
      "description": "Packet validation stage for reference preparation."
    },
    "downstream_status": {
      "type": "string",
      "enum": [
        "not_sent",
        "handed_off",
        "awaiting_confirmation",
        "confirmed",
        "failed"
      ],
      "description": "Downstream handoff status. Do not mark confirmed without downstream evidence."
    }
  }
}
