Add & Update Time Entries
The Time tracking API allows you to access and manipulate time entries in similar fashion to using the daily timesheet view. This allows developers to create lightweight clients or widgets to track time beyond directly interacting with Harvest through the web browser.
Parameters
Parameter | Description |
---|---|
ID |
Time Entry ID |
Hours |
Number of (decimal time) hours tracked in this time entry |
Notes |
Time entry notes |
Project-ID |
Project ID that the time entry is associated with |
Spent-At |
Date of the time entry |
Task-ID |
Task ID that the time entry is associated with |
Client-ID |
Client ID that the time entry is associated with |
User-ID |
User ID that tracked this time entry |
Is-Billed |
true if the time entry has been marked as invoiced, false if uninvoiced |
Is-Closed |
true if the time entry has been approved via Timesheet Approval (no API support), false if un-approved |
Timer-Started-At |
Time (UTC) and date that timer was started (if tracking by duration) |
Hours-With-Timer |
The current amount of time tracked, if timer is running |
Hours-Without-Timer |
The current amount of time tracked, if timer is not running |
Started-At |
Starting timestamp of entry (if tracking time via start and end times) |
Ended-At |
Ending timestamp of entry (if tracking time via start and end times) |
Updated-At |
Time (UTC) and date that entry was last updated |
Created-At |
Time (UTC) and date that entry was created |
Creating an entry
POST https://YOURACCOUNT.harvestapp.com/daily/add
HTTP Response: 201 Created
Note: To start a timer, leave the hours
parameter blank.
Note: Omit the request wrapper when making this call over JSON.
Examples
Note: If your account uses timestamp timers, you may alternatively POST a started_at
and ended_at
time:
Toggling a timer
GET https://YOURACCOUNT.harvestapp.com/daily/timer/{DAY_ENTRY_ID}
HTTP Response: 200 OK
Note: If your account uses timesheet timestamps, timers cannot be restarted. Instead, a new timer will be created with the same project, task, and notes and be returned.
Deleting an entry
DELETE https://YOURACCOUNT.harvestapp.com/daily/delete/{DAY_ENTRY_ID}
HTTP Response: 200 OK
Updating an entry
POST https://YOURACCOUNT.harvestapp.com/daily/update/{DAY_ENTRY_ID}
HTTP Response: 200 OK
Note: If your account uses timesheet timestamps, you may alternatively POST a started_at
and ended_at
times in lieu of hours.
Examples
Working with timesheets for other users
An Administrator can add the of_user= {USER_ID}
parameter to the URL of any time tracking API call in order to work with the timesheet of another user.
https://YOURACCOUNT.harvestapp.com/daily?of_user={USER_ID}
Working with locked timesheets
Administrators may edit and delete locked time entries. The following fields are considered read-only on locked time entries: project_id
, task_id
, spent_at
.