How to get API when a project is updated?

Updated on March 26, 2020 05:16AM by Admin

Businesses tend to use multiple applications to handle all the information related to their business. Due to this, there are instances where Employees tend to lose track of all the information. Using API, you can ensure that the information is added in the counterparts.

You can make use of the API to update the existing Project records in Apptivo without logging into it.

  • To get the API for updating a project, go to Settings → API → Update. You can see the Update Project API page in the right pane.
Settings

  • Here, you can gain the API information needed to update a Project. The different attributes present are mentioned in detail below.

API URL

This is the URL to update a project using API.

https://api2.apptivo.com/app/dao/v6/projects?a=update&projectInformation={ ... }&attributeName=[...]&isCustomAttributesUpdate=<...>&apiKey=&accessKey=;

ProjectInformation

This has the data related to the attributes whose values will be added when a Project is updated.

{

"id": "id",   - (Id of the project)

"objectId": "objectId", - (ObjectId of the project that is 88)

"name": "name", - (Name of the project)

"description": "description", - (description of the project)

"startDate": "startDate", - (StartDate of the project)

"endDate": "endDate", - (endDate of the project)

 "status": "status", - (status of the project)

"statusMeaning": "statusMeaning", - (status Meaning of the project)

"statusId": "statusId", - (statusId of the project)

"priorityMeaning": "priorityMeaning", - (priority Meaning of the project)

"priorityId": "priorityId", - (priorityId of the project)

"priority": "priority", - (priority of the project)

"billingMethodName": "billingMethodName", - (Billing method Name of the project)

"billingMethodCode": "billingMethodCode", - (Billing Method code of the project)

"billingMethodId": "billingMethodId", - (Billing Method Id of the project)

"projectManagerId": "projectManagerId", - (project Manager Id of the project)

"projectManagerName": "projectManagerName", - (Project Manager Name of the project)

"timesheetApprovalPersonType": "timesheetApprovalPersonType" - (Timesheet approval person type of the project)

"timesheetApprovalObjectRefName": "timesheetApprovalObjectRefName", - (Timesheet approval ObjectRefName of the project)

"timesheetApprovalObjectId": "timesheetApprovalObjectId", - (TimesheetApprovalObjectId for the project)

"timesheetApprovalObjectRefId": "timesheetApprovalObjectRefId", - (Timesheet approval objectRefId of the project)

"customerName": "customerName", - (Customer Name of the project)

 "customerId": "customerId", - (Customer Id of the project)

"labels": [   (This is the tags)

      {

          "LabelName": "LabelName",

          "LabelId": "LabelID"

      }

      ],

      "projectPeople": [  (projectpeople added in the teams tab)

      {

          "employeeId": "employeeId",

          "employeeName": "employeeName",

          "emailId": "emailId"

      }

      ],

"objectStatus": "objectStatus", - (object status of the project)

"currencyCode": "currencyCode", - (currency code of the project)

"estimatedEffort": "estimatedEffort", - (Estimate effort of the project)

"estimatedCost": "estimatedCost", - (Estimate Cost of the project)

"projectFee": "projectFee", - (project Fee of the project)

"isActive": "isActive", - (It will depend on status field. If the status is enable in settings, isActive will be true otherwise false)

"createdBy": "createdBy", - (userId of who created the project)

"updatedBy": "updatedBy", - (UserId of recent project modifier)

"createdByName": "createdByName", - (Employee Name of who created the project)

"creationDate": "creationDate", - (project creation Date)

"lastUpdateDate": "lastUpdateDate", - (Last modified date of the project)

"lastUpdatedByName": "lastUpdatedByName", - (Name of the Employee who modified the project at last)

//Custom Address of the project

"addresses": [

      {

           "addressAttributeId": apptivo_attribute_addressAttributeId_1558955450297_923_922261558955450297_763,

           "addressType": "addressType",

           "addressTypeCode": "addressTypeCode",

           "addressLine1": "addressLine1",

           "addressLine2": "addressLine2",

           "city": "city",

           "stateCode": "stateCode",

           "state": "state",

           "zipCode": "zipCode",

           "countryId": "countryId",

           "countryName": "countryName",

           "countryCode": "countryCode",

           "deliveryInstructions": "deliveryInstructions"

      },

       


      {

           "addressAttributeId": apptivo_attribute_addressAttributeId_1568179443094_556_921281568179443094_899,

           "addressType": "addressType",

           "addressTypeCode": "addressTypeCode",

           "addressLine1": "addressLine1",

           "addressLine2": "addressLine2",

           "city": "city",

           "stateCode": "stateCode",

           "state": "state",

           "zipCode": "zipCode",

           "countryId": "countryId",

           "countryName": "countryName",

           "countryCode": "countryCode",

           "deliveryInstructions": "deliveryInstructions"

      }

       ],

}

// Custom Attributes of the project

