UpdateContact(sessionID, domainId, xmlDoc)

Modified on Thu, 08 Jun 2023 at 10:22 AM

Yuki Web service - UpdateContact

The UpdateContact method enables you to update a contact or to create a new contact.


When will a contact be updated?

A contact will be updated if it meets one of the criteria below:

  • The ID of the contact is included in the XML
    If there is no contact found with a corresponding ID then this will be indicated in the response.
  • The Code is included in the XML and corresponds with a contact or several contacts
    If there are several contacts founds with the same Code then the most recent contact will be updated.
  • Based on the  Type, FullName and Email*.
    The contact will have to be of the same type and the FullName corresponds 1:1 or the FullName is stripped of the following characters ( , . " - space) and compared. If several contacts are found then the Email, if available, also will be used as filter. If there are still several contacts remaining then the most recently created contact will be updated.
    * Email is Type = 0 > EmailHome, Type = 2 > EmailWork 

When will a new contact be created?

If a contact is not updated because an existing contact cannot be found in the XML message based on the criteria above then a new contact will be created. 


Available XML elements


Also see: https://www.yukiworks.nl/schemas/contact.xsd


<ID>

Here a GUID of an existing contact can be given that is for example obtained via the ContactSearch.
If the ID is given then the contact with the corresponding ID will be updated in order to prevent possible duplicates.


<Type>

Person = 0

Company = 2


<Code>

Contact code of the contact


<FirstName>

First name of a person


<MiddleName>

Middle name of a person


<LastName>

Last name of a person


<FullName>

Full name of a company or person


<AddressLine_1>

Street name of a person


<AddressLine_2>

Streetname of a person


<PostCode>

Postal code of a person


<City>

City of a person


<MailAddressLine_1>

Postal address streetname of a company or person


<MailAddressLine_2>

Postal address streetname of a company or person


<MailPostCode>

Postal address postal code of a company or person


<MailCity> 

Postal address city of a company or person


<Country>

Country code according to ISO 3166 for a person 


<WorkAddressLine_1>

Streetname of a company or an additional address for a person


<WorkAddressLine_2>

Stteetname of a company or an additional address for a person


<WorkPostCode>

Postal code of a company or an additional address for a person


<WorkCity>

City of a company or an additional address for a person


<WorkCountry>

Country code according ISO 3166 for a company or an additional address for a person


<PhoneHome>

Home fixed telephone number of a person


<PhoneWork>

Fixed telephone number of a company


<MobileHome>

Home mobile phone number of a person


<MobileWork>

Work mobile phone number of a person


<EmailHome>

Email address of a person


<EmailWork>

Email address of a company or the work email address of a person


Example of XML


<Contact xmlns="urn:xmlns:http://www.theyukicompany.com:contact" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Type>0</Type>
<Code>1</Code>
<FirstName>A</FirstName>
<MiddleName>van</MiddleName>
<LastName>B</LastName>
<FullName>A van B</FullName>
<AddressLine_1>Persoonstraat 1</AddressLine_1>
<AddressLine_2>Persoonstraat 2</AddressLine_2>
<PostCode>1234PR</PostCode>
<City>Rotterdam</City>
<MailAddressLine_1>Postadres 1</MailAddressLine_1>
<MailAddressLine_2>Postadres 2</MailAddressLine_2>
<MailPostCode>1234PS</MailPostCode>
<MailCity>Rotterdam</MailCity>
<Country>NL</Country>
<WorkAddressLine_1>Werkstraat 1</WorkAddressLine_1>
<WorkAddressLine_2>Werkstraat 2</WorkAddressLine_2>
<WorkPostCode>1234WK</WorkPostCode>
<WorkCity>Rotterdam</WorkCity>
<WorkCountry>NL</WorkCountry>
<PhoneHome>010-2019734</PhoneHome>
<MobileHome>010-2019734</MobileHome>
<MobileWork>010-2019734</MobileWork>
<EmailHome>support@yuki.nl</EmailHome>
<EmailWork>support@yuki.nl</EmailWork>

</Contact>


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article