{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Compare-EV seller stock feed record",
  "description": "Version 1.0 public onboarding schema. A signed seller agreement and seller verification are required before display.",
  "type": "object",
  "required": ["seller_id", "branch_id", "model", "variant", "model_year", "availability", "price_pkr", "updated_at", "expires_at", "source", "photo_rights"],
  "properties": {
    "seller_id": {"type": "string"},
    "branch_id": {"type": "string"},
    "model": {"type": "string"},
    "variant": {"type": "string"},
    "model_year": {"type": "integer"},
    "colour": {"type": "string"},
    "quantity": {"type": "integer", "minimum": 0},
    "availability": {"enum": ["in_stock", "low_stock", "order_only", "sold_out", "unknown"]},
    "price_pkr": {"type": "number", "minimum": 0},
    "mandatory_charges_pkr": {"type": "number", "minimum": 0},
    "finance_eligible": {"type": "boolean"},
    "delivery_estimate_days": {"type": "integer", "minimum": 0},
    "warranty_provider": {"type": "string"},
    "updated_at": {"type": "string", "format": "date-time"},
    "expires_at": {"type": "string", "format": "date-time"},
    "source": {"enum": ["api", "webhook", "managed_csv", "google_sheet", "seller_portal"]},
    "exact_model_photo_url": {"type": "string", "format": "uri"},
    "photo_rights": {"enum": ["manufacturer_authorised", "seller_owned", "licensed", "not_supplied"]}
  },
  "additionalProperties": false
}
