{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/domain-group/main/json-schema/domain-group-pre-market-v1-listing-response-schema.json",
  "title": "PreMarket.v1.ListingResponse",
  "description": "Pre-portal listing response.",
  "x-generated": "2026-10-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/domain-group-premarket-api-openapi.yml#/components/schemas/PreMarket.v1.ListingResponse",
  "required": [
    "address",
    "bathrooms",
    "bedrooms",
    "carspaces",
    "estimatedSalePrice",
    "id",
    "listingStatus"
  ],
  "type": "object",
  "properties": {
    "id": {
      "minLength": 1,
      "type": "string",
      "description": "Pre-portal listing ID."
    },
    "listingStatus": {
      "$ref": "#/$defs/PreMarket.v1.PrePortalListingStatus"
    },
    "relatedAdId": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The Domain Ad Id of the related listing.",
      "format": "int32"
    },
    "providerDetails": {
      "$ref": "#/$defs/PreMarket.v1.ProviderDetails"
    },
    "address": {
      "$ref": "#/$defs/PreMarket.v1.AddressResponse"
    },
    "advertiserIdentifiers": {
      "$ref": "#/$defs/PreMarket.v1.AdvertiserIdentifiers"
    },
    "bedrooms": {
      "type": "number",
      "description": "Total number of bedrooms in the property.",
      "format": "float"
    },
    "bathrooms": {
      "type": "number",
      "description": "Total number of bathrooms in the property.",
      "format": "float"
    },
    "carspaces": {
      "type": "number",
      "description": "Total number of car spaces in the property.",
      "format": "float"
    },
    "headline": {
      "maximum": 250,
      "minimum": 0,
      "type": [
        "string",
        "null"
      ],
      "description": "The short description of the property provided by the advertiser."
    },
    "description": {
      "maximum": 6000,
      "minimum": 0,
      "type": [
        "string",
        "null"
      ],
      "description": "The long description of the property provided by the advertiser."
    },
    "authorityExecutedDate": {
      "type": [
        "string",
        "null"
      ],
      "description": "The date on which the authority contract was executed.\nThe date is compliant with the ISO 8601 and is in the UTC format, e.g. 2009-06-15T13:45:30.0000000Z.",
      "format": "date-time"
    },
    "reservePrice": {
      "type": [
        "number",
        "null"
      ],
      "description": "Vendor reserve price.",
      "format": "double"
    },
    "estimatedSalePrice": {
      "$ref": "#/$defs/PreMarket.v1.Price"
    },
    "propertyTypes": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/PreMarket.v1.PropertyType"
      },
      "description": "The property types (e.g. house, apartment/unit/flat, etc.)."
    },
    "authorityType": {
      "$ref": "#/$defs/PreMarket.v1.AuthorityType"
    },
    "exclusivePeriodDays": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The time (in days) that the agent has exclusive authority to sell the property.",
      "format": "int32"
    },
    "exclusiveContinuingPeriodDays": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The time (in days) that exclusive authority has been extended.",
      "format": "int32"
    },
    "exclusivePeriodStartDate": {
      "type": [
        "string",
        "null"
      ],
      "description": "Start date of the exclusivity period.\nThe date is compliant with the ISO 8601 and is in the UTC format, e.g. 2009-06-15T13:45:30.0000000Z.",
      "format": "date-time"
    },
    "geoLocation": {
      "$ref": "#/$defs/PreMarket.v1.GeoLocation"
    },
    "mapCertainty": {
      "type": "integer",
      "description": "Map certainty of the property location.",
      "format": "int32"
    },
    "media": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/PreMarket.v1.PropertyMedia"
      },
      "description": "The media associated with the property provided by the advertiser."
    },
    "propertyId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The identifier which uniquely identifies the property being advertised.\nThis may be empty if the Address of property is poorly described."
    },
    "statementOfInformation": {
      "$ref": "#/$defs/PreMarket.v1.StatementOfInformation"
    },
    "dateCreated": {
      "type": "string",
      "description": "The date/time the listing was created.\nThe date is compliant with the ISO 8601 and is in the UTC format, e.g. 2009-06-15T13:45:30.0000000Z.",
      "format": "date-time"
    },
    "dateUpdated": {
      "type": "string",
      "description": "The date/time the listing was last updated.\nThe date is compliant with the ISO 8601 and is in the UTC format, e.g. 2009-06-15T13:45:30.0000000Z.",
      "format": "date-time"
    },
    "datePreMarket": {
      "type": [
        "string",
        "null"
      ],
      "description": "The date/time the listing went pre-market.\nThe date is compliant with the ISO 8601 and is in the UTC format, e.g. 2009-06-15T13:45:30.0000000Z.",
      "format": "date-time"
    },
    "dateListed": {
      "type": [
        "string",
        "null"
      ],
      "description": "The date/time the listing was listed.\nThe date is compliant with the ISO 8601 and is in the UTC format, e.g. 2009-06-15T13:45:30.0000000Z.",
      "format": "date-time"
    },
    "dateSold": {
      "type": [
        "string",
        "null"
      ],
      "description": "The date/time when the listing status was changed to sold (it is NOT the date/time when the property was sold).\nThe date is compliant with the ISO 8601 and is in the UTC format, e.g. 2009-06-15T13:45:30.0000000Z.",
      "format": "date-time"
    },
    "dateWithdrawn": {
      "type": [
        "string",
        "null"
      ],
      "description": "The date/time the listing was withdrawn.\nThe date is compliant with the ISO 8601 and is in the UTC format, e.g. 2009-06-15T13:45:30.0000000Z.",
      "format": "date-time"
    },
    "dateDrafted": {
      "type": [
        "string",
        "null"
      ],
      "description": "The date/time the listing was drafted.\nThe date is compliant with the ISO 8601 and is in the UTC format, e.g. 2009-06-15T13:45:30.0000000Z.",
      "format": "date-time"
    },
    "metadata": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": "string"
      },
      "description": "Optional listing metadata."
    },
    "comment": {
      "type": [
        "string",
        "null"
      ],
      "description": "Optional listing comment."
    },
    "soldDetails": {
      "$ref": "#/$defs/PreMarket.v1.SoldDetails"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "PreMarket.v1.AddressResponse": {
      "required": [
        "postcode",
        "slug",
        "state",
        "street",
        "streetNumber",
        "suburb"
      ],
      "type": "object",
      "properties": {
        "streetNumber": {
          "maxLength": 20,
          "minLength": 1,
          "type": "string",
          "description": "Street (and possibly unit) number component of an address. E.g. 23, 1a, 11/1."
        },
        "street": {
          "maxLength": 50,
          "minLength": 1,
          "type": "string",
          "description": "Street name, e.g. Punt Road."
        },
        "suburb": {
          "maxLength": 50,
          "minLength": 1,
          "type": "string"
        },
        "state": {
          "$ref": "#/$defs/PreMarket.v1.State"
        },
        "postcode": {
          "minLength": 1,
          "pattern": "^[0-9]{3,4}$",
          "type": "string"
        },
        "slug": {
          "minLength": 1,
          "type": "string",
          "readOnly": true
        }
      },
      "additionalProperties": false
    },
    "PreMarket.v1.AdvertiserIdentifiers": {
      "required": [
        "domainAgencyId"
      ],
      "type": "object",
      "properties": {
        "domainAgencyId": {
          "type": "integer",
          "description": "Domain Agency Id",
          "format": "int32"
        },
        "contactIds": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "integer",
            "format": "int32"
          },
          "description": "Identifier of each contact the advertiser has associated with the listing"
        },
        "agentIds": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          },
          "description": "Identifier of each agent the advertiser has associated with the listing"
        }
      },
      "additionalProperties": false
    },
    "PreMarket.v1.AuthorityType": {
      "enum": [
        "privateSale",
        "auction",
        "expressionOfInterest"
      ],
      "type": "string"
    },
    "PreMarket.v1.GeoLocation": {
      "type": "object",
      "properties": {
        "latitude": {
          "type": "number",
          "description": "Latitude of the property.",
          "format": "double"
        },
        "longitude": {
          "type": "number",
          "description": "Longitude of the property.",
          "format": "double"
        }
      },
      "additionalProperties": false,
      "description": "Encapsulates the details of a geo location."
    },
    "PreMarket.v1.PrePortalListingStatus": {
      "enum": [
        "preMarket",
        "sold",
        "listed",
        "withdrawn",
        "draft"
      ],
      "type": "string"
    },
    "PreMarket.v1.Price": {
      "required": [
        "from",
        "to"
      ],
      "type": "object",
      "properties": {
        "from": {
          "minimum": 0,
          "type": "number",
          "description": "Lower end of the price range.",
          "format": "double"
        },
        "to": {
          "minimum": 0,
          "type": "number",
          "description": "Upper end of the price range.",
          "format": "double"
        },
        "displayText": {
          "maxLength": 80,
          "type": [
            "string",
            "null"
          ],
          "description": "When provided this will be shown instead of the price range, e.g.: \"Offers over $450K considered\""
        }
      },
      "additionalProperties": false
    },
    "PreMarket.v1.PropertyMedia": {
      "required": [
        "resourceType",
        "url"
      ],
      "type": "object",
      "properties": {
        "resourceType": {
          "$ref": "#/$defs/PreMarket.v1.ResourceType"
        },
        "url": {
          "minLength": 1,
          "pattern": "^http[s]?:+.*",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "PreMarket.v1.PropertyType": {
      "enum": [
        "house",
        "townhouse",
        "apartmentUnitFlat",
        "vacantLand"
      ],
      "type": "string"
    },
    "PreMarket.v1.ProviderDetails": {
      "type": "object",
      "properties": {
        "providerSystem": {
          "type": [
            "string",
            "null"
          ],
          "description": "Identify the source of the listing"
        },
        "providerAdID": {
          "type": [
            "string",
            "null"
          ],
          "description": "Unique ID within provider system"
        }
      },
      "additionalProperties": false,
      "description": "Information for the listing provider"
    },
    "PreMarket.v1.ResourceType": {
      "enum": [
        "photograph",
        "floorPlan"
      ],
      "type": "string"
    },
    "PreMarket.v1.SoldDetails": {
      "type": "object",
      "properties": {
        "soldPrice": {
          "maximum": 2147483647,
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ],
          "description": "Price the property was sold for.",
          "format": "int32"
        },
        "soldDate": {
          "type": [
            "string",
            "null"
          ],
          "description": "The date when the property was sold.\nThe date must comply with the ISO 8601 and be in the UTC format, e.g. 2021-10-15T13:45:30.0000000Z.",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    },
    "PreMarket.v1.State": {
      "enum": [
        "nsw",
        "vic",
        "act",
        "sa",
        "wa",
        "tas",
        "qld",
        "nt"
      ],
      "type": "string",
      "description": "Australian states"
    },
    "PreMarket.v1.StatementOfInformation": {
      "required": [
        "documentationUrl"
      ],
      "type": "object",
      "properties": {
        "documentationUrl": {
          "minLength": 1,
          "pattern": "^http[s]?:+.*",
          "type": "string",
          "description": "Link to the statement of information documentation file.\nMust be a PDF file.\nFile should be less than 10 MB in size\nThe Statement of Information must be updated if there is a change in the indicative selling price."
        }
      },
      "additionalProperties": false
    }
  }
}