Planfix API contact.update

From Planfix
Jump to: navigation, search

Function for updating customer information. Request format:

<?xml version="1.0" encoding="UTF-8"?>
<request method="contact.update">
  <account></account>
  <sid></sid>
  <silent></silent>
  <contact>
    <id></id>
    <userid></userid>
    <general></general>
    <name></name>
    <midName></midName>
    <lastName></lastName>
    <template></template>
    <post></post>
    <email></email>
    <phones>
        <phone>
            <number></number>
            <typeId></typeId>
            <typeName></typeName>
        </phone>
        <!-- ... -->
    </phones>
    <secondaryEmails>
        <email></email>
        <!-- ... -->
    </secondaryEmails>
    <address></address>
    <description></description>
    <sex></sex>
    <site></site>
    <skype></skype>
    <facebook></facebook>
    <icq></icq>
    <birthdate></birthdate>
    <lang></lang>
    <canBeWorker></canBeWorker>
    <canBeClient></canBeClient>
    <group>
      <id></id>
    </group>
    <customData>
      <customValue>
        <id></id>
        <value></value>
      </customValue>
      <!-- ... -->
    </customData>
    <responsible>
      <users>
        <id></id>
        <id></id>
        <!-- ... -->
      </users>
      <groups>
        <id></id>
        <id></id>
        <!-- ... -->
      </groups>
    </responsible>
    <telegram>
      <id></id>
      <username></username>
    </telegram>
  </contact>
</request>
Name Type Value Note
silent bool when set to 1 - no notifications are sent about the change, no actions are created and no entries are made in the contact log mandatory value 1 when performing bulk periodic updates of contacts
id int Identifier of the updated contact
userid int contact identifier, if it is taken from the data within the system, where he is used on par with employees (such as task assignee), or from the variables {{Contact.Identifier}},{{Task.Counterparty.Identifier}} and those similar
general int number of the updated contact (used if id is not specified)
name string Name
midName string Middle name
lastName string Lats name
template int contact template number, (general in the results of contact.getList) optional, if absent does not change
post string Position
email string Email address
phones string Phones
phone.number string Phone numbers
phone.typeId int identifier of the number type valid values can be obtained by the function contact.getPhoneTypes
phone.typeName string name of the number type
secondaryEmails string additional email addresses
secondaryEmails.email string email
address string Address
description string Additional information
sex enum gender valid values see in the section customer's gender
site string website
skype string skype
facebook string facebook
icq string icq number
birthdate DateTime birth date
lang string language: En
canBeWorker boolean displayed in the list of task participants
canBeClient boolean isplayed in the list of task counterparties
group.id int ontact group identifier valid values can be obtained by the function contact.getGroupList
customData custom contact field values
customData.customValue.id custom contact field identifier
customData.customValue.value value of the custom contact field (for fields of the type set of tasks, list of employees, set of directory entries - identifiers separated by commas in square brackets)
responsible root element of the supervisor list
responsible .users root element of the supervisor users list
responsible .users.id int user identifier
responsible .groups root element of the supervisor groups list
responsible .groups.id int group identifier
telegram.id int internal identifier in Telegram
telegram.username string username in Telegram

Result of successful execution of the function:

<?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 identifier of the action about the change

Otherwise, a response with an error will be returned:

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


Go To