Search

Resource type: search

This can be used to search for data records based on defined criteria, similar to the search in enterprise. The type of record searched for is specified in the resource identifier (address, estate, searchcriteria).

Resource ID: address, estate, searchcriteria

Parameters (general):

See Search estate for more information on searching for estates.

See Search search criteria for more information on searching for search criteria.

  • input
    STRING. MANDATORY. Contains the search term to search for. This must not be empty. The address fields firstname, surname, company, default emailaddress and customerno (KdNr.) of all addresses will be searched through. If the search term appears in one of the searched fields of an address, this address is displayed in the response.

The search terms can be combined and are then used in an AND operation. Example: “Max Mustermann Musterfirma” finds the address with first name “Max”, surname “Mustermann” and company “Musterfirma”.

Below only the parameters for “Search address” are explained.

Parameters (address):

  • includecontactdata
    BOOLEAN. OPTIONAL. If true, then all email addresses are searched, not just the default email address. In addition, all telephone numbers are also searched.
  • casesensitive
    BOOLEAN. OPTIONAL. Search is case-sensitive.
  • searchparameter
    ARRAY. OPTIONAL. Array of fields to include in the search. If you want to search fields other than the standard fields, enter an array of field names here. Only these fields will then be searched for the input string. Example: ["Vorname", "Name"]
  • listlimit
    INTEGER. OPTIONAL. Maximum number of records returned.
  • sortby
    STRING. OPTIONAL. Field to sort by. The field names from the administration must be used. Here KdNr for customerno, Vorname for firstname, Name for surname, Zusatz1 for company, Email for emailaddress
  • sortorder
    STRING. OPTIONAL. Possible values: ASC or DESC. Ascending or descending.

Request example

{
    "actionid": "urn:onoffice-de-ns:smart:2.5:smartml:action:get",
    "resourceid": "address",
    "identifier": "",
    "resourcetype": "search",
    "parameters": {
        "input": "Max Mustermann"
    }
}

Response (address):

  • customerno
    Customer number
  • firstname
    First name in the address record
  • surname
    Last name in the address record
  • company
    Company in the address record
  • emailaddress
    Email addresses in the address record
  • primaryEmail
    Primary email address in the address record

Response example

...
                        {
                            "id": 10775,
                            "type": "address",
                            "elements": {
                                "customerno": 18446077777866,
                                "surname": "Mustermann",
                                "firstname": "Max",
                                "company": "",
                                "emailaddress": [
                                    "max.mustermann@test153.de"
                                ],
                                "primaryEmail": "m.mustermann@onoffice.de"
                            }
                        },
...