Planfix API project.add / Create a project

From PlanFix
Revision as of 09:04, 3 August 2022 by Aliona (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Requests to create projects look as follows:

<?xml version="1.0" encoding="UTF-8"?>
<request method="project.add">
  <account></account>
  <sid></sid>
  <project>
    <title></title>
    <description></description>
    <owner>
      <id></id>
    </owner>
    <client>
      <id></id>
    </client>
    <status></status>
    <hidden></hidden>
    <hasEndDate></hasEndDate>
    <endDate></endDate>
    <group>
      <id></id>
    </group>
    <parent>
      <id></id>
    </parent>
    <auditors>
      <id></id>
      <id></id>
      <!-- ... -->
    </auditors>
    <managers>
      <id></id>
      <id></id>
      <!-- ... -->
    </managers>
    <workers>
      <id></id>
      <id></id>
      <!-- ... -->
    </workers>
    <customData>
      <customValue>
        <id></id>
        <value></value>
      </customValue>
      <!-- ... -->
    </customData>
  </project>
  <signature></signature>
</request>

If you don't pass a creator or set id=0, the user of the current session will be used as the creator. Counterparty is not a required parameter. Regular users (not contacts) are able to call this function.

Name Type Value Notes
sid string(32) session key created as a result of passing authentication Authentication
title string Project name
description string Description of the project set by the user
owner This field is not required. In this case, the creator will be the user who is making the request (determined by sid)
owner.id int dentifier of the user who will be the project creator. value 0 (zero) allowed. In this case, the creator will be the user who is making the request (determined by sid)
client not required
client.id int counterparty identifier value 0 (zero) allowed.
status enum status of the project being created for a list of valid values for this field, see the project statuses section
hidden bool hidden
hasEndDate bool whether or not there is an end date
endDate DateTime only used if hasEndDate parameter is true
group not required
group.id int project group identifier
parent not required
parent.id int parent project identifier
auditors project auditors not required
auditors.id int project auditor identifier
managers project managers not required
managers.id int project manager identifier
assignees project default assignees
assignees.id int default project assignee identifier
customData project custom field values
customData.customValue.id project custom field identifier
customData.customValue.value project custom field value (for task set, employee list, and directory entry set field types, separate identifiers with commas in square brackets)

Response when project creation is successful:

<?xml version="1.0" encoding="UTF-8"?>
<response status="ok">
  <project>
    <id></id>
  </project>
</response>
Name Type Value Notes
project.id int identifier of project created

Otherwise, an error response will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<response status="error">
  <code></code>
</response>


Go To