Task Assignments

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": 3234,
        "hourly_rate": 100,
        "deactivated": true
    }
}

Still have questions? We’re happy to help!

Contact Us