API Documentation

Time Tracking

Extended REST API
Clients
Projects
Tasks
People
Expenses
Expense Tracking
User Assignment
Task Assignment
Reports
Invoices
Invoice Messages
Invoice Payments
Invoice Categories


Questions?
Email support@getharvest.com

Tasks

Show one task

GET /tasks/#{task_id}

HTTP Response: 200 Success
<task>
  <!-- If true task will be added as billable upon assigning it to a
  project -->
  <billable-by-default>true</billable-by-default>
  <!-- False if hours can be recorded against this task.  True if
  task is archived -->
  <deactivated>false</deactivated>
  <default-hourly-rate>120</default-hourly-rate>
  <id>1</id>
  <!-- If true task is added to new projects by default -->
  <is-default>true</is-default>
  <name>UI Design</name>
</task>

Show all tasks

GET /tasks

HTTP Response: 200 Success
<tasks>
  <task>
    <!-- If true task will be added as billable upon assigning it to
    a project -->
    <billable-by-default>true</billable-by-default>
    <deactivated>false</deactivated>
    <default-hourly-rate>120</default-hourly-rate>
    <id>1</id>
    <!-- If true task is added to new projects by default -->
    <is-default>true</is-default>
    <name>UI Design</name>
  </task>
  <task>
     ...
  </task>
  ...
</tasks>

Create new task

POST /tasks

HTTP Response: 201 Created
Location: /tasks/#{new_task_id} Sample post:
<task>
  <billable-by-default>false</billable-by-default>
  <default-hourly-rate>100</default-hourly-rate>
  <is-default>false</is-default>
  <name>Server Admninistration</name>
</task>

Delete existing task

DELETE /tasks/#{task_id}

HTTP Response: 200 OK is returned if task does not have any hours associated.
HTTP Response: 400 Bad Request is returned if task is not removable.
Update an existing task

PUT /task/#{task_id}

HTTP Response: 200 OK
Location: /tasks/#{task_id} Sample post:
<task>
  <billable-by-default>true</billable-by-default>
  <default-hourly-rate>150</default-hourly-rate>
  <is-default>true</is-default>
  <name>Flash design</name>
</task>