Planfix API contact.add

From Planfix
Jump to: navigation, search

Function to add a contact. Request format:

<?xml version="1.0" encoding="UTF-8"?>
<request method="contact.add">
        <!-- ... -->
        <!-- ... -->
      <!-- ... -->
        <!-- ... -->
        <!-- ... -->
Name Type Value Note
template int contact template number, (general in contact.getList results)
The API's implementation for creating a contact using a template is currently unfinished.

The contact creation form, corresponding custom fields, and some of its properties are configured based on the template.

However, data tags, files, checklists, and reminders are not currently configured from the template.

name string Name
midName string Middle name
lastName string Last name
post string Position
email string email address
phones string phones
phone.number string phone number
phone.typeId int phone number type identifier acceptable values can be obtained by the function contact.getPhoneTypes
phone.typeName string phone number type name
secondaryEmails string additional email addresses string email
address string Address
description string Additional information
sex enum gender acceptable values see in the customer's gender section
site string website
skype string skype
facebook string facebook
icq string номер-icq
birthdate DateTime birthdate
lang string language:En
isCompany boolean is a company
canBeWorker boolean displayed in the task participant list
canBeClient boolean displayed in the task counterparty list int contact group identifier acceptable values can be obtained by the function contact.getGroupList
customData contact custom field values contact custom field identifier can be obtained by calling contact.get of the template by which the contact is created
customData.customValue.value contact custom field value (for task set type fields, employee list, directory record set - identifiers separated by commas in square brackets)
responsible root element of the supervisor list
responsible .users root element of the supervisor user list
responsible int user identifier
responsible .groups root element of the supervisor group list
responsible int group identifier
signature string(32) signature

Result of successful function execution:

<?xml version="1.0" encoding="UTF-8"?>
<response status="ok">
Name Type Value Note int identifier of the added contact
contact.userid int contact identifier for cases when it is used in the system on par with employees (task assignee, etc.)
contact.general int number of the added contact
actionid int identifier of the contact creation action

Otherwise, an error response will be returned:

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

Go To