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 FreshBooks
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.
Operation | Description |
|---|---|
Creates a new timesheet entry. | |
Retrieves a single time entry record. | |
Retrieves a list of timesheet entries. | |
Updates an existing time entry. |
Operation details
This section provides details on the time entries.
Creating a new timesheet entry
The createTimeEntry operation creates a new timesheet entry.
createTimeEntry
<freshbooks.createTimeEntry>
<projectId>{$ctx:projectId}</projectId>
<taskId>{$ctx:taskId}</taskId>
<staffId>{$ctx:staffId}</staffId>
<hours>{$ctx:hours}</hours>
<notes>{$ctx:notes}</notes>
<date>{$ctx:date}</date>
</freshbooks.createTimeEntry>Properties
projectId:The project ID of the time entry.taskId:The task ID of the time entry.staffId:The staff ID of the time entry.hours:The number of hours of the time entry.notes:The additional notes.date:Effective date of time entry
Sample request
Following is a sample REST/XML request that can be handled by the createTimeEntry operation.
Sample Request for createTimeEntry
<createTimeEntry>
<arbitraryPassword></arbitraryPassword>
<apiUrl>https://supun.freshbooks.com</apiUrl>
<authenticationToken>a0491134a07f92b7570a4790e4c88798</authenticationToken>
<projectId>20137</projectId>
<taskId>215714</taskId>
<staffId>1</staffId>
<hours>1</hours>
<notes>test</notes>
<date>2015-04-20</date>
</createTimeEntry> Related FreshBooks documentation
http://www.freshbooks.com/developers/docs/time-entries#time_entry.create
Retrieving a single time entry record
The getTimeEntry operation retrieves a single time entry record.
getTimeEntry
<freshbooks.getTimeEntry>
<timeEntryId>{$ctx:timeEntryId}</timeEntryId>
</freshbooks.getTimeEntry>Properties
timeEntryId:The ID of a time entry.
Sample request
Following is a sample REST/XML request that can be handled by the getTimeEntry operation.
Sample Request for getTimeEntry
<getTimeEntry>
<arbitraryPassword></arbitraryPassword>
<apiUrl>https://supun.freshbooks.com</apiUrl>
<authenticationToken>a0491134a07f92b7570a4790e4c88798</authenticationToken>
<timeEntryId>43966</timeEntryId>
</getTimeEntry> Related FreshBooks documentation
http://www.freshbooks.com/developers/docs/time-entries#time_entry.get
Retrieving a list of timesheet entries
The listTimeEntries operation retrieves a list of timesheet entries.
listTimeEntries
<freshbooks.listTimeEntries>
<page>{$ctx:page}</page>
<perPage>{$ctx:perPage}</perPage>
<projectId>{$ctx:projectId}</projectId>
<taskId>{$ctx:taskId}</taskId>
<dateFrom>{$ctx:dateFrom}</dateFrom>
<dateTo>{$ctx:dateTo}</dateTo>
</freshbooks.listTimeEntries>Properties
page:The number of the page.perPage:The number of results per page.projectId:The unique identifier of the project by which the results can be filtered.taskId:The unique identifier of the task by which the results can be filtered.dateFrom:The 'from date' of the task by which the results can be filtered.dateTo:The 'to date' of the task by which the results can be filtered.
Sample request
Following is a sample REST/XML request that can be handled by the listTimeEntries operation.
Sample Request for listTimeEntries
<listTimeEntries>
<arbitraryPassword></arbitraryPassword>
<apiUrl>https://supun.freshbooks.com</apiUrl>
<authenticationToken>a0491134a07f92b7570a4790e4c88798</authenticationToken>
<page>1</page>
<perPage>5</perPage>
<projectId>20137</projectId>
<taskId>215714</taskId>
<dateFrom>2015-04-19</dateFrom>
<dateTo>2015-04-21</dateTo>
</listTimeEntries>Related FreshBooks documentation
http://www.freshbooks.com/developers/docs/time-entries#time_entry.list
Updating an existing time entry
The updateTimeEntry operation updates an existing time entry.
updateTimeEntry
<freshbooks.updateTimeEntry>
<timeEntryId>{$ctx:timeEntryId}</timeEntryId>
<projectId>{$ctx:projectId}</projectId>
<taskId>{$ctx:taskId}</taskId>
<staffId>{$ctx:staffId}</staffId>
<hours>{$ctx:hours}</hours>
<notes>{$ctx:notes}</notes>
<date>{$ctx:date}</date>
</freshbooks.updateTimeEntry>Properties
timeEntryId:The ID of a time entry.projectId:The project ID of the time entry.taskId:The task ID of the time entry.staffId:The staff ID of the time entry.hours:The number of hours of the time entry.notes:The additional notes.date:Effective date of the time entry.