Search criteria

Resource type: searchcriteria

Creates a new search criteria record if the user has the necessary rights. To create, the record ID of an address is required to which the search criterion is to be linked. The user must have at least read access to this address record.

All keys and values of a new record are passed in parameter "data". All fields that can be queried via the administration in enterprise, which are active as a search criteria field, are valid. If the individual search criterion can assume “from – to” values, the field names must be supplemented with the suffixes "__von" or "__bis". This is the case for number fields like prices and areas.

For the radius search, the field “Umkreis” must be active for search criteria. The following keys can be used: range_plz, range_ort, range_strasse, range_hausnummer, range, range_land

The internal and public comment can be set by "krit_bemerkung":"xyz" und "krit_bemerkung_oeffentlich":"xyz".

Parameter:

  • adressid
    Record ID of the linked address
  • data
    OBJECT

Example:

...
{
	"actionid": "urn:onoffice-de-ns:smart:2.5:smartml:action:create",
	"resourceid": "",
	"identifier": "",
	"resourcetype": "searchcriteria",
        "parameters": {
            "addressid":"153",
            "data": {
                "objektart":"haus", 
                "vermarktungsart":"kauf",
                "range_plz":"52068",
                "range_ort":"Aachen",
                "range_strasse":"Charlottenburger Allee",
                "range_hausnummer":"5",
                "range":"100",
                "kaufpreis__von":"50000",
                "kaufpreis__bis":"100000"     
            }
        }
}
...