Planfix API contact.get: Difference between revisions
From Planfix
(→Go To) |
m (Aliona moved page Plafix API contact.get to Planfix API contact.get without leaving a redirect) |
(No difference)
|
Latest revision as of 11:23, 15 March 2024
Function for obtaining customer information. Request format:
<?xml version="1.0" encoding="UTF-8"?>
<request method="contact.get">
<account></account>
<sid></sid>
<contact>
<id></id>
<userid></userid>
<general></general>
</contact>
<fields>
<field>lastUpdateDate</field>
...
</fields>
<signature></signature>
</request>
Name | Type | Value | Note |
---|---|---|---|
contact.id | int | contact identifier | |
general | int | contact number | if set, used instead of id |
userid | int | contact identifier for cases when it is used in the system on par with employees (task assignee, etc., as well as a user field of the contact type) | if set, used instead of id in the absence of general |
fields | get additional fields | ||
fields.field | string | field, possible values:
|
a field with the same name will be added to the response in the contact node |
signature | string(32) | signature |
Result of successful function execution:
<?xml version="1.0" encoding="UTF-8"?>
<response status="ok">
<contact>
<id></id>
<userid></userid>
<general></general>
<template>
<id></id>
</template>
<name></name>
<midName></midName>
<lastName></lastName>
<isCompany></isCompany>
<post></post>
<email></email>
<secondaryEmails>
<email></email>
<!-- ... -->
</secondaryEmails>
<phones>
<phone>
<number></number>
<typeId><typeId>
<typeName><typeName>
</phone>
...
</phones>
<address></address>
<description></description>
<sex></sex>
<site></site>
<skype></skype>
<icq></icq>
<userPic></userPic>
<birthdate></birthdate>
<group>
<id></id>
<name></name>
</group>
<contractors>
<client>
<id></id>
<name></name>
</client>
<client>
<id></id>
<name></name>
</client>
<!-- ... -->
</contractors>
<havePlanfixAccess>{true|false}</havePlanfixAccess>
<telegram>
<id></id>
</telegram>
<customData>
<customValue>
<field>
<id></id>
<name></name>
</field>
<value></value>
<text></text>
</customValue>
<customValue>
<!-- ... -->
</customValue>
<!-- ... -->
</customData>
<responsible>
<users>
<user>
<id></id>
<name></name>
</user>
<!-- ... -->
</users>
<groups>
<group>
<id></id>
<name></name>
</group>
<!-- ... -->
</groups>
</responsible>
</contact>
</response>
Name | Type | Value | Note |
---|---|---|---|
id | int | contact identifier | |
userid | int | иcontact identifier for cases when it is used in the system on par with employees (task assignee, etc., as well as a user field of the contact type) | |
general | int | contact number | |
template.id | int | contact template number | |
name | string | First name Middle name | |
midName | string | Middle name | |
lastName | string | Last name | |
isCompany | boolean | Is a company | |
post | string | Position | |
string | email address | ||
secondaryEmails.email | additional email addresses, if any | ||
phones | list of phones | ||
phones.phone.number | string | phone number | |
phones.phone.typeId | int | phone number type identifier | |
phones.phone.typeName | string | phone number type name | |
address | string | Address | |
description | string | Additional information | |
sex | enum | gender | see the customer's gender section for possible values, if the value is not set, the value is empty |
site | string | website | |
skype | string | skype | |
icq | string | icq number | |
userPic | string | link to image | |
birthdate | DateTime | birth date | |
group | contact group | ||
group.id | int | group identifier | |
group.name | string | group name | |
signature | string(32) | signature | |
contractors | list of companies to which he belongs | ||
contractors.client | company description | ||
contractors.client.id | int | company identifier | |
contractors.client.name | string | company name/ title | |
havePlanfixAccess | bool | does the contact have access to Planfix | this parameter is returned only to the user with administrator rights |
telegram.id | int | internal identifier in Telegram | returned only for contacts from Telegram |
customData | task custom field values | ||
customData.customValue.field.id | custom field identifier | ||
customData.customValue.field.name | custom field name | ||
customData.customValue.value | custom field value | ||
customData.customValue.text | custom field text value | ||
responsible | supervisor list root element | ||
responsible.users | supervisor list root element | ||
responsible.users.user | node | user | |
responsible.users.user.id | int | user identifier | |
responsible.users.user.name | string | user name | |
responsible.groups | supervisor group list root element | ||
responsible.groups.group | node | group | |
responsible.groups.group.id | int | group identifier | |
responsible.groups.group.name | string | group name |
Otherwise, an error response will be returned:
<?xml version="1.0" encoding="UTF-8"?>
<response status="error">
<code></code>
</response>