This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Working with Projects in Zoho Books



Overview

The following operations allow you to work with projects. Click an operation name to see details on how to use it.

For a sample proxy service that illustrates how to work with projects, see Sample configuration

OperationDescription

createProject

Creates a new project.

getProjectRetrieves the details of a project.
listProjectsRetrieves all projects with pagination.
assignUsersToProjectAssigns users to a project.

Operation details

This section provides further details on the operations related to projects.

Creating a new project

The createProject operation creates a new project for the customer.

createProject
<zohobooks.createProject>
    <budgetHours>{$ctx:budgetHours}</budgetHours>
    <users>{$ctx:users}</users>
    <budgetType>{$ctx:budgetType}</budgetType>
    <rate>{$ctx:rate}</rate>
    <customerId>{$ctx:customerId}</customerId>
    <budgetAmount>{$ctx:budgetAmount}</budgetAmount>
    <description>{$ctx:description}</description>
    <billingType>{$ctx:billingType}</billingType>
    <tasks>{$ctx:tasks}</tasks>
	<projectName>{$ctx:projectName}</projectName>
</zohobooks.createProject>
Properties
  • budgetHours: Budgeting a staff.
  • users: List of users assigned to the project.
  • budgetType: The way you budget.
  • rate: Hourly rate for a task.
  • customerId: The ID of the customer.
  • budgetAmount: Give a value, if you are estimating total project cost.
  • description: The description of the project.
  • billingType: The way you bill your customer.
  • tasks: List of tasks allocated to the project.
  • projectName: The name of the project.
Sample request

Following is a sample REST/JSON request that can be handled by the createProject operation.

Sample Request for createProject
{
	"apiUrl": "https://books.zoho.com",
	"authToken": "57e6fad184585333a76eab2906ad9dd1",
	"organizationId": "48996196",
	"budgetType":"hours_per_staff",
	"customerId":"122825000000040003",
	"description":"this is to check param",
	"billingType":"based_on_task_hours",
	"projectName":"test projectC12"
}

Note

There are more optional parameters available. For more information on the usage of these parameters please check the API document. 

Related Zoho Books documentation

https://www.zoho.com/books/api/v3/projects/#create-a-project

Retrieving the details of a project

The getProject operation retrieves the details of a project.

getProject
<zohobooks.getProject>
	<projectId>{$ctx:projectId}</projectId>
</zohobooks.getProject>
Properties
  • projectId: The ID of the project.
Sample request

Following is a sample REST/JSON request that can be handled by the getProject operation.

Sample Request for getProject
{
    "projectId": "122825000000048015",
    "apiUrl": "https://books.zoho.com",
    "authToken": "57e6fad184585333a76eab2906ad9dd1",
    "organizationId": "48996196"
}
Related Zoho Books documentation

https://www.zoho.com/books/api/v3/projects/#get-a-project

Retrieving all projects with pagination

The listProjects operation retrieves all projects with pagination.

listProjects
<zohobooks.listProjects>
    <sortColumn>{$ctx:sortColumn}</sortColumn>
    <customerId>{$ctx:customerId}</customerId>
    <page>{$ctx:page}</page>
    <perPage>{$ctx:perPage}</perPage>
	<filterBy>{$ctx:filterBy}</filterBy>
</zohobooks.listProjects>
Properties
  • sortColumn: Sort projects. Allowed Values: project_name, customer_name, rate and created_time
  • customerId: Search projects by customer ID.
  • page: Number of page to be returned - Pagination value.
  • perPage: Specifies how many entries should be returned in the response.
  • filterBy: Filter projects by any status. Allowed Values: Status.All, Status.Active and Status.Inactive.
Sample request

Following is a sample REST/JSON request that can be handled by the listProjects operation.

Sample Request for listProjects
{
	"apiUrl": "https://books.zoho.com",
	"authToken": "57e6fad184585333a76eab2906ad9dd1",
	"organizationId": "48996196",
	"sortColumn":"created_time",
	"customerId":"460000000044001",
	"page":"1",
	"perPage":"200",
	"filterBy":"Status.Active"
}
Related Zoho Books documentation

https://www.zoho.com/books/api/v3/projects/#list-projects

Assigning users to a project

The assignUsersToProject operation assigns users to a project.

assignUsersToProject
<zohobooks.assignUsersToProject>
    <users>{$ctx:users}</users>
	<projectId>{$ctx:projectId}</projectId>
</zohobooks.assignUsersToProject>
Properties
  • users: The array of user details.
  • projectId: The ID of the project.
Sample request

Following is a sample REST/JSON request that can be handled by the assignUsersToProject operation.

Sample Request for assignUsersToProject
{
	"apiUrl": "https://books.zoho.com",
	"authToken": "9298fb0a5122ca1e101eddddb6398d70",
	"organizationId": "49545655",
	"projectId":"122825000000049001",
	"users":[
		{
		"user_id": "122825000000043013",
		"rate": "3.0",
		"budget_hours": "10"
		},
		{
		"user_id": "122825000000048025",
		"rate": "3.0",
		"budget_hours": "10"
		}
		]
}
Related Zoho Books documentation

https://www.zoho.com/books/api/v3/projects/users/#assign-users

Sample configuration

Following is a sample proxy service that illustrates how to connect to Zoho Books with the init operation and use the createProject operation. The sample request for this proxy can be found in the createProject sample request. You can use this sample as a template for using other operations in this category.

Sample Proxy
<?xml version="1.0" encoding="UTF-8"?>
	<proxy xmlns="http://ws.apache.org/ns/synapse" name="zohobooks_createProject" transports="https,http" statistics="disable" trace="disable" startOnLoad="true">
	 <target>
	 <inSequence>
      <property name="authToken" expression="json-eval($.authToken)"/>
      <property name="apiUrl" expression="json-eval($.apiUrl)"/>
      <property name="organizationId" expression="json-eval($.organizationId)"/>
      <property name="budgetHours" expression="json-eval($.budgetHours)"/>
      <property name="users" expression="json-eval($.users)"/>
      <property name="budgetType" expression="json-eval($.budgetType)"/>
      <property name="rate" expression="json-eval($.rate)"/>
      <property name="customerId" expression="json-eval($.customerId)"/>
      <property name="budgetAmount" expression="json-eval($.budgetAmount)"/>
      <property name="description" expression="json-eval($.description)"/>
      <property name="billingType" expression="json-eval($.billingType)"/>
      <property name="tasks" expression="json-eval($.tasks)"/>
      <property name="projectName" expression="json-eval($.projectName)"/>
      <zohobooks.init>
         <authToken>{$ctx:authToken}</authToken>
         <apiUrl>{$ctx:apiUrl}</apiUrl>
         <organizationId>{$ctx:organizationId}</organizationId>
      </zohobooks.init>
      <zohobooks.createProject>
         <budgetHours>{$ctx:budgetHours}</budgetHours>
         <users>{$ctx:users}</users>
         <budgetType>{$ctx:budgetType}</budgetType>
         <rate>{$ctx:rate}</rate>
         <customerId>{$ctx:customerId}</customerId>
         <budgetAmount>{$ctx:budgetAmount}</budgetAmount>
         <description>{$ctx:description}</description>
         <billingType>{$ctx:billingType}</billingType>
         <tasks>{$ctx:tasks}</tasks>
         <projectName>{$ctx:projectName}</projectName>
      </zohobooks.createProject>
	   <respond/>
	 </inSequence>
	  <outSequence>
	   <send/>
	  </outSequence>
	 </target>
   <description/>
  </proxy>