Write Addressable
This request write attributes of an addressable.
This request udpates object attributes. The field ChangeType from Xelion Object specifies the change of the object or sub-object.
Best practice for updating an object:
-
Edit the read object.
-
Set the changeType attribute of the addressable and its sub-objects.
-
Write the object to the server.
Resource
PUT /addressables/<OID>
Where OID
is the object ID of the addressable.
Parameters
None
Payload
A sub-class of Addressable.
Response
The changed addressable object. Created sub-objects are updated with their object ID.
Context
Authorization |
User |
Errors
Example
Note in the example below that one phone number is removed, one is added and one is unchanged.
Request
PUT https://xelion.nl/api/v1/master/addressables/1557367
Payload
{
"initials": "A.",
"givenName": "Arnon",
"familyName": "Ron",
"communicationLanguage": "natDutch",
"employments": [],
"telecomAddresses": [
{
"commonName": "0644287570",
"addressType": "Telephone_and_SMS",
"address": "0644287568",
"label": "",
"oid": "1589972",
"objectType": "TelecomAddress",
"changeType": "Removed"
},
{
"commonName": "0644287569",
"addressType": "Telephone_and_SMS",
"address": "0644287568",
"label": "",
"oid": "",
"objectType": "TelecomAddress",
"changeType": "Created"
},
{
"commonName": "0644287568",
"addressType": "Mobile",
"address": "0644287568",
"label": "",
"oid": "1558662",
"objectType": "TelecomAddress",
"changeType": "Unmodified"
}
],
"addresses": [],
"permissions": "ReadWriteRemove",
"commonName": "Arnon Ron",
"objectType": "Person",
"changeType": "Modified"
}
Response
{
"object": {
"initials": "A.",
"givenName": "Arnon",
"namePrefix": "",
"familyName": "Ron",
"nameSuffix": "",
"additionalName": "",
"communicationLanguage": "natDutch",
"employments": [],
"telecomAddresses": [
{
"commonName": "0644287569",
"addressType": "Telephone_and_SMS",
"address": "0644287568",
"label": "",
"oid": "1589978",
"objectType": "TelecomAddress",
"changeType": "Unmodified"
},
{
"commonName": "0644287568",
"addressType": "Mobile",
"address": "0644287568",
"label": "",
"oid": "1558662",
"objectType": "TelecomAddress",
"changeType": "Unmodified"
}
],
"addresses": [],
"permissions": "ReadWriteRemove",
"commonName": "Arnon Ron",
"oid": "1556377",
"objectType": "Person",
"changeType": "Unmodified"
},
"links": [
{
"rel": "self",
"href": "http://xelion.nl/api/v1/master/addressables/1556377",
"method": "GET"
}
]
}