Search criteria

Resource type: searchcriteria

Search criteria can be edited with this API call.

Parameters:

  • data
    ARRAY

    • „field name“ (individually)

Name of the target field (key) and value to set (value). Which fields are available as search criteria can be viewed in the administration on the “search criteria” tab. On the “input fields” tab, you will find the corresponding field names for the fields that you must use for the API call.

In addition, even more properties of a search criterion can be set.

You can specify the status (active/inactive) of a search criterion with "sys_status":"1" or "sys_status":"0".

Until when the search criterion should be valid is set with "sysExpiryDate":"yyyy-mm-dd".

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

Which fields are to be considered KO criteria, is specified as an array of fields in the notation "sys_ko":["kaufpreis","plz","objektart"].

For most number fields, you can specify a range (from – to). You can specify this range in two ways. Either notated as "kaufpreis__von":"250000" and
"kaufpreis__bis":"500000" or as a range"kaufpreis":["250000", "500000"].

If the “radius” field is active in the search criteria administration, you can define a radius search. Via "range":"50" you can enter the radius in kilometers. The destination of the radius search is defined via range_plz, range_ort, range_strasse, range_hausnummer, range_land. From this information, longitude and latitude are generated, on which the radius search is based.

Example: Edit search criterion

...
"actions":[
 {
        "actionid":"urn:onoffice-de-ns:smart:2.5:smartml:action:modify",
        "resourceid":210,
        "resourcetype":"searchcriteria",
        "identifier":"",
        "parameters": {
                   "data": {
                        "objektart":"haus",
                        "objekttyp":["villa","schloss"],
                        "ort":"Aachen",
                        "vermarktungsart":"kauf",
                        "kaufpreis__von":"2500000",
                        "kaufpreis__bis":"5000000",
                        "sys_ko":["kaufpreis","ort","objektart"], 
                        "sysExpiryDate":"2017-11-27",
                        "range":"50",
                        "range_plz":"52074"       
                   }
        }
    }
...