The V1 API has been deprecated, but will continue to function for legacy applications. As of January 1st, 2019, we will only offer technical support for the V2 API.
Add & Update Expenses
Expense parameters
Parameters
Description
Notes
Expense entry notes
Total-Cost
integer value for the expense entry
Project-ID
Valid and existing project ID
Expense-Category-ID
Valid and existing expense category ID
Billable
Options: true, false. Note: Only expenses that are billable can be invoiced.
Spent-At
Date for expense entry
Units
integer value for use with an expense calculated by unit price (Example: Mileage)
Create a new expense
POSThttps://YOURACCOUNT.harvestapp.com/expenses
HTTP Response: 201 Created
Note: Upon successfully creating a new expense, we’ll return a Location header which will contain the newly created expense ID.
Note: The has-receipt field will indicate whether a receipt image has been attached. If it is true, you can use the URL in receipt-url to fetch the image.
When adding or updating an image receipt, there’s no need to post any JSON or XML. Just post the image data as you would any multipart form data. Be sure to set the name of the post data to expense[receipt] and set the filename= parameter:
You may add an of_user={USERID} parameter to the URL of any expense tracking API call to work with the timesheet of another user. The authenticating user must be an Administrator for this to work.
Example request: GEThttps://YOURACCOUNT.harvestapp.com/expenses?of_user=123456
Locked expenses
Administrators may edit and delete locked expenses. The following fields are considered read-only on locked expenses: project_id, expense_category_id, spent_at.