"customAttributes": [

          {

              "id": currency_1580729692110_502_1152441580729692110_781,

              "customAttributeId": currency_1580729692110_502_1152441580729692110_781,

              "customAttributeName": currency_1580729692110_502_1152441580729692110_781,

              "customAttributeType": currency,

              "customAttributeValue": 

          },

          {

              "id": formula_1580729692111_169_1166641580729692111_952,

              "customAttributeId": formula_1580729692111_169_1166641580729692111_952,

              "customAttributeName": formula_1580729692111_169_1166641580729692111_952,

              "customAttributeType": formula,

              "customAttributeValue": 

          },

          {

              "id": referenceField_1582192577411_46_801051582192577411_209,

              "customAttributeId": referenceField_1582192577411_46_801051582192577411_209,

              "customAttributeName": referenceField_1582192577411_46_801051582192577411_209,

              "customAttributeType": referenceField,

              "customAttributeValue": 

          },

          {

              "id": referenceField_1582192705307_254_1272911582192705307_849,

              "customAttributeId": referenceField_1582192705307_254_1272911582192705307_849,

              "customAttributeName": referenceField_1582192705307_254_1272911582192705307_849,

              "customAttributeType": referenceField,

              "customAttributeValue": 

          }

      ]

}


“attributeName” : ["description"] - (This the array of modified Field Names)

“attributeIds” : ["description_attr"] - (This is the array of modified Field AttributeIds)

“isCustomAttributesUpdate” : true - (Set as true if you update any custom Attribute)

 



The mandatory fields required to create a project are mentioned below:

  • startDate
  • projectManagerId
  • projectManagerName
  • currency
  • billingMethodId
  • billingMethodName
  • statusMeaning
  • statusId
  • priorityId
  • priorityMeaning

Description of Mandatory Attributes

  • name

This is a text field which indicates the name of the Project.

  • startDate

This is a date field denoting the start date of the Project.

  • projectManagerId

You can use this attribute to select any employee. This is the ID of the Project Manager.

  • projectManagerName

This attribute is used to add the name of the Project manager.

  • currency

Here, you can add the currency format of the project. By default, it will display the firm country currency code. This is a search and select field. If you want to create a project with multicurrency, you need to configure the multi-currency from the User Menu → Business Settings page → Currencies.

  • billingMethodId

This is the ID of the Billing Method.

  • billingMethodName

You can use this field to add the Name of the Billing Method. In projects, Billing is carried out using four methods. They are,

  • Project Flat Fee
  • Milestone Billing
  • Time & Expenses
  • Non- Billable
  • statusId

This indicates the ID of the project status.

  • statusMeaning

This attribute is used to add the status of the Project. By default, we will display 6 project statuses. They are,

  • Awaiting Kickoff
  • On Track
  • Behind Schedule
  • In Trouble
  • On Hold
  • Completed

You can also create your own project status or change the name of the status by navigating to Projects → Settings → Projects → Statuses → Projects.

  • priorityId

This is the Id of project priority.

  • priorityMeaning

Here, you can add the priority of the project. By default, we have three priorities. They are,

  • High
  • Medium
  • Low

You can also create a new priority ord edit the existing priority by moving to Settings → Projects → Priorities.

Description of Additional Attributes

Projects App has the following additional attributes. It is not necessary to add the values for these attributes.

  • description

You can add a detailed description of the project in this attribute.

  • endDate

You can use this attribute to record the end date of the project.

  • customerName

You can enter the customer name here.

  • customerId

This is the customer ID of the project.

  • labels

Labels denote the tags created from Settings → General → Tags.

  • projectpeople

projectpeople is nothing but who are all the employees going to work on that project.

  • estimatedEffort

The estimated effort needed for the completion of the Project is recorded here.

  • estimatedCost

You can use this to enter the estimated cost for the project.

  • projectFee

projectFee is used to record the exact project fee for the project.

  • isActive

This is based on project status. If the project status is enabled in the Settings → Projects → Statuses → project statuses, it will be “Y” otherwise “N”.

  • customAttributes

To create records with custom attributes, you have to send this param.

  • Addresses

This is the custom address field used to add the email address.

  • emailAddresses

This is the custom email address field where you can enter the email address.

  • phoneNumbers

This is a custom phone number field where you can add the phone number.

Updating a Project

Create an API code with the values used while creating a Project. Modify the code with values that have to be updated and run it in your browser.

For Instance: Consider updating the Project Name and Description in an existing project in the Projects App.

Project Overview
  • In the Update API’s ProjectInformation, add the existing values of attributes with changes in the values where an update has to be done.
  • This is the API used to update a Project in Caroline’s business.
Project API

  • Here, you can see the API URL and ProjectInformation are combined to update an API for a project update.
  • Now, copy the API and run it in your browser. You can see it is loaded successfully.
  • Subsequently, the name and description are updated in the existing project.
Output Update