Planfix API action.add
From Planfix
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 |
datatags | sets (attaches) a list of data tags | not required | |
datatags.datatag | node containing data on the attached tag data | ||
datatag.id | int | data tag identifier | for a list of available data tags, use the datatag.getList function |
datatag.datatagData | list of field values | ||
datatagData.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>