Skip to main content
Schema for storing real estate-related QR code information

Schema Structure

This category uses the standard QR code category structure.

Components Used

This category uses the following components:

Schema

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "array",
  "title": "Real Estate QR Code Schema",
  "description": "Schema for storing real estate-related QR code information",
  "items": {
    "type": "object",
    "required": [
      "type",
      "data"
    ],
    "additionalProperties": false,
    "properties": {
      "type": {
        "type": "string",
        "enum": [
          "design_info",
          "real_estate_profile",
          "contact_details",
          "social_media_profiles",
          "property_listing",
          "custom_form",
          "settings",
          "page_settings"
        ]
      },
      "data": {
        "type": "object"
      }
    },
    "allOf": [
      {
        "if": {
          "properties": {
            "type": {
              "const": "design_info"
            }
          }
        },
        "then": {
          "properties": {
            "data": {
              "type": "object",
              "required": [
                "color",
                "background",
                "fontFamily",
                "fontSize"
              ],
              "properties": {
                "color": {
                  "type": "object",
                  "properties": {
                    "primary": {
                      "type": "string"
                    },
                    "primaryText": {
                      "type": "string"
                    }
                  }
                },
                "background": {
                  "type": "string"
                },
                "fontFamily": {
                  "type": "string"
                },
                "fontSize": {
                  "type": "number"
                }
              }
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "type": {
              "const": "real_estate_profile"
            }
          }
        },
        "then": {
          "properties": {
            "data": {
              "type": "object",
              "required": [
                "image",
                "name",
                "license_number"
              ],
              "properties": {
                "image": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    }
                  }
                },
                "name": {
                  "type": "string"
                },
                "license_number": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "companyLogo": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "type": {
              "const": "contact_details"
            }
          }
        },
        "then": {
          "properties": {
            "data": {
              "type": "object",
              "properties": {
                "emails": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "email"
                    ],
                    "properties": {
                      "email": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      }
                    }
                  }
                },
                "phoneNumbers": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "phoneNumber"
                    ],
                    "properties": {
                      "phoneNumber": {
                        "type": "string"
                      }
                    }
                  }
                },
                "txtMsgNumbers": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "txtMsgNumber": {
                        "type": "string"
                      }
                    }
                  }
                },
                "addresses": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "address"
                    ],
                    "properties": {
                      "address": {
                        "type": "string"
                      },
                      "hasMapLocation": {
                        "type": "boolean"
                      },
                      "location": {
                        "$ref": "components/_base_map.json#properties/location"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "type": {
              "const": "social_media_profiles"
            }
          }
        },
        "then": {
          "properties": {
            "data": {
              "type": "object",
              "required": [
                "profiles"
              ],
              "additionalProperties": false,
              "properties": {
                "profiles": {
                  "$ref": "components/social_profile.json"
                }
              }
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "type": {
              "const": "property_listing"
            }
          }
        },
        "then": {
          "properties": {
            "data": {
              "type": "object",
              "required": [
                "listings"
              ],
              "properties": {
                "listings": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "propertyName",
                      "propertyDescription"
                    ],
                    "properties": {
                      "propertyName": {
                        "type": "string"
                      },
                      "propertyDescription": {
                        "type": "string"
                      },
                      "purpose": {
                        "type": "string"
                      },
                      "bedroom": {
                        "type": "integer"
                      },
                      "bathroom": {
                        "type": "integer"
                      },
                      "propertyArea": {
                        "type": "object",
                        "required": [
                          "value",
                          "unit"
                        ],
                        "properties": {
                          "value": {
                            "type": "integer"
                          },
                          "unit": {
                            "type": "string"
                          }
                        }
                      },
                      "propertyLot": {
                        "type": "object",
                        "required": [
                          "value",
                          "unit"
                        ],
                        "properties": {
                          "value": {
                            "type": "integer"
                          },
                          "unit": {
                            "type": "string"
                          }
                        }
                      },
                      "pricing": {
                        "type": "object",
                        "required": [
                          "amount",
                          "currency"
                        ],
                        "properties": {
                          "amount": {
                            "type": "integer"
                          },
                          "currency": {
                            "type": "string"
                          },
                          "frequency": {
                            "type": "string"
                          },
                          "leaseFrequency": {
                            "type": "string"
                          },
                          "lease": {
                            "type": "integer"
                          }
                        }
                      },
                      "propertyLocation": {
                        "type": "string"
                      },
                      "showOnMap": {
                        "type": "boolean"
                      },
                      "mapLocation": {
                        "$ref": "components/_base_map.json#properties/location"
                      },
                      "media": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "type": {
              "const": "custom_form"
            }
          }
        },
        "then": {
          "properties": {
            "data": {
              "type": "object",
              "required": [
                "description",
                "questions"
              ],
              "properties": {
                "description": {
                  "type": "string"
                },
                "questions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "name",
                      "type",
                      "required"
                    ],
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string"
                      },
                      "required": {
                        "type": "boolean"
                      }
                    }
                  }
                },
                "receiverEmail": {
                  "type": "string",
                  "format": "email"
                }
              }
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "type": {
              "const": "settings"
            }
          }
        },
        "then": {
          "properties": {
            "data": {
              "type": "object",
              "properties": {
                "geoLocationListing": {
                  "type": "object",
                  "properties": {
                    "active": {
                      "type": "boolean"
                    },
                    "unitOfMeasurement": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "type": {
              "const": "page_settings"
            }
          }
        },
        "then": {
          "properties": {
            "data": {
              "$ref": "components/page_settings.json"
            }
          }
        }
      }
    ]
  }
}