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”.

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
  • 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”. 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.

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"
            }
        }
    ]
 }
...