Admin or project manager permissions required.

The user assignment object

Attribute Type Description
id integer Unique ID for the user assignment.
user object An object containing the id and name of the associated user.
is_active boolean Whether the user assignment is active or archived.
is_project_manager boolean Determines if the user has project manager permissions for the project.
hourly_rate decimal Rate used when the project’s bill_by is People.
budget decimal Budget used when the project’s budget_by is person.
created_at datetime Date and time the user assignment was created.
updated_at datetime Date and time the user assignment was last updated.

List all user assignments

Returns a list of your user assignments for the project identified by PROJECT_ID. The user assignments are returned sorted by creation date, with the most recently created user assignments appearing first.

The response contains an object with a user_assignments property that contains an array of up to per_page user assignments. Each entry in the array is a separate user assignment object. If no more user assignments are available, the resulting array will be empty. Several additional pagination properties are included in the response to simplify paginating your user assignments.

GET /v2/projects/{PROJECT_ID}/user_assignments
Parameter Type Description
updated_since datetime Only return user assignments that have been updated since the given date and time.
page integer The page number to use in pagination. For instance, if you make a list request and receive 100 records, your subsequent call can include page=2 to retreive the next page of the list. (Default: 1)
per_page integer The number of records to return per page. Can range between 1 and 100. (Default: 100)

Example Request:

curl "https://api.harvestapp.com/v2/projects/14308069/user_assignments" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Harvest-Account-Id: $ACCOUNT_ID" \
  -H "User-Agent: MyApp (yourname@example.com)"

Example Response:

{
  "user_assignments":[
    {
      "id":125068554,
      "is_project_manager":true,
      "is_active":true,
      "budget":null,
      "created_at":"2017-06-26T22:32:52Z",
      "updated_at":"2017-06-26T22:32:52Z",
      "hourly_rate":100.0,
      "user":{
        "id":1782959,
        "name":"Kim Allen"
      }
    },
    {
      "id":125066109,
      "is_project_manager":true,
      "is_active":true,
      "budget":null,
      "created_at":"2017-06-26T21:52:18Z",
      "updated_at":"2017-06-26T21:52:18Z",
      "hourly_rate":100.0,
      "user":{
        "id":1782884,
        "name":"Bob Powell"
      }
    }
  ],
  "per_page":100,
  "total_pages":1,
  "total_entries":2,
  "next_page":null,
  "previous_page":null,
  "page":1,
  "links":{
    "first":"https://api.harvestapp.com/v2/projects/14308069/user_assignments?page=1&per_page=100",
    "next":null,
    "previous":null,
    "last":"https://api.harvestapp.com/v2/projects/14308069/user_assignments?page=1&per_page=100"
  }
}

Retreive a user assignment

Retrieves the user assignment with the given ID. Returns a user assignment object and a 200 OK response code if a valid identifier was provided.

GET /v2/projects/{PROJECT_ID}/user_assignments/{USER_ASSIGNMENT_ID}

Example Request:

curl "https://api.harvestapp.com/v2/projects/14308069/user_assignments/125068554" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Harvest-Account-Id: $ACCOUNT_ID" \
  -H "User-Agent: MyApp (yourname@example.com)"

Example Response:

{
  "id":125068554,
  "is_project_manager":true,
  "is_active":true,
  "budget":null,
  "created_at":"2017-06-26T22:32:52Z",
  "updated_at":"2017-06-26T22:32:52Z",
  "hourly_rate":100.0,
  "user":{
    "id":1782959,
    "name":"Kim Allen"
  }
}

Create a user assignment

Creates a new user assignment object. Returns a user assignment object and a 201 Created response code if the call succeeded.

POST /v2/projects/{PROJECT_ID}/user_assignments
Parameter Type Required Description
user_id integer required The ID of the user to associate with the project.
is_active boolean optional Whether the user assignment is active or archived. Defaults to true.
is_project_manager boolean optional Determines if the user has project manager permissions for the project. Defaults to false.
hourly_rate decimal optional Rate used when the project’s bill_by is People. Defaults to 0.
budget decimal optional Budget used when the project’s budget_by is person.

Example Request:

curl "https://api.harvestapp.com/v2/projects/14308069/user_assignments" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Harvest-Account-Id: $ACCOUNT_ID" \
  -H "User-Agent: MyApp (yourname@example.com)" \
  -X POST \
  -d user_id=1782974 \
  -d hourly_rate=75.50

Example Response:

{
  "id":125068758,
  "is_project_manager":false,
  "is_active":true,
  "budget":null,
  "created_at":"2017-06-26T22:36:01Z",
  "updated_at":"2017-06-26T22:36:01Z",
  "hourly_rate":75.5,
  "user":{
    "id":1782974,
    "name":"Jim Allen"
  }
}

Update a user assignment

Updates the specific user assignment by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Returns a user assignment object and a 200 OK response code if the call succeeded.

PATCH /v2/projects/{PROJECT_ID}/user_assignments/{USER_ASSIGNMENT_ID}
Parameter Type Description
is_active boolean Whether the user assignment is active or archived.
is_project_manager boolean Determines if the user has project manager permissions for the project.
hourly_rate decimal Rate used when the project’s bill_by is People.
budget decimal Budget used when the project’s budget_by is person.

Example Request:

curl "https://api.harvestapp.com/v2/projects/14308069/user_assignments/125068758" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Harvest-Account-Id: $ACCOUNT_ID" \
  -H "User-Agent: MyApp (yourname@example.com)" \
  -X PATCH \
  -d budget=120

Example Response:

{
  "id":125068758,
  "is_project_manager":false,
  "is_active":true,
  "budget":120.0,
  "created_at":"2017-06-26T22:36:01Z",
  "updated_at":"2017-06-26T22:36:35Z",
  "hourly_rate":75.5,
  "user":{
    "id":1782974,
    "name":"Jim Allen"
  }
}

Delete a user assignment

Delete a user assignment. Deleting a user assignment is only possible if it has no time entries or expenses associated with it. Returns a 200 OK response code if the call succeeded.

DELETE /v2/projects/{PROJECT_ID}/user_assignments/{USER_ASSIGNMENT_ID}

Example Request:

curl "https://api.harvestapp.com/v2/projects/14308069/user_assignments/125068758" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Harvest-Account-Id: $ACCOUNT_ID" \
  -H "User-Agent: MyApp (yourname@example.com)" \
  -X DELETE