Projects
Our Projects resource is custom designed to enable the integration with any third-party application.
Projects resource allows you to create/update a Project and tracks who created/updated the project along with the date and time. You can also retrieve the Project information through this API.
GET
End Point: /projects
Search for any existing Projects using this service.
You can fetch the project list by the Project status using the 'Include Completed' dropdown.
Include Completed dropdown - True: you can get the Completed status projects list.
Include Completed dropdown - False: you can get the Open status projects list. By Default, when you blank search the project list, system fetches the Open status projects.
In the project record list, who created/updated the project along with date and time is fetched for the respective record as shown in the payload.
You can also apply filters as defined here.
Sample response payload
[
{
"recordid": "string",
"projectid": "string",
"description": "string",
"status": "Open",
"projectstatus": "Avaiting Approval",
"stage": "Planning",
"companyid": "string",
"companyname": "string",
"contactid": "string",
"contactname": "string",
"managerid": "string",
"managername": "string",
"startdate": "MM/dd/yyyy HH:mm",
"enddate": "MM/dd/yyyy HH:mm",
"actualdate": "MM/dd/yyyy HH:mm",
"createdbyid": "string",
"createdbyname": "string",
"createddate": "MM/dd/yyyy HH:mm",
"updatedbyid": "string",
"updatedbyname": "string",
"updateddate": "MM/dd/yyyy HH:mm"
}
]
GET by ID
End Point: /projects/{id}
You can retrieve all the information including the comments of a specific Project by ID using this service.
Along with the project information, you will also see who created/updated the project along with date and time as shown in the payload.
Sample response payload
{
"recordid": "string",
{
"recordid": "string",
"projectid": "string",
"description": "string",
"status": "Open",
"companyid": "string",
"companyname": "string",
"contactid": "string",
"contactname": "string",
"managerid": "string",
"managername": "string",
"projectstatus": "Avaiting Approval",
"stage": "Planning",
"startdate": "MM/dd/yyyy HH:mm",
"enddate": "MM/dd/yyyy HH:mm",
"actualdate": "MM/dd/yyyy HH:mm",
"createdbyid": "string",
"createdbyname": "string",
"createddate": "MM/dd/yyyy HH:mm",
"updatedbyid": "string",
"updatedbyname": "string",
"updateddate": "MM/dd/yyyy HH:mm",
"udfs":
[
{
"caption": "string",
"value": "string"
}
],
"contacts":
[
{
"recordid": "string",
"contactid": "string",
"contactname": "string",
"emailaddr": "string",
"phoneno": "string",
"type": "string"
}
],
"comments":
[
{
"recordid": "string",
"comment": "string"
}
]
}
}
POST
End Point: /projects
You can create a Project with the following details that are available in the Project creation window in R2.
Information tab (all fields)
Contacts tab (all columns)
Project UDFs
Comments
Generate Project ID based on the Site IDs setup
The Project ID can be generated in a sequence based on the Site IDS setup defined for the respective site. You can provide the site when creating a project. Based on the site provided, system picks the corresponding IDS set up for the provided site to generate the project ID.
If the site is not defined, system considers the API user's default site to generate the project ID. As usual, if you provide the project ID in the payload, then Site IDS setup will be ignored to generate the project ID.
We have introduced a header attribute called UserContext
to manually provide site information.
The header attributes has the following syntax — 'UserContext: {"siteid": "LA"}'
Here, based on the siteid provided, the system picks the corresponding IDS set up for the provided site to generate a project ID.
If the given Site ID is invalid, API will return an error message in the format — Invalid siteid: <given site ID>
Mandatory field details must be entered for successful creation.
On successful creation, you will see the entire object in the response along with created details i.e. created by id, created name, and created date.
The ID of the new record will be returned in 'Location' attribute of the HTTP Header.
The 'Location' indicates the target of a redirection or the URL of a newly created resource.
For example: /projects/{id}
Sample response payload
{
"recordid": "string",
{
"recordid": "string",
"projectid": "string",
"description": "string",
"status": "Open",
"contactid": "string",
"managerid": "string",
"projectstatus": "Avaiting Approval",
"stage": "Planning",
"startdate": "MM/dd/yyyy HH:mm",
"enddate": "MM/dd/yyyy HH:mm",
"actualdate": "MM/dd/yyyy HH:mm",
"udfs":
[
{
"caption": "string",
"value": "string"
}
],
"contacts":
[
{
"recordid": "string",
"contactid": "string",
"contactname": "string",
"emailaddr": "string",
"phoneno": "string",
"type": "string"
}
],
"comments":
[
{
"recordid": "string",
"comment": "string"
}
]
}
PUT
End Point: /projects/{id}
You can modify the data including the comments of an existing Project details.
After a successful update, you will see the entire object in the response along with created and updated details i.e, created and updated ID, name, and date.
Sample request payload
{
"recordid": "string",
{
"recordid": "string",
"projectid": "string",
"description": "string",
"status": "Open",
"contactid": "string",
"managerid": "string",
"projectstatus": "Avaiting Approval",
"stage": "Planning",
"startdate": "MM/dd/yyyy HH:mm",
"enddate": "MM/dd/yyyy HH:mm",
"actualdate": "MM/dd/yyyy HH:mm",
"udfs":
[
{
"caption": "string",
"value": "string"
}
],
"contacts":
[
{
"recordid": "string",
"contactid": "string",
"contactname": "string",
"emailaddr": "string",
"phoneno": "string",
"type": "string"
}
],
"comments":
[
{
"recordid": "string",
"comment": "string"
}
]
}