Planfix API action.add: Difference between revisions

From Planfix
Jump to: navigation, search
No edit summary
No edit summary
Line 121: Line 121:
| || TIMEPERIOD || colspan="2"| <begin>hh:mm</begin><end>hh:mm</end>
| || TIMEPERIOD || colspan="2"| <begin>hh:mm</begin><end>hh:mm</end>
|-
|-
| || HANDBOOK || colspan="2"| int - directory entry key
| || DIRECTORY || colspan="2"| int - directory entry key
|-
|-
| || USER || colspan="2"| int  - employee identifier
| || USER || colspan="2"| int  - employee identifier
Line 127: Line 127:
| || CLIENT || colspan="2"| int - counterparty identifier
| || CLIENT || colspan="2"| int - counterparty identifier
|-
|-
| || LOGINLIST || colspan="2"| <id></id>...<id></id> - where each node contains an employee identifier the data tag relates to (there may be only one node).
| || USERNAMELIST || colspan="2"| <id></id>...<id></id> - where each node contains an employee identifier the data tag relates to (there may be only one node).
|-
|-
|}
|}

Revision as of 15:12, 4 August 2023


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>
DIRECTORY int - directory entry key
USER int - employee identifier
CLIENT int - counterparty identifier
USERNAMELIST <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>


Go To