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
Parameter | Description | Default Value | Data Type | Mandatory |
v | API version to use | INTEGER | YES |
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 Name | Description | Default Value | Data Type | Mandatory |
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 thrown | FALSE | BOOLEAN | NO |
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. | FALSE | BOOLEAN | NO |
contact > contact_id | Contact ID that relates to the contact whose details are being updated | STRING | YES | |
contact > new_contact_id | New Contact ID with the value of the contact id we want to replace for | STRING | NO | |
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 | STRING | NO | |
contact > first_name | The first name of the contact | STRING | NO | |
contact > last_name | The last name of the contact | STRING | NO | |
contact > email | The email address for the contact | STRING | NO | |
contact > email_2 | An additional email address for the contact | STRING | NO | |
contact > company | The name of the company to which the contact belongs | STRING | NO | |
contact > mobile_phone | The mobile phone number for the contact | STRING | NO | |
contact > home_phone | The home phone number for the contact | STRING | NO | |
contact > business_phone | The work phone number for the contact | STRING | NO | |
contact > business_fax | The internationalised business fax number for the contact | STRING | NO | |
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 | STRING | NO | |
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 | STRING | NO | |
contact > notes | Any notes associated with the contact | STRING | NO |
Result¶
Error Result¶
HTTP Code | Error String | Resolution |
400 | API Version Empty | Add a value for the v parameter in the query string |
400 | API Version Invalid | Correct v parameter |
400 | Request Method must be PUT. x attempted | Switch request method x to PUT |
400 | XML Empty | Add xml to the request body |
400 | XML parse error. x at line y, column z | Correct XML at point x on line y, column z |
400 | Request Empty | Add at least one contact to the request |
400 | Contact ID x of y Empty | Add contact_id to contact x (item) of y (total) |
400 | Contact ID x of y does not exist | Correct contact_id (item) of y (total) |
400 | Duplicate Contact ID Received | Change contact_id to be unique |
400 | Display Name x of y Empty | Remove Display Name from the request or add a value to the element |
400 | Home Phone x of y is not internationalised | Correct home_phone x (item) of y (total) so it is in an internationalised format |
400 | Business Phone x of y is not internationalised | Correct business_phone x (item) of y (total) so it is in an internationalised format |
400 | Business Fax x of y is not internationalised | Correct business_fax x (item) of y (total) so it is in an internationalised format |
400 | Mobile Phone x of y is not internationalised | Correct mobile_phone x (item) of y (total) so it is in an internationalised format |
400 | First Name x of y Invalid | Correct first name with only alphabetic characteres |
400 | Last Name x of y Invalid | Correct last name with only alphabetic characteres |
400 | Display Name and Phone Number Combination x of y already exists | Change 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 |
400 | Display Name and Phone Number Combination duplicated | Change the display_name and one or more phone numbers to a combination that doesn't already exist in the XML. |
400 | Home Country x of y Invalid | Correct home_country x (item) of y (total) so that is matches a country name returned by Countries::getCountries |
400 | Business Country x of y Invalid | Correct business_country x (item) of y (total) so that is matches a country name returned by Countries::getCountries |
400 | Contact x of y has empty fields that are used in Rules or Rule Templates | Remove the empty detail's element from contact_id x (item) of y (total), complete the empty detail or change rm_rules to TRUE |
500 | Internal Server Error | Retry later |