Estates

Resource type: estate

Returns a list of estates.

The parameter filterid can be used to restrict the selection of estates. With self-created filters from enterprise you could e.g. retrieve the last modified estates. Or you can use the parameter filter to specify the filter expression directly in the API call.

Parameters:

  • data
    ARRAY of fields that you want to read. All fields specified in the enterprise administration are valid here.
    If you want to read out the marketing status of an estate, you need you include verkauft and reserviert in the parameter data. In the response verkauft = 1 defines the marketing status “Sold” or “Rented”, depeding on the marketing method. reserviert = 1 stands for the marketing status “Reserved”.  verkauft = 0 and reserviert = 0 represent the marketing status “Open”.
  • filterid
    INTEGER. Filter-ID. This parameter can also be used to restrict the selection of estates via estate filters created in enterprise. The filter IDs of your created filters can be read out via the API call Filter. For more information about filters, see our online help.
  • filter
    OBJECT. Key: field, value: array of objects with filter expressions in the format "status": [{"op": "=", "val": 1}]. With op you specify the operator. Possible values for op are the following SQL operators:
    is or =, >, <, >=, <=, != or <>, between, like, not like, in, not in

    For the operator like the value % can be specified as a placeholder.

    With val you specify the value which should be applied to the filtering. The individual filter expressions are linked with the AND operation. See also the example below.

  • listlimit
    INTEGER. Maximum number of estates in the list. Default value: 20, maximum: 500.
  • listoffset
    INTEGER. Offset of the list, that means from which data record onwards the list should be output.
  • sortby
    OBJECT. Fields to sort by. The field name is used as the key, and the type of sorting as the value. Notation: {"kaufpreis": "ASC", "warmmiete": "DESC"}
    Possible values for sorting are ASC for ascending, DESC for descending.
  • formatoutput
    BOOLEAN. Enable formatted output. If set to true, the contents of the single- and multi-select fields (column content in the enterprise administration on tabs singleselect und multiselect) instead of the field (column field in the administration on tabs singleselect und multiselect) are outputted.
  • estatelanguage
    STRING. Language of the object, only relevant for multi-language estates. Specified in ISO format with 3 characters, z.B. DEU, ENG.
  • outputlanguage
    STRING. Output language. E.g. the contents of the single- and multi-select fields are output in the specified language. Parameter formatoutput must be set to true.
  • georangesearch
    OBJECT. Radius search. Syntax: "georangesearch": {"country": "DEU", "zip": 52068, "radius": 10 }. country and radius are mandatory. Instead of zip, also city can be used as center of the radius search. zip gives more exact results usually.
    The second variant of the radius search is based on geocoordinates. Syntax: "georangesearch": {"latitude": 50, "longitude": 6, "radius": 100 }. See example below for usage.

Example: active property with purchase price < 300000

...
{
	"actionid": "urn:onoffice-de-ns:smart:2.5:smartml:action:read",
	"resourceid": "",
	"identifier": "",
	"resourcetype": "estate",
	"parameters": {
		"data":["Id", "kaufpreis", "lage"],
		"filter": {
			"status": [{"op": "=", "val": 1}],
			"kaufpreis": [{"op": "<", "val": 300000}]
		},
		"listlimit": 10,
		"listoffset": 20,
		"sortby": {"kaufpreis": "ASC", "warmmiete": "ASC"}
	}
}
...

Example: Real estate changed after 01.01.2018

...
{
    "actionid": "urn:onoffice-de-ns:smart:2.5:smartml:action:read",
    "resourceid": "",
    "identifier": "",
    "resourcetype": "estate",
    "parameters": {
        "data":["Id", "kaufpreis", "lage"],
        "filter": {
            "geaendert_am": [{"op": "<", "val": "2018-01-01 00:00"}]
        }
    }
}
...

Example: Filter estates by “last change”

{
    "actionid": "urn:onoffice-de-ns:smart:2.5:smartml:action:read",
    "resourceid": "",
    "identifier": "",
    "resourcetype": "estate",
    "parameters": {
        "data":["Id", "kaufpreis", "lage"],
        "filterid":109,
        "sortby": {"kaufpreis": "ASC", "warmmiete": "ASC"}
    }
}

The expression used in the filter is: `ObjTech`.`geaendert_am` >= '2018-01-01 00:00' AND `ObjTech`.`geaendert_am` <= '2018-01-31 23:59'

Example: Marketing status

{
    "actionid": "urn:onoffice-de-ns:smart:2.5:smartml:action:read",
    "resourceid": "",
    "identifier": "",
    "resourcetype": "estate",
    "parameters": {
        "data":["Id", "kaufpreis", "reserviert", "verkauft"],
        "filter": {
            "status": [{"op": "=", "val": 1}],
            "kaufpreis": [{"op": "<", "val": 300000}]
        }
    }
}

Example: Usage of georange (Umkreissuche)

{
    "actionid": "urn:onoffice-de-ns:smart:2.5:smartml:action:read",
    "resourceid": "",
    "identifier": "",
    "resourcetype": "estate",
    "parameters": {
        "data":["Id", "kaufpreis", "laengengrad", "breitengrad", "ort"],
        "filter": {
            "status": [{"op": "=", "val": 1}],
            "kaufpreis": [{"op": "<", "val": 300000}]
        },
		"georangesearch": {
			"country": "DEU",
			"zip": 52068,
			"radius": 10
		},
        "listoffset": 0
    }
}