Addresses

Resource type: address

Creates a new address record if the user has the necessary rights.

The parameters of this action include all fields active in enterprise for address records. You can look up the field names in the administration of onOffice enterprise (Extras->Settings->Administration->Tab Input fields->Column field).

Contact details (telephone, fax, email) are created via fixed parameters.

In addresses, estates and other modules you can set relations like e.g. tenant, buyer, owner, contact person, estate units etc. These relations are not queried and set via estate or address calls, but this information is queried or set via the API calls “Create, Modify, Delete and Get relations”.

Note: Record number (Datensatznummer) and customer number (Kundennummer) are 2 different fields in addresses. The record number is the ID to be specified for the API.
Note: Mobile numbers are automatically set to the type “mobile”, even if “phone” was specified.

Parameter:

  • (individually)
  • phone
    Normal phone entry
  • phone_private
    Telephone entry with type “private”
  • phone_business
    Telephone entry with type “business”
  • mobile
    Telephone entry with type “mobile”
  • fax
    Normal fax entry
  • fax_private
    Fax entry with type “private”
  • fax_business
    Fax entry with type “business”
  • email
    Normal email entry
  • email_business
    Email entry with type “business”
  • email_private
    Email entry with type “private”
  • Benutzer
    STRING. Field “Betreuer” (“Support”). You need to specify the user name to set “Betreuer”. The user names can be found by queriying “Name” in the “data” parameter with the Read user call. In enterprise the user names are found under Extras >> Settings >> User.
  • Status
    TINYINT(1). “Active / Aktiv” = 1, “Archive / Archiviert” = 0.
  • newsletter_aktiv
    TINYINT(1). “No” = 0, “Yes” = 1, “Cancellation” = 2, “Double Opt-In pending” = 3, “not specified” = 4.
  • Land
    STRING. country as ISO 3166-1 alpha-3 value
  • checkDuplicate
    BOOLEAN. Default: false. If true, a duplicate check is performed for the field “email”. Without the parameter noOverrideByDuplicate, the data of the already existing address is updated or overwritten. If there are several duplicates, the duplicate with the lowest ID will be updated.

    A duplicate check of the entire address database with further criteria such as name, postal code etc. can be carried out in enterprise. For further information on resolving duplicates visit the online help.

  • noOverrideByDuplicate
    BOOLEAN. Default: false. If true, the duplicate check with parameter checkDuplicate does not update or overwrite the data of the already existing address.

Example:

...
"actions":[
    {
        "actionid":"urn:onoffice-de-ns:smart:2.5:smartml:action:create",
        "resourcetype":"address",
        "parameters": {
                "Anrede":"Herr",
                "Vorname":"Max",
                "Name":"Mustermann",
                "email":"m.mustermann@onoffice.de",
                "phone":"0241 12345",
                "Plz":"52074",
                "Ort":"Aachen",
                "Benutzer":"theotest",
                "HerkunftKontakt":["Suchmaschine","Newsletter"]
        },
        "resourceid":"",
        "identifier":""
    }
]
...

Response:

...
"response":{
    "results":[
        {
            "actionid":"urn:onoffice-de-ns:smart:2.5:smartml:action:create",
            "resourceid":"",
            "resourcetype":"address",
            "identifier":"",
            "data":{
                "meta":{
                    "cntabsolute":null
                },
                "records":[
                    {
                        "id":181,
                        "type":"address",
                        "elements":[
                        ]
                    }
                ]
            },
            "status":{
                "errorcode":0,
                "message":"OK"
            }
        }
    ]
 }
...