Planfix API contact.updateContractors: Difference between revisions

From Planfix
Jump to: navigation, search
No edit summary
 
Line 71: Line 71:
== 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:24, 6 March 2024

This function changes the information about a contact's affiliation with the company. Request format:

<?xml version="1.0" encoding="UTF-8"?>
<request method="contact.updateContractors">
  <account></account>
  <sid></sid>
  <contact>
    <id></id>
    <contractors>
      <addClient>
        <id></id>
        <id></id>
        <!-- -->
      </addClient>
      <delClient>
        <id></id>
        <id></id>
        <!-- -->
      </delClient>
    </contractors>
  </contact>
  <signature></signature>
</request>
Name Тип Value Note
id
contractors root element of companies
contractors.addClient list of companies the contact is affiliated with
contractors.addClient.id id company identifier
contractors.delClient list of companies to be removed from the contact's list of companies
contractors.delClient.id id company identifier
signature


Result of successful execution:

<?xml version="1.0" encoding="UTF-8"?>
<response status="ok">
  <contact>
    <id></id>
  </contact>
</response>
Name Type Value Note
contact.id int contact identifier


Otherwise, an error response will be returned:

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


Go To