{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/bridge-interactive/main/json-schema/bridge-property-schema.json",
  "title": "Bridge RESO Property",
  "description": "RESO-normalized Property record served by the Bridge RESO Web API. Field set follows the RESO Data Dictionary 1.7+ with selected high-cardinality fields modeled here.",
  "type": "object",
  "required": ["ListingKey"],
  "properties": {
    "ListingKey": { "type": "string", "description": "Unique key for the listing within the dataset." },
    "ListingId": { "type": "string", "description": "MLS-assigned listing number." },
    "ListPrice": { "type": "number" },
    "OriginalListPrice": { "type": "number" },
    "ClosePrice": { "type": "number" },
    "StandardStatus": { "type": "string", "enum": ["Active", "Pending", "Closed", "Withdrawn", "Canceled", "Expired", "Hold", "ComingSoon", "ActiveUnderContract"] },
    "MlsStatus": { "type": "string" },
    "PropertyType": { "type": "string", "enum": ["Residential", "ResidentialLease", "ResidentialIncome", "Commercial", "CommercialLease", "Land", "Farm", "BusinessOpportunity", "ManufacturedInPark"] },
    "PropertySubType": { "type": "string" },
    "UnparsedAddress": { "type": "string" },
    "StreetNumber": { "type": "string" },
    "StreetName": { "type": "string" },
    "StreetSuffix": { "type": "string" },
    "UnitNumber": { "type": "string" },
    "City": { "type": "string" },
    "StateOrProvince": { "type": "string" },
    "PostalCode": { "type": "string" },
    "PostalCodePlus4": { "type": "string" },
    "Country": { "type": "string" },
    "CountyOrParish": { "type": "string" },
    "Latitude": { "type": "number" },
    "Longitude": { "type": "number" },
    "BedroomsTotal": { "type": "integer" },
    "BathroomsTotalInteger": { "type": "integer" },
    "BathroomsFull": { "type": "integer" },
    "BathroomsHalf": { "type": "integer" },
    "LivingArea": { "type": "number" },
    "LivingAreaUnits": { "type": "string" },
    "LotSizeSquareFeet": { "type": "number" },
    "LotSizeAcres": { "type": "number" },
    "YearBuilt": { "type": "integer" },
    "GarageSpaces": { "type": "number" },
    "PoolFeatures": { "type": "array", "items": { "type": "string" } },
    "ParkingFeatures": { "type": "array", "items": { "type": "string" } },
    "PublicRemarks": { "type": "string" },
    "PrivateRemarks": { "type": "string" },
    "ListAgentKey": { "type": "string" },
    "ListAgentMlsId": { "type": "string" },
    "ListAgentFullName": { "type": "string" },
    "ListOfficeKey": { "type": "string" },
    "ListOfficeName": { "type": "string" },
    "CoListAgentKey": { "type": "string" },
    "BuyerAgentKey": { "type": "string" },
    "OnMarketDate": { "type": "string", "format": "date" },
    "CloseDate": { "type": "string", "format": "date" },
    "ContractStatusChangeDate": { "type": "string", "format": "date" },
    "DaysOnMarket": { "type": "integer" },
    "ModificationTimestamp": { "type": "string", "format": "date-time" },
    "PhotosChangeTimestamp": { "type": "string", "format": "date-time" },
    "PhotosCount": { "type": "integer" },
    "Media": {
      "type": "array",
      "items": { "$ref": "#/$defs/Media" }
    }
  },
  "$defs": {
    "Media": {
      "type": "object",
      "properties": {
        "MediaKey": { "type": "string" },
        "MediaURL": { "type": "string", "format": "uri" },
        "MediaCategory": { "type": "string", "enum": ["Photo", "Video", "VirtualTour", "Document", "FloorPlan"] },
        "MediaType": { "type": "string" },
        "Order": { "type": "integer" },
        "ImageWidth": { "type": "integer" },
        "ImageHeight": { "type": "integer" },
        "ResourceRecordKey": { "type": "string" },
        "ShortDescription": { "type": "string" },
        "ModificationTimestamp": { "type": "string", "format": "date-time" }
      }
    }
  }
}
