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 Time Entries in Zoho Books



Overview

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

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

OperationDescription

createTimeEntry

Creates a time entry.

getTimeEntryRetrieves details of a time entry.
listTimeEntriesRetrieves all time entries with pagination.

Operation details

This section provides further details on the operations related to time entries.

Creating a time entry

The createTimeEntry operation creates/logs a time entry.

createTimeEntry
<zohobooks.createTimeEntry>
    <taskId>{$ctx:taskId}</taskId>
    <isBillable>{$ctx:isBillable}</isBillable>
    <logTime>{$ctx:logTime}</logTime>
    <userId>{$ctx:userId}</userId>
    <beginTime>{$ctx:beginTime}</beginTime>
    <logDate>{$ctx:logDate}</logDate>
    <startTimer>{$ctx:startTimer}</startTimer>
    <projectId>{$ctx:projectId}</projectId>
    <notes>{$ctx:notes}</notes>
	<endTime>{$ctx:endTime}</endTime>
</zohobooks.createTimeEntry>
Properties
  • taskId: The ID of the task.
  • isBillable: Whether it is billable or not.
  • logTime: The time the user spent on this task. Either send this attribute or begin and end time attributes.
  • userId: The ID of the user.
  • beginTime: The time the user started working on this task.
  • logDate: The date on which the user spent on the task.
  • startTimer: Start timer.
  • projectId: The ID of the project.
  • notes: Description of the work done.
  • endTime: The time the user stopped working on this task.
Sample request

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

Sample Request for createTimeEntry
{
	"apiUrl": "https://books.zoho.com",
	"authToken": "57e6fad184585333a76eab2906ad9dd1",
	"organizationId": "48996196",
	"taskId":"122825000000048043",
	"isBillable":"true",
	"logTime":"5:00",
	"userId":"122825000000048025",
	"beginTime":"10:00",
	"logDate":"2014-10-17",
	"startTimer":"2013-09-18 19:12:19",
	"projectId":"122825000000049001",
	"notes":"testing",
	"endTime":"15:00"
}
Related Zoho Books documentation

https://www.zoho.com/books/api/v3/projects/timeentries/#log-time-entries

Retrieving details of a time entry

The getTimeEntry operation retrieves details of a time entry.

getTimeEntry
<zohobooks.getTimeEntry>
	<timeEntryId>{$ctx:timeEntryId}</timeEntryId>
</zohobooks.getTimeEntry>
Properties
  • timeEntryId: The ID of the logged time entry.
Sample request

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

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

https://www.zoho.com/books/api/v3/projects/timeentries/#get-a-time-entry

Retrieving all time entries with pagination

The listTimeEntries operation retrieves all time entries with pagination.

listTimeEntries
<zohobooks.listTimeEntries>
    <sortColumn>{$ctx:sortColumn}</sortColumn>
    <fromDate>{$ctx:fromDate}</fromDate>
    <page>{$ctx:page}</page>
    <userId>{$ctx:userId}</userId>
    <perPage>{$ctx:perPage}</perPage>
    <projectId>{$ctx:projectId}</projectId>
    <filterBy>{$ctx:filterBy}</filterBy>
	<toDate>{$ctx:toDate}</toDate>
</zohobooks.listTimeEntries>
Properties
  • sortColumn: Sort time entries. Allowed Values: project_name, task_name, user_name, log_date, timer_started_at and customer_name
  • fromDate: The date from which the time entries logged are to be fetched.
  • page: Number of pages to be returned - Pagination value.
  • userId: Search time entries by user_id.
  • perPage: Specifies how many entries should be returned in the response.
  • projectId: Search time entries by project_id.
  • filterBy: Filter time entries by date and status. Allowed Values: Date.All, Date.Today, Date.ThisWeek and etc.
  • toDate: The date up to which the time entries logged are to be fetched.
Sample request

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

Sample Request for listTimeEntries
{
	"apiUrl": "https://books.zoho.com",
	"authToken": "57e6fad184585333a76eab2906ad9dd1",
	"organizationId": "48996196",
	"sortColumn":"task_name",
	"fromDate":"2013-09-18",
	"page":"1",	
	"userId":"122825000000039001",
	"perPage":"200",
	"projectId":"460000000044007",
	"filterBy":"Date.Today",
	"toDate":"2013-12-18"
}
Related Zoho Books documentation

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

Sample configuration

Following is a sample proxy service that illustrates how to connect to Zoho Books with the init operation and use the createTimeEntry operation. The sample request for this proxy can be found in the createTimeEntry 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_createTimeEntry" 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="taskId" expression="json-eval($.taskId)"/>
      <property name="isBillable" expression="json-eval($.isBillable)"/>
      <property name="logTime" expression="json-eval($.logTime)"/>
      <property name="userId" expression="json-eval($.userId)"/>
      <property name="beginTime" expression="json-eval($.beginTime)"/>
      <property name="logDate" expression="json-eval($.logDate)"/>
      <property name="startTimer" expression="json-eval($.startTimer)"/>
      <property name="projectId" expression="json-eval($.projectId)"/>
      <property name="notes" expression="json-eval($.notes)"/>
      <property name="endTime" expression="json-eval($.endTime)"/>
      <zohobooks.init>
         <authToken>{$ctx:authToken}</authToken>
         <apiUrl>{$ctx:apiUrl}</apiUrl>
         <organizationId>{$ctx:organizationId}</organizationId>
      </zohobooks.init>
      <zohobooks.createTimeEntry>
         <taskId>{$ctx:taskId}</taskId>
         <isBillable>{$ctx:isBillable}</isBillable>
         <logTime>{$ctx:logTime}</logTime>
         <userId>{$ctx:userId}</userId>
         <beginTime>{$ctx:beginTime}</beginTime>
         <logDate>{$ctx:logDate}</logDate>
         <startTimer>{$ctx:startTimer}</startTimer>
         <projectId>{$ctx:projectId}</projectId>
         <notes>{$ctx:notes}</notes>
         <endTime>{$ctx:endTime}</endTime>
      </zohobooks.createTimeEntry>
	   <respond/>
	 </inSequence>
	  <outSequence>
	   <send/>
	  </outSequence>
	 </target>
   <description/>
  </proxy>