Planfix API action.add: Difference between revisions
From Planfix
No edit summary |
(→Go To) |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 83: | Line 83: | ||
|contact.general||int ||contact's phone number || | |contact.general||int ||contact's phone number || | ||
|- | |- | ||
|taskNewStatus ||enum ||this action changes the task status to the one specified ||not required; for a list of valid values, see the task statuses section [[Planfix API: Task statuses| task statuses]] | |taskNewStatus ||enum ||this action changes the task status to the one specified ||not required; for a list of valid values, see the task statuses section [[Planfix API:Task statuses| task statuses]] | ||
|- | |- | ||
|notifiedList || ||the following list of users must be notified of this action ||not required | |notifiedList || ||the following list of users must be notified of this action ||not required | ||
Line 99: | Line 99: | ||
|dateTime || DateTime || date/time of creation; not required; by default current date/time is used || can only be used if an employee with admin rights is logged in | |dateTime || DateTime || date/time of creation; not required; by default current date/time is used || can only be used if an employee with admin rights is logged in | ||
|- | |- | ||
| | |analitics || || sets (attaches) a list of data tags || not required | ||
|- | |- | ||
| | |analitics.analitic || || node containing data on the attached tag data || | ||
|- | |- | ||
| | |analitic.id || int || data tag identifier || for a list of available data tags, use the [[Planfix API analitic.getList| analitic.getList]] function | ||
|- | |- | ||
| | |alitic.analiticData || || list of field values || | ||
|- | |- | ||
| | |analiticData.itemData || || value of one of the parameters || | ||
|- | |- | ||
|itemData.fieldId || int || parameter identifier || identifier of the parameter equal to [[Planfix API | |itemData.fieldId || int || parameter identifier || identifier of the parameter equal to [[Planfix API analitic.getOptions|field.id]] | ||
|- | |- | ||
|itemData.value || string || value || | |itemData.value || string || value || | ||
|- | |- | ||
| ||colspan="3" | format of values for different types of data tags: | | ||colspan="3" | format of values for different types of data tags: | | ||
|- | |- | ||
| || DATE || colspan="2"| dd-mm-yyyy | | || DATE || colspan="2"| dd-mm-yyyy | ||
Line 160: | Line 160: | ||
== Go To == | == Go To == | ||
*[[Planfix API:Actions]] | *[[Planfix API:Actions]] | ||
*[[Error codes]] | *[[Error codes XML API v1|Error codes]] | ||
*[[List of functions]] | *[[List of functions]] |
Latest revision as of 14:42, 15 March 2024
Adding an action. Incomplete version of the function, will be improved:
<?xml version="1.0" encoding="UTF-8"?>
<request method="action.add">
<account></account>
<sid></sid>
<action>
<description></description>
<task>
<id></id>
<general></general>
</task>
<contact>
<general></general>
</contact>
<taskNewStatus></taskNewStatus>
<notifiedList>
<user>
<id></id>
<id></id>
<!-- ... -->
</user>
</notifiedList>
<isHidden></isHidden>
<owner>
<id></id>
</owner>
<dateTime></dateTime>
<analitics>
<analitic>
<id></id>
<analiticData>
<itemData>
<fieldId></fieldId>
<value></value>
</itemData>
<itemData>
<fieldId></fieldId>
<value></value>
</itemData>
<!-- ... -->
</analiticData>
</analitic>
<analitic>
<id></id>
<analiticData>
<itemData>
<fieldId></fieldId>
<value></value>
</itemData>
<itemData>
<fieldId></fieldId>
<value></value>
</itemData>
<!-- ... -->
</analiticData>
</analitic>
<!-- ... -->
</analitics>
</action>
<signature></signature>
</request>
Name | Тип | Value | Notes |
---|---|---|---|
description | string | text with action/comment description | |
task (contact) | task/contact where the action is being added - only one node (either a task or a contact) | ||
task.id | int | task identifier | |
task.general | int | task number (if given, used instead of ID) | |
contact.general | int | contact's phone number | |
taskNewStatus | enum | this action changes the task status to the one specified | not required; for a list of valid values, see the task statuses section task statuses |
notifiedList | the following list of users must be notified of this action | not required | |
notifiedList.user | list of users who will receive a notification | ||
notifiedList.user.id | int | user identifier | |
isHidden | bool | whether or not the action (comment) is hidden from all users, excluding the list of those notified | not required, by default set to 0 (false) |
owner | person who created the action | not required. If not specified, the user who executes the function will be used | |
owner.id | int | action creator's identifier | |
dateTime | DateTime | date/time of creation; not required; by default current date/time is used | can only be used if an employee with admin rights is logged in |
analitics | sets (attaches) a list of data tags | not required | |
analitics.analitic | node containing data on the attached tag data | ||
analitic.id | int | data tag identifier | for a list of available data tags, use the analitic.getList function |
alitic.analiticData | list of field values | ||
analiticData.itemData | value of one of the parameters | ||
itemData.fieldId | int | parameter identifier | identifier of the parameter equal to field.id |
itemData.value | string | value | |
format of values for different types of data tags: | | |||
DATE | dd-mm-yyyy | ||
TIME | hh:mm | ||
TIMEPERIOD | <begin>hh:mm</begin><end>hh:mm</end> | ||
HANDBOOK | int - directory entry key | ||
USER | int - employee identifier | ||
CLIENT | int - counterparty identifier | ||
LOGINLIST | <id></id>...<id></id> - where each node contains an employee identifier the data tag relates to (there may be only one node). |
Result of successful request:
<?xml version="1.0" encoding="UTF-8"?>
<response status="ok">
<action>
<id></id>
</action>
</response>
Name | Type | Value | Notes |
---|---|---|---|
action.id | int | identifier of the action added |
Otherwise, an error response will be returned:
<?xml version="1.0" encoding="UTF-8"?>
<response status="error">
<code></code>
</response>