All Assigned Tasks To Project

GET https://YOURACCOUNT.harvestapp.com/projects/{project_id}/task_assignments

You filter by updated_since. To show only the task assignments that have been updated since 2010-09-25 18:30, pass the UTC date time value (URL encoded). Check out the example below.

GET https://YOURACCOUNT.harvestapp.com/projects/#{project_id}/task_assignments?updated_since=2010-09-25+18%3A30

HTTP Response: 200 OK

Example request in Postman

<task-assignments type="array">
    <task-assignment>
        <project-id type="integer">3554414</project-id>
        <task-id type="integer">2086199</task-id>
        <billable type="boolean">true</billable>
        <deactivated type="boolean">true</deactivated>
        <hourly-rate type="decimal">100.0</hourly-rate>
        <budget type="decimal" nil="true"/>
        <id type="integer">37453419</id>
        <created-at type="dateTime">2013-04-30T20:28:12Z</created-at>
        <updated-at type="dateTime">2013-08-01T22:11:11Z</updated-at>
        <estimate nil="true"/>
{
  "task_assignment": {
    "project_id": 3554414,
    "task_id": 2086199,
    "billable": true,
    "deactivated": true,
    "hourly_rate": 100,
    "budget": null,
    "id": 37453419,
    "created_at": "2013-04-30T20:28:12Z",
    "updated_at": "2013-08-01T22:11:11Z",
    "estimate": null
  }
}

Get One Task Assignment

GET https://YOURACCOUNT.harvestapp.com/projects/{PROJECT_ID}/task_assignments/{TASK_ASSIGNMENT_ID}

HTTP Response: 200 OK

Example request in Postman

<task-assignments type="array">
    <task-assignment>
        <project-id type="integer">3554414</project-id>
        <task-id type="integer">2086199</task-id>
        <billable type="boolean">true</billable>
        <deactivated type="boolean">true</deactivated>
        <hourly-rate type="decimal">100.0</hourly-rate>
        <budget type="decimal" nil="true"/>
        <id type="integer">37453419</id>
        <created-at type="dateTime">2013-04-30T20:28:12Z</created-at>
        <updated-at type="dateTime">2013-08-01T22:11:11Z</updated-at>
        <estimate nil="true"/>
{
  "task_assignment": {
    "project_id": 3554414,
    "task_id": 2086199,
    "billable": true,
    "deactivated": true,
    "hourly_rate": 100,
    "budget": null,
    "id": 37453419,
    "created_at": "2013-04-30T20:28:12Z",
    "updated_at": "2013-08-01T22:11:11Z",
    "estimate": null
  }
}

Assign Task To A Project

POST https://YOURACCOUNT.harvestapp.com/projects/{PROJECT_ID}/task_assignments

You’ll need to include the Task ID you’d like to add in the body of your request. See example below.

Once successful, we’ll return:

Location: /projects/{PROJECT_ID}/task_assignments/{NEW_TASK_ASSIGNMENT_ID}

Examples

<task>
  <id type="integer">653425</id>
</task>
{
  "task": {
    "id": 653425
  }
}

Create A New Task And Assign It To A Project

To create a new task, and assign it to a project use:

POST https://YOURACCOUNT.harvestapp.com/projects/{PROJECT_ID}/task_assignments/add_with_create_new_task

You’ll need to include the task name in your request. See examples below.

Once successful, we’ll return:

Location: /projects/{PROJECT_ID}/task_assignments/{NEW_TASK_ASSIGNMENT_ID}

Examples

<task>
  <name>A New Task</name>
</task>
{
  "task": {
    "name": "A New Task"
  }
}

Removing A Task From A Project

DELETE https://YOURACCOUNT.harvestapp.com/projects/{PROJECT_ID}/task_assignments/{TASK_ASSIGNMENT_ID}

Harvest will not remove the task if it has recorded hours against the project. Instead we will archive the assignment. Harvest will reply with a custom hint header if archiving occurred.

Updating A Task Assignment For A Project

PUT https://YOURACCOUNT.harvestapp.com/projects/{PROJECT_ID}/task_assignments/{TASK_ASSIGNMENT_ID}

<task-assignment>
  <billable type="boolean">true</billable>
  <deactivated type="boolean">false</deactivated>
  <budget type="decimal">3234</budget>
  <hourly-rate type="decimal">100</hourly-rate>
</task-assignment>
{
    "task_assignment": {
        "billable": false,
        "budget": true,
        "hourly_rate": 100,
        "deactivated": true
    }
}