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
    Contains the search term to search for. This must not be empty.
  • extendedclaim
    STRING. Mandatory for marketplace providers. Not relevant for all other users. To verify the user which uses the marketplace return the “apiClaim” parameter from the service call as “extendedclaim”. User rights are then observed by the marketplace provider API user (not applicable for search criteria).

Below only the parameters for “Search address” are explained.
Parameters (address):

  • includecontactdata
    OPTIONAL. Search includes secondary contact information (phone/email) rather than just the main information
  • casesensitive
    OPTIONAL. Search is case-sensitive
  • searchparameter
    OPTIONAL. Array of fields to include in the search
  • listlimit
    OPTIONAL. Maximum number of records returned
  • sortby
    OPTIONAL. STRING. 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
    OPTIONAL. STRING. 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"
                            }
                        },
...