API Documentation
Overview
Time Tracking
Extended REST API
Clients
Client Contacts
Projects
Tasks
People
Expenses
Expense Tracking
User Assignment
Task Assignment
Reports
Invoices
Invoice Messages
Invoice Payments
Invoice Categories
Questions? Contact support
Overview
Time Tracking
Extended REST API
Clients
Client Contacts
Projects
Tasks
People
Expenses
Expense Tracking
User Assignment
Task Assignment
Reports
Invoices
Invoice Messages
Invoice Payments
Invoice Categories
Questions? Contact support
People
Show a user
GET /people/#{user_id}
HTTP Response: 200 Success
<user> <id type="integer">54234</id> <email>Jane@Doe.com</email> <first-name>Jane</first-name> <last-name>Doe</last-name> <!-- If true the user will be added to all new projects automatically --> <has-access-to-all-future-projects type="boolean"> false </has-access-to-all-future-projects> <!-- If present the user will bill out with this value on all future projects she is added to. To change existing rates You'll have to change the UserAssignment object --> <default-hourly-rate type="decimal">100</default-hourly-rate> <!-- If true the user will be able to login and record time entries --> <is-active type="boolean">true</is-active> <is-admin type="boolean">true</is-admin> <is-contractor type="boolean">true</is-contractor> <telephone></telephone> <department></department> <timezone>Eastern Time (US & Canada)</timezone> </user>
Note: You may also pass a user's email address in place of a user_id.
Show all users
GET /people
HTTP Response: 200 Success
<users> <user> <id type="integer">54234</id> <email>Jane@Doe.com</email> <first-name>Jane</first-name> <last-name>Doe</last-name> <!-- If true the user will be added to all new projects automatically --> <has-access-to-all-future-projects type="boolean"> false </has-access-to-all-future-projects> <!-- If present the user will bill out with this value on all future projects she is added to. To change existing rates You'll have to change the UserAssignment object --> <default-hourly-rate type="decimal">100</default-hourly-rate> <!-- If true the user will be able to login and record time entries --> <is-active type="boolean">true</is-active> <is-admin type="boolean">true</is-admin> <is-contractor type="boolean">true</is-contractor> <telephone></telephone> <department></department> <timezone>Eastern Time (US & Canada)</timezone> </user> </users>
Create new user
POST /people
HTTP Response: 201 Created
Location: /people/#{new_user_id}
Sample post:
<user> <first_name>Edgar</first_name> <last_name>Ruth</last_name> <email>edgar@ruth.com</email> <password>mypassword</password> <password_confirmation>mypassword</password_confirmation> <timezone>Central Time (US & Canada)</timezone> <is_admin type="boolean">false</is_admin> <telephone>444-444</telephone> </user>
Note: we accept only a limited set of values for the timezone attribute.
Reset password for user
POST /people/#{user_id}/reset_password
Harvest will generate and mail a new random password. All other API calls will ignore changes to the password attribute.
Update user
PUT /people/#{user_id}
HTTP Response: 200 OKLocation: /people/#{user_id}
You can update selected attributes for a user, note that updates to password are disregarded.
<user> <first_name>John</first_name> <last_name>Doe</last_name> <email>john@doe.com</email> <timezone>Central Time (US & Canada)</timezone> <is_admin type="boolean">true</is_admin> <telephone>212-555-1212</telephone> </user>
Delete existing user
DELETE /people/#{user_id}
HTTP Response: 200 OK is returned if user does not have
any hours logged.
Otherwise the user is not removable and
HTTP Response: 400 Bad
Request is returned. You can still archive the user to disable the user's login.
Toggle an existing user
POST /people/#{user_id}/toggle
This will archive an active user or activate an archived user. Note that activation is not performed if it results in more users allowed than the plan limit. Response isHTTP Response: 400 Bad Request or in case of success HTTP Response: 200 OK