updateContacts

Request Method: PUT

Description: Update contact(s) details

URL: https://api.iovox.com:444/Contacts?v=3&method=updateContacts

The following parameters can be sent in the querystring

ParameterDescriptionDefault ValueData TypeMandatory
vAPI version to use
INTEGERYES

Payload

The following XML payload must be sent with an updateContacts request:

<?xml version="1.0" encoding="utf-8"?>
<request>
  <rm_rules>TRUE</rm_rules>
  <replace_details>TRUE</replace_details>
  <contact>
    <contact_id>333</contact_id>
    <new_contact_id>333 Updated</new_contact_id>
    <display_name>John Smith</display_name>
    <first_name>John</first_name>
    <last_name>Smith</last_name>
    <email>jsmith@iovox.com</email>
    <email_2>jsmith@iovox.com</email_2>
    <company>Smith's ABC</company>
    <mobile_phone>447772412312</mobile_phone>
    <home_phone>44123231231</home_phone>
    <business_phone>44123871237</business_phone>
    <business_fax>44123875237</business_fax>
    <work_address_1>155 Abbey Street</work_address_1>
    <work_address_2>Westminister</work_address_2>
    <work_city>London</work_city>
    <work_country>United Kingdom</work_country>
    <work_postcode>W1 5P6</work_postcode>
    <home_address_1>155 Abbey Street</home_address_1>
    <home_address_2>Westminister</home_address_2>
    <home_city>London</home_city>
    <home_country>United Kingdom</home_country>
    <home_postcode>W1 5P6</home_postcode>
    <notes>This is a note.</notes>
  </contact>
  <contact>
    ...
  <contact>
</request>

Payload Description

Node NameDescriptionDefault ValueData TypeMandatory

contact > 

rm_rules
TRUE/FALSE. If set to TRUE and an empty detail forms part of a custom Rule Template the Template will be deleted and removed from any Links it is attached to. Also, if the empty detail is being used to fix a variable Rule the related template will be detached from any Links using this detail. If set to FALSE and the empty details are used in a Rule Template or to fix a variable Rule, an error will be thrownFALSEBOOLEANNO
contact > replace_details

TRUE/FALSE. If a Contact has multiple values for the same element, for example multiple business_phones, it will replace the list with the new values sent in the request when this parameter is set to TRUE.

FALSEBOOLEANNO

contact > 

contact_id  
Contact ID that relates to the contact whose details are being updated
STRINGYES

contact > 

new_contact_id  
New Contact ID with the value of the contact id we want to replace for
STRINGNO

contact > 

display_name
The full name of the contact. This must be unique when in combination with any of this contact's phone numbers. Cannot be empty if set in XML
STRINGNO

contact > 

first_name
The first name of the contact
STRINGNO

contact > 

last_name
The last name of the contact
STRINGNO

contact > 

email
The email address for the contact
STRINGNO

contact > 

email_2
An additional email address for the contact
STRINGNO

contact > 

company
The name of the company to which the contact belongs
STRINGNO

contact > 

mobile_phone
The mobile phone number for the contact
STRINGNO

contact > 

home_phone
The home phone number for the contact
STRINGNO

contact > 

business_phone
The work phone number for the contact
STRINGNO

contact > 

business_fax
The internationalised business fax number for the contact
STRINGNO

contact > 

home_country
A string representing the country in which the contact resides. While this is not mandatory if it is absent (and home_phone is provided in the payload) a 'best guess' at the contact's country will be made based on the phone number provided. This will be stored against the contact's details
STRINGNO

contact > 

business_country
A string representing the country of the contact's business. While this is not mandatory if it is absent and business_phone is provided in the payload a 'best guess' at the contact's business country will be made based on the phone number provided. This will be stored against the contact's details
STRINGNO

contact > 

notes
Any notes associated with the contact
STRINGNO

Result

Error Result

HTTP CodeError StringResolution
400API Version EmptyAdd a value for the v parameter in the query string
400API Version InvalidCorrect v parameter
400Request Method must be PUT. x attemptedSwitch request method x to PUT
400XML EmptyAdd xml to the request body
400XML parse error. x at line y, column zCorrect XML at point x on line y, column z
400Request EmptyAdd at least one contact to the request
400Contact ID x of y EmptyAdd contact_id to contact x (item) of y (total)
400Contact ID x of y does not existCorrect contact_id (item) of y (total)
400Duplicate Contact ID ReceivedChange contact_id to be unique
400Display Name x of y EmptyRemove Display Name from the request or add a value to the element
400Home Phone x of y is not internationalisedCorrect home_phone x (item) of y (total) so it is in an internationalised format
400Business Phone x of y is not internationalisedCorrect business_phone x (item) of y (total) so it is in an internationalised format
400Business Fax x of y is not internationalisedCorrect business_fax x (item) of y (total) so it is in an internationalised format
400Mobile Phone x of y is not internationalisedCorrect mobile_phone x (item) of y (total) so it is in an internationalised format
400First Name x of y InvalidCorrect first name with only alphabetic characteres
400Last Name x of y InvalidCorrect last name with only alphabetic characteres
400Display Name and Phone Number Combination x of y already existsChange the display_name and one or more phone numbers in Contact x (item) of y (total) to a combination that doesn't already exist, or use the updateContacts function to update the related contact
400Display Name and Phone Number Combination duplicatedChange the display_name and one or more phone numbers to a combination that doesn't already exist in the XML.
400Home Country x of y InvalidCorrect home_country x (item) of y (total) so that is matches a country name returned by Countries::getCountries
400Business Country x of y InvalidCorrect business_country x (item) of y (total) so that is matches a country name returned by Countries::getCountries
400Contact x of y has empty fields that are used in Rules or Rule TemplatesRemove the empty detail's element from contact_id x (item) of y (total), complete the empty detail or change rm_rules to TRUE
500Internal Server ErrorRetry later

Success Result

HTTP/1.1 204 No Content