Planfix API action.add: Difference between revisions

From Planfix
Jump to: navigation, search
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 5: Line 5:
|description=Planfix API action.add
|description=Planfix API action.add
}}
}}
Adding an action. Incomplete version of the function, will be improved:
Adding an action. Incomplete version of the function, will be improved:
<source lang="xml">
<source lang="xml">
Line 95: Line 93:
|owner || || person who created the action||not required. If not specified, the user who executes the function will be used
|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 ||  
|owner.id ||int ||action creator's identifier ||If it is a contact, you must use the userid from the [[Planfix API contact.get|contact.get]] response
|-
|-
|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

Latest revision as of 14:22, 11 December 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 If it is a contact, you must use the userid from the contact.get response
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>


Go To