Planfix API contact.update: Difference between revisions
From Planfix
(Created page with "{{#seo: |title=Planfix API contact.update |titlemode=append |keywords=planfix, contacts, api, api |description=updating customer information }} Function for updating customer information. Request format: <source lang="xml"> <?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> <la...") |
No edit summary |
||
Line 82: | Line 82: | ||
|id ||int ||Identifier of the updated contact || | |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 < | |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 <nowiki> {{Contact.Identifier}},{{Task.Counterparty.Identifier}} </nowiki> and those similar|| | ||
|- | |- | ||
|general||int ||number of the updated contact (used if id is not specified)|| | |general||int ||number of the updated contact (used if id is not specified)|| |
Revision as of 10:15, 1 March 2024
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 | ||
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 | |||
address | string | Address | ||
description | string | Additional information | ||
sex | enum | пол | gender | valid values see in the section ccustomer's gender |
site | string | website | ||
skype | string | skype | ||
string | ||||
icq | string | номер-icq | ||
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>