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
Clients
Get all clients
GET /clients
HTTP Response: 200 Success
<clients> <client> <id type="integer">11072</id> <name>SuprCorp</name> <active type="boolean">true</active> <details>123 Main St. Third Floor New York, NY 10011 USA 212-555-1212 212-555-1213 (fax) http://www.company.com</details> </client> <client> ... </client> </clients>
You can also filter by updated_since. To show only the clients that have been updated since "2010-08-03 18:30", pass the UTC date time value (URL encoded).
GET /clients?updated_since=2010-08-03+18%3A30
HTTP Response: 200 Success
Get a client
GET /clients/#{client_id}
HTTP Response: 200 Success
<client> <id type="integer">11072</id> <name>SuprCorp</name> <active type="boolean">true</active> <details>123 Main St. Third Floor New York, NY 10011 USA 212-555-1212 212-555-1213 (fax) http://www.company.com</details> </client>
Create a new client
POST /clients
HTTP Response: 201 Created
Location: /clients/#{new_client_id}
You need to post the following:
<client> <name>Company LLC</name> <details>123 Main St. Third Floor New York, NY 10011 USA 212-555-1212 212-555-1213 (fax) http://www.company.com</details> </client>Note: Only NAME is required.
Update client
PUT /clients/#{client_id}
HTTP Response: 200 OK
Location: /clients/#{client_id}
You may update selected attributes for a client.
<client> <name>Company LLC</name> <details>123 Main St. Third Floor New York, NY 10011 USA 212-555-1212 212-555-1213 (fax) http://www.company.com</details> </client>
(De)Activate an existing client
POST /clients/#{client_id}/toggle
HTTP Response: 200 Success
Location: /clients/#{client_id}
Note that if the client has active projects, Harvest will return
HTTP Response: 400 Bad Request, with a Hint header.
Delete a client
DELETE /clients/#{client_id}
If client does not have associated projects or invoices Harvest deletes it and returnsHTTP Response: 200 OK
otherwise client is not deleted and you'll get a HTTP Response: 400 Bad Request .