Planfix API contact.getList

From Planfix
Jump to: navigation, search

Function for getting a list of contacts. Request format:

<?xml version="1.0" encoding="UTF-8"?>
<request method="contact.getList">
Name Type Value Note
pageCurrent int requested page
pageSize int requested list size
target enum / int contacts, companies or a specified task filter see acceptable values below
company int company identifier, contacts that need to be selected optional, if the node is absent - the selection is not limited to one company
search string string for contact search, contacts containing this string in their name, surname, or email will be returned
filters additional complex filters see the list and format of acceptable values in the section contact filters
fields get additional fields
fields.field string field, possible values:
  • lastUpdateDate - last change date
  • lastCommentDate - last comment date
a field with the same name will be added to the response in the contact node
signature string(32) signature

Acceptable values for the target parameter

Value Description Note
contact contacts default value
company companies
template templates
contact filter identifier available filters can be obtained with the function contact.getFilterList

Result of successful request execution:

<?xml version="1.0" encoding="UTF-8"?>
<response status="ok">
  <contacts count="count" totalCount="totalCount">
        <!-- ... -->
          <!-- ... -->
        <!-- ... -->
    <!-- ... -->
Name Type Value Note
contacts contact list
contacts count int number of contacts in the list
contacts totalCount int umber of contacts satisfying the request condition
contact node describing the contact
id int contact identifier
userid int contact identifier for cases when it is used in the system on par with employees (task assignee and so on, as well as user field of contact type)
general int contact number int contact template number
name string First name Middle name
lastName string Surname
isCompany boolean Is a company
post string Position
email string email address
phones phone list string phone number int phone number type identifier string phone number type name
address string Address
description string Additional information
sex enum gender see acceptable values in the section customer's gender
skype string skype
facebook string facebook
telegramId string telegramId
icq string icq number
userPic string link to the image
birthdate DateTime birthdate
signature string(32) signiture
contractors counterparty list to which it relates
contractors.client counterparty description int customer/counterparty identifier string counterparty name/title
havePlanfixAccess bool does the contact have access to Planfix this parameter is returned only to a user with administrator rights
user contact credentials this parameter is returned only to a user with administrator rights
user.login string login in the system
user.role string role
user.status enum status string email address
customData custom task fields values custom field identifier custom field name
customData.customValue.value custom field value
customData.customValue.text text value of the custom field

Otherwise, a response with an error will be returned:

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

Go To