Planfix API contact.updateCustomData: Difference between revisions

From Planfix
Jump to: navigation, search
No edit summary
 
Line 78: Line 78:
== Go To ==
== Go To ==
*[[Planfix API:Contacts]]
*[[Planfix API:Contacts]]
*[[Error codes]]
*[[Error codes XML API v1|Error codes]]
*[[List of functions]]
*[[List of functions]]

Latest revision as of 09:09, 6 March 2024

Function for updating custom contact fields. It can be used if the user does not have permission to modify the contact and, therefore, cannot use the contact.update function but has permission to modify custom contact fields.

Request format:

<?xml version="1.0" encoding="UTF-8"?>
<request method="contact.updateCustomData">
  <account></account>
  <sid></sid>
  <contact>
    <id></id>
    <general></general>
    <customData>
      <customValue>
        <id></id>
        <value></value>
      </customValue>
      <!-- ... -->
    </customData>
  </contact>
  <signature></signature>
</request>
Name Type Value Note
id int updated contact identifier
general int updated contact number (used if id is not set)
customData Custom contact field values
customData.customValue.id Custom contact field identifier
customData.customValue.value Custom contact field value (or fields of the type task set, employee list, directory entry set - identifiers separated by commas in square brackets)
signature string(32) signature

Result of successful function execution:

<?xml version="1.0" encoding="UTF-8"?>
<response status="ok">
  <contact>
    <id></id>
    <general></general>
  </contact>
  <actionid></actionid>
</response>
Name Type Value Note
contact.id int updated contact identifier
contact.general int added contact number
actionid int action about the change identifier

Otherwise, a response with an error will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<response status="error">
  <code></code>
</response>


Go To