Addresses

Resource type: address

When editing an address, the same parameters are valid, which are valid when reading an address.

To change the contact data of a address record (telephone, fax, email) additional parameters are necessary (see examples below).

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

Parameters:

  • „field name“ (individually)
  • Name of the target field (key) and value to set (value).

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

Parameters (contact data):

  • „Type of contact data“
  • 'phone' for normal telephone numbers,
    'phone_business' for business phone numbers,
    'mobile' for mobile phone numbers,
    'email' for email addresses,
    'fax' for fax numbers

  • action
    Type of change of contact data record
    • add
      Add a contact data record.
    • modify
      Modify a contact data record. Identification based on the old value. It must be ensured that the value is unique, otherwise the action is aborted with an error.
    • delete
      Delete a contact data record. Identification based on the old value. It must be ensured that the value is unique, otherwise the action will be aborted with an error.
  • oldvalue
    Old value of contact data record for identification.
  • newvalue
    New value of the contact record.

Example: Modify address data

...
"actions":[
	{
		"actionid":"urn:onoffice-de-ns:smart:2.5:smartml:action:modify",
		"resourceid":32,
		"resourcetype":"address",
		"identifier":"",
		"parameters":{
			"Vorname":"Peter",
			"Name":"Lustig",
			"Strasse":"Hauptstr. 2",
			"Land":6, //Deutschland
			"Geburtsdatum":"2017-01-31 12:00:00",
			"newsletter_aktiv":"0",
			"HerkunftKontakt":["Suchmaschine","Newsletter"]
		}
	}
]
...

Example: Modify phone number

ResourceID is the ID of the address record, oldvalue is the number to change.

...
"actions":[
    {
        "actionid":"urn:onoffice-de-ns:smart:2.5:smartml:action:modify",
        "resourceid":32,
        "resourcetype":"address",
        "identifier":"",
        "parameters":{
			"phone":{"action":"modify", "oldvalue":"0049 641 43681-272", "newvalue":"0049 244 48453-311"}
        }
    }
]
...

Example: Add an email address

...
"actions":[
    {
        "actionid":"urn:onoffice-de-ns:smart:2.5:smartml:action:modify",
        "resourceid":6,
        "resourcetype":"address",
        "identifier":"",
        "parameters":{
			"email":{"action":"add", "newvalue":"max.mustermann982@beispiel.de"}
        }
    }
]
...

Example: Delete fax number

...
"actions":[
    {
        "actionid":"urn:onoffice-de-ns:smart:2.5:smartml:action:modify",
        "resourceid":6,
        "resourcetype":"address",
        "identifier":"",
        "parameters":{
			"fax":{"action":"delete", "oldvalue":"02419461785"}
        }
    }
]
